diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-19 13:54:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-19 13:54:35 +0000 |
commit | bf2d1ccefd7b5bd13295733a36bf19afba46f4b2 (patch) | |
tree | c440a5bcf7e328d1dd05dd3b1a5def173adb49df /src | |
parent | 1997d2d086b237e2688d12567933a53b2229ea26 (diff) | |
download | gnunet-bf2d1ccefd7b5bd13295733a36bf19afba46f4b2.tar.gz gnunet-bf2d1ccefd7b5bd13295733a36bf19afba46f4b2.zip |
adding min_expiration argument to GNUNET_DATASTORE_ContinuationWithStatus callback to communicate which content has a chance of being stored in the medium term
Diffstat (limited to 'src')
-rw-r--r-- | src/datastore/datastore.h | 6 | ||||
-rw-r--r-- | src/datastore/datastore_api.c | 11 | ||||
-rw-r--r-- | src/datastore/perf_datastore_api.c | 8 | ||||
-rw-r--r-- | src/datastore/test_datastore_api.c | 6 | ||||
-rw-r--r-- | src/datastore/test_datastore_api_management.c | 4 | ||||
-rw-r--r-- | src/fs/fs_namespace.c | 16 | ||||
-rw-r--r-- | src/fs/fs_publish.c | 22 | ||||
-rw-r--r-- | src/fs/fs_unindex.c | 3 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_indexing.c | 5 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_pr.c | 11 | ||||
-rw-r--r-- | src/include/gnunet_datastore_service.h | 3 |
11 files changed, 68 insertions, 27 deletions
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h index fa8352d24..563b7486c 100644 --- a/src/datastore/datastore.h +++ b/src/datastore/datastore.h | |||
@@ -72,6 +72,12 @@ struct StatusMessage | |||
72 | */ | 72 | */ |
73 | int32_t status GNUNET_PACKED; | 73 | int32_t status GNUNET_PACKED; |
74 | 74 | ||
75 | /** | ||
76 | * Minimum expiration time required for content to be stored | ||
77 | * by the datacache at this time, zero for unknown or no limit. | ||
78 | */ | ||
79 | struct GNUNET_TIME_AbsoluteNBO min_expiration; | ||
80 | |||
75 | }; | 81 | }; |
76 | 82 | ||
77 | 83 | ||
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 46004c4f3..36d1d98b7 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c | |||
@@ -697,10 +697,13 @@ process_queue (struct GNUNET_DATASTORE_Handle *h) | |||
697 | * | 697 | * |
698 | * @param cls closure | 698 | * @param cls closure |
699 | * @param result result | 699 | * @param result result |
700 | * @param min_expiration expiration time | ||
700 | * @param emsg error message | 701 | * @param emsg error message |
701 | */ | 702 | */ |
702 | static void | 703 | static void |
703 | drop_status_cont (void *cls, int32_t result, const char *emsg) | 704 | drop_status_cont (void *cls, int32_t result, |
705 | struct GNUNET_TIME_Absolute min_expiration, | ||
706 | const char *emsg) | ||
704 | { | 707 | { |
705 | /* do nothing */ | 708 | /* do nothing */ |
706 | } | 709 | } |
@@ -765,6 +768,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
765 | process_queue (h); | 768 | process_queue (h); |
766 | if (rc.cont != NULL) | 769 | if (rc.cont != NULL) |
767 | rc.cont (rc.cont_cls, GNUNET_SYSERR, | 770 | rc.cont (rc.cont_cls, GNUNET_SYSERR, |
771 | GNUNET_TIME_UNIT_ZERO_ABS, | ||
768 | _("Failed to receive status response from database.")); | 772 | _("Failed to receive status response from database.")); |
769 | return; | 773 | return; |
770 | } | 774 | } |
@@ -778,6 +782,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
778 | do_disconnect (h); | 782 | do_disconnect (h); |
779 | if (rc.cont != NULL) | 783 | if (rc.cont != NULL) |
780 | rc.cont (rc.cont_cls, GNUNET_SYSERR, | 784 | rc.cont (rc.cont_cls, GNUNET_SYSERR, |
785 | GNUNET_TIME_UNIT_ZERO_ABS, | ||
781 | _("Error reading response from datastore service")); | 786 | _("Error reading response from datastore service")); |
782 | return; | 787 | return; |
783 | } | 788 | } |
@@ -807,7 +812,9 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
807 | h->retry_time.rel_value = 0; | 812 | h->retry_time.rel_value = 0; |
808 | process_queue (h); | 813 | process_queue (h); |
809 | if (rc.cont != NULL) | 814 | if (rc.cont != NULL) |
810 | rc.cont (rc.cont_cls, status, emsg); | 815 | rc.cont (rc.cont_cls, status, |
816 | GNUNET_TIME_absolute_ntoh (sm->min_expiration), | ||
817 | emsg); | ||
811 | } | 818 | } |
812 | 819 | ||
813 | 820 | ||
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index 1ba215374..372a61f7d 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c | |||
@@ -111,7 +111,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
111 | 111 | ||
112 | 112 | ||
113 | static void | 113 | static void |
114 | check_success (void *cls, int success, const char *msg) | 114 | check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
115 | { | 115 | { |
116 | struct CpsRunContext *crc = cls; | 116 | struct CpsRunContext *crc = cls; |
117 | 117 | ||
@@ -149,10 +149,12 @@ check_success (void *cls, int success, const char *msg) | |||
149 | * | 149 | * |
150 | * @param cls closure | 150 | * @param cls closure |
151 | * @param success GNUNET_SYSERR on failure | 151 | * @param success GNUNET_SYSERR on failure |
152 | * @param min_expiration minimum expiration time required for content to be stored | ||
153 | * by the datacache at this time, zero for unknown | ||
152 | * @param msg NULL on success, otherwise an error message | 154 | * @param msg NULL on success, otherwise an error message |
153 | */ | 155 | */ |
154 | static void | 156 | static void |
155 | remove_next (void *cls, int success, const char *msg) | 157 | remove_next (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
156 | { | 158 | { |
157 | struct CpsRunContext *crc = cls; | 159 | struct CpsRunContext *crc = cls; |
158 | 160 | ||
@@ -276,7 +278,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
276 | 278 | ||
277 | 279 | ||
278 | static void | 280 | static void |
279 | run_tests (void *cls, int success, const char *msg) | 281 | run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
280 | { | 282 | { |
281 | struct CpsRunContext *crc = cls; | 283 | struct CpsRunContext *crc = cls; |
282 | 284 | ||
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c index 0309a6592..942e0a11e 100644 --- a/src/datastore/test_datastore_api.c +++ b/src/datastore/test_datastore_api.c | |||
@@ -139,7 +139,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
139 | 139 | ||
140 | 140 | ||
141 | static void | 141 | static void |
142 | check_success (void *cls, int success, const char *msg) | 142 | check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
143 | { | 143 | { |
144 | struct CpsRunContext *crc = cls; | 144 | struct CpsRunContext *crc = cls; |
145 | 145 | ||
@@ -158,7 +158,7 @@ check_success (void *cls, int success, const char *msg) | |||
158 | 158 | ||
159 | 159 | ||
160 | static void | 160 | static void |
161 | get_reserved (void *cls, int success, const char *msg) | 161 | get_reserved (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
162 | { | 162 | { |
163 | struct CpsRunContext *crc = cls; | 163 | struct CpsRunContext *crc = cls; |
164 | 164 | ||
@@ -450,7 +450,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
450 | 450 | ||
451 | 451 | ||
452 | static void | 452 | static void |
453 | run_tests (void *cls, int32_t success, const char *msg) | 453 | run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
454 | { | 454 | { |
455 | struct CpsRunContext *crc = cls; | 455 | struct CpsRunContext *crc = cls; |
456 | 456 | ||
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c index cb04d31d1..3cb8ed94a 100644 --- a/src/datastore/test_datastore_api_management.c +++ b/src/datastore/test_datastore_api_management.c | |||
@@ -122,7 +122,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
122 | 122 | ||
123 | 123 | ||
124 | static void | 124 | static void |
125 | check_success (void *cls, int success, const char *msg) | 125 | check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
126 | { | 126 | { |
127 | struct CpsRunContext *crc = cls; | 127 | struct CpsRunContext *crc = cls; |
128 | 128 | ||
@@ -246,7 +246,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
246 | 246 | ||
247 | 247 | ||
248 | static void | 248 | static void |
249 | run_tests (void *cls, int success, const char *msg) | 249 | run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
250 | { | 250 | { |
251 | struct CpsRunContext *crc = cls; | 251 | struct CpsRunContext *crc = cls; |
252 | 252 | ||
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index 9d754009b..ec4e2495a 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c | |||
@@ -311,10 +311,13 @@ do_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
311 | * | 311 | * |
312 | * @param cls closure (our struct AdvertismentContext) | 312 | * @param cls closure (our struct AdvertismentContext) |
313 | * @param success GNUNET_SYSERR on failure | 313 | * @param success GNUNET_SYSERR on failure |
314 | * @param min_expiration minimum expiration time required for content to be stored | ||
314 | * @param msg NULL on success, otherwise an error message | 315 | * @param msg NULL on success, otherwise an error message |
315 | */ | 316 | */ |
316 | static void | 317 | static void |
317 | advertisement_cont (void *cls, int success, const char *msg) | 318 | advertisement_cont (void *cls, int success, |
319 | struct GNUNET_TIME_Absolute min_expiration, | ||
320 | const char *msg) | ||
318 | { | 321 | { |
319 | struct AdvertisementContext *ac = cls; | 322 | struct AdvertisementContext *ac = cls; |
320 | const char *keyword; | 323 | const char *keyword; |
@@ -475,7 +478,7 @@ GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h, | |||
475 | ctx->ns = namespace; | 478 | ctx->ns = namespace; |
476 | ctx->ns->rc++; | 479 | ctx->ns->rc++; |
477 | ctx->bo = *bo; | 480 | ctx->bo = *bo; |
478 | advertisement_cont (ctx, GNUNET_OK, NULL); | 481 | advertisement_cont (ctx, GNUNET_OK, GNUNET_TIME_UNIT_ZERO_ABS, NULL); |
479 | } | 482 | } |
480 | 483 | ||
481 | 484 | ||
@@ -697,10 +700,13 @@ struct PublishSksContext | |||
697 | * | 700 | * |
698 | * @param cls closure of type "struct PublishSksContext*" | 701 | * @param cls closure of type "struct PublishSksContext*" |
699 | * @param success GNUNET_OK on success | 702 | * @param success GNUNET_OK on success |
703 | * @param min_expiration minimum expiration time required for content to be stored | ||
700 | * @param msg error message (or NULL) | 704 | * @param msg error message (or NULL) |
701 | */ | 705 | */ |
702 | static void | 706 | static void |
703 | sb_put_cont (void *cls, int success, const char *msg) | 707 | sb_put_cont (void *cls, int success, |
708 | struct GNUNET_TIME_Absolute min_expiration, | ||
709 | const char *msg) | ||
704 | { | 710 | { |
705 | struct PublishSksContext *psc = cls; | 711 | struct PublishSksContext *psc = cls; |
706 | GNUNET_HashCode hc; | 712 | GNUNET_HashCode hc; |
@@ -867,7 +873,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, | |||
867 | { | 873 | { |
868 | GNUNET_free (sb_enc); | 874 | GNUNET_free (sb_enc); |
869 | GNUNET_free (sb); | 875 | GNUNET_free (sb); |
870 | sb_put_cont (psc, GNUNET_OK, NULL); | 876 | sb_put_cont (psc, GNUNET_OK, GNUNET_TIME_UNIT_ZERO_ABS, NULL); |
871 | return; | 877 | return; |
872 | } | 878 | } |
873 | psc->dsh = GNUNET_DATASTORE_connect (h->cfg); | 879 | psc->dsh = GNUNET_DATASTORE_connect (h->cfg); |
@@ -875,7 +881,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, | |||
875 | { | 881 | { |
876 | GNUNET_free (sb_enc); | 882 | GNUNET_free (sb_enc); |
877 | GNUNET_free (sb); | 883 | GNUNET_free (sb); |
878 | sb_put_cont (psc, GNUNET_NO, _("Failed to connect to datastore.")); | 884 | sb_put_cont (psc, GNUNET_NO, GNUNET_TIME_UNIT_ZERO_ABS, _("Failed to connect to datastore.")); |
879 | return; | 885 | return; |
880 | } | 886 | } |
881 | GNUNET_CRYPTO_hash_xor (&sks_uri->data.sks.namespace, &id, &query); | 887 | GNUNET_CRYPTO_hash_xor (&sks_uri->data.sks.namespace, &id, &query); |
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 9a834ee86..05f667451 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -124,10 +124,13 @@ publish_cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
124 | * | 124 | * |
125 | * @param cls the 'struct GNUNET_FS_PublishContext' | 125 | * @param cls the 'struct GNUNET_FS_PublishContext' |
126 | * @param success GNUNET_OK on success | 126 | * @param success GNUNET_OK on success |
127 | * @param min_expiration minimum expiration time required for content to be stored | ||
127 | * @param msg error message (or NULL) | 128 | * @param msg error message (or NULL) |
128 | */ | 129 | */ |
129 | static void | 130 | static void |
130 | ds_put_cont (void *cls, int success, const char *msg) | 131 | ds_put_cont (void *cls, int success, |
132 | struct GNUNET_TIME_Absolute min_expiration, | ||
133 | const char *msg) | ||
131 | { | 134 | { |
132 | struct GNUNET_FS_PublishContext *pc = cls; | 135 | struct GNUNET_FS_PublishContext *pc = cls; |
133 | struct GNUNET_FS_ProgressInfo pi; | 136 | struct GNUNET_FS_ProgressInfo pi; |
@@ -224,10 +227,13 @@ signal_publish_error (struct GNUNET_FS_FileInformation *p, | |||
224 | * | 227 | * |
225 | * @param cls the 'struct GNUNET_FS_PublishContext' | 228 | * @param cls the 'struct GNUNET_FS_PublishContext' |
226 | * @param success success code (not used) | 229 | * @param success success code (not used) |
230 | * @param min_expiration minimum expiration time required for content to be stored | ||
227 | * @param msg error message (typically NULL, not used) | 231 | * @param msg error message (typically NULL, not used) |
228 | */ | 232 | */ |
229 | static void | 233 | static void |
230 | finish_release_reserve (void *cls, int success, const char *msg) | 234 | finish_release_reserve (void *cls, int success, |
235 | struct GNUNET_TIME_Absolute min_expiration, | ||
236 | const char *msg) | ||
231 | { | 237 | { |
232 | struct GNUNET_FS_PublishContext *pc = cls; | 238 | struct GNUNET_FS_PublishContext *pc = cls; |
233 | 239 | ||
@@ -271,7 +277,7 @@ publish_sblocks_cont (void *cls, const struct GNUNET_FS_Uri *uri, | |||
271 | } | 277 | } |
272 | else | 278 | else |
273 | { | 279 | { |
274 | finish_release_reserve (pc, GNUNET_OK, NULL); | 280 | finish_release_reserve (pc, GNUNET_OK, GNUNET_TIME_UNIT_ZERO_ABS, NULL); |
275 | } | 281 | } |
276 | } | 282 | } |
277 | 283 | ||
@@ -1067,10 +1073,13 @@ GNUNET_FS_publish_signal_suspend_ (void *cls) | |||
1067 | * | 1073 | * |
1068 | * @param cls the 'struct GNUNET_FS_PublishContext*' | 1074 | * @param cls the 'struct GNUNET_FS_PublishContext*' |
1069 | * @param success positive reservation ID on success | 1075 | * @param success positive reservation ID on success |
1076 | * @param min_expiration minimum expiration time required for content to be stored | ||
1070 | * @param msg error message on error, otherwise NULL | 1077 | * @param msg error message on error, otherwise NULL |
1071 | */ | 1078 | */ |
1072 | static void | 1079 | static void |
1073 | finish_reserve (void *cls, int success, const char *msg) | 1080 | finish_reserve (void *cls, int success, |
1081 | struct GNUNET_TIME_Absolute min_expiration, | ||
1082 | const char *msg) | ||
1074 | { | 1083 | { |
1075 | struct GNUNET_FS_PublishContext *pc = cls; | 1084 | struct GNUNET_FS_PublishContext *pc = cls; |
1076 | 1085 | ||
@@ -1348,10 +1357,13 @@ publish_ksk_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
1348 | * | 1357 | * |
1349 | * @param cls closure of type "struct PublishKskContext*" | 1358 | * @param cls closure of type "struct PublishKskContext*" |
1350 | * @param success GNUNET_OK on success | 1359 | * @param success GNUNET_OK on success |
1360 | * @param min_expiration minimum expiration time required for content to be stored | ||
1351 | * @param msg error message (or NULL) | 1361 | * @param msg error message (or NULL) |
1352 | */ | 1362 | */ |
1353 | static void | 1363 | static void |
1354 | kb_put_cont (void *cls, int success, const char *msg) | 1364 | kb_put_cont (void *cls, int success, |
1365 | struct GNUNET_TIME_Absolute min_expiration, | ||
1366 | const char *msg) | ||
1355 | { | 1367 | { |
1356 | struct PublishKskContext *pkc = cls; | 1368 | struct PublishKskContext *pkc = cls; |
1357 | 1369 | ||
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index 79b7e8c73..fa9147bcd 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -144,10 +144,11 @@ signal_unindex_error (struct GNUNET_FS_UnindexContext *uc) | |||
144 | * | 144 | * |
145 | * @param cls closure | 145 | * @param cls closure |
146 | * @param success GNUNET_SYSERR on failure | 146 | * @param success GNUNET_SYSERR on failure |
147 | * @param min_expiration minimum expiration time required for content to be stored | ||
147 | * @param msg NULL on success, otherwise an error message | 148 | * @param msg NULL on success, otherwise an error message |
148 | */ | 149 | */ |
149 | static void | 150 | static void |
150 | process_cont (void *cls, int success, const char *msg) | 151 | process_cont (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg) |
151 | { | 152 | { |
152 | struct GNUNET_FS_UnindexContext *uc = cls; | 153 | struct GNUNET_FS_UnindexContext *uc = cls; |
153 | 154 | ||
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c index 41a40e125..d3aef8917 100644 --- a/src/fs/gnunet-service-fs_indexing.c +++ b/src/fs/gnunet-service-fs_indexing.c | |||
@@ -477,10 +477,13 @@ GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client, | |||
477 | * | 477 | * |
478 | * @param cls unused | 478 | * @param cls unused |
479 | * @param success did the deletion work? | 479 | * @param success did the deletion work? |
480 | * @param min_expiration minimum expiration time required for content to be stored | ||
480 | * @param msg error message | 481 | * @param msg error message |
481 | */ | 482 | */ |
482 | static void | 483 | static void |
483 | remove_cont (void *cls, int success, const char *msg) | 484 | remove_cont (void *cls, int success, |
485 | struct GNUNET_TIME_Absolute min_expiration, | ||
486 | const char *msg) | ||
484 | { | 487 | { |
485 | if (GNUNET_OK != success) | 488 | if (GNUNET_OK != success) |
486 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 489 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index aa18e2fc8..12245c8a6 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -890,18 +890,19 @@ struct PutMigrationContext | |||
890 | * | 890 | * |
891 | * @param cls closure | 891 | * @param cls closure |
892 | * @param success GNUNET_SYSERR on failure | 892 | * @param success GNUNET_SYSERR on failure |
893 | * @param min_expiration minimum expiration time required for content to be stored | ||
893 | * @param msg NULL on success, otherwise an error message | 894 | * @param msg NULL on success, otherwise an error message |
894 | */ | 895 | */ |
895 | static void | 896 | static void |
896 | put_migration_continuation (void *cls, int success, const char *msg) | 897 | put_migration_continuation (void *cls, int success, |
898 | struct GNUNET_TIME_Absolute min_expiration, | ||
899 | const char *msg) | ||
897 | { | 900 | { |
898 | struct PutMigrationContext *pmc = cls; | 901 | struct PutMigrationContext *pmc = cls; |
899 | struct GNUNET_TIME_Relative delay; | ||
900 | struct GNUNET_TIME_Relative block_time; | 902 | struct GNUNET_TIME_Relative block_time; |
901 | struct GSF_ConnectedPeer *cp; | 903 | struct GSF_ConnectedPeer *cp; |
902 | struct GSF_PeerPerformanceData *ppd; | 904 | struct GSF_PeerPerformanceData *ppd; |
903 | 905 | ||
904 | delay = GNUNET_TIME_absolute_get_duration (pmc->start); | ||
905 | cp = GSF_peer_get_ (&pmc->origin); | 906 | cp = GSF_peer_get_ (&pmc->origin); |
906 | if ((GNUNET_OK != success) && (GNUNET_NO == pmc->requested)) | 907 | if ((GNUNET_OK != success) && (GNUNET_NO == pmc->requested)) |
907 | { | 908 | { |
@@ -1023,7 +1024,7 @@ handle_dht_reply (void *cls, struct GNUNET_TIME_Absolute exp, | |||
1023 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, | 1024 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, |
1024 | &put_migration_continuation, pmc)) | 1025 | &put_migration_continuation, pmc)) |
1025 | { | 1026 | { |
1026 | put_migration_continuation (pmc, GNUNET_NO, NULL); | 1027 | put_migration_continuation (pmc, GNUNET_NO, GNUNET_TIME_UNIT_ZERO_ABS, NULL); |
1027 | } | 1028 | } |
1028 | } | 1029 | } |
1029 | } | 1030 | } |
@@ -1538,7 +1539,7 @@ GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp, | |||
1538 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, | 1539 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, |
1539 | &put_migration_continuation, pmc)) | 1540 | &put_migration_continuation, pmc)) |
1540 | { | 1541 | { |
1541 | put_migration_continuation (pmc, GNUNET_NO, NULL); | 1542 | put_migration_continuation (pmc, GNUNET_NO, GNUNET_TIME_UNIT_ZERO_ABS, NULL); |
1542 | } | 1543 | } |
1543 | } | 1544 | } |
1544 | else | 1545 | else |
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h index 03ec9117c..db680eaf3 100644 --- a/src/include/gnunet_datastore_service.h +++ b/src/include/gnunet_datastore_service.h | |||
@@ -86,10 +86,13 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop); | |||
86 | * @param success GNUNET_SYSERR on failure (including timeout/queue drop) | 86 | * @param success GNUNET_SYSERR on failure (including timeout/queue drop) |
87 | * GNUNET_NO if content was already there | 87 | * GNUNET_NO if content was already there |
88 | * GNUNET_YES (or other positive value) on success | 88 | * GNUNET_YES (or other positive value) on success |
89 | * @param min_expiration minimum expiration time required for content to be stored | ||
90 | * by the datacache at this time, zero for unknown | ||
89 | * @param msg NULL on success, otherwise an error message | 91 | * @param msg NULL on success, otherwise an error message |
90 | */ | 92 | */ |
91 | typedef void (*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls, | 93 | typedef void (*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls, |
92 | int32_t success, | 94 | int32_t success, |
95 | struct GNUNET_TIME_Absolute min_expiration, | ||
93 | const char *msg); | 96 | const char *msg); |
94 | 97 | ||
95 | 98 | ||