Revision 9d6a53c3 loop-mt.c

View differences:

loop-mt.c
49 49
  static uint8_t buff[BUFFSIZE];
50 50

  
51 51
    len = recv_from_peer(s, &remote, buff, BUFFSIZE);
52
    if (len < 0) {
53
      fprintf(stderr,"Error receiving message. Maybe larger than %d bytes\n", BUFFSIZE);
54
      nodeid_free(remote);
55
      continue;
56
    }
52 57
    switch (buff[0] /* Message Type */) {
53 58
      case MSG_TYPE_TOPOLOGY:
54 59
        pthread_mutex_lock(&topology_mutex);
......
75 80
  static uint8_t buff[BUFFSIZE];
76 81

  
77 82
    len = recv_from_peer(s, &remote, buff, BUFFSIZE);
83
    if (len < 0) {
84
      fprintf(stderr,"Error receiving message. Maybe larger than %d bytes\n", BUFFSIZE);
85
      nodeid_free(remote);
86
      continue;
87
    }
78 88
    dprintf("Received message (%c) from %s\n", buff[0], node_addr(remote));
79 89
    switch (buff[0] /* Message Type */) {
80 90
      case MSG_TYPE_TOPOLOGY:

Also available in: Unified diff