diff options
Diffstat (limited to 'src/fs/fs_publish.c')
-rw-r--r-- | src/fs/fs_publish.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index a8a9a220f..175e453c6 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -97,7 +97,7 @@ publish_cleanup (struct GNUNET_FS_PublishContext *pc) | |||
97 | GNUNET_CLIENT_disconnect (pc->client); | 97 | GNUNET_CLIENT_disconnect (pc->client); |
98 | pc->client = NULL; | 98 | pc->client = NULL; |
99 | } | 99 | } |
100 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); | 100 | GNUNET_assert (NULL == pc->upload_task); |
101 | GNUNET_free (pc); | 101 | GNUNET_free (pc); |
102 | } | 102 | } |
103 | 103 | ||
@@ -138,7 +138,7 @@ ds_put_cont (void *cls, int success, | |||
138 | GNUNET_FS_unindex_start (pc->h, pc->fi_pos->filename, NULL); | 138 | GNUNET_FS_unindex_start (pc->h, pc->fi_pos->filename, NULL); |
139 | } | 139 | } |
140 | } | 140 | } |
141 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); | 141 | GNUNET_assert (NULL == pc->upload_task); |
142 | pc->upload_task = | 142 | pc->upload_task = |
143 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 143 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
144 | &GNUNET_FS_publish_main_, pc); | 144 | &GNUNET_FS_publish_main_, pc); |
@@ -316,7 +316,7 @@ publish_kblocks_cont (void *cls, | |||
316 | signal_publish_error (p, pc, emsg); | 316 | signal_publish_error (p, pc, emsg); |
317 | GNUNET_FS_file_information_sync_ (p); | 317 | GNUNET_FS_file_information_sync_ (p); |
318 | GNUNET_FS_publish_sync_ (pc); | 318 | GNUNET_FS_publish_sync_ (pc); |
319 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); | 319 | GNUNET_assert (NULL == pc->upload_task); |
320 | pc->upload_task = | 320 | pc->upload_task = |
321 | GNUNET_SCHEDULER_add_with_priority | 321 | GNUNET_SCHEDULER_add_with_priority |
322 | (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 322 | (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
@@ -334,7 +334,7 @@ publish_kblocks_cont (void *cls, | |||
334 | else | 334 | else |
335 | pc->fi_pos = p->dir; | 335 | pc->fi_pos = p->dir; |
336 | GNUNET_FS_publish_sync_ (pc); | 336 | GNUNET_FS_publish_sync_ (pc); |
337 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); | 337 | GNUNET_assert (NULL == pc->upload_task); |
338 | pc->upload_task = | 338 | pc->upload_task = |
339 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 339 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
340 | &GNUNET_FS_publish_main_, pc); | 340 | &GNUNET_FS_publish_main_, pc); |
@@ -449,7 +449,7 @@ encode_cont (void *cls, | |||
449 | p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, flen); | 449 | p->client_info = GNUNET_FS_publish_make_status_ (&pi, pc, p, flen); |
450 | } | 450 | } |
451 | /* continue with main */ /* continue with main */ | 451 | /* continue with main */ /* continue with main */ |
452 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); | 452 | GNUNET_assert (NULL == pc->upload_task); |
453 | pc->upload_task = | 453 | pc->upload_task = |
454 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 454 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
455 | &GNUNET_FS_publish_main_, pc); | 455 | &GNUNET_FS_publish_main_, pc); |
@@ -487,7 +487,7 @@ block_proc (void *cls, | |||
487 | if (NULL == pc->dsh) | 487 | if (NULL == pc->dsh) |
488 | { | 488 | { |
489 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for datastore connection\n"); | 489 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for datastore connection\n"); |
490 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); | 490 | GNUNET_assert (NULL == pc->upload_task); |
491 | pc->upload_task = | 491 | pc->upload_task = |
492 | GNUNET_SCHEDULER_add_with_priority | 492 | GNUNET_SCHEDULER_add_with_priority |
493 | (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, pc); | 493 | (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, pc); |
@@ -947,7 +947,7 @@ GNUNET_FS_publish_main_ (void *cls, | |||
947 | struct GNUNET_FS_FileInformation *p; | 947 | struct GNUNET_FS_FileInformation *p; |
948 | char *fn; | 948 | char *fn; |
949 | 949 | ||
950 | pc->upload_task = GNUNET_SCHEDULER_NO_TASK; | 950 | pc->upload_task = NULL; |
951 | p = pc->fi_pos; | 951 | p = pc->fi_pos; |
952 | if (NULL == p) | 952 | if (NULL == p) |
953 | { | 953 | { |
@@ -1234,10 +1234,10 @@ GNUNET_FS_publish_signal_suspend_ (void *cls) | |||
1234 | { | 1234 | { |
1235 | struct GNUNET_FS_PublishContext *pc = cls; | 1235 | struct GNUNET_FS_PublishContext *pc = cls; |
1236 | 1236 | ||
1237 | if (GNUNET_SCHEDULER_NO_TASK != pc->upload_task) | 1237 | if (NULL != pc->upload_task) |
1238 | { | 1238 | { |
1239 | GNUNET_SCHEDULER_cancel (pc->upload_task); | 1239 | GNUNET_SCHEDULER_cancel (pc->upload_task); |
1240 | pc->upload_task = GNUNET_SCHEDULER_NO_TASK; | 1240 | pc->upload_task = NULL; |
1241 | } | 1241 | } |
1242 | pc->skip_next_fi_callback = GNUNET_YES; | 1242 | pc->skip_next_fi_callback = GNUNET_YES; |
1243 | GNUNET_FS_file_information_inspect (pc->fi, &fip_signal_suspend, pc); | 1243 | GNUNET_FS_file_information_inspect (pc->fi, &fip_signal_suspend, pc); |
@@ -1275,7 +1275,7 @@ finish_reserve (void *cls, int success, | |||
1275 | return; | 1275 | return; |
1276 | } | 1276 | } |
1277 | pc->rid = success; | 1277 | pc->rid = success; |
1278 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); | 1278 | GNUNET_assert (NULL == pc->upload_task); |
1279 | pc->upload_task = | 1279 | pc->upload_task = |
1280 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, | 1280 | GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, |
1281 | &GNUNET_FS_publish_main_, pc); | 1281 | &GNUNET_FS_publish_main_, pc); |
@@ -1373,7 +1373,7 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h, | |||
1373 | } | 1373 | } |
1374 | else | 1374 | else |
1375 | { | 1375 | { |
1376 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == ret->upload_task); | 1376 | GNUNET_assert (NULL == ret->upload_task); |
1377 | ret->upload_task = | 1377 | ret->upload_task = |
1378 | GNUNET_SCHEDULER_add_with_priority | 1378 | GNUNET_SCHEDULER_add_with_priority |
1379 | (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, ret); | 1379 | (GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, ret); |
@@ -1462,10 +1462,10 @@ GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc) | |||
1462 | GNUNET_FS_publish_sks_cancel (pc->sks_pc); | 1462 | GNUNET_FS_publish_sks_cancel (pc->sks_pc); |
1463 | pc->sks_pc = NULL; | 1463 | pc->sks_pc = NULL; |
1464 | } | 1464 | } |
1465 | if (GNUNET_SCHEDULER_NO_TASK != pc->upload_task) | 1465 | if (NULL != pc->upload_task) |
1466 | { | 1466 | { |
1467 | GNUNET_SCHEDULER_cancel (pc->upload_task); | 1467 | GNUNET_SCHEDULER_cancel (pc->upload_task); |
1468 | pc->upload_task = GNUNET_SCHEDULER_NO_TASK; | 1468 | pc->upload_task = NULL; |
1469 | } | 1469 | } |
1470 | pc->skip_next_fi_callback = GNUNET_YES; | 1470 | pc->skip_next_fi_callback = GNUNET_YES; |
1471 | GNUNET_FS_file_information_inspect (pc->fi, &fip_signal_stop, pc); | 1471 | GNUNET_FS_file_information_inspect (pc->fi, &fip_signal_stop, pc); |