aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_publish.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-19 13:54:35 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-19 13:54:35 +0000
commitbf2d1ccefd7b5bd13295733a36bf19afba46f4b2 (patch)
treec440a5bcf7e328d1dd05dd3b1a5def173adb49df /src/fs/fs_publish.c
parent1997d2d086b237e2688d12567933a53b2229ea26 (diff)
downloadgnunet-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.c22
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 */
129static void 130static void
130ds_put_cont (void *cls, int success, const char *msg) 131ds_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 */
229static void 233static void
230finish_release_reserve (void *cls, int success, const char *msg) 234finish_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 */
1072static void 1079static void
1073finish_reserve (void *cls, int success, const char *msg) 1080finish_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 */
1353static void 1363static void
1354kb_put_cont (void *cls, int success, const char *msg) 1364kb_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