do not log if response was missed due to shutdown of our own process
authorChristian Grothoff <christian@grothoff.org>
Tue, 10 Nov 2009 20:20:32 +0000 (20:20 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 10 Nov 2009 20:20:32 +0000 (20:20 +0000)
src/arm/arm_api.c

index bc80b779f32957318d0df8d9d0c9551db9884c49..29d160147372228e00c3622b9acfc9a092fa534d 100644 (file)
@@ -245,11 +245,12 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg)
 
   if (msg == NULL)
     {
-      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                  _("Error receiving response to `%s' request from ARM service\n"),
-                 (sc->type == GNUNET_MESSAGE_TYPE_ARM_START) 
-                 ? "START"
-                 : "STOP");
+      if (0 == (GNUNET_SCHEDULER_REASON_SHUTDOWN & GNUNET_SCHEDULER_get_reason (sc->h->sched)))
+       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                   _("Error receiving response to `%s' request from ARM service\n"),
+                   (sc->type == GNUNET_MESSAGE_TYPE_ARM_START) 
+                   ? "START"
+                   : "STOP");
       GNUNET_CLIENT_disconnect (sc->h->client);
       sc->h->client = GNUNET_CLIENT_connect (sc->h->sched, 
                                             "arm",