aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-09-02 19:55:10 +0000
committerChristian Grothoff <christian@grothoff.org>2009-09-02 19:55:10 +0000
commit586cf79331064d131c90df08e2d51215214a37d2 (patch)
treeffd2dd05efea3d42de5e532abd78b88ab63c7fb9 /src/fs
parentbec64fd32ad5f930ee60634103222c4575904728 (diff)
downloadgnunet-586cf79331064d131c90df08e2d51215214a37d2.tar.gz
gnunet-586cf79331064d131c90df08e2d51215214a37d2.zip
finishing first run at unindex
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/fs_unindex.c55
1 files changed, 32 insertions, 23 deletions
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index a6d414f09..2d16e9aee 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -144,29 +144,6 @@ unindex_process (void *cls,
144 uc, 144 uc,
145 GNUNET_CONSTANTS_SERVICE_TIMEOUT); 145 GNUNET_CONSTANTS_SERVICE_TIMEOUT);
146} 146}
147
148
149/**
150 * Function called with information about our
151 * progress in computing the tree encoding.
152 *
153 * @param cls closure
154 * @param offset where are we in the file
155 * @param pt_block plaintext of the currently processed block
156 * @param pt_size size of pt_block
157 * @param depth depth of the block in the tree
158 */
159static void
160unindex_progress (void *cls,
161 uint64_t offset,
162 const void *pt_block,
163 size_t pt_size,
164 unsigned int depth)
165{
166 struct GNUNET_FS_UnindexContext *uc = cls;
167 // FIXME: call callback!
168}
169
170 147
171 148
172/** 149/**
@@ -195,6 +172,38 @@ make_unindex_status (struct GNUNET_FS_ProgressInfo *pi,
195 172
196 173
197/** 174/**
175 * Function called with information about our
176 * progress in computing the tree encoding.
177 *
178 * @param cls closure
179 * @param offset where are we in the file
180 * @param pt_block plaintext of the currently processed block
181 * @param pt_size size of pt_block
182 * @param depth depth of the block in the tree
183 */
184static void
185unindex_progress (void *cls,
186 uint64_t offset,
187 const void *pt_block,
188 size_t pt_size,
189 unsigned int depth)
190{
191 struct GNUNET_FS_UnindexContext *uc = cls;
192 struct GNUNET_FS_ProgressInfo pi;
193
194 pi.status = GNUNET_FS_STATUS_UNINDEX_PROGRESS;
195 make_unindex_status (&pi, uc, offset);
196 pi.value.unindex.specifics.progress.data = pt_block;
197 pi.value.unindex.specifics.progress.offset = offset;
198 pi.value.unindex.specifics.progress.data_len = pt_size;
199 pi.value.unindex.specifics.progress.depth = depth;
200 uc->client_info
201 = uc->h->upcb (uc->h->upcb_cls,
202 &pi);
203}
204
205
206/**
198 * We've encountered an error during 207 * We've encountered an error during
199 * unindexing. Signal the client. 208 * unindexing. Signal the client.
200 * 209 *