Changeset 857729e


Ignore:
Timestamp:
11/09/18 10:50:59 (2 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
develop, master
Children:
4819d75
Parents:
bc86030
Message:

format_ndag: fixed uninitialised "ssock->srcaddr" bug

This bug was causing a segfault on start-up when using 'ndag:'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_ndag.c

    rcf7cca1 r857729e  
    752752        }
    753753
     754        ssock->sock = join_multicast_group(src.groupaddr, src.localiface,
     755                        NULL, src.port, &(ssock->srcaddr));
     756
     757        if (ssock->sock < 0) {
     758                return -1;
     759        }
     760
     761        if (ssock->sock > rt->maxfd) {
     762                rt->maxfd = ssock->sock;
     763        }
     764
    754765#if HAVE_DECL_RECVMMSG
    755766        for (i = 0; i < RECV_BATCH_SIZE; i++) {
     
    772783        ssock->recordcount = 0;
    773784        rt->sourcecount += 1;
    774 
    775         ssock->sock = join_multicast_group(src.groupaddr, src.localiface,
    776                         NULL, src.port, &(ssock->srcaddr));
    777 
    778         if (ssock->sock < 0) {
    779                 return -1;
    780         }
    781 
    782         if (ssock->sock > rt->maxfd) {
    783                 rt->maxfd = ssock->sock;
    784         }
    785785
    786786        fprintf(stderr, "Added new stream %s:%u to thread %d\n",
Note: See TracChangeset for help on using the changeset viewer.