aboutsummaryrefslogtreecommitdiff
path: root/src/util/server.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-28 18:44:18 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-28 18:44:18 +0000
commit7e5583d5334f7241686dad86a2110d7d6a7ecfc2 (patch)
tree10dc7df948163edd6449dbeef28aa9204fc22d8a /src/util/server.c
parent6778df25761e1dd63cea97c27ae713079e061f1d (diff)
downloadgnunet-7e5583d5334f7241686dad86a2110d7d6a7ecfc2.tar.gz
gnunet-7e5583d5334f7241686dad86a2110d7d6a7ecfc2.zip
notify monitor about existing connections
Diffstat (limited to 'src/util/server.c')
-rw-r--r--src/util/server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/server.c b/src/util/server.c
index 920d4ab33..9233f3240 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -1416,6 +1416,7 @@ GNUNET_SERVER_connect_notify (struct GNUNET_SERVER_Handle *server,
1416 void *callback_cls) 1416 void *callback_cls)
1417{ 1417{
1418 struct NotifyList *n; 1418 struct NotifyList *n;
1419 struct GNUNET_SERVER_Client *client;
1419 1420
1420 n = GNUNET_new (struct NotifyList); 1421 n = GNUNET_new (struct NotifyList);
1421 n->callback = callback; 1422 n->callback = callback;
@@ -1423,6 +1424,8 @@ GNUNET_SERVER_connect_notify (struct GNUNET_SERVER_Handle *server,
1423 GNUNET_CONTAINER_DLL_insert (server->connect_notify_list_head, 1424 GNUNET_CONTAINER_DLL_insert (server->connect_notify_list_head,
1424 server->connect_notify_list_tail, 1425 server->connect_notify_list_tail,
1425 n); 1426 n);
1427 for (client = server->clients_head; NULL != client; client = client->next)
1428 callback (callback_cls, client);
1426} 1429}
1427 1430
1428 1431
@@ -1435,8 +1438,8 @@ GNUNET_SERVER_connect_notify (struct GNUNET_SERVER_Handle *server,
1435 */ 1438 */
1436void 1439void
1437GNUNET_SERVER_disconnect_notify_cancel (struct GNUNET_SERVER_Handle *server, 1440GNUNET_SERVER_disconnect_notify_cancel (struct GNUNET_SERVER_Handle *server,
1438 GNUNET_SERVER_DisconnectCallback 1441 GNUNET_SERVER_DisconnectCallback callback,
1439 callback, void *callback_cls) 1442 void *callback_cls)
1440{ 1443{
1441 struct NotifyList *pos; 1444 struct NotifyList *pos;
1442 1445