diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-04 08:50:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-04 08:50:09 +0000 |
commit | 6aefa4ac85435c8e7afb86e4e6daef77da69709a (patch) | |
tree | fe3241f641088070ef4a909f627482f8252bf0a9 /src/fs/fs_unindex.c | |
parent | db9926f66da9571020fba8f1f2fa0014d1b65b0f (diff) | |
download | gnunet-6aefa4ac85435c8e7afb86e4e6daef77da69709a.tar.gz gnunet-6aefa4ac85435c8e7afb86e4e6daef77da69709a.zip |
generating SUSPEND events
Diffstat (limited to 'src/fs/fs_unindex.c')
-rw-r--r-- | src/fs/fs_unindex.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index 6d4ee3f54..c79b3413e 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -403,9 +403,16 @@ static void | |||
403 | unindex_signal_suspend (void *cls) | 403 | unindex_signal_suspend (void *cls) |
404 | { | 404 | { |
405 | struct GNUNET_FS_UnindexContext *uc = cls; | 405 | struct GNUNET_FS_UnindexContext *uc = cls; |
406 | struct GNUNET_FS_ProgressInfo pi; | ||
406 | 407 | ||
407 | GNUNET_FS_end_top (uc->h, uc->top); | 408 | GNUNET_FS_end_top (uc->h, uc->top); |
408 | /* FIXME: signal! */ | 409 | pi.status = GNUNET_FS_STATUS_UNINDEX_SUSPEND; |
410 | GNUNET_FS_unindex_make_status_ (&pi, uc, | ||
411 | (uc->state == UNINDEX_STATE_COMPLETE) | ||
412 | ? uc->file_size : 0); | ||
413 | GNUNET_break (NULL == uc->client_info); | ||
414 | GNUNET_free (uc->filename); | ||
415 | GNUNET_free_non_null (uc->serialization); | ||
409 | GNUNET_free (uc); | 416 | GNUNET_free (uc); |
410 | } | 417 | } |
411 | 418 | ||
@@ -476,6 +483,7 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc) | |||
476 | if (uc->serialization != NULL) | 483 | if (uc->serialization != NULL) |
477 | { | 484 | { |
478 | GNUNET_FS_remove_sync_file_ (uc->h, "unindex", uc->serialization); | 485 | GNUNET_FS_remove_sync_file_ (uc->h, "unindex", uc->serialization); |
486 | GNUNET_free (uc->serialization); | ||
479 | uc->serialization = NULL; | 487 | uc->serialization = NULL; |
480 | } | 488 | } |
481 | pi.status = GNUNET_FS_STATUS_UNINDEX_STOPPED; | 489 | pi.status = GNUNET_FS_STATUS_UNINDEX_STOPPED; |
@@ -485,7 +493,6 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc) | |||
485 | ? uc->file_size : 0); | 493 | ? uc->file_size : 0); |
486 | GNUNET_break (NULL == uc->client_info); | 494 | GNUNET_break (NULL == uc->client_info); |
487 | GNUNET_free (uc->filename); | 495 | GNUNET_free (uc->filename); |
488 | GNUNET_free_non_null (uc->serialization); | ||
489 | GNUNET_free (uc); | 496 | GNUNET_free (uc); |
490 | } | 497 | } |
491 | 498 | ||