aboutsummaryrefslogtreecommitdiff
path: root/src/arm
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2011-02-05 12:38:04 +0000
committerNathan S. Evans <evans@in.tum.de>2011-02-05 12:38:04 +0000
commitc6fbb7224e3bdf617ae07e106b9494c522cbe1cd (patch)
tree0882bf0d576c105bcf9c47646dc6d47c9a85955b /src/arm
parent1b9ada73c28674a518e9270da04b6853d1bb942a (diff)
downloadgnunet-c6fbb7224e3bdf617ae07e106b9494c522cbe1cd.tar.gz
gnunet-c6fbb7224e3bdf617ae07e106b9494c522cbe1cd.zip
clean up debug messages
Diffstat (limited to 'src/arm')
-rw-r--r--src/arm/arm_api.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c
index cd089c621..c5caa5393 100644
--- a/src/arm/arm_api.c
+++ b/src/arm/arm_api.c
@@ -107,9 +107,11 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg)
107 107
108 if ((msg == NULL) && (shutdown_ctx->confirmed != GNUNET_YES)) 108 if ((msg == NULL) && (shutdown_ctx->confirmed != GNUNET_YES))
109 { 109 {
110#if DEBUG_ARM
110 /* Means the other side closed the connection and never confirmed a shutdown */ 111 /* Means the other side closed the connection and never confirmed a shutdown */
111 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 112 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
112 "Service handle shutdown before ACK!\n"); 113 "Service handle shutdown before ACK!\n");
114#endif
113 if (shutdown_ctx->cont != NULL) 115 if (shutdown_ctx->cont != NULL)
114 shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_SYSERR); 116 shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_SYSERR);
115 GNUNET_SCHEDULER_cancel(shutdown_ctx->cancel_task); 117 GNUNET_SCHEDULER_cancel(shutdown_ctx->cancel_task);
@@ -171,7 +173,9 @@ void service_shutdown_cancel (void *cls,
171 const struct GNUNET_SCHEDULER_TaskContext * tc) 173 const struct GNUNET_SCHEDULER_TaskContext * tc)
172{ 174{
173 struct ShutdownContext *shutdown_ctx = cls; 175 struct ShutdownContext *shutdown_ctx = cls;
174 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "service_shutdown_cancel called!\n"); 176#if DEBUG_ARM
177 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "service_shutdown_cancel called!\n");
178#endif
175 shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_SYSERR); 179 shutdown_ctx->cont(shutdown_ctx->cont_cls, GNUNET_SYSERR);
176 GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); 180 GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
177 GNUNET_free(shutdown_ctx); 181 GNUNET_free(shutdown_ctx);
@@ -622,6 +626,9 @@ GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
622 _("Asked to start service `%s' within %llu ms\n"), service_name, 626 _("Asked to start service `%s' within %llu ms\n"), service_name,
623 (unsigned long long) timeout.rel_value); 627 (unsigned long long) timeout.rel_value);
624#endif 628#endif
629 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
630 _("Asked to start service `%s' within %llu ms\n"), service_name,
631 (unsigned long long) timeout.rel_value);
625 if (0 == strcasecmp ("arm", service_name)) 632 if (0 == strcasecmp ("arm", service_name))
626 { 633 {
627 slen = strlen ("arm") + 1; 634 slen = strlen ("arm") + 1;
@@ -640,12 +647,15 @@ GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
640 client = GNUNET_CLIENT_connect ("arm", h->cfg); 647 client = GNUNET_CLIENT_connect ("arm", h->cfg);
641 if (client == NULL) 648 if (client == NULL)
642 { 649 {
650 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "arm_api, GNUNET_CLIENT_connect returned NULL\n");
643 cb (cb_cls, GNUNET_SYSERR); 651 cb (cb_cls, GNUNET_SYSERR);
644 return; 652 return;
645 } 653 }
654 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "arm_api, GNUNET_CLIENT_connect returned non-NULL\n");
646 GNUNET_CLIENT_ignore_shutdown (client, GNUNET_YES); 655 GNUNET_CLIENT_ignore_shutdown (client, GNUNET_YES);
647 h->client = client; 656 h->client = client;
648 } 657 }
658 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "arm_api, h->client non-NULL\n");
649 change_service (h, service_name, timeout, cb, cb_cls, GNUNET_MESSAGE_TYPE_ARM_START); 659 change_service (h, service_name, timeout, cb, cb_cls, GNUNET_MESSAGE_TYPE_ARM_START);
650} 660}
651 661