aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-02-22 10:52:42 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-02-22 10:52:42 +0000
commit87b76a67c1c683ba424c236ee61c6829112d4b88 (patch)
tree428c28fd8316d4000f221b89ab8dfdbc46e9a3bf /src
parentf72df56543cfcd06df55f9f8e89b752013cc7bf6 (diff)
- changes
Diffstat (limited to 'src')
-rw-r--r--src/namestore/gnunet-service-namestore.c10
-rw-r--r--src/namestore/namestore_api.c20
-rw-r--r--src/namestore/test_namestore_api.c2
-rw-r--r--src/namestore/test_namestore_api.conf7
4 files changed, 26 insertions, 13 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 8e7946246b..5bfda01610 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -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}
};
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index 28f304d082..fbe212c446 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -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.
*
diff --git a/src/namestore/test_namestore_api.c b/src/namestore/test_namestore_api.c
index 16074c7cf5..85fbcbfc54 100644
--- a/src/namestore/test_namestore_api.c
+++ b/src/namestore/test_namestore_api.c
@@ -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;
diff --git a/src/namestore/test_namestore_api.conf b/src/namestore/test_namestore_api.conf
index c73a154986..be93cb9622 100644
--- a/src/namestore/test_namestore_api.conf
+++ b/src/namestore/test_namestore_api.conf
@@ -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
-
-