aboutsummaryrefslogtreecommitdiff
path: root/src/datastore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-05-27 13:31:12 +0000
committerChristian Grothoff <christian@grothoff.org>2011-05-27 13:31:12 +0000
commitf7a801c7347c9dae30658c1b7b0eda0a62e2fd47 (patch)
treee251f53682ce821404ddd3d3a812509abad4b25d /src/datastore
parent8ccab66a1e386747158f1d65d5a6bde45db9b56f (diff)
downloadgnunet-f7a801c7347c9dae30658c1b7b0eda0a62e2fd47.tar.gz
gnunet-f7a801c7347c9dae30658c1b7b0eda0a62e2fd47.zip
docu, check NULL
Diffstat (limited to 'src/datastore')
-rw-r--r--src/datastore/datastore_api.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 76d9e5f3c..d861157d9 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -692,6 +692,13 @@ drop_status_cont (void *cls, int32_t result, const char *emsg)
692} 692}
693 693
694 694
695/**
696 * Free a queue entry. Removes the given entry from the
697 * queue and releases associated resources. Does NOT
698 * call the callback.
699 *
700 * @param qe entry to free.
701 */
695static void 702static void
696free_queue_entry (struct GNUNET_DATASTORE_QueueEntry *qe) 703free_queue_entry (struct GNUNET_DATASTORE_QueueEntry *qe)
697{ 704{
@@ -710,6 +717,7 @@ free_queue_entry (struct GNUNET_DATASTORE_QueueEntry *qe)
710 GNUNET_free (qe); 717 GNUNET_free (qe);
711} 718}
712 719
720
713/** 721/**
714 * Type of a function to call when we receive a message 722 * Type of a function to call when we receive a message
715 * from the service. 723 * from the service.
@@ -1281,15 +1289,16 @@ process_result_message (void *cls,
1281#endif 1289#endif
1282 free_queue_entry (qe); 1290 free_queue_entry (qe);
1283 h->retry_time.rel_value = 0; 1291 h->retry_time.rel_value = 0;
1284 rc.proc (rc.proc_cls, 1292 if (rc.proc != NULL)
1285 &dm->key, 1293 rc.proc (rc.proc_cls,
1286 ntohl(dm->size), 1294 &dm->key,
1287 &dm[1], 1295 ntohl(dm->size),
1288 ntohl(dm->type), 1296 &dm[1],
1289 ntohl(dm->priority), 1297 ntohl(dm->type),
1290 ntohl(dm->anonymity), 1298 ntohl(dm->priority),
1291 GNUNET_TIME_absolute_ntoh(dm->expiration), 1299 ntohl(dm->anonymity),
1292 GNUNET_ntohll(dm->uid)); 1300 GNUNET_TIME_absolute_ntoh(dm->expiration),
1301 GNUNET_ntohll(dm->uid));
1293} 1302}
1294 1303
1295 1304