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.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 1d092a619..ba9bc5b93 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -1240,24 +1240,24 @@ handle_update (void *cls,
1240 1240
1241 1241
1242/** 1242/**
1243 * Handle GET_RANDOM-message. 1243 * Handle GET_REPLICATION-message.
1244 * 1244 *
1245 * @param cls closure 1245 * @param cls closure
1246 * @param client identification of the client 1246 * @param client identification of the client
1247 * @param message the actual message 1247 * @param message the actual message
1248 */ 1248 */
1249static void 1249static void
1250handle_get_random (void *cls, 1250handle_get_replication (void *cls,
1251 struct GNUNET_SERVER_Client *client, 1251 struct GNUNET_SERVER_Client *client,
1252 const struct GNUNET_MessageHeader *message) 1252 const struct GNUNET_MessageHeader *message)
1253{ 1253{
1254#if DEBUG_DATASTORE 1254#if DEBUG_DATASTORE
1255 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1255 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1256 "Processing `%s' request\n", 1256 "Processing `%s' request\n",
1257 "GET_RANDOM"); 1257 "GET_REPLICATION");
1258#endif 1258#endif
1259 GNUNET_STATISTICS_update (stats, 1259 GNUNET_STATISTICS_update (stats,
1260 gettext_noop ("# GET RANDOM requests received"), 1260 gettext_noop ("# GET REPLICATION requests received"),
1261 1, 1261 1,
1262 GNUNET_NO); 1262 GNUNET_NO);
1263 GNUNET_SERVER_client_keep (client); 1263 GNUNET_SERVER_client_keep (client);
@@ -1282,6 +1282,12 @@ handle_get_zero_anonymity (void *cls,
1282 enum GNUNET_BLOCK_Type type; 1282 enum GNUNET_BLOCK_Type type;
1283 1283
1284 type = (enum GNUNET_BLOCK_Type) ntohl (msg->type); 1284 type = (enum GNUNET_BLOCK_Type) ntohl (msg->type);
1285 if (type == GNUNET_BLOCK_TYPE_ANY)
1286 {
1287 GNUNET_break (0);
1288 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
1289 return;
1290 }
1285#if DEBUG_DATASTORE 1291#if DEBUG_DATASTORE
1286 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1292 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1287 "Processing `%s' request\n", 1293 "Processing `%s' request\n",
@@ -1706,7 +1712,7 @@ run (void *cls,
1706 {&handle_update, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE, 1712 {&handle_update, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_UPDATE,
1707 sizeof (struct UpdateMessage) }, 1713 sizeof (struct UpdateMessage) },
1708 {&handle_get, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET, 0 }, 1714 {&handle_get, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET, 0 },
1709 {&handle_get_random, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM, 1715 {&handle_get_replication, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET_REPLICATION,
1710 sizeof(struct GNUNET_MessageHeader) }, 1716 sizeof(struct GNUNET_MessageHeader) },
1711 {&handle_get_zero_anonymity, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET_ZERO_ANONYMITY, 1717 {&handle_get_zero_anonymity, NULL, GNUNET_MESSAGE_TYPE_DATASTORE_GET_ZERO_ANONYMITY,
1712 sizeof(struct GetZeroAnonymityMessage) }, 1718 sizeof(struct GetZeroAnonymityMessage) },