diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-11 09:43:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-11 09:43:04 +0000 |
commit | d9d94d0e53d26af75ec8241383d166544ebd79f3 (patch) | |
tree | 9080b73624389403a198257fe0547bb4634e64d2 /src/util/test_connection_transmit_cancel.c | |
parent | 2d792ee2e9cc0c993b8907e2c8edb0c2b8465343 (diff) | |
download | gnunet-d9d94d0e53d26af75ec8241383d166544ebd79f3.tar.gz gnunet-d9d94d0e53d26af75ec8241383d166544ebd79f3.zip |
converting to GNUNET_LOG_from*
Diffstat (limited to 'src/util/test_connection_transmit_cancel.c')
-rw-r--r-- | src/util/test_connection_transmit_cancel.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/util/test_connection_transmit_cancel.c b/src/util/test_connection_transmit_cancel.c index 50308a2d0..540d8c51d 100644 --- a/src/util/test_connection_transmit_cancel.c +++ b/src/util/test_connection_transmit_cancel.c | |||
@@ -43,7 +43,8 @@ not_run (void *cls, size_t size, void *buf) | |||
43 | 43 | ||
44 | 44 | ||
45 | static void | 45 | static void |
46 | task_transmit_cancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 46 | task_transmit_cancel (void *cls, |
47 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
47 | { | 48 | { |
48 | int *ok = cls; | 49 | int *ok = cls; |
49 | struct GNUNET_CONNECTION_TransmitHandle *th; | 50 | struct GNUNET_CONNECTION_TransmitHandle *th; |
@@ -52,8 +53,8 @@ task_transmit_cancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
52 | csock = GNUNET_CONNECTION_create_from_connect (cfg, "localhost", PORT); | 53 | csock = GNUNET_CONNECTION_create_from_connect (cfg, "localhost", PORT); |
53 | GNUNET_assert (csock != NULL); | 54 | GNUNET_assert (csock != NULL); |
54 | th = GNUNET_CONNECTION_notify_transmit_ready (csock, 12, | 55 | th = GNUNET_CONNECTION_notify_transmit_ready (csock, 12, |
55 | GNUNET_TIME_UNIT_MINUTES, | 56 | GNUNET_TIME_UNIT_MINUTES, |
56 | ¬_run, cls); | 57 | ¬_run, cls); |
57 | GNUNET_assert (NULL != th); | 58 | GNUNET_assert (NULL != th); |
58 | GNUNET_CONNECTION_notify_transmit_ready_cancel (th); | 59 | GNUNET_CONNECTION_notify_transmit_ready_cancel (th); |
59 | GNUNET_CONNECTION_destroy (csock, GNUNET_YES); | 60 | GNUNET_CONNECTION_destroy (csock, GNUNET_YES); |
@@ -74,7 +75,7 @@ check_transmit_cancel () | |||
74 | ok = 1; | 75 | ok = 1; |
75 | cfg = GNUNET_CONFIGURATION_create (); | 76 | cfg = GNUNET_CONFIGURATION_create (); |
76 | GNUNET_CONFIGURATION_set_value_string (cfg, "resolver", "HOSTNAME", | 77 | GNUNET_CONFIGURATION_set_value_string (cfg, "resolver", "HOSTNAME", |
77 | "localhost"); | 78 | "localhost"); |
78 | GNUNET_SCHEDULER_run (&task_transmit_cancel, &ok); | 79 | GNUNET_SCHEDULER_run (&task_transmit_cancel, &ok); |
79 | GNUNET_CONFIGURATION_destroy (cfg); | 80 | GNUNET_CONFIGURATION_destroy (cfg); |
80 | return ok; | 81 | return ok; |
@@ -88,11 +89,11 @@ main (int argc, char *argv[]) | |||
88 | 89 | ||
89 | GNUNET_log_setup ("test_connection_transmit_cancel", | 90 | GNUNET_log_setup ("test_connection_transmit_cancel", |
90 | #if VERBOSE | 91 | #if VERBOSE |
91 | "DEBUG", | 92 | "DEBUG", |
92 | #else | 93 | #else |
93 | "WARNING", | 94 | "WARNING", |
94 | #endif | 95 | #endif |
95 | NULL); | 96 | NULL); |
96 | ret += check_transmit_cancel (); | 97 | ret += check_transmit_cancel (); |
97 | 98 | ||
98 | return ret; | 99 | return ret; |