config fix
[oweals/gnunet.git] / src / sensor / gnunet-sensor.c
index 0b4dd6da1d29a3ad9a2e4a59b52d1ce68ac7789a..fa7930832bfe9e2181c1909a31aaa072950990fc 100644 (file)
@@ -42,7 +42,7 @@ static char *get_sensor;
 /*
  * Handle to sensor service
  */
-struct GNUNET_SENSOR_Handle *sensor_handle;
+static struct GNUNET_SENSOR_Handle *sensor_handle;
 
 /**
  * Run on shutdown
@@ -79,10 +79,7 @@ void print_sensor_info(void *cls,
     return;
   }
   if(NULL == sensor) /* no more sensors from service */
-  {
-    GNUNET_SCHEDULER_shutdown();
     return;
-  }
   printf("Name: %s\nVersion: %d.%d\n",
       sensor->name,
       sensor->version_major,
@@ -132,6 +129,7 @@ run (void *cls,
         NULL);
   }
 
+  GNUNET_SCHEDULER_shutdown();
   ret = 0;
 }