diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-29 14:30:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-29 14:30:09 +0000 |
commit | bcbd6ff27cac65a011ca60c100ef3374c8cd7899 (patch) | |
tree | 1435ce4fbc6b73c5d65d96d587ab3fd6cc1dd7f5 /src/gns/gns_api.c | |
parent | ab500ec36e087619e7e58693dc744c3f67a9d200 (diff) | |
download | gnunet-bcbd6ff27cac65a011ca60c100ef3374c8cd7899.tar.gz gnunet-bcbd6ff27cac65a011ca60c100ef3374c8cd7899.zip |
-fix shutdown segv if GNS connection was down
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r-- | src/gns/gns_api.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 0963bdc5a..7b97c6df8 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -474,7 +474,11 @@ GNUNET_GNS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
474 | void | 474 | void |
475 | GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle) | 475 | GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle) |
476 | { | 476 | { |
477 | GNUNET_CLIENT_disconnect (handle->client); | 477 | if (NULL != handle->client) |
478 | { | ||
479 | GNUNET_CLIENT_disconnect (handle->client); | ||
480 | handle->client = NULL; | ||
481 | } | ||
478 | if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task) | 482 | if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task) |
479 | { | 483 | { |
480 | GNUNET_SCHEDULER_cancel (handle->reconnect_task); | 484 | GNUNET_SCHEDULER_cancel (handle->reconnect_task); |