diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-06-16 13:30:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-06-16 13:30:01 +0000 |
commit | 25d6dc70350e323d67c18e20d2c788aa12eec0b8 (patch) | |
tree | af3fb93e3289a6499a77bfc17613a233b8e33a60 | |
parent | d58848f00bab995bce6dd8e44c6afc462db26bb8 (diff) | |
download | gnunet-25d6dc70350e323d67c18e20d2c788aa12eec0b8.tar.gz gnunet-25d6dc70350e323d67c18e20d2c788aa12eec0b8.zip |
fix
-rw-r--r-- | src/datastore/datastore_api.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 6eafbee8b..c347fd71d 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c | |||
@@ -795,16 +795,14 @@ process_status_message (void *cls, | |||
795 | { | 795 | { |
796 | was_transmitted = qe->was_transmitted; | 796 | was_transmitted = qe->was_transmitted; |
797 | free_queue_entry (qe); | 797 | free_queue_entry (qe); |
798 | if (NULL == h->client) | ||
799 | return; /* forced disconnect */ | ||
800 | if (rc.cont != NULL) | ||
801 | rc.cont (rc.cont_cls, | ||
802 | GNUNET_SYSERR, | ||
803 | _("Failed to receive status response from database.")); | ||
804 | if (was_transmitted == GNUNET_YES) | 798 | if (was_transmitted == GNUNET_YES) |
805 | do_disconnect (h); | 799 | do_disconnect (h); |
806 | else | 800 | else |
807 | process_queue (h); | 801 | process_queue (h); |
802 | if (rc.cont != NULL) | ||
803 | rc.cont (rc.cont_cls, | ||
804 | GNUNET_SYSERR, | ||
805 | _("Failed to receive status response from database.")); | ||
808 | return; | 806 | return; |
809 | } | 807 | } |
810 | GNUNET_assert (GNUNET_YES == qe->was_transmitted); | 808 | GNUNET_assert (GNUNET_YES == qe->was_transmitted); |
@@ -1256,20 +1254,22 @@ process_result_message (void *cls, | |||
1256 | { | 1254 | { |
1257 | qe = h->queue_head; | 1255 | qe = h->queue_head; |
1258 | GNUNET_assert (NULL != qe); | 1256 | GNUNET_assert (NULL != qe); |
1257 | rc = qe->qc.rc; | ||
1258 | free_queue_entry (qe); | ||
1259 | if (qe->was_transmitted == GNUNET_YES) | 1259 | if (qe->was_transmitted == GNUNET_YES) |
1260 | { | 1260 | { |
1261 | rc = qe->qc.rc; | ||
1262 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1261 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1263 | _("Failed to receive response from database.\n")); | 1262 | _("Failed to receive response from database.\n")); |
1264 | do_disconnect (h); | 1263 | do_disconnect (h); |
1265 | free_queue_entry (qe); | ||
1266 | if (rc.proc != NULL) | ||
1267 | rc.proc (rc.proc_cls, | ||
1268 | NULL, 0, NULL, 0, 0, 0, | ||
1269 | GNUNET_TIME_UNIT_ZERO_ABS, 0); | ||
1270 | } | 1264 | } |
1271 | else | 1265 | else |
1272 | process_queue (h); | 1266 | { |
1267 | process_queue (h); | ||
1268 | } | ||
1269 | if (rc.proc != NULL) | ||
1270 | rc.proc (rc.proc_cls, | ||
1271 | NULL, 0, NULL, 0, 0, 0, | ||
1272 | GNUNET_TIME_UNIT_ZERO_ABS, 0); | ||
1273 | return; | 1273 | return; |
1274 | } | 1274 | } |
1275 | if (ntohs(msg->type) == GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END) | 1275 | if (ntohs(msg->type) == GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END) |