diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-04-28 08:07:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-04-28 08:07:19 +0000 |
commit | b393f0f2c8f2075c16310a8edbe552020fd8b147 (patch) | |
tree | d6b91d0939ab540d2f66291cf0659ed40bda9626 /src/fs/gnunet-publish.c | |
parent | 1c90bd35e34a9a237ebde4440367322a8cc2a686 (diff) | |
download | gnunet-b393f0f2c8f2075c16310a8edbe552020fd8b147.tar.gz gnunet-b393f0f2c8f2075c16310a8edbe552020fd8b147.zip |
merge meta data for search results
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r-- | src/fs/gnunet-publish.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index f341594c5..279eedcce 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -216,40 +216,6 @@ meta_printer (void *cls, | |||
216 | 216 | ||
217 | 217 | ||
218 | /** | 218 | /** |
219 | * Merge metadata entries. | ||
220 | * | ||
221 | * @param cls closure, target metadata structure | ||
222 | * @param plugin_name name of the plugin that generated the meta data | ||
223 | * @param type type of the meta data | ||
224 | * @param format format of data | ||
225 | * @param data_mime_type mime type of data | ||
226 | * @param data value of the meta data | ||
227 | * @param data_size number of bytes in data | ||
228 | * @return always 0 | ||
229 | */ | ||
230 | static int | ||
231 | meta_merger (void *cls, | ||
232 | const char *plugin_name, | ||
233 | enum EXTRACTOR_MetaType type, | ||
234 | enum EXTRACTOR_MetaFormat format, | ||
235 | const char *data_mime_type, | ||
236 | const char *data, | ||
237 | size_t data_size) | ||
238 | { | ||
239 | struct GNUNET_CONTAINER_MetaData *m = cls; | ||
240 | |||
241 | GNUNET_CONTAINER_meta_data_insert (m, | ||
242 | plugin_name, | ||
243 | type, | ||
244 | format, | ||
245 | data_mime_type, | ||
246 | data, | ||
247 | data_size); | ||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | |||
252 | /** | ||
253 | * Function called on all entries before the publication. This is | 219 | * Function called on all entries before the publication. This is |
254 | * where we perform modifications to the default based on command-line | 220 | * where we perform modifications to the default based on command-line |
255 | * options. | 221 | * options. |
@@ -302,9 +268,7 @@ publish_inspector (void *cls, | |||
302 | } | 268 | } |
303 | if (NULL != meta) | 269 | if (NULL != meta) |
304 | { | 270 | { |
305 | GNUNET_CONTAINER_meta_data_iterate (meta, | 271 | GNUNET_CONTAINER_meta_data_merge (m, meta); |
306 | &meta_merger, | ||
307 | m); | ||
308 | GNUNET_CONTAINER_meta_data_destroy (meta); | 272 | GNUNET_CONTAINER_meta_data_destroy (meta); |
309 | meta = NULL; | 273 | meta = NULL; |
310 | } | 274 | } |