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/fs/fs_publish.c | |
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/fs/fs_publish.c')
-rw-r--r-- | src/fs/fs_publish.c | 22 |
1 files changed, 17 insertions, 5 deletions
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 | ||