gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r29150 - gnunet/src/namestore


From: gnunet
Subject: [GNUnet-SVN] r29150 - gnunet/src/namestore
Date: Tue, 10 Sep 2013 12:50:04 +0200

Author: grothoff
Date: 2013-09-10 12:50:04 +0200 (Tue, 10 Sep 2013)
New Revision: 29150

Modified:
   gnunet/src/namestore/gnunet-namestore.c
   gnunet/src/namestore/namestore_api.c
Log:
-fix crash in gnunet-namestore -a if no other records already existed

Modified: gnunet/src/namestore/gnunet-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-namestore.c     2013-09-10 10:37:17 UTC (rev 
29149)
+++ gnunet/src/namestore/gnunet-namestore.c     2013-09-10 10:50:04 UTC (rev 
29150)
@@ -239,9 +239,9 @@
  * operation.
  *
  * @param cls closure, location of the QueueEntry pointer to NULL out
- * @param success GNUNET_SYSERR on failure (including timeout/queue 
drop/failure to validate)
- *                GNUNET_NO if content was already there
- *                GNUNET_YES (or other positive value) on success
+ * @param success #GNUNET_SYSERR on failure (including timeout/queue 
drop/failure to validate)
+ *                #GNUNET_NO if content was already there
+ *                #GNUNET_YES (or other positive value) on success
  * @param emsg NULL on success, otherwise an error message
  */
 static void
@@ -273,9 +273,9 @@
  * operation.
  *
  * @param cls closure, unused
- * @param success GNUNET_SYSERR on failure (including timeout/queue 
drop/failure to validate)
- *                GNUNET_NO if content was already there
- *                GNUNET_YES (or other positive value) on success
+ * @param success #GNUNET_SYSERR on failure (including timeout/queue 
drop/failure to validate)
+ *                #GNUNET_NO if content was already there
+ *                #GNUNET_YES (or other positive value) on success
  * @param emsg NULL on success, otherwise an error message
  */
 static void
@@ -301,7 +301,7 @@
  * @param cls closure
  * @param zone_key private key of the zone
  * @param name name that is being mapped (at most 255 characters long)
- * @param rd_len number of entries in 'rd' array
+ * @param rd_len number of entries in @a rd array
  * @param rd array of records with data to store
  */
 static void
@@ -320,7 +320,7 @@
     list_it = NULL;
     if ( (NULL == del_qe) &&
         (NULL == add_qe_uri) &&
-        (NULL == add_qe) )
+        (NULL == add_qe) )    
       GNUNET_SCHEDULER_shutdown ();
     return;
   }
@@ -369,7 +369,7 @@
  * @param cls closure, unused
  * @param zone_key private key of the zone
  * @param rec_name name that is being mapped (at most 255 characters long)
- * @param rd_count number of entries in 'rd' array
+ * @param rd_count number of entries in @a rd array
  * @param rd array of records with data to store
  */
 static void
@@ -409,7 +409,10 @@
                                           rde,
                                           &add_continuation,
                                           &add_qe);
-  GNUNET_NAMESTORE_zone_iteration_stop (add_zit);
+  /* only cancel if we were not told that this
+     was the end of the iteration already */
+  if (NULL != rec_name)
+    GNUNET_NAMESTORE_zone_iteration_stop (add_zit);
   add_zit = NULL;
 }
 
@@ -420,7 +423,7 @@
  * operation.
  *
  * @param cls closure with our configuration
- * @param result GNUNET_YES if the namestore service is running
+ * @param result #GNUNET_YES if the namestore service is running
  */
 static void
 testservice_task (void *cls,

Modified: gnunet/src/namestore/namestore_api.c
===================================================================
--- gnunet/src/namestore/namestore_api.c        2013-09-10 10:37:17 UTC (rev 
29149)
+++ gnunet/src/namestore/namestore_api.c        2013-09-10 10:50:04 UTC (rev 
29150)
@@ -416,13 +416,13 @@
 
 
 /**
- * Handle an incoming message of type 
'GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE'
+ * Handle an incoming message of type 
#GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE.
  *
  * @param qe the respective entry in the message queue
  * @param msg the message we received
  * @param size the message size
- * @return GNUNET_OK on success, GNUNET_NO if we notified the client about
- *         the error, GNUNET_SYSERR on error and we did NOT notify the client
+ * @return #GNUNET_OK on success, #GNUNET_NO if we notified the client about
+ *         the error, #GNUNET_SYSERR on error and we did NOT notify the client
  */
 static int
 handle_zone_to_name_response (struct GNUNET_NAMESTORE_QueueEntry *qe,
@@ -493,10 +493,10 @@
  *
  * @param qe the respective zone iteration handle
  * @param msg the message we received
- * @param type the message type in HBO
+ * @param type the message type in host byte order
  * @param size the message size
- * @return GNUNET_OK on success, GNUNET_NO if we notified the client about
- *         the error, GNUNET_SYSERR on error and we did NOT notify the client
+ * @return #GNUNET_OK on success, #GNUNET_NO if we notified the client about
+ *         the error, #GNUNET_SYSERR on error and we did NOT notify the client
  */
 static int
 manage_record_operations (struct GNUNET_NAMESTORE_QueueEntry *qe,
@@ -555,8 +555,8 @@
  * @param ze the respective iterator for this operation
  * @param msg the message containing the respoonse
  * @param size the message size
- * @return GNUNET_YES on success, 'ze' should be kept, GNUNET_NO on success if 
'ze' should
- *         not be kept any longer, GNUNET_SYSERR on error (disconnect) and 
'ze' should be kept
+ * @return #GNUNET_YES on success, @a ze should be kept, #GNUNET_NO on success 
if @a ze should
+ *         not be kept any longer, #GNUNET_SYSERR on error (disconnect) and @a 
ze should be kept
  */
 static int
 handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze,
@@ -587,7 +587,8 @@
   }
   if ((0 == name_len) && (0 == (memcmp (&msg->private_key, &priv_dummy, sizeof 
(priv_dummy)))))
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Zone iteration is completed!\n");
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+        "Zone iteration is completed!\n");
     if (NULL != ze->proc)
       ze->proc (ze->proc_cls, NULL, NULL, 0, NULL);
     return GNUNET_NO;
@@ -621,8 +622,8 @@
  * @param msg the message we received
  * @param type the message type in HBO
  * @param size the message size
- * @return GNUNET_YES on success, 'ze' should be kept, GNUNET_NO on success if 
'ze' should
- *         not be kept any longer, GNUNET_SYSERR on error (disconnect) and 
'ze' should be kept
+ * @return #GNUNET_YES on success, @a ze should be kept, #GNUNET_NO on success 
if @a ze should
+ *         not be kept any longer, #GNUNET_SYSERR on error (disconnect) and @a 
ze should be kept
  */
 static int
 manage_zone_operations (struct GNUNET_NAMESTORE_ZoneIterator *ze,
@@ -650,7 +651,7 @@
  * Type of a function to call when we receive a message
  * from the service.
  *
- * @param cls the 'struct GNUNET_NAMESTORE_SchedulingHandle'
+ * @param cls the `struct GNUNET_NAMESTORE_SchedulingHandle`
  * @param msg message received, NULL on timeout or fatal error
  */
 static void
@@ -710,8 +711,7 @@
       GNUNET_free (qe);
     }
   }
-
-  /* Is it a zone iteration operation ? */
+  /* Is it a zone iteration operation? */
   for (ze = h->z_head; ze != NULL; ze = ze->next)
     if (ze->op_id == r_id)
       break;




reply via email to

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