diff options
author | Omar Tarabai <tarabai@devegypt.com> | 2014-06-11 11:54:30 +0000 |
---|---|---|
committer | Omar Tarabai <tarabai@devegypt.com> | 2014-06-11 11:54:30 +0000 |
commit | 495f1745570ea1d5ba8e23916030815fe65d1cbc (patch) | |
tree | d1eb8d6f5773db3ddabf165dcd3ea1c85ceabcff /src/peerstore/gnunet-service-peerstore.c | |
parent | 6f79b466c1333431aca6ee3158a29cdf62f1002e (diff) | |
download | gnunet-495f1745570ea1d5ba8e23916030815fe65d1cbc.tar.gz gnunet-495f1745570ea1d5ba8e23916030815fe65d1cbc.zip |
peerstore: minor fixes
Diffstat (limited to 'src/peerstore/gnunet-service-peerstore.c')
-rw-r--r-- | src/peerstore/gnunet-service-peerstore.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c index d4f0ebc2c..c9ddafa10 100644 --- a/src/peerstore/gnunet-service-peerstore.c +++ b/src/peerstore/gnunet-service-peerstore.c | |||
@@ -75,9 +75,16 @@ shutdown_task (void *cls, | |||
75 | GNUNET_free (db_lib_name); | 75 | GNUNET_free (db_lib_name); |
76 | db_lib_name = NULL; | 76 | db_lib_name = NULL; |
77 | } | 77 | } |
78 | GNUNET_SERVER_notification_context_destroy(nc); | 78 | if(NULL != nc) |
79 | GNUNET_CONTAINER_multihashmap_destroy(watchers); | 79 | { |
80 | watchers = NULL; | 80 | GNUNET_SERVER_notification_context_destroy(nc); |
81 | nc = NULL; | ||
82 | } | ||
83 | if(NULL != watchers) | ||
84 | { | ||
85 | GNUNET_CONTAINER_multihashmap_destroy(watchers); | ||
86 | watchers = NULL; | ||
87 | } | ||
81 | GNUNET_SCHEDULER_shutdown(); | 88 | GNUNET_SCHEDULER_shutdown(); |
82 | } | 89 | } |
83 | 90 | ||
@@ -395,10 +402,8 @@ run (void *cls, | |||
395 | if(NULL == db) | 402 | if(NULL == db) |
396 | { | 403 | { |
397 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Could not load database backend `%s'\n"), db_lib_name); | 404 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, _("Could not load database backend `%s'\n"), db_lib_name); |
398 | /* FIXME: | 405 | GNUNET_SCHEDULER_add_now (&shutdown_task, NULL); |
399 | * error handling required, otherwise you try to access db | 406 | return; |
400 | * in message handlers like handle_store ... | ||
401 | * if(GNUNET_OK != db->store_record(db->cls, ... */ | ||
402 | } | 407 | } |
403 | else | 408 | else |
404 | { | 409 | { |