diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-05-11 19:08:27 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-05-11 19:08:27 +0000 |
commit | b6611f1bfbf2f21cc66759b16660d0203db22504 (patch) | |
tree | 8e4aee0e3924e01f7a9e53e993cfa04fbb00bfac /src | |
parent | 362cc6cfa3cd9e7a9625d6c9841374331761ce88 (diff) | |
download | gnunet-b6611f1bfbf2f21cc66759b16660d0203db22504.tar.gz gnunet-b6611f1bfbf2f21cc66759b16660d0203db22504.zip |
reduce debugging messages
Diffstat (limited to 'src')
-rw-r--r-- | src/arm/arm_api.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index f15c9ab53..cd4343dbd 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c | |||
@@ -121,20 +121,20 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
121 | { | 121 | { |
122 | struct ShutdownContext *shutdown_ctx = cls; | 122 | struct ShutdownContext *shutdown_ctx = cls; |
123 | 123 | ||
124 | if ((msg == NULL) && (shutdown_ctx->confirmed != GNUNET_YES)) | 124 | if ((msg == NULL) && (shutdown_ctx->confirmed != GNUNET_YES)) |
125 | { | 125 | { |
126 | /* Means the other side closed the connection and never confirmed a shutdown */ | 126 | /* Means the other side closed the connection and never confirmed a shutdown */ |
127 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 127 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
128 | "Service handle shutdown before ACK!\n"); | 128 | "Service handle shutdown before ACK!\n"); |
129 | if (shutdown_ctx->cont != NULL) | 129 | if (shutdown_ctx->cont != NULL) |
130 | shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_SYSERR); | 130 | shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_SYSERR); |
131 | GNUNET_SCHEDULER_cancel(shutdown_ctx->sched, shutdown_ctx->cancel_task); | 131 | GNUNET_SCHEDULER_cancel(shutdown_ctx->sched, shutdown_ctx->cancel_task); |
132 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 132 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); |
133 | GNUNET_free(shutdown_ctx); | 133 | GNUNET_free(shutdown_ctx); |
134 | } | 134 | } |
135 | else if ((msg == NULL) && (shutdown_ctx->confirmed == GNUNET_YES)) | 135 | else if ((msg == NULL) && (shutdown_ctx->confirmed == GNUNET_YES)) |
136 | { | 136 | { |
137 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, | 137 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
138 | "Service shutdown complete.\n"); | 138 | "Service shutdown complete.\n"); |
139 | if (shutdown_ctx->cont != NULL) | 139 | if (shutdown_ctx->cont != NULL) |
140 | shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_NO); | 140 | shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_NO); |
@@ -149,20 +149,20 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
149 | switch (ntohs(msg->type)) | 149 | switch (ntohs(msg->type)) |
150 | { | 150 | { |
151 | case GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN_ACK: | 151 | case GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN_ACK: |
152 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, | 152 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
153 | "Received confirmation for service shutdown.\n"); | 153 | "Received confirmation for service shutdown.\n"); |
154 | shutdown_ctx->confirmed = GNUNET_YES; | 154 | shutdown_ctx->confirmed = GNUNET_YES; |
155 | GNUNET_CLIENT_receive (shutdown_ctx->sock, | 155 | GNUNET_CLIENT_receive (shutdown_ctx->sock, |
156 | &service_shutdown_handler, | 156 | &service_shutdown_handler, |
157 | shutdown_ctx, | 157 | shutdown_ctx, |
158 | GNUNET_TIME_UNIT_FOREVER_REL); | 158 | GNUNET_TIME_UNIT_FOREVER_REL); |
159 | break; | 159 | break; |
160 | default: /* Fall through */ | 160 | default: /* Fall through */ |
161 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, | 161 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
162 | "Service shutdown refused!\n"); | 162 | "Service shutdown refused!\n"); |
163 | if (shutdown_ctx->cont != NULL) | 163 | if (shutdown_ctx->cont != NULL) |
164 | shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_YES); | 164 | shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_YES); |
165 | 165 | ||
166 | GNUNET_SCHEDULER_cancel(shutdown_ctx->sched, shutdown_ctx->cancel_task); | 166 | GNUNET_SCHEDULER_cancel(shutdown_ctx->sched, shutdown_ctx->cancel_task); |
167 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 167 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); |
168 | GNUNET_free(shutdown_ctx); | 168 | GNUNET_free(shutdown_ctx); |
@@ -214,11 +214,11 @@ write_shutdown (void *cls, size_t size, void *buf) | |||
214 | } | 214 | } |
215 | 215 | ||
216 | GNUNET_CLIENT_receive (shutdown_ctx->sock, | 216 | GNUNET_CLIENT_receive (shutdown_ctx->sock, |
217 | &service_shutdown_handler, shutdown_ctx, | 217 | &service_shutdown_handler, shutdown_ctx, |
218 | GNUNET_TIME_UNIT_FOREVER_REL); | 218 | GNUNET_TIME_UNIT_FOREVER_REL); |
219 | shutdown_ctx->cancel_task = GNUNET_SCHEDULER_add_delayed (shutdown_ctx->sched, | 219 | shutdown_ctx->cancel_task = GNUNET_SCHEDULER_add_delayed (shutdown_ctx->sched, |
220 | GNUNET_TIME_absolute_get_remaining(shutdown_ctx->timeout), | 220 | GNUNET_TIME_absolute_get_remaining(shutdown_ctx->timeout), |
221 | &service_shutdown_cancel, | 221 | &service_shutdown_cancel, |
222 | shutdown_ctx); | 222 | shutdown_ctx); |
223 | msg = (struct GNUNET_MessageHeader *) buf; | 223 | msg = (struct GNUNET_MessageHeader *) buf; |
224 | msg->type = htons (GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN); | 224 | msg->type = htons (GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN); |