From fe32c814a43d6f7d3c4494a8de0d607186c03846 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Sun, 15 Jul 2012 10:25:22 +0000 Subject: [PATCH] -fix --- src/gns/gnunet-gns-proxy.c | 2 +- src/gns/test_gns_proxy.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 1897c4f0b..310416f6f 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -1405,7 +1405,7 @@ curl_download_prepare () else if (NULL != ctasks_head) { /* as specified in curl docs */ - curl_download_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, + curl_download_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS, &curl_task_download, curl_multi); } diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 9b0e8c76d..dd3ba315b 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c @@ -383,6 +383,7 @@ run (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to write tmp cfg\n"); + do_shutdown (); return; } @@ -394,7 +395,13 @@ run (void *cls, "gnunet-gns-proxy", "-c", tmp_cfgfile, NULL); - GNUNET_assert (NULL != proxy_proc); + if (NULL == proxy_proc) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Unable to start proxy\n"); + do_shutdown (); + return; + } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", "ZONEKEY", @@ -428,6 +435,13 @@ int main (int argc, char *const *argv) { + if (GNUNET_SYSERR == GNUNET_OS_check_helper_binary ("gnunet-gns-proxy")) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Proxy binay not in PATH... skipping!"); + return 0; + } + GNUNET_CRYPTO_setup_hostkey ("test_gns_proxy.conf"); if (0 != curl_global_init (CURL_GLOBAL_WIN32)) -- 2.25.1