gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27426 - gnunet/src/set


From: gnunet
Subject: [GNUnet-SVN] r27426 - gnunet/src/set
Date: Wed, 12 Jun 2013 13:32:38 +0200

Author: grothoff
Date: 2013-06-12 13:32:38 +0200 (Wed, 12 Jun 2013)
New Revision: 27426

Modified:
   gnunet/src/set/gnunet-service-set.c
Log:
-keep and drop are not needed here as we watch for disconnects, also implicitly 
fixes missing drop

Modified: gnunet/src/set/gnunet-service-set.c
===================================================================
--- gnunet/src/set/gnunet-service-set.c 2013-06-12 11:30:21 UTC (rev 27425)
+++ gnunet/src/set/gnunet-service-set.c 2013-06-12 11:32:38 UTC (rev 27426)
@@ -23,8 +23,6 @@
  * @brief two-peer set operations
  * @author Florian Dold
  */
-
-
 #include "gnunet-service-set.h"
 #include "set_protocol.h"
 
@@ -146,12 +144,6 @@
     GNUNET_MQ_destroy (listener->client_mq);
     listener->client_mq = NULL;
   }
-  if (NULL != listener->client)
-  {
-    GNUNET_SERVER_client_drop (listener->client);
-    listener->client = NULL;
-  }
-  
   GNUNET_CONTAINER_DLL_remove (listeners_head, listeners_tail, listener);
   GNUNET_free (listener);
 }
@@ -189,7 +181,7 @@
  * @param cls closure, unused
  * @param client the client to clean up after
  */
-void
+static void
 handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
 {
   struct Set *set;
@@ -226,6 +218,7 @@
   GNUNET_free (incoming);
 }
 
+
 static struct Listener *
 get_listener_by_target (enum GNUNET_SET_OperationType op,
                         const struct GNUNET_HashCode *app_id)
@@ -332,7 +325,6 @@
   GNUNET_assert (NULL != set);
 
   set->client = client;
-  GNUNET_SERVER_client_keep (client);
   set->client_mq = GNUNET_MQ_queue_for_server_client (client);
   GNUNET_CONTAINER_DLL_insert (sets_head, sets_tail, set);
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
@@ -362,7 +354,6 @@
   }
   listener = GNUNET_new (struct Listener);
   listener->client = client;
-  GNUNET_SERVER_client_keep (client);
   listener->client_mq = GNUNET_MQ_queue_for_server_client (client);
   listener->app_id = msg->app_id;
   listener->operation = ntohs (msg->operation);
@@ -698,7 +689,7 @@
 
   configuration = cfg;
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, 
NULL);
-  GNUNET_SERVER_disconnect_notify (server, handle_client_disconnect, NULL);
+  GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL);
   GNUNET_SERVER_add_handlers (server, server_handlers);
   stream_listen_socket = GNUNET_STREAM_listen (cfg, 
GNUNET_APPLICATION_TYPE_SET,
                                                &stream_listen_cb, NULL,




reply via email to

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