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_quota_compliance.c | |
parent | 50933946df11f262a622c418fd6b0dbbee1d6e2d (diff) | |
download | gnunet-ec3b01719d0dc6d12bfa3cc093fb30453e42e146.tar.gz gnunet-ec3b01719d0dc6d12bfa3cc093fb30453e42e146.zip |
fix
Diffstat (limited to 'src/transport/test_quota_compliance.c')
-rw-r--r-- | src/transport/test_quota_compliance.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index 086561095..466ec9674 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c | |||
@@ -559,11 +559,11 @@ exchange_hello_last (void *cls, | |||
559 | { | 559 | { |
560 | struct PeerContext *me = cls; | 560 | struct PeerContext *me = cls; |
561 | 561 | ||
562 | GNUNET_assert (message != NULL); | ||
562 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 563 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
563 | "Exchanging HELLO of size %d with peer (%s)!\n", | 564 | "Exchanging HELLO of size %d with peer (%s)!\n", |
564 | (int) GNUNET_HELLO_size((const struct GNUNET_HELLO_Message *)message), | 565 | (int) GNUNET_HELLO_size((const struct GNUNET_HELLO_Message *)message), |
565 | GNUNET_i2s (&me->id)); | 566 | GNUNET_i2s (&me->id)); |
566 | GNUNET_assert (message != NULL); | ||
567 | GNUNET_assert (GNUNET_OK == | 567 | GNUNET_assert (GNUNET_OK == |
568 | GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *) | 568 | GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *) |
569 | message, &me->id)); | 569 | message, &me->id)); |
@@ -648,8 +648,10 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
648 | p->cfg = GNUNET_CONFIGURATION_create (); | 648 | p->cfg = GNUNET_CONFIGURATION_create (); |
649 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 649 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
650 | if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) | 650 | if (GNUNET_CONFIGURATION_have_value (p->cfg,"PATHS", "SERVICEHOME")) |
651 | { | ||
651 | GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); | 652 | GNUNET_CONFIGURATION_get_value_string (p->cfg, "PATHS", "SERVICEHOME", &p->servicehome); |
652 | GNUNET_DISK_directory_remove (p->servicehome); | 653 | GNUNET_DISK_directory_remove (p->servicehome); |
654 | } | ||
653 | 655 | ||
654 | #if START_ARM | 656 | #if START_ARM |
655 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, | 657 | p->arm_proc = GNUNET_OS_start_process (NULL, NULL, |
@@ -922,16 +924,17 @@ main (int argc, char *argv[]) | |||
922 | stop_arm (&p1); | 924 | stop_arm (&p1); |
923 | stop_arm (&p2); | 925 | stop_arm (&p2); |
924 | 926 | ||
925 | if ((p1.servicehome != NULL) && (p2.servicehome != NULL)) | 927 | if (p1.servicehome != NULL) |
926 | { | 928 | { |
927 | GNUNET_DISK_directory_remove (p1.servicehome); | 929 | GNUNET_DISK_directory_remove (p1.servicehome); |
928 | GNUNET_DISK_directory_remove (p2.servicehome); | 930 | GNUNET_free(p1.servicehome); |
929 | GNUNET_free(p1.servicehome); | 931 | } |
930 | GNUNET_free(p2.servicehome); | 932 | if (p2.servicehome != NULL) |
931 | } | 933 | { |
932 | 934 | GNUNET_DISK_directory_remove (p2.servicehome); | |
935 | GNUNET_free(p2.servicehome); | ||
936 | } | ||
933 | GNUNET_free(logger); | 937 | GNUNET_free(logger); |
934 | |||
935 | return ret; | 938 | return ret; |
936 | } | 939 | } |
937 | 940 | ||