aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Cabral <bcabral@uw.edu>2014-09-05 03:10:59 +0000
committerBruno Cabral <bcabral@uw.edu>2014-09-05 03:10:59 +0000
commit202967b94a0139fad4924c4ba365b45b3df12d34 (patch)
tree098eae05217e9d4de82ba9c1edfe7250af82dc63
parent2442c3b2635c9932a5f115664806871170576803 (diff)
downloadgnunet-202967b94a0139fad4924c4ba365b45b3df12d34.tar.gz
gnunet-202967b94a0139fad4924c4ba365b45b3df12d34.zip
Do not crash if key is NULL.
-rw-r--r--src/fs/gnunet-service-fs_cadet_server.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/fs/gnunet-service-fs_cadet_server.c b/src/fs/gnunet-service-fs_cadet_server.c
index 77add757d..5e4715781 100644
--- a/src/fs/gnunet-service-fs_cadet_server.c
+++ b/src/fs/gnunet-service-fs_cadet_server.c
@@ -345,9 +345,17 @@ handle_datastore_reply (void *cls,
345 hard error as we might have had the answer in the 345 hard error as we might have had the answer in the
346 past and the user might have unindexed it. Hence 346 past and the user might have unindexed it. Hence
347 we log at level "INFO" for now. */ 347 we log at level "INFO" for now. */
348 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 348 if(NULL == key)
349 "Have no answer for query `%s'\n", 349 {
350 GNUNET_h2s (key)); 350 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
351 "Have no answer and the query was NULL\n");
352 }
353 else
354 {
355 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
356 "Have no answer for query `%s'\n",
357 GNUNET_h2s (key));
358 }
351 GNUNET_STATISTICS_update (GSF_stats, 359 GNUNET_STATISTICS_update (GSF_stats,
352 gettext_noop ("# queries received via cadet not answered"), 1, 360 gettext_noop ("# queries received via cadet not answered"), 1,
353 GNUNET_NO); 361 GNUNET_NO);