+
+}
+
+
+static void
+testservice_task (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ struct GNUNET_CONFIGURATION_Handle *cfg = cls;
+
+ if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
+ {
+ FPRINTF (stderr, _("Service `%s' is not running\n"), "namestore");
+ return;
+ }
+
+
+ if (NULL == keyfile)
+ {
+ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
+ "ZONEKEY", &keyfile))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "gns", "ZONEKEY");
+ return;
+ }
+ fprintf (stderr,
+ _("Using default zone file `%s'\n"),
+ keyfile);
+ }
+ keygen = GNUNET_CRYPTO_rsa_key_create_start (keyfile, key_generation_cb, cfg);
+ GNUNET_free (keyfile);
+ keyfile = NULL;
+ if (NULL == keygen)
+ {
+ GNUNET_SCHEDULER_shutdown ();
+ ret = 1;
+ }
+}
+
+
+/**
+ * Main function that will be run.
+ *
+ * @param cls closure
+ * @param args remaining command-line arguments
+ * @param cfgfile name of the configuration file used (for saving, can be NULL!)
+ * @param cfg configuration
+ */
+static void
+run (void *cls, char *const *args, const char *cfgfile,
+ const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+
+ if ( (NULL != args[0]) && (NULL == uri) )
+ uri = GNUNET_strdup (args[0]);
+
+ GNUNET_CLIENT_service_test ("namestore", cfg,
+ GNUNET_TIME_UNIT_SECONDS,
+ &testservice_task,
+ (void *) cfg);