[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15335 - gnunet/src/datastore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15335 - gnunet/src/datastore |
Date: |
Fri, 27 May 2011 15:31:12 +0200 |
Author: grothoff
Date: 2011-05-27 15:31:12 +0200 (Fri, 27 May 2011)
New Revision: 15335
Modified:
gnunet/src/datastore/datastore_api.c
Log:
docu, check NULL
Modified: gnunet/src/datastore/datastore_api.c
===================================================================
--- gnunet/src/datastore/datastore_api.c 2011-05-27 13:30:52 UTC (rev
15334)
+++ gnunet/src/datastore/datastore_api.c 2011-05-27 13:31:12 UTC (rev
15335)
@@ -692,6 +692,13 @@
}
+/**
+ * Free a queue entry. Removes the given entry from the
+ * queue and releases associated resources. Does NOT
+ * call the callback.
+ *
+ * @param qe entry to free.
+ */
static void
free_queue_entry (struct GNUNET_DATASTORE_QueueEntry *qe)
{
@@ -710,6 +717,7 @@
GNUNET_free (qe);
}
+
/**
* Type of a function to call when we receive a message
* from the service.
@@ -1281,15 +1289,16 @@
#endif
free_queue_entry (qe);
h->retry_time.rel_value = 0;
- rc.proc (rc.proc_cls,
- &dm->key,
- ntohl(dm->size),
- &dm[1],
- ntohl(dm->type),
- ntohl(dm->priority),
- ntohl(dm->anonymity),
- GNUNET_TIME_absolute_ntoh(dm->expiration),
- GNUNET_ntohll(dm->uid));
+ if (rc.proc != NULL)
+ rc.proc (rc.proc_cls,
+ &dm->key,
+ ntohl(dm->size),
+ &dm[1],
+ ntohl(dm->type),
+ ntohl(dm->priority),
+ ntohl(dm->anonymity),
+ GNUNET_TIME_absolute_ntoh(dm->expiration),
+ GNUNET_ntohll(dm->uid));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15335 - gnunet/src/datastore,
gnunet <=