GNUNET_asprintf (&single_variable, "single_%s_per_host", section);
GNUNET_asprintf (&per_host_variable, "num_%s_per_host", section);
- if ((0 == strcmp (option, "PORT")) && (1 == sscanf (value, "%u", &ival)))
+ if ((0 == strcmp (option, "PORT")) && (1 == SSCANF (value, "%u", &ival)))
{
if ((ival != 0) &&
(GNUNET_YES !=
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PERCENTAGE",
&p_string))
{
- if (sscanf (p_string, "%lf", &logNModifier) != 1)
+ if (SSCANF (p_string, "%lf", &logNModifier) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PROBABILITY",
&p_string))
{
- if (sscanf (p_string, "%lf", &probability) != 1)
+ if (SSCANF (p_string, "%lf", &probability) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PERCENTAGE",
&p_string))
{
- if (sscanf (p_string, "%lf", &nat_percentage) != 1)
+ if (SSCANF (p_string, "%lf", &nat_percentage) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PERCENTAGE",
&p_string))
{
- if (sscanf (p_string, "%lf", &nat_percentage) != 1)
+ if (SSCANF (p_string, "%lf", &nat_percentage) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PERCENTAGE",
&p_string))
{
- if (sscanf (p_string, "%lf", &percentage) != 1)
+ if (SSCANF (p_string, "%lf", &percentage) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PROBABILITY",
&p_string))
{
- if (sscanf (p_string, "%lf", &probability) != 1)
+ if (SSCANF (p_string, "%lf", &probability) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PROBABILITY",
&p_string))
{
- if (sscanf (p_string, "%lf", &probability) != 1)
+ if (SSCANF (p_string, "%lf", &probability) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
if (pg->peers[pg_iter].daemon->hostname == NULL) /* Local, just copy the file */
{
GNUNET_asprintf (&arg, "%s/friends", temp_service_path);
- procarr[pg_iter] =
- GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "mv", "mv", mytemp, arg, NULL);
- GNUNET_assert (procarr[pg_iter] != NULL);
#if VERBOSE_TESTING
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Copying file with command cp %s %s\n", mytemp, arg);
+ "Copying file with RENAME(%s,%s)\n", mytemp, arg);
#endif
- ret = GNUNET_OS_process_wait (procarr[pg_iter]); /* FIXME: schedule this, throttle! */
- GNUNET_OS_process_close (procarr[pg_iter]);
+ RENAME (mytemp, arg);
+ procarr[pg_iter] = NULL;
GNUNET_free (arg);
}
else /* Remote, scp the file to the correct place */
if (pg->peers[pg_iter].daemon->hostname == NULL) /* Local, just copy the file */
{
GNUNET_asprintf (&arg, "%s/blacklist", temp_service_path);
- procarr[pg_iter] =
- GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "mv", "mv", mytemp, arg, NULL);
+ RENAME (mytemp, arg);
+ procarr[pg_iter] = NULL;
#if VERBOSE_TESTING
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- _("Copying file with command cp %s %s\n"), mytemp, arg);
+ _("Copying file with RENAME (%s,%s)\n"), mytemp, arg);
#endif
GNUNET_free (arg);
data[count] = '\0';
temphost = GNUNET_malloc (sizeof (struct GNUNET_TESTING_Host));
ret =
- sscanf (buf, "%a[a-zA-Z0-9_]@%a[a-zA-Z0-9.]:%hd",
+ SSCANF (buf, "%a[a-zA-Z0-9_]@%a[a-zA-Z0-9.]:%hd",
&temphost->username, &temphost->hostname, &temphost->port);
if (3 == ret)
{