{
if (meter->completed == 0)
{
- fprintf (stdout, "%sProgress: [0%%", meter->startup_string);
+ FPRINTF (stdout, "%sProgress: [0%%", meter->startup_string);
}
else
- fprintf (stdout, "%d%%",
+ FPRINTF (stdout, "%d%%",
(int) (((float) meter->completed / meter->total) * 100));
}
else if (meter->completed % meter->dotnum == 0)
- fprintf (stdout, ".");
+ FPRINTF (stdout, "%s", ".");
if (meter->completed + 1 == meter->total)
- fprintf (stdout, "%d%%]\n", 100);
+ FPRINTF (stdout, "%d%%]\n", 100);
fflush (stdout);
}
meter->completed++;
}
}
+
+/**
+ * Callback called for each started daemon.
+ *
+ * @param cls Clause (PG Context).
+ * @param id PeerIdentidy of started daemon.
+ * @param cfg Configuration used by the daemon.
+ * @param d Handle for the daemon.
+ * @param emsg Error message, NULL on success.
+ */
static void
internal_peers_started_callback (void *cls,
const struct GNUNET_PeerIdentity *id,
pg_start_ctx->peers_left--;
+ if (NULL == pg_start_ctx->peer_start_meter)
+ {
+ /* Cancelled Ctrl-C or error */
+ return;
+ }
if (GNUNET_YES == update_meter (pg_start_ctx->peer_start_meter))
{
#if VERBOSE