diff options
Diffstat (limited to 'src/dht/gnunet-service-xdht_clients.c')
-rw-r--r-- | src/dht/gnunet-service-xdht_clients.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/dht/gnunet-service-xdht_clients.c b/src/dht/gnunet-service-xdht_clients.c index bc5504ebe..afd14c78d 100644 --- a/src/dht/gnunet-service-xdht_clients.c +++ b/src/dht/gnunet-service-xdht_clients.c | |||
@@ -1295,42 +1295,6 @@ handle_dht_local_monitor_stop (void *cls, struct GNUNET_SERVER_Client *client, | |||
1295 | } | 1295 | } |
1296 | 1296 | ||
1297 | 1297 | ||
1298 | #if ENABLE_MALICIOUS | ||
1299 | /** | ||
1300 | * Handler for act malicious message. | ||
1301 | * | ||
1302 | * @param cls closure for the service | ||
1303 | * @param client the client we received this message from | ||
1304 | * @param message the actual message received | ||
1305 | * | ||
1306 | */ | ||
1307 | static void | ||
1308 | handle_dht_act_malicious (void *cls, struct GNUNET_SERVER_Client *client, | ||
1309 | const struct GNUNET_MessageHeader *message) | ||
1310 | { | ||
1311 | const struct GNUNET_DHT_ActMaliciousMessage *msg; | ||
1312 | struct PendingMessage *pm; | ||
1313 | struct GNUNET_DHT_ClientActMaliciousConfirmationMessage *conf; | ||
1314 | unsigned int malicious_action; | ||
1315 | |||
1316 | msg = (const struct GNUNET_DHT_ActMaliciousMessage *)message; | ||
1317 | malicious_action = msg->action; | ||
1318 | |||
1319 | if(GNUNET_OK == GDS_NEIGHBOURS_act_malicious (malicious_action)) | ||
1320 | { | ||
1321 | pm = GNUNET_malloc (sizeof (struct PendingMessage) + | ||
1322 | sizeof (struct GNUNET_DHT_ClientActMaliciousConfirmationMessage)); | ||
1323 | conf = (struct GNUNET_DHT_ClientActMaliciousConfirmationMessage *) &pm[1]; | ||
1324 | conf->header.size = htons (sizeof (struct GNUNET_DHT_ClientActMaliciousConfirmationMessage)); | ||
1325 | conf->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_CLIENT_ACT_MALICIOUS_OK); | ||
1326 | pm->msg = &conf->header; | ||
1327 | add_pending_message (find_active_client (client), pm); | ||
1328 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | ||
1329 | } | ||
1330 | } | ||
1331 | #endif | ||
1332 | |||
1333 | |||
1334 | /** | 1298 | /** |
1335 | * Functions with this signature are called whenever a client | 1299 | * Functions with this signature are called whenever a client |
1336 | * is disconnected on the network level. | 1300 | * is disconnected on the network level. |
@@ -1406,11 +1370,6 @@ GDS_CLIENTS_init (struct GNUNET_SERVER_Handle *server) | |||
1406 | sizeof (struct GNUNET_DHT_MonitorStartStopMessage)}, | 1370 | sizeof (struct GNUNET_DHT_MonitorStartStopMessage)}, |
1407 | {&handle_dht_local_get_result_seen, NULL, | 1371 | {&handle_dht_local_get_result_seen, NULL, |
1408 | GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_RESULTS_KNOWN, 0}, | 1372 | GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_RESULTS_KNOWN, 0}, |
1409 | #if ENABLE_MALICIOUS | ||
1410 | {&handle_dht_act_malicious, NULL, | ||
1411 | GNUNET_MESSAGE_TYPE_DHT_ACT_MALICIOUS, | ||
1412 | sizeof (struct GNUNET_DHT_ActMaliciousMessage)}, | ||
1413 | #endif | ||
1414 | {NULL, NULL, 0, 0} | 1373 | {NULL, NULL, 0, 0} |
1415 | }; | 1374 | }; |
1416 | forward_map = GNUNET_CONTAINER_multihashmap_create (1024, GNUNET_NO); | 1375 | forward_map = GNUNET_CONTAINER_multihashmap_create (1024, GNUNET_NO); |