From: Christian Grothoff Date: Fri, 27 May 2011 13:31:12 +0000 (+0000) Subject: docu, check NULL X-Git-Tag: initial-import-from-subversion-38251~18397 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f7a801c7347c9dae30658c1b7b0eda0a62e2fd47;p=oweals%2Fgnunet.git docu, check NULL --- 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) } +/** + * 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 @@ free_queue_entry (struct GNUNET_DATASTORE_QueueEntry *qe) GNUNET_free (qe); } + /** * Type of a function to call when we receive a message * from the service. @@ -1281,15 +1289,16 @@ process_result_message (void *cls, #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)); }