- changes
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 22 Feb 2012 10:52:42 +0000 (10:52 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 22 Feb 2012 10:52:42 +0000 (10:52 +0000)
src/namestore/gnunet-service-namestore.c
src/namestore/namestore_api.c
src/namestore/test_namestore_api.c
src/namestore/test_namestore_api.conf

index 8e7946246b45651711552084cefec73e5523eb4f..5bfda01610cf749bbe6fd0469d28e4cb0ca1d9a5 100644 (file)
@@ -27,6 +27,7 @@
 #include "gnunet_getopt_lib.h"
 #include "gnunet_service_lib.h"
 #include "gnunet_namestore_service.h"
+#include "namestore.h"
 
 
 /**
@@ -41,6 +42,12 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   /* FIXME: do clean up here */
 }
 
+static void handle_start ()
+{
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "START");
+
+}
+
 
 /**
  * Process template requests.
@@ -54,7 +61,8 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
   static const struct GNUNET_SERVER_MessageHandler handlers[] = {
-    /* FIXME: add handlers here! */
+    {&handle_start, NULL,
+     GNUNET_MESSAGE_TYPE_NAMESTORE_START, sizeof (struct StartMessage)},
     {NULL, NULL, 0, 0}
   };
 
index 28f304d082e16ef473fba2f959a9eee9ff2e501f..fbe212c446c002c9bc6aee428aa7fcd1064674ef 100644 (file)
@@ -137,15 +137,6 @@ struct GNUNET_NAMESTORE_SimpleRecord
 static void
 force_reconnect (struct GNUNET_NAMESTORE_Handle *nsh);
 
-/**
- * Transmit messages from the message queue to the service
- * (if there are any, and if we are not already trying).
- *
- * @param nsh handle to use
- */
-static void
-do_transmit (struct GNUNET_NAMESTORE_Handle *nsh);
-
 
 /**
  * Type of a function to call when we receive a message
@@ -185,6 +176,17 @@ process_namestore_message (void *cls, const struct GNUNET_MessageHeader *msg)
     force_reconnect (nsh);
 }
 
+
+/**
+ * Transmit messages from the message queue to the service
+ * (if there are any, and if we are not already trying).
+ *
+ * @param nsh handle to use
+ */
+static void
+do_transmit (struct GNUNET_NAMESTORE_Handle *nsh);
+
+
 /**
  * We can now transmit a message to NAMESTORE. Do it.
  *
index 16074c7cf55d3501a9ff81513614ebfcee0ff57c..85fbcbfc542c3a39b569e3aafa5e9096d64f5967 100644 (file)
@@ -31,6 +31,7 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
 
 static int res;
 
+
 static void
 run (void *cls, char *const *args, const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
@@ -67,7 +68,6 @@ main (int argc, char *argv[])
 {
   int ret;
 
-
   ret = check ();
 
   return ret;
index c73a15498657968211eaf01efa6e3c89a574ba27..be93cb9622de6f740f977d63c8e8ad9c3e5581b6 100644 (file)
@@ -1,3 +1,8 @@
+[arm]
+PORT = 12000
+DEFAULTSERVICES = namestore
+UNIXPATH = /tmp/gnunet-p1-service-arm.sock
+
 [namestore]
 AUTOSTART = YES
 UNIXPATH = /tmp/gnunet-service-namestore.sock
@@ -26,5 +31,3 @@ CONFIG = ~/.my.cnf
 # HOST = localhost
 # PORT = 3306
 
-
-