aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-25 22:40:58 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-25 22:40:58 +0100
commit54bdbf432f7ea469f83a894df552105d1a2a1a93 (patch)
treeba1e59221a1e16ebe98a21f71532c1d22e476ac8 /src/util
parent1a21dbf376615c353873825815ed0e91d1a42b5f (diff)
downloadgnunet-54bdbf432f7ea469f83a894df552105d1a2a1a93.tar.gz
gnunet-54bdbf432f7ea469f83a894df552105d1a2a1a93.zip
allow connect_cb to be NULL
Diffstat (limited to 'src/util')
-rw-r--r--src/util/service_new.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/util/service_new.c b/src/util/service_new.c
index a893d287b..8d654c0cb 100644
--- a/src/util/service_new.c
+++ b/src/util/service_new.c
@@ -2203,9 +2203,10 @@ start_client (struct GNUNET_SERVICE_Handle *sh,
2203 client); 2203 client);
2204 client->mst = GNUNET_MST_create (&service_client_mst_cb, 2204 client->mst = GNUNET_MST_create (&service_client_mst_cb,
2205 client); 2205 client);
2206 client->user_context = sh->connect_cb (sh->cb_cls, 2206 if (NULL != sh->connect_cb)
2207 client, 2207 client->user_context = sh->connect_cb (sh->cb_cls,
2208 client->mq); 2208 client,
2209 client->mq);
2209 GNUNET_MQ_set_handlers_closure (client->mq, 2210 GNUNET_MQ_set_handlers_closure (client->mq,
2210 client->user_context); 2211 client->user_context);
2211 client->recv_task 2212 client->recv_task
@@ -2525,9 +2526,10 @@ GNUNET_SERVICE_client_drop (struct GNUNET_SERVICE_Client *c)
2525 GNUNET_CONTAINER_DLL_remove (sh->clients_head, 2526 GNUNET_CONTAINER_DLL_remove (sh->clients_head,
2526 sh->clients_tail, 2527 sh->clients_tail,
2527 c); 2528 c);
2528 sh->disconnect_cb (sh->cb_cls, 2529 if (NULL != sh->disconnect_cb)
2529 c, 2530 sh->disconnect_cb (sh->cb_cls,
2530 c->user_context); 2531 c,
2532 c->user_context);
2531 if (NULL != c->warn_task) 2533 if (NULL != c->warn_task)
2532 { 2534 {
2533 GNUNET_SCHEDULER_cancel (c->warn_task); 2535 GNUNET_SCHEDULER_cancel (c->warn_task);