gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: allow connect_cb to be NULL


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: allow connect_cb to be NULL
Date: Wed, 25 Jan 2017 22:41:00 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 54bdbf432 allow connect_cb to be NULL
54bdbf432 is described below

commit 54bdbf432f7ea469f83a894df552105d1a2a1a93
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Jan 25 22:40:58 2017 +0100

    allow connect_cb to be NULL
---
 src/util/service_new.c | 14 ++++++++------
 1 file 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,
                                               client);
   client->mst = GNUNET_MST_create (&service_client_mst_cb,
                                   client);
-  client->user_context = sh->connect_cb (sh->cb_cls,
-                                         client,
-                                         client->mq);
+  if (NULL != sh->connect_cb)
+    client->user_context = sh->connect_cb (sh->cb_cls,
+                                           client,
+                                           client->mq);
   GNUNET_MQ_set_handlers_closure (client->mq,
                                   client->user_context);
   client->recv_task
@@ -2525,9 +2526,10 @@ GNUNET_SERVICE_client_drop (struct GNUNET_SERVICE_Client 
*c)
   GNUNET_CONTAINER_DLL_remove (sh->clients_head,
                                sh->clients_tail,
                                c);
-  sh->disconnect_cb (sh->cb_cls,
-                     c,
-                     c->user_context);
+  if (NULL != sh->disconnect_cb)
+    sh->disconnect_cb (sh->cb_cls,
+                       c,
+                       c->user_context);
   if (NULL != c->warn_task)
   {
     GNUNET_SCHEDULER_cancel (c->warn_task);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]