gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r14682 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r14682 - gnunet/src/core
Date: Mon, 21 Mar 2011 11:59:52 +0100

Author: grothoff
Date: 2011-03-21 11:59:52 +0100 (Mon, 21 Mar 2011)
New Revision: 14682

Modified:
   gnunet/src/core/gnunet-service-core.c
Log:
cleanup

Modified: gnunet/src/core/gnunet-service-core.c
===================================================================
--- gnunet/src/core/gnunet-service-core.c       2011-03-21 10:55:42 UTC (rev 
14681)
+++ gnunet/src/core/gnunet-service-core.c       2011-03-21 10:59:52 UTC (rev 
14682)
@@ -1433,6 +1433,11 @@
 
 /**
  * Helper function for handle_client_iterate_peers.
+ *
+ * @param cls the 'struct GNUNET_SERVER_TransmitContext' to queue replies
+ * @param key identity of the connected peer
+ * @param value the 'struct Neighbour' for the peer
+ * @return GNUNET_OK (continue to iterate)
  */
 static int
 queue_connect_message (void *cls,
@@ -1516,7 +1521,7 @@
 }
 
 /**
- * Handle CORE_ITERATE_PEERS request.
+ * Handle CORE_ITERATE_PEERS request.  Notify client about existing neighbours.
  *
  * @param cls unused
  * @param client client sending the iteration request
@@ -1531,15 +1536,13 @@
   struct GNUNET_MessageHeader done_msg;
   struct GNUNET_SERVER_TransmitContext *tc;
   struct GNUNET_PeerIdentity *peer;
-  int msize;
-  /* notify new client about existing neighbours */
 
-  msize = ntohs(message->size);
   tc = GNUNET_SERVER_transmit_context_create (client);
-
-  peer = (struct GNUNET_PeerIdentity *)&message[1];
-  GNUNET_CONTAINER_multihashmap_get_multiple(neighbours, &peer->hashPubKey, 
&queue_connect_message, tc);
-
+  peer = (struct GNUNET_PeerIdentity *) &message[1];
+  GNUNET_CONTAINER_multihashmap_get_multiple(neighbours,
+                                            &peer->hashPubKey, 
+                                            &queue_connect_message, 
+                                            tc);
   done_msg.size = htons (sizeof (struct GNUNET_MessageHeader));
   done_msg.type = htons (GNUNET_MESSAGE_TYPE_CORE_ITERATE_PEERS_END);
   GNUNET_SERVER_transmit_context_append_message (tc, &done_msg);
@@ -1550,6 +1553,10 @@
 
 /**
  * Handle REQUEST_INFO request.
+ *
+ * @param cls unused
+ * @param client client sending the request
+ * @param message iteration request message
  */
 static void
 handle_client_request_info (void *cls,




reply via email to

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