gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27420 - gnunet/src/gns


From: gnunet
Subject: [GNUnet-SVN] r27420 - gnunet/src/gns
Date: Wed, 12 Jun 2013 12:18:37 +0200

Author: grothoff
Date: 2013-06-12 12:18:36 +0200 (Wed, 12 Jun 2013)
New Revision: 27420

Modified:
   gnunet/src/gns/gnunet-gns-helper-service-w32.c
Log:
-remove unnecessary client pointer from struct and avoid the keep/drop calls 
that are not needed

Modified: gnunet/src/gns/gnunet-gns-helper-service-w32.c
===================================================================
--- gnunet/src/gns/gnunet-gns-helper-service-w32.c      2013-06-12 03:25:32 UTC 
(rev 27419)
+++ gnunet/src/gns/gnunet-gns-helper-service-w32.c      2013-06-12 10:18:36 UTC 
(rev 27420)
@@ -109,11 +109,6 @@
    */
   struct GNUNET_SERVER_TransmitHandle *th;
 
-  /**
-   * Client that we are transmitting to.
-   */
-  struct GNUNET_SERVER_Client *client;
-
 };
 
 
@@ -133,6 +128,7 @@
  */
 static int cleaning_done;
 
+
 /**
  * Function called to notify a client about the socket
  * begin ready to queue more data.  "buf" will be
@@ -157,14 +153,12 @@
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 _("Transmission to client failed!\n"));
-    GNUNET_SERVER_client_drop (tcc->client);
     GNUNET_free (tcc->msg);
     GNUNET_free (tcc);
     return 0;
   }
   GNUNET_assert (size >= msize);
   memcpy (buf, tcc->msg, msize);
-  GNUNET_SERVER_client_drop (tcc->client);
   GNUNET_free (tcc->msg);
   GNUNET_free (tcc);
   return msize;
@@ -187,13 +181,11 @@
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 _("Shutdown in progress, aborting transmission.\n"));
-    GNUNET_SERVER_client_drop (client);
     GNUNET_free (msg);
     return;
   }
   tcc = GNUNET_malloc (sizeof (struct TransmitCallbackContext));
   tcc->msg = msg;
-  tcc->client = client;
   if (NULL ==
       (tcc->th =
        GNUNET_SERVER_notify_transmit_ready (client, 
@@ -202,19 +194,19 @@
                                             &transmit_callback, tcc)))
   {
     GNUNET_break (0);
-    GNUNET_SERVER_client_drop (client);
     GNUNET_free (msg);
     GNUNET_free (tcc);
     return;
   }
-  GNUNET_SERVER_client_keep (client);
   GNUNET_CONTAINER_DLL_insert (tcc_head, tcc_tail, tcc);
 }
 
+
 #define MarshallPtr(ptr, base, type) \
   if (ptr) \
     ptr = (type *) ((char *) ptr - (char *) base)
 
+
 void
 MarshallWSAQUERYSETW (WSAQUERYSETW *qs, GUID *sc)
 {
@@ -508,6 +500,7 @@
   transmit (rq->client, &msg->header);
 }
 
+
 static void
 get_ip_from_hostname (struct GNUNET_SERVER_Client *client,
     const wchar_t *name, int af, GUID sc)
@@ -581,7 +574,6 @@
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Lookup launched, waiting for a reply\n");
-    GNUNET_SERVER_client_keep (client);
     GNUNET_SERVER_receive_done (client, GNUNET_OK);
   }
   else
@@ -598,6 +590,7 @@
   }
 }
 
+
 /**
  * Handle GET-message.
  *
@@ -649,7 +642,6 @@
     return;
   }
   get_ip_from_hostname (client, hostname, af, sc);
-  return;
 }
 
 
@@ -746,4 +738,4 @@
   return ret;
 }
 
-/* end of gnunet-gns.c */
+/* end of gnunet-gns-helper-service-w32.c */




reply via email to

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