- GNUNET_CRYPTO_hash (wi->filename,
- strlen (wi->filename),
- &key);
- GNUNET_CONTAINER_multihashmap_put (work_finished,
- &key,
- wi,
- GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
+ /* consume the signal */
+ GNUNET_break (0 < GNUNET_DISK_file_read (pr, &c, sizeof (c)));
+
+ if (GNUNET_YES == do_shutdown)
+ {
+ GNUNET_free (wi->filename);
+ GNUNET_free (wi);
+ return;
+ }
+ if ( (GNUNET_OS_PROCESS_EXITED == type) &&
+ (0 == code) )
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ _("Publication of `%s' done\n"),
+ wi->filename);
+ GNUNET_CRYPTO_hash (wi->filename,
+ strlen (wi->filename),
+ &key);
+ GNUNET_CONTAINER_multihashmap_put (work_finished,
+ &key,
+ wi,
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
+ }
+ else
+ {
+ GNUNET_CONTAINER_DLL_insert_tail (work_head,
+ work_tail,
+ wi);
+ }