diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-14 11:20:29 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-14 11:20:29 +0000 |
commit | cced1cd7e8a319105177e29cc4f1720739e307bb (patch) | |
tree | fd712679c47946af449f03bf3684cc3bfa31388a /src/fs/fs_publish.c | |
parent | 5e6ff76c94890e47b51f8bd555437c0ee181e851 (diff) | |
download | gnunet-cced1cd7e8a319105177e29cc4f1720739e307bb.tar.gz gnunet-cced1cd7e8a319105177e29cc4f1720739e307bb.zip |
fixes
Diffstat (limited to 'src/fs/fs_publish.c')
-rw-r--r-- | src/fs/fs_publish.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index aa7f794be..4e2039ba0 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -109,11 +109,14 @@ GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | |||
109 | /** | 109 | /** |
110 | * Cleanup the publish context, we're done with it. | 110 | * Cleanup the publish context, we're done with it. |
111 | * | 111 | * |
112 | * @param pc struct to clean up after | 112 | * @param cls struct to clean up after |
113 | * @param tc scheduler context | ||
113 | */ | 114 | */ |
114 | static void | 115 | static void |
115 | publish_cleanup (struct GNUNET_FS_PublishContext *pc) | 116 | publish_cleanup (void *cls, |
117 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
116 | { | 118 | { |
119 | struct GNUNET_FS_PublishContext *pc = cls; | ||
117 | GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL); | 120 | GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL); |
118 | if (pc->namespace != NULL) | 121 | if (pc->namespace != NULL) |
119 | GNUNET_FS_namespace_delete (pc->namespace, GNUNET_NO); | 122 | GNUNET_FS_namespace_delete (pc->namespace, GNUNET_NO); |
@@ -146,9 +149,11 @@ ds_put_cont (void *cls, | |||
146 | 149 | ||
147 | if (GNUNET_SYSERR == pcc->sc->in_network_wait) | 150 | if (GNUNET_SYSERR == pcc->sc->in_network_wait) |
148 | { | 151 | { |
149 | /* we were aborted in the meantime, | 152 | /* we were aborted in the meantime, finish shutdown! */ |
150 | finish shutdown! */ | 153 | GNUNET_SCHEDULER_add_continuation (pcc->sc->h->sched, |
151 | publish_cleanup (pcc->sc); | 154 | &publish_cleanup, |
155 | pcc->sc, | ||
156 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
152 | GNUNET_free (pcc); | 157 | GNUNET_free (pcc); |
153 | return; | 158 | return; |
154 | } | 159 | } |
@@ -1016,7 +1021,10 @@ GNUNET_FS_publish_signal_suspend_ (void *cls) | |||
1016 | &fip_signal_suspend, | 1021 | &fip_signal_suspend, |
1017 | pc); | 1022 | pc); |
1018 | GNUNET_FS_end_top (pc->h, pc->top); | 1023 | GNUNET_FS_end_top (pc->h, pc->top); |
1019 | publish_cleanup (pc); | 1024 | GNUNET_SCHEDULER_add_continuation (pc->h->sched, |
1025 | &publish_cleanup, | ||
1026 | pc, | ||
1027 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
1020 | } | 1028 | } |
1021 | 1029 | ||
1022 | /** | 1030 | /** |
@@ -1163,7 +1171,10 @@ GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc) | |||
1163 | pc->in_network_wait = GNUNET_SYSERR; | 1171 | pc->in_network_wait = GNUNET_SYSERR; |
1164 | return; | 1172 | return; |
1165 | } | 1173 | } |
1166 | publish_cleanup (pc); | 1174 | GNUNET_SCHEDULER_add_continuation (pc->h->sched, |
1175 | &publish_cleanup, | ||
1176 | pc, | ||
1177 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
1167 | } | 1178 | } |
1168 | 1179 | ||
1169 | 1180 | ||