aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/gnunet-service-datastore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datastore/gnunet-service-datastore.c')
-rw-r--r--src/datastore/gnunet-service-datastore.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 64d1ce363..ddab5cdf3 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -1239,29 +1239,6 @@ handle_drop (void *cls,
1239 1239
1240 1240
1241/** 1241/**
1242 * List of handlers for the messages understood by this
1243 * service.
1244 */
1245static struct GNUNET_SERVER_MessageHandler handlers[] = {
1246 {&handle_reserve, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE,
1247 sizeof(struct ReserveMessage) },
1248 {&handle_release_reserve, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE,
1249 sizeof(struct ReleaseReserveMessage) },
1250 {&handle_put, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_PUT, 0 },
1251 {&handle_update, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE,
1252 sizeof (struct UpdateMessage) },
1253 {&handle_get, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET, 0 },
1254 {&handle_get_random, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM,
1255 sizeof(struct GNUNET_MessageHeader) },
1256 {&handle_remove, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE, 0 },
1257 {&handle_drop, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_DROP,
1258 sizeof(struct GNUNET_MessageHeader) },
1259 {NULL, NULL, 0, 0}
1260};
1261
1262
1263
1264/**
1265 * Load the datastore plugin. 1242 * Load the datastore plugin.
1266 */ 1243 */
1267static struct DatastorePlugin * 1244static struct DatastorePlugin *
@@ -1443,6 +1420,22 @@ run (void *cls,
1443 struct GNUNET_SERVER_Handle *server, 1420 struct GNUNET_SERVER_Handle *server,
1444 const struct GNUNET_CONFIGURATION_Handle *c) 1421 const struct GNUNET_CONFIGURATION_Handle *c)
1445{ 1422{
1423 static const struct GNUNET_SERVER_MessageHandler handlers[] = {
1424 {&handle_reserve, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE,
1425 sizeof(struct ReserveMessage) },
1426 {&handle_release_reserve, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_RELEASE_RESERVE,
1427 sizeof(struct ReleaseReserveMessage) },
1428 {&handle_put, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_PUT, 0 },
1429 {&handle_update, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE,
1430 sizeof (struct UpdateMessage) },
1431 {&handle_get, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET, 0 },
1432 {&handle_get_random, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM,
1433 sizeof(struct GNUNET_MessageHeader) },
1434 {&handle_remove, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE, 0 },
1435 {&handle_drop, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_DROP,
1436 sizeof(struct GNUNET_MessageHeader) },
1437 {NULL, NULL, 0, 0}
1438 };
1446 char *fn; 1439 char *fn;
1447 unsigned int bf_size; 1440 unsigned int bf_size;
1448 1441