Revision fbeb4f32 loop-mt.c

View differences:

loop-mt.c
48 48
    switch (buff[0] /* Message Type */) {
49 49
      case MSG_TYPE_TOPOLOGY:
50 50
        pthread_mutex_lock(&topology_mutex);
51
        update_peers(pset, buff, len);
51
        update_peers(pset, remote, buff, len);
52 52
        pthread_mutex_unlock(&topology_mutex);
53 53
        break;
54 54
      case MSG_TYPE_CHUNK:
......
74 74
    switch (buff[0] /* Message Type */) {
75 75
      case MSG_TYPE_TOPOLOGY:
76 76
        pthread_mutex_lock(&topology_mutex);
77
        update_peers(pset, buff, len);
77
        update_peers(pset, remote, buff, len);
78 78
        pthread_mutex_unlock(&topology_mutex);
79 79
        break;
80 80
      case MSG_TYPE_CHUNK:
......
101 101
  int gossiping_period = period * 10;
102 102

  
103 103
  pthread_mutex_lock(&topology_mutex);
104
  update_peers(pset, NULL, 0);
104
  update_peers(pset, NULL, NULL, 0);
105 105
  pthread_mutex_unlock(&topology_mutex);
106 106
  while(!done) {
107 107
    pthread_mutex_lock(&topology_mutex);
108
    update_peers(pset, NULL, 0);
108
    update_peers(pset, NULL, NULL, 0);
109 109
    pthread_mutex_unlock(&topology_mutex);
110 110
    usleep(gossiping_period);
111 111
  }

Also available in: Unified diff