diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-03-12 13:29:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-03-12 13:29:05 +0000 |
commit | a6f43190ab793b3487da2133735e166e337000c4 (patch) | |
tree | fc2dacc6a36f3ec04cf86a14cdea9c5bdf45274f /src/fs | |
parent | 61cfd3340e67672f351ab92dab7da72dca058c79 (diff) | |
download | gnunet-a6f43190ab793b3487da2133735e166e337000c4.tar.gz gnunet-a6f43190ab793b3487da2133735e166e337000c4.zip |
cancel pending write if we are just dead anyway
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs.c | 2 | ||||
-rw-r--r-- | src/fs/fs_download.c | 10 | ||||
-rw-r--r-- | src/fs/fs_list_indexed.c | 8 | ||||
-rw-r--r-- | src/fs/fs_publish.c | 2 | ||||
-rw-r--r-- | src/fs/fs_search.c | 6 | ||||
-rw-r--r-- | src/fs/fs_unindex.c | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/src/fs/fs.c b/src/fs/fs.c index 8396fc18f..2d080bfa6 100644 --- a/src/fs/fs.c +++ b/src/fs/fs.c | |||
@@ -97,7 +97,7 @@ GNUNET_FS_stop (struct GNUNET_FS_Handle *h) | |||
97 | { | 97 | { |
98 | // FIXME: serialize state!? (or is it always serialized???) | 98 | // FIXME: serialize state!? (or is it always serialized???) |
99 | // FIXME: terminate receive-loop with client | 99 | // FIXME: terminate receive-loop with client |
100 | GNUNET_CLIENT_disconnect (h->client); | 100 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); |
101 | GNUNET_free (h->client_name); | 101 | GNUNET_free (h->client_name); |
102 | GNUNET_free (h); | 102 | GNUNET_free (h); |
103 | } | 103 | } |
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 7e5081f6e..12d6ff0b6 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -394,7 +394,7 @@ process_result_with_request (void *cls, | |||
394 | GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th); | 394 | GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th); |
395 | dc->th = NULL; | 395 | dc->th = NULL; |
396 | } | 396 | } |
397 | GNUNET_CLIENT_disconnect (dc->client); | 397 | GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); |
398 | dc->client = NULL; | 398 | dc->client = NULL; |
399 | return GNUNET_NO; | 399 | return GNUNET_NO; |
400 | } | 400 | } |
@@ -460,7 +460,7 @@ process_result_with_request (void *cls, | |||
460 | GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th); | 460 | GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th); |
461 | dc->th = NULL; | 461 | dc->th = NULL; |
462 | } | 462 | } |
463 | GNUNET_CLIENT_disconnect (dc->client); | 463 | GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); |
464 | dc->client = NULL; | 464 | dc->client = NULL; |
465 | GNUNET_free (sm); | 465 | GNUNET_free (sm); |
466 | return GNUNET_NO; | 466 | return GNUNET_NO; |
@@ -776,7 +776,7 @@ try_reconnect (struct GNUNET_FS_DownloadContext *dc) | |||
776 | GNUNET_CONTAINER_multihashmap_iterate (dc->active, | 776 | GNUNET_CONTAINER_multihashmap_iterate (dc->active, |
777 | &retry_entry, | 777 | &retry_entry, |
778 | dc); | 778 | dc); |
779 | GNUNET_CLIENT_disconnect (dc->client); | 779 | GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); |
780 | dc->client = NULL; | 780 | dc->client = NULL; |
781 | } | 781 | } |
782 | dc->task | 782 | dc->task |
@@ -879,7 +879,7 @@ GNUNET_FS_download_start (struct GNUNET_FS_Handle *h, | |||
879 | GNUNET_CONTAINER_meta_data_destroy (dc->meta); | 879 | GNUNET_CONTAINER_meta_data_destroy (dc->meta); |
880 | GNUNET_FS_uri_destroy (dc->uri); | 880 | GNUNET_FS_uri_destroy (dc->uri); |
881 | GNUNET_free (dc->filename); | 881 | GNUNET_free (dc->filename); |
882 | GNUNET_CLIENT_disconnect (dc->client); | 882 | GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); |
883 | GNUNET_free (dc); | 883 | GNUNET_free (dc); |
884 | return NULL; | 884 | return NULL; |
885 | } | 885 | } |
@@ -960,7 +960,7 @@ GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, | |||
960 | dc->th = NULL; | 960 | dc->th = NULL; |
961 | } | 961 | } |
962 | if (NULL != dc->client) | 962 | if (NULL != dc->client) |
963 | GNUNET_CLIENT_disconnect (dc->client); | 963 | GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); |
964 | GNUNET_CONTAINER_multihashmap_iterate (dc->active, | 964 | GNUNET_CONTAINER_multihashmap_iterate (dc->active, |
965 | &free_entry, | 965 | &free_entry, |
966 | NULL); | 966 | NULL); |
diff --git a/src/fs/fs_list_indexed.c b/src/fs/fs_list_indexed.c index d182f9aa4..775affbc3 100644 --- a/src/fs/fs_list_indexed.c +++ b/src/fs/fs_list_indexed.c | |||
@@ -94,7 +94,7 @@ handle_index_info (void *cls, | |||
94 | gic->cont, | 94 | gic->cont, |
95 | gic->cont_cls, | 95 | gic->cont_cls, |
96 | GNUNET_SCHEDULER_REASON_TIMEOUT); | 96 | GNUNET_SCHEDULER_REASON_TIMEOUT); |
97 | GNUNET_CLIENT_disconnect (gic->client); | 97 | GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO); |
98 | GNUNET_free (gic); | 98 | GNUNET_free (gic); |
99 | return; | 99 | return; |
100 | } | 100 | } |
@@ -105,7 +105,7 @@ handle_index_info (void *cls, | |||
105 | gic->cont, | 105 | gic->cont, |
106 | gic->cont_cls, | 106 | gic->cont_cls, |
107 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 107 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
108 | GNUNET_CLIENT_disconnect (gic->client); | 108 | GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO); |
109 | GNUNET_free (gic); | 109 | GNUNET_free (gic); |
110 | return; | 110 | return; |
111 | } | 111 | } |
@@ -125,7 +125,7 @@ handle_index_info (void *cls, | |||
125 | gic->cont, | 125 | gic->cont, |
126 | gic->cont_cls, | 126 | gic->cont_cls, |
127 | GNUNET_SCHEDULER_REASON_TIMEOUT); | 127 | GNUNET_SCHEDULER_REASON_TIMEOUT); |
128 | GNUNET_CLIENT_disconnect (gic->client); | 128 | GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO); |
129 | GNUNET_free (gic); | 129 | GNUNET_free (gic); |
130 | return; | 130 | return; |
131 | } | 131 | } |
@@ -138,7 +138,7 @@ handle_index_info (void *cls, | |||
138 | gic->cont, | 138 | gic->cont, |
139 | gic->cont_cls, | 139 | gic->cont_cls, |
140 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 140 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); |
141 | GNUNET_CLIENT_disconnect (gic->client); | 141 | GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO); |
142 | GNUNET_free (gic); | 142 | GNUNET_free (gic); |
143 | return; | 143 | return; |
144 | } | 144 | } |
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index df566b917..db95a6100 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -664,7 +664,7 @@ process_index_start_response (void *cls, | |||
664 | const char *emsg; | 664 | const char *emsg; |
665 | uint16_t msize; | 665 | uint16_t msize; |
666 | 666 | ||
667 | GNUNET_CLIENT_disconnect (sc->client); | 667 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); |
668 | sc->client = NULL; | 668 | sc->client = NULL; |
669 | p = sc->fi_pos; | 669 | p = sc->fi_pos; |
670 | if (msg == NULL) | 670 | if (msg == NULL) |
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 90a28052f..8d9050051 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -715,7 +715,7 @@ try_reconnect (struct GNUNET_FS_SearchContext *sc) | |||
715 | { | 715 | { |
716 | if (NULL != sc->client) | 716 | if (NULL != sc->client) |
717 | { | 717 | { |
718 | GNUNET_CLIENT_disconnect (sc->client); | 718 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); |
719 | sc->client = NULL; | 719 | sc->client = NULL; |
720 | } | 720 | } |
721 | sc->task | 721 | sc->task |
@@ -858,7 +858,7 @@ GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc) | |||
858 | sc->task); | 858 | sc->task); |
859 | sc->task = GNUNET_SCHEDULER_NO_TASK; | 859 | sc->task = GNUNET_SCHEDULER_NO_TASK; |
860 | if (NULL != sc->client) | 860 | if (NULL != sc->client) |
861 | GNUNET_CLIENT_disconnect (sc->client); | 861 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); |
862 | sc->client = NULL; | 862 | sc->client = NULL; |
863 | // FIXME: make persistent! | 863 | // FIXME: make persistent! |
864 | // FIXME: should this freeze all active probes? | 864 | // FIXME: should this freeze all active probes? |
@@ -967,7 +967,7 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc) | |||
967 | GNUNET_SCHEDULER_cancel (sc->h->sched, | 967 | GNUNET_SCHEDULER_cancel (sc->h->sched, |
968 | sc->task); | 968 | sc->task); |
969 | if (NULL != sc->client) | 969 | if (NULL != sc->client) |
970 | GNUNET_CLIENT_disconnect (sc->client); | 970 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); |
971 | GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map); | 971 | GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map); |
972 | for (i=0;i<sc->uri->data.ksk.keywordCount;i++) | 972 | for (i=0;i<sc->uri->data.ksk.keywordCount;i++) |
973 | GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results); | 973 | GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results); |
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index fc4012464..5d1e7c8f0 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -284,7 +284,7 @@ process_fs_response (void *cls, | |||
284 | { | 284 | { |
285 | struct GNUNET_FS_UnindexContext *uc = cls; | 285 | struct GNUNET_FS_UnindexContext *uc = cls; |
286 | 286 | ||
287 | GNUNET_CLIENT_disconnect (uc->client); | 287 | GNUNET_CLIENT_disconnect (uc->client, GNUNET_NO); |
288 | uc->client = NULL; | 288 | uc->client = NULL; |
289 | if (uc->state != UNINDEX_STATE_FS_NOTIFY) | 289 | if (uc->state != UNINDEX_STATE_FS_NOTIFY) |
290 | { | 290 | { |