aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_pr.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-11-27 21:02:36 +0000
committerChristian Grothoff <christian@grothoff.org>2013-11-27 21:02:36 +0000
commit9d840e937d7e69f585cd5536a63ad6629412c0d6 (patch)
treeb068060020f63c918cd0de09082a5b552ddc817a /src/fs/gnunet-service-fs_pr.c
parent7faa62d0e03329190ad48489d09daa087c9456e2 (diff)
downloadgnunet-9d840e937d7e69f585cd5536a63ad6629412c0d6.tar.gz
gnunet-9d840e937d7e69f585cd5536a63ad6629412c0d6.zip
-attempting to address #3133
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.c')
-rw-r--r--src/fs/gnunet-service-fs_pr.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index ee71019bb..99c4056ae 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -595,7 +595,14 @@ clean_request (void *cls, const struct GNUNET_HashCode * key, void *value)
595 GSF_LocalLookupContinuation cont; 595 GSF_LocalLookupContinuation cont;
596 596
597 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 597 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
598 "Cleaning up pending request for `%s'.\n", GNUNET_h2s (key)); 598 "Cleaning up pending request for `%s'.\n",
599 GNUNET_h2s (key));
600 if (NULL != pr->mesh_request)
601 {
602 pr->mesh_retry_count = MESH_RETRY_MAX;
603 GSF_mesh_query_cancel (pr->mesh_request);
604 pr->mesh_request = NULL;
605 }
599 if (NULL != (cont = pr->llc_cont)) 606 if (NULL != (cont = pr->llc_cont))
600 { 607 {
601 pr->llc_cont = NULL; 608 pr->llc_cont = NULL;
@@ -627,11 +634,6 @@ clean_request (void *cls, const struct GNUNET_HashCode * key, void *value)
627 GNUNET_DHT_get_stop (pr->gh); 634 GNUNET_DHT_get_stop (pr->gh);
628 pr->gh = NULL; 635 pr->gh = NULL;
629 } 636 }
630 if (NULL != pr->mesh_request)
631 {
632 GSF_mesh_query_cancel (pr->mesh_request);
633 pr->mesh_request = NULL;
634 }
635 if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) 637 if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task)
636 { 638 {
637 GNUNET_SCHEDULER_cancel (pr->warn_task); 639 GNUNET_SCHEDULER_cancel (pr->warn_task);
@@ -668,6 +670,12 @@ GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup)
668 * but do NOT remove from our data-structures, we still need it there 670 * but do NOT remove from our data-structures, we still need it there
669 * to prevent the request from looping */ 671 * to prevent the request from looping */
670 pr->rh = NULL; 672 pr->rh = NULL;
673 if (NULL != pr->mesh_request)
674 {
675 pr->mesh_retry_count = MESH_RETRY_MAX;
676 GSF_mesh_query_cancel (pr->mesh_request);
677 pr->mesh_request = NULL;
678 }
671 if (NULL != (cont = pr->llc_cont)) 679 if (NULL != (cont = pr->llc_cont))
672 { 680 {
673 pr->llc_cont = NULL; 681 pr->llc_cont = NULL;
@@ -684,11 +692,6 @@ GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup)
684 GNUNET_DHT_get_stop (pr->gh); 692 GNUNET_DHT_get_stop (pr->gh);
685 pr->gh = NULL; 693 pr->gh = NULL;
686 } 694 }
687 if (NULL != pr->mesh_request)
688 {
689 GSF_mesh_query_cancel (pr->mesh_request);
690 pr->mesh_request = NULL;
691 }
692 if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) 695 if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task)
693 { 696 {
694 GNUNET_SCHEDULER_cancel (pr->warn_task); 697 GNUNET_SCHEDULER_cancel (pr->warn_task);
@@ -1143,7 +1146,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
1143 * @param cls the pending request struct 1146 * @param cls the pending request struct
1144 * @param type type of the block, ANY on error 1147 * @param type type of the block, ANY on error
1145 * @param expiration expiration time for the block 1148 * @param expiration expiration time for the block
1146 * @param data_size number of bytes in 'data', 0 on error 1149 * @param data_size number of bytes in @a data, 0 on error
1147 * @param data reply block data, NULL on error 1150 * @param data reply block data, NULL on error
1148 */ 1151 */
1149static void 1152static void
@@ -1162,11 +1165,11 @@ mesh_reply_proc (void *cls,
1162 { 1165 {
1163 GNUNET_break (NULL == data); 1166 GNUNET_break (NULL == data);
1164 GNUNET_break (0 == data_size); 1167 GNUNET_break (0 == data_size);
1165 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1166 "Error retrieiving block via mesh\n");
1167 pr->mesh_retry_count++; 1168 pr->mesh_retry_count++;
1168 if (pr->mesh_retry_count >= MESH_RETRY_MAX) 1169 if (pr->mesh_retry_count >= MESH_RETRY_MAX)
1169 return; /* give up on mesh */ 1170 return; /* give up on mesh */
1171 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1172 "Error retrieiving block via mesh\n");
1170 /* retry -- without delay, as this is non-anonymous 1173 /* retry -- without delay, as this is non-anonymous
1171 and mesh/mesh connect will take some time anyway */ 1174 and mesh/mesh connect will take some time anyway */
1172 pr->mesh_request = GSF_mesh_query (pr->public_data.target, 1175 pr->mesh_request = GSF_mesh_query (pr->public_data.target,