aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-auto-share.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-auto-share.c')
-rw-r--r--src/fs/gnunet-auto-share.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c
index 3aed0268b..f91e9d00d 100644
--- a/src/fs/gnunet-auto-share.c
+++ b/src/fs/gnunet-auto-share.c
@@ -201,9 +201,9 @@ load_state ()
201 while (n-- > 0) 201 while (n-- > 0)
202 { 202 {
203 struct GNUNET_BIO_ReadSpec rs[] = { 203 struct GNUNET_BIO_ReadSpec rs[] = {
204 GNUNET_BIO_read_spec_string("filename", &fn, 1024), 204 GNUNET_BIO_read_spec_string ("filename", &fn, 1024),
205 GNUNET_BIO_read_spec_object("id", &id, sizeof(struct GNUNET_HashCode)), 205 GNUNET_BIO_read_spec_object ("id", &id, sizeof(struct GNUNET_HashCode)),
206 GNUNET_BIO_read_spec_end(), 206 GNUNET_BIO_read_spec_end (),
207 }; 207 };
208 if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs)) 208 if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs))
209 goto error; 209 goto error;
@@ -227,13 +227,13 @@ load_state ()
227 return; 227 return;
228 rh = NULL; 228 rh = NULL;
229error: 229error:
230 GNUNET_free_non_null (fn); 230 GNUNET_free (fn);
231 if (NULL != rh) 231 if (NULL != rh)
232 (void) GNUNET_BIO_read_close (rh, &emsg); 232 (void) GNUNET_BIO_read_close (rh, &emsg);
233 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 233 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
234 _ ("Failed to load state: %s\n"), 234 _ ("Failed to load state: %s\n"),
235 emsg); 235 emsg);
236 GNUNET_free_non_null (emsg); 236 GNUNET_free (emsg);
237} 237}
238 238
239 239
@@ -258,7 +258,8 @@ write_item (void *cls, const struct GNUNET_HashCode *key, void *value)
258 struct GNUNET_BIO_WriteSpec ws[] = { 258 struct GNUNET_BIO_WriteSpec ws[] = {
259 GNUNET_BIO_write_spec_string ("auto-share-write-item-filename", 259 GNUNET_BIO_write_spec_string ("auto-share-write-item-filename",
260 wi->filename), 260 wi->filename),
261 GNUNET_BIO_write_spec_object ("id", &wi->id, sizeof(struct GNUNET_HashCode)), 261 GNUNET_BIO_write_spec_object ("id", &wi->id, sizeof(struct
262 GNUNET_HashCode)),
262 GNUNET_BIO_write_spec_end (), 263 GNUNET_BIO_write_spec_end (),
263 }; 264 };
264 if (GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws)) 265 if (GNUNET_OK != GNUNET_BIO_write_spec_commit (wh, ws))
@@ -478,8 +479,7 @@ work (void *cls)
478 argv[argc] = NULL; 479 argv[argc] = NULL;
479 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Publishing `%s'\n"), wi->filename); 480 GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Publishing `%s'\n"), wi->filename);
480 GNUNET_assert (NULL == publish_proc); 481 GNUNET_assert (NULL == publish_proc);
481 publish_proc = GNUNET_OS_start_process_vap (GNUNET_YES, 482 publish_proc = GNUNET_OS_start_process_vap (GNUNET_OS_USE_PIPE_CONTROL,
482 0,
483 NULL, 483 NULL,
484 NULL, 484 NULL,
485 NULL, 485 NULL,
@@ -748,7 +748,7 @@ main (int argc, char *const *argv)
748 748
749 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) 749 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
750 return 2; 750 return 2;
751 sigpipe = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_NO); 751 sigpipe = GNUNET_DISK_pipe (GNUNET_DISK_PF_NONE);
752 GNUNET_assert (NULL != sigpipe); 752 GNUNET_assert (NULL != sigpipe);
753 shc_chld = 753 shc_chld =
754 GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); 754 GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death);
@@ -781,7 +781,7 @@ main (int argc, char *const *argv)
781 shc_chld = NULL; 781 shc_chld = NULL;
782 GNUNET_DISK_pipe_close (sigpipe); 782 GNUNET_DISK_pipe_close (sigpipe);
783 sigpipe = NULL; 783 sigpipe = NULL;
784 GNUNET_free_non_null (cfg_filename); 784 GNUNET_free (cfg_filename);
785 cfg_filename = NULL; 785 cfg_filename = NULL;
786 GNUNET_free_nz ((void *) argv); 786 GNUNET_free_nz ((void *) argv);
787 return ok; 787 return ok;