aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/fs_tree.c')
-rw-r--r--src/fs/fs_tree.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c
index b409080db..2108b4831 100644
--- a/src/fs/fs_tree.c
+++ b/src/fs/fs_tree.c
@@ -250,7 +250,6 @@ compute_chk_offset (unsigned int height,
250 corresponds to */ 250 corresponds to */
251 for (i=0;i<height;i++) 251 for (i=0;i<height;i++)
252 bds *= CHK_PER_INODE; 252 bds *= CHK_PER_INODE;
253 GNUNET_assert (0 == (offset % bds));
254 ret = offset / bds; 253 ret = offset / bds;
255 return ret % CHK_PER_INODE; 254 return ret % CHK_PER_INODE;
256} 255}
@@ -312,6 +311,19 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te)
312 &sk, 311 &sk,
313 &iv, 312 &iv,
314 enc); 313 enc);
314 if (0 == te->current_depth)
315 {
316 te->uri = GNUNET_malloc (sizeof(struct GNUNET_FS_Uri));
317 te->uri->type = chk;
318 te->uri->data.chk.chk = te->chk_tree[0];
319 te->uri->data.chk.file_length = GNUNET_htonll (te->size);
320 GNUNET_SCHEDULER_add_continuation (te->h->sched,
321 GNUNET_NO,
322 te->cont,
323 te->cls,
324 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
325 return;
326 }
315 if (NULL != te->proc) 327 if (NULL != te->proc)
316 te->proc (te->cls, 328 te->proc (te->cls,
317 &mychk->query, 329 &mychk->query,
@@ -343,18 +355,6 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder * te)
343 else 355 else
344 te->current_depth = te->chk_tree_depth; 356 te->current_depth = te->chk_tree_depth;
345 } 357 }
346 if (0 == te->current_depth)
347 {
348 te->uri = GNUNET_malloc (sizeof(struct GNUNET_FS_Uri));
349 te->uri->type = chk;
350 te->uri->data.chk.chk = te->chk_tree[0];
351 te->uri->data.chk.file_length = GNUNET_htonll (te->size);
352 GNUNET_SCHEDULER_add_continuation (te->h->sched,
353 GNUNET_NO,
354 te->cont,
355 te->cls,
356 GNUNET_SCHEDULER_REASON_PREREQ_DONE);
357 }
358} 358}
359 359
360 360