diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-01-22 15:14:39 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-01-22 15:14:39 +0000 |
commit | 87487477c67697355c79d2fe079d23a5b31c7ab6 (patch) | |
tree | d4a0754426c7887e9e4a5f8cd8c6a99eb66d0a05 /src/util/server_nc.c | |
parent | 3f3d51ef20ae4ef5017ca92ed1f6e153322f3a95 (diff) | |
download | gnunet-87487477c67697355c79d2fe079d23a5b31c7ab6.tar.gz gnunet-87487477c67697355c79d2fe079d23a5b31c7ab6.zip |
updates to peerinfo to use new nc API
Diffstat (limited to 'src/util/server_nc.c')
-rw-r--r-- | src/util/server_nc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/util/server_nc.c b/src/util/server_nc.c index 9b6eefe1f..05a4913a8 100644 --- a/src/util/server_nc.c +++ b/src/util/server_nc.c | |||
@@ -146,6 +146,11 @@ handle_client_disconnect (void *cls, | |||
146 | struct ClientList *prev; | 146 | struct ClientList *prev; |
147 | struct PendingMessageList *pml; | 147 | struct PendingMessageList *pml; |
148 | 148 | ||
149 | if (client == NULL) | ||
150 | { | ||
151 | nc->server = NULL; | ||
152 | return; | ||
153 | } | ||
149 | prev = NULL; | 154 | prev = NULL; |
150 | pos = nc->clients; | 155 | pos = nc->clients; |
151 | while (NULL != pos) | 156 | while (NULL != pos) |
@@ -219,9 +224,10 @@ GNUNET_SERVER_notification_context_destroy (struct GNUNET_SERVER_NotificationCon | |||
219 | } | 224 | } |
220 | GNUNET_free (pos); | 225 | GNUNET_free (pos); |
221 | } | 226 | } |
222 | GNUNET_SERVER_disconnect_notify_cancel (nc->server, | 227 | if (nc->server != NULL) |
223 | &handle_client_disconnect, | 228 | GNUNET_SERVER_disconnect_notify_cancel (nc->server, |
224 | nc); | 229 | &handle_client_disconnect, |
230 | nc); | ||
225 | GNUNET_free (nc); | 231 | GNUNET_free (nc); |
226 | } | 232 | } |
227 | 233 | ||