From: Christian Grothoff Date: Fri, 15 Jul 2011 11:47:38 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~17828 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7f7b211b9f52bb2276b2d344d1bae68e01eaf0ed;p=oweals%2Fgnunet.git fix --- diff --git a/src/transport/test_transport_api_multiaddress.c b/src/transport/test_transport_api_multiaddress.c index 89a9985b1..f56d7c026 100644 --- a/src/transport/test_transport_api_multiaddress.c +++ b/src/transport/test_transport_api_multiaddress.c @@ -216,8 +216,13 @@ setup_peer (struct PeerContext *p, GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) - GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); - GNUNET_DISK_directory_remove (p->servicehome); + { + GNUNET_assert (GNUNET_OK == + GNUNET_CONFIGURATION_get_value_string (p->cfg, + "PATHS", "SERVICEHOME", + &p->servicehome)); + GNUNET_DISK_directory_remove (p->servicehome); + } #if START_ARM p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", @@ -274,11 +279,6 @@ setup_peer (struct PeerContext *p, #endif "-c", cfgname, NULL); #endif - - - if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) - GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); - p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, @@ -351,13 +351,16 @@ check () stop_arm (&p1); stop_arm (&p2); - if ((p1.servicehome != NULL) && (p2.servicehome != NULL)) - { - GNUNET_DISK_directory_remove (p1.servicehome); - GNUNET_DISK_directory_remove (p2.servicehome); - GNUNET_free(p1.servicehome); - GNUNET_free(p2.servicehome); - } + if (p1.servicehome != NULL) + { + GNUNET_DISK_directory_remove (p1.servicehome); + GNUNET_free(p1.servicehome); + } + if (p2.servicehome != NULL) + { + GNUNET_DISK_directory_remove (p2.servicehome); + GNUNET_free(p2.servicehome); + } return ok; }