diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-07-15 11:41:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-07-15 11:41:27 +0000 |
commit | ec3b01719d0dc6d12bfa3cc093fb30453e42e146 (patch) | |
tree | aa14eabef248a7359a3a2d92c7a197b0f8b7ca1c /src/transport/test_transport_api.c | |
parent | 50933946df11f262a622c418fd6b0dbbee1d6e2d (diff) | |
download | gnunet-ec3b01719d0dc6d12bfa3cc093fb30453e42e146.tar.gz gnunet-ec3b01719d0dc6d12bfa3cc093fb30453e42e146.zip |
fix
Diffstat (limited to 'src/transport/test_transport_api.c')
-rw-r--r-- | src/transport/test_transport_api.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index ae56c939f..c86fe4258 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -143,11 +143,11 @@ exchange_hello_last (void *cls, | |||
143 | { | 143 | { |
144 | struct PeerContext *me = cls; | 144 | struct PeerContext *me = cls; |
145 | 145 | ||
146 | GNUNET_assert (message != NULL); | ||
146 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 147 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
147 | "Exchanging HELLO of size %d with peer (%s)!\n", | 148 | "Exchanging HELLO of size %d with peer (%s)!\n", |
148 | (int) GNUNET_HELLO_size((const struct GNUNET_HELLO_Message *)message), | 149 | (int) GNUNET_HELLO_size((const struct GNUNET_HELLO_Message *)message), |
149 | GNUNET_i2s (&me->id)); | 150 | GNUNET_i2s (&me->id)); |
150 | GNUNET_assert (message != NULL); | ||
151 | GNUNET_assert (GNUNET_OK == | 151 | GNUNET_assert (GNUNET_OK == |
152 | GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *) | 152 | GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *) |
153 | message, &me->id)); | 153 | message, &me->id)); |
@@ -296,8 +296,14 @@ setup_peer (struct PeerContext *p, | |||
296 | 296 | ||
297 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 297 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
298 | if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) | 298 | if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) |
299 | GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); | 299 | { |
300 | GNUNET_DISK_directory_remove (p->servicehome); | 300 | GNUNET_assert (GNUNET_OK == |
301 | GNUNET_CONFIGURATION_get_value_string (p->cfg, | ||
302 | "PATHS", | ||
303 | "SERVICEHOME", | ||
304 | &p->servicehome)); | ||
305 | GNUNET_DISK_directory_remove (p->servicehome); | ||
306 | } | ||
301 | 307 | ||
302 | #if START_ARM | 308 | #if START_ARM |
303 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 309 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
@@ -542,13 +548,16 @@ check () | |||
542 | GNUNET_free(cert_file_p2); | 548 | GNUNET_free(cert_file_p2); |
543 | } | 549 | } |
544 | 550 | ||
545 | if ((p1.servicehome != NULL) && (p2.servicehome != NULL)) | 551 | if (p1.servicehome != NULL) |
546 | { | 552 | { |
547 | GNUNET_DISK_directory_remove (p1.servicehome); | 553 | GNUNET_DISK_directory_remove (p1.servicehome); |
548 | GNUNET_DISK_directory_remove (p2.servicehome); | ||
549 | GNUNET_free(p1.servicehome); | 554 | GNUNET_free(p1.servicehome); |
550 | GNUNET_free(p2.servicehome); | 555 | } |
551 | } | 556 | if.servicehome != NULL) |
557 | { | ||
558 | GNUNET_DISK_directory_remove (p2.servicehome); | ||
559 | GNUNET_free(p2.servicehome); | ||
560 | } | ||
552 | return ok; | 561 | return ok; |
553 | } | 562 | } |
554 | 563 | ||