aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-04-02 15:39:04 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-04-02 15:39:04 +0000
commit63d32c4e2c33221de970ca4158b2aca5c4505e18 (patch)
tree08d2636bcfb9bc4c0c11765c9f9582a16b6617ba /src
parentfcb359dc93bdf9c891edcfb965013e19c61981cf (diff)
downloadgnunet-63d32c4e2c33221de970ca4158b2aca5c4505e18.tar.gz
gnunet-63d32c4e2c33221de970ca4158b2aca5c4505e18.zip
breaks tests
Diffstat (limited to 'src')
-rw-r--r--src/ats/gnunet-service-ats_addresses.c198
-rw-r--r--src/ats/gnunet-service-ats_addresses.h13
-rw-r--r--src/ats/gnunet-service-ats_addresses_mlp.c4
-rw-r--r--src/ats/gnunet-service-ats_addresses_simplistic.c6
4 files changed, 88 insertions, 133 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index dfbef6eb2..2e662a661 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -370,43 +370,9 @@ struct GAS_Addresses_Handle
370 370
371 371
372/** 372/**
373 * Assemble ATS information from address 373 * Disassemble ATS information and update performance information in address
374 * 374 *
375 * @param aa source address 375 * Updates existing information and adds new information
376 * @param dest destination
377 * @return number of elements
378 */
379static unsigned int
380assemble_ats_information (const struct ATS_Address *aa, struct GNUNET_ATS_Information **dest)
381{
382 unsigned int ats_count = GNUNET_ATS_PropertyCount - 1;
383 struct GNUNET_ATS_Information *ats;
384
385 ats = GNUNET_malloc (ats_count * sizeof (struct GNUNET_ATS_Information));
386 (*dest) = ats;
387
388 ats[0].type = ntohl(GNUNET_ATS_UTILIZATION_UP);
389 ats[0].value = aa->atsp_utilization_out.value__;
390 ats[1].type = ntohl(GNUNET_ATS_UTILIZATION_DOWN);
391 ats[1].value = aa->atsp_utilization_in.value__;
392 ats[2].type = ntohl(GNUNET_ATS_NETWORK_TYPE);
393 ats[2].value = ntohl(aa->atsp_network_type);
394 ats[3].type = ntohl(GNUNET_ATS_QUALITY_NET_DELAY);
395 ats[3].value = ntohl(aa->atsp_latency.rel_value);
396 ats[4].type = ntohl(GNUNET_ATS_QUALITY_NET_DISTANCE);
397 ats[4].value = ntohl(aa->atsp_distance);
398 ats[5].type = ntohl(GNUNET_ATS_COST_WAN);
399 ats[5].value = ntohl (aa->atsp_cost_wan);
400 ats[6].type = ntohl(GNUNET_ATS_COST_LAN);
401 ats[6].value = ntohl (aa->atsp_cost_lan);
402 ats[7].type = ntohl(GNUNET_ATS_COST_WLAN);
403 ats[7].value = ntohl (aa->atsp_cost_wlan);
404 return ats_count;
405}
406
407
408/**
409 * Disassemble ATS information and update address
410 * 376 *
411 * @param src source ATS information 377 * @param src source ATS information
412 * @param ats_count number of ATS information 378 * @param ats_count number of ATS information
@@ -418,68 +384,60 @@ disassemble_ats_information (const struct GNUNET_ATS_Information *src,
418 uint32_t ats_count, 384 uint32_t ats_count,
419 struct ATS_Address *dest) 385 struct ATS_Address *dest)
420{ 386{
421 int i; 387
422 int change = GNUNET_NO; 388 int c1;
423 int res = 0; 389 int c2;
424 for (i = 0; i < ats_count; i++) 390 int found;
425 switch (ntohl (src[i].type)) 391 int change;
426 { 392
427 case GNUNET_ATS_UTILIZATION_UP: 393 struct GNUNET_ATS_Information add_atsi[ats_count];
428 if (dest->atsp_utilization_out.value__ != src[i].value) 394 struct GNUNET_ATS_Information *tmp_atsi;
429 change = GNUNET_YES; 395 uint32_t add_atsi_count;
430 dest->atsp_utilization_out.value__ = src[i].value; 396
431 res ++; 397 change = GNUNET_NO;
432 break; 398 add_atsi_count = 0;
433 case GNUNET_ATS_UTILIZATION_DOWN: 399
434 if (dest->atsp_utilization_in.value__ != src[i].value) 400 if (NULL == dest->atsi)
435 change = GNUNET_YES; 401 {
436 dest->atsp_utilization_in.value__ = src[i].value; 402 dest->atsi = GNUNET_malloc (ats_count * sizeof (struct GNUNET_ATS_Information));
437 res ++; 403 dest->atsi_count = ats_count;
438 break; 404 memcpy (dest->atsi, src, ats_count * sizeof (struct GNUNET_ATS_Information));
439 case GNUNET_ATS_QUALITY_NET_DELAY: 405 return GNUNET_YES;
440 if (dest->atsp_latency.rel_value != src[i].value) 406 }
441 change = GNUNET_YES; 407
442 dest->atsp_latency.rel_value = ntohl (src[i].value); 408 /* Update existing performance information */
443 res ++; 409 for (c1 = 0; c1 < ats_count; c1++)
444 break; 410 {
445 case GNUNET_ATS_QUALITY_NET_DISTANCE: 411 found = GNUNET_NO;
446 if (dest->atsp_distance!= src[i].value) 412 for (c2 = 0; c2 < dest->atsi_count; c2++)
447 change = GNUNET_YES; 413 {
448 dest->atsp_distance = ntohl (src[i].value); 414 if (src[c1].type == dest->atsi[c2].type)
449 res ++; 415 {
450 break; 416 if (src[c1].value != dest->atsi[c2].value)
451 case GNUNET_ATS_COST_WAN: 417 {
452 if (dest->atsp_cost_wan != src[i].value) 418 dest->atsi[c2].value = src[c1].value;
453 change = GNUNET_YES; 419 change = GNUNET_YES;
454 dest->atsp_cost_wan = ntohl (src[i].value); 420 }
455 res ++; 421 found = GNUNET_YES;
456 break; 422 break;
457 case GNUNET_ATS_COST_LAN: 423 }
458 if (dest->atsp_cost_lan != src[i].value) 424 }
459 change = GNUNET_YES; 425 if (GNUNET_NO == found)
460 dest->atsp_cost_lan = ntohl (src[i].value); 426 {
461 res ++; 427 add_atsi[add_atsi_count] = src[c1];
462 break; 428 add_atsi_count ++;
463 case GNUNET_ATS_COST_WLAN: 429 }
464 if (dest->atsp_cost_wlan != src[i].value) 430 }
465 change = GNUNET_YES; 431
466 dest->atsp_cost_wlan = ntohl (src[i].value); 432 if (add_atsi_count > 0)
467 res ++; 433 {
468 break; 434 tmp_atsi = GNUNET_malloc ((dest->atsi_count + add_atsi_count) *
469 case GNUNET_ATS_NETWORK_TYPE: 435 sizeof (sizeof (struct GNUNET_ATS_Information)));
470 if (dest->atsp_network_type != src[i].value) 436 memcpy (tmp_atsi, dest->atsi, dest->atsi_count * sizeof (struct GNUNET_ATS_Information));
471 change = GNUNET_YES; 437 memcpy (&tmp_atsi[dest->atsi_count], add_atsi, add_atsi_count * sizeof (struct GNUNET_ATS_Information));
472 dest->atsp_network_type = ntohl (src[i].value); 438 change = GNUNET_YES;
473 res ++; 439 }
474 break; 440
475 case GNUNET_ATS_ARRAY_TERMINATOR:
476 break;
477 default:
478 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
479 "Received unsupported ATS type %u\n", ntohl (src[i].type));
480 GNUNET_break (0);
481 break;
482 }
483 return change; 441 return change;
484} 442}
485 443
@@ -492,6 +450,7 @@ static void
492free_address (struct ATS_Address *addr) 450free_address (struct ATS_Address *addr)
493{ 451{
494 GNUNET_free (addr->plugin); 452 GNUNET_free (addr->plugin);
453 GNUNET_free_non_null (addr->atsi);
495 GNUNET_free (addr); 454 GNUNET_free (addr);
496} 455}
497 456
@@ -523,6 +482,8 @@ create_address (const struct GNUNET_PeerIdentity *peer,
523 aa->active = GNUNET_NO; 482 aa->active = GNUNET_NO;
524 aa->used = GNUNET_NO; 483 aa->used = GNUNET_NO;
525 aa->solver_information = NULL; 484 aa->solver_information = NULL;
485 aa->atsi = NULL;
486 aa->atsi_count = 0;
526 aa->assigned_bw_in = GNUNET_BANDWIDTH_value_init(0); 487 aa->assigned_bw_in = GNUNET_BANDWIDTH_value_init(0);
527 aa->assigned_bw_out = GNUNET_BANDWIDTH_value_init(0); 488 aa->assigned_bw_out = GNUNET_BANDWIDTH_value_init(0);
528 return aa; 489 return aa;
@@ -736,8 +697,6 @@ GAS_addresses_add (struct GAS_Addresses_Handle *handle,
736{ 697{
737 struct ATS_Address *aa; 698 struct ATS_Address *aa;
738 struct ATS_Address *ea; 699 struct ATS_Address *ea;
739 struct GNUNET_ATS_Information *ats_new;
740 uint32_t ats_count_new;
741 unsigned int ats_res; 700 unsigned int ats_res;
742 701
743 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 702 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -774,15 +733,13 @@ GAS_addresses_add (struct GAS_Addresses_Handle *handle,
774 /* Tell solver about new address */ 733 /* Tell solver about new address */
775 handle->s_add (handle->solver, handle->addresses, aa); 734 handle->s_add (handle->solver, handle->addresses, aa);
776 /* Notify performance clients about new address */ 735 /* Notify performance clients about new address */
777 ats_count_new = assemble_ats_information (aa, &ats_new);
778 GAS_performance_notify_all_clients (&aa->peer, 736 GAS_performance_notify_all_clients (&aa->peer,
779 aa->plugin, 737 aa->plugin,
780 aa->addr, aa->addr_len, 738 aa->addr, aa->addr_len,
781 aa->session_id, 739 aa->session_id,
782 ats_new, ats_count_new, 740 aa->atsi, aa->atsi_count,
783 aa->assigned_bw_out, 741 aa->assigned_bw_out,
784 aa->assigned_bw_in); 742 aa->assigned_bw_in);
785 GNUNET_free (ats_new);
786 return; 743 return;
787 } 744 }
788 GNUNET_free (aa->plugin); 745 GNUNET_free (aa->plugin);
@@ -808,15 +765,13 @@ GAS_addresses_add (struct GAS_Addresses_Handle *handle,
808 ea->session_id = session_id; 765 ea->session_id = session_id;
809 if (GNUNET_YES == disassemble_ats_information(atsi, atsi_count, ea)) 766 if (GNUNET_YES == disassemble_ats_information(atsi, atsi_count, ea))
810 { 767 {
811 ats_count_new = assemble_ats_information (aa, &ats_new);
812 GAS_performance_notify_all_clients (&aa->peer, 768 GAS_performance_notify_all_clients (&aa->peer,
813 aa->plugin, 769 aa->plugin,
814 aa->addr, aa->addr_len, 770 aa->addr, aa->addr_len,
815 aa->session_id, 771 aa->session_id,
816 ats_new, ats_count_new, 772 aa->atsi, aa->atsi_count,
817 aa->assigned_bw_out, 773 aa->assigned_bw_out,
818 aa->assigned_bw_in); 774 aa->assigned_bw_in);
819 GNUNET_free (ats_new);
820 } 775 }
821 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 776 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
822 "Updated existing address for peer `%s' %p with new session %u\n", 777 "Updated existing address for peer `%s' %p with new session %u\n",
@@ -848,8 +803,6 @@ GAS_addresses_update (struct GAS_Addresses_Handle *handle,
848 uint32_t atsi_count) 803 uint32_t atsi_count)
849{ 804{
850 struct ATS_Address *aa; 805 struct ATS_Address *aa;
851 struct GNUNET_ATS_Information *ats_new;
852 uint32_t ats_count_new;
853 806
854 if (GNUNET_NO == handle->running) 807 if (GNUNET_NO == handle->running)
855 return; 808 return;
@@ -878,16 +831,14 @@ GAS_addresses_update (struct GAS_Addresses_Handle *handle,
878 /* Update address */ 831 /* Update address */
879 if (GNUNET_YES == disassemble_ats_information (atsi, atsi_count, aa)) 832 if (GNUNET_YES == disassemble_ats_information (atsi, atsi_count, aa))
880 { 833 {
881 ats_count_new = assemble_ats_information (aa, &ats_new);
882 /* Notify performance clients about updated address */ 834 /* Notify performance clients about updated address */
883 GAS_performance_notify_all_clients (&aa->peer, 835 GAS_performance_notify_all_clients (&aa->peer,
884 aa->plugin, 836 aa->plugin,
885 aa->addr, aa->addr_len, 837 aa->addr, aa->addr_len,
886 aa->session_id, 838 aa->session_id,
887 ats_new, ats_count_new, 839 aa->atsi, aa->atsi_count,
888 aa->assigned_bw_out, 840 aa->assigned_bw_out,
889 aa->assigned_bw_in); 841 aa->assigned_bw_in);
890 GNUNET_free (ats_new);
891 } 842 }
892} 843}
893 844
@@ -1163,8 +1114,6 @@ GAS_addresses_request_address (struct GAS_Addresses_Handle *handle,
1163{ 1114{
1164 struct GAS_Addresses_Suggestion_Requests *cur = handle->r_head; 1115 struct GAS_Addresses_Suggestion_Requests *cur = handle->r_head;
1165 struct ATS_Address *aa; 1116 struct ATS_Address *aa;
1166 struct GNUNET_ATS_Information *ats;
1167 unsigned int ats_count;
1168 1117
1169 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1118 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1170 "Received `%s' for peer `%s'\n", 1119 "Received `%s' for peer `%s'\n",
@@ -1198,12 +1147,11 @@ GAS_addresses_request_address (struct GAS_Addresses_Handle *handle,
1198 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1147 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1199 "Suggesting address %p for peer `%s'\n", aa, GNUNET_i2s (peer)); 1148 "Suggesting address %p for peer `%s'\n", aa, GNUNET_i2s (peer));
1200 1149
1201 ats_count = assemble_ats_information (aa, &ats);
1202 GAS_scheduling_transmit_address_suggestion (peer, 1150 GAS_scheduling_transmit_address_suggestion (peer,
1203 aa->plugin, 1151 aa->plugin,
1204 aa->addr, aa->addr_len, 1152 aa->addr, aa->addr_len,
1205 aa->session_id, 1153 aa->session_id,
1206 ats, ats_count, 1154 aa->atsi, aa->atsi_count,
1207 aa->assigned_bw_out, 1155 aa->assigned_bw_out,
1208 aa->assigned_bw_in); 1156 aa->assigned_bw_in);
1209 1157
@@ -1213,8 +1161,6 @@ GAS_addresses_request_address (struct GAS_Addresses_Handle *handle,
1213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1161 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1214 "Address %p ready for suggestion, block interval now %llu \n", 1162 "Address %p ready for suggestion, block interval now %llu \n",
1215 aa, aa->block_interval); 1163 aa, aa->block_interval);
1216
1217 GNUNET_free (ats);
1218} 1164}
1219 1165
1220 1166
@@ -1418,23 +1364,18 @@ bandwidth_changed_cb (void *cls, struct ATS_Address *address)
1418{ 1364{
1419 struct GAS_Addresses_Handle *handle = cls; 1365 struct GAS_Addresses_Handle *handle = cls;
1420 struct GAS_Addresses_Suggestion_Requests *cur; 1366 struct GAS_Addresses_Suggestion_Requests *cur;
1421 struct GNUNET_ATS_Information *ats;
1422 unsigned int ats_count;
1423 1367
1424 GNUNET_assert (handle != NULL); 1368 GNUNET_assert (handle != NULL);
1425 GNUNET_assert (address != NULL); 1369 GNUNET_assert (address != NULL);
1426 1370
1427 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Bandwidth assignment changed for peer %s \n", GNUNET_i2s(&address->peer)); 1371 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Bandwidth assignment changed for peer %s \n", GNUNET_i2s(&address->peer));
1428 1372
1429
1430 ats_count = assemble_ats_information (address, &ats);
1431
1432 /* Notify performance clients about changes to address */ 1373 /* Notify performance clients about changes to address */
1433 GAS_performance_notify_all_clients (&address->peer, 1374 GAS_performance_notify_all_clients (&address->peer,
1434 address->plugin, 1375 address->plugin,
1435 address->addr, address->addr_len, 1376 address->addr, address->addr_len,
1436 address->session_id, 1377 address->session_id,
1437 ats, ats_count, 1378 address->atsi, address->atsi_count,
1438 address->assigned_bw_out, 1379 address->assigned_bw_out,
1439 address->assigned_bw_in); 1380 address->assigned_bw_in);
1440 cur = handle->r_head; 1381 cur = handle->r_head;
@@ -1448,7 +1389,6 @@ bandwidth_changed_cb (void *cls, struct ATS_Address *address)
1448 { 1389 {
1449 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1390 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1450 "Nobody is interested in peer `%s' :(\n",GNUNET_i2s (&address->peer)); 1391 "Nobody is interested in peer `%s' :(\n",GNUNET_i2s (&address->peer));
1451 GNUNET_free (ats);
1452 return; 1392 return;
1453 } 1393 }
1454 1394
@@ -1460,10 +1400,9 @@ bandwidth_changed_cb (void *cls, struct ATS_Address *address)
1460 address->plugin, 1400 address->plugin,
1461 address->addr, address->addr_len, 1401 address->addr, address->addr_len,
1462 address->session_id, 1402 address->session_id,
1463 ats, ats_count, 1403 address->atsi, address->atsi_count,
1464 address->assigned_bw_out, 1404 address->assigned_bw_out,
1465 address->assigned_bw_in); 1405 address->assigned_bw_in);
1466 GNUNET_free (ats);
1467} 1406}
1468 1407
1469 1408
@@ -1746,22 +1685,17 @@ peerinfo_it (void *cls,
1746{ 1685{
1747 struct PeerInfoIteratorContext *pi_ctx = cls; 1686 struct PeerInfoIteratorContext *pi_ctx = cls;
1748 struct ATS_Address *addr = (struct ATS_Address *) value; 1687 struct ATS_Address *addr = (struct ATS_Address *) value;
1749 struct GNUNET_ATS_Information *ats;
1750 uint32_t ats_count;
1751 1688
1752 if (NULL != pi_ctx->it) 1689 if (NULL != pi_ctx->it)
1753 { 1690 {
1754 ats_count = assemble_ats_information (addr, &ats);
1755
1756 pi_ctx->it (pi_ctx->it_cls, 1691 pi_ctx->it (pi_ctx->it_cls,
1757 &addr->peer, 1692 &addr->peer,
1758 addr->plugin, 1693 addr->plugin,
1759 addr->addr, addr->addr_len, 1694 addr->addr, addr->addr_len,
1760 addr->active, 1695 addr->active,
1761 ats, ats_count, 1696 addr->atsi, addr->atsi_count,
1762 addr->assigned_bw_out, 1697 addr->assigned_bw_out,
1763 addr->assigned_bw_in); 1698 addr->assigned_bw_in);
1764 GNUNET_free (ats);
1765 } 1699 }
1766 return GNUNET_YES; 1700 return GNUNET_YES;
1767} 1701}
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h
index b2fc7b798..25622a3a4 100644
--- a/src/ats/gnunet-service-ats_addresses.h
+++ b/src/ats/gnunet-service-ats_addresses.h
@@ -277,6 +277,17 @@ struct ATS_Address
277 */ 277 */
278 void *solver_information; 278 void *solver_information;
279 279
280 /**
281 * ATS performance information for this address
282 */
283 struct GNUNET_ATS_Information *atsi;
284
285 /**
286 * ATS performance information for this address
287 */
288 uint32_t atsi_count;
289
290#if 0
280 /* CHECK USAGE */ 291 /* CHECK USAGE */
281 struct GNUNET_TIME_Relative atsp_latency; 292 struct GNUNET_TIME_Relative atsp_latency;
282 293
@@ -301,7 +312,7 @@ struct ATS_Address
301 312
302 /* CHECK USAGE */ 313 /* CHECK USAGE */
303 uint32_t atsp_network_type; 314 uint32_t atsp_network_type;
304 315#endif
305 /** 316 /**
306 * Inbound bandwidth assigned by solver in NBO 317 * Inbound bandwidth assigned by solver in NBO
307 */ 318 */
diff --git a/src/ats/gnunet-service-ats_addresses_mlp.c b/src/ats/gnunet-service-ats_addresses_mlp.c
index 3a4e14a32..4c10f5b8a 100644
--- a/src/ats/gnunet-service-ats_addresses_mlp.c
+++ b/src/ats/gnunet-service-ats_addresses_mlp.c
@@ -582,11 +582,13 @@ mlp_create_problem_add_address_information (void *cls, const struct GNUNET_HashC
582 */ 582 */
583 for (c = 0; c < GNUNET_ATS_NetworkTypeCount; c++) 583 for (c = 0; c < GNUNET_ATS_NetworkTypeCount; c++)
584 { 584 {
585#if 0
585 if (mlp->pv.quota_index[c] == address->atsp_network_type) 586 if (mlp->pv.quota_index[c] == address->atsp_network_type)
586 { 587 {
587 mlp_create_problem_set_value (p, p->r_quota[c], mlpi->c_b, 1, __LINE__); 588 mlp_create_problem_set_value (p, p->r_quota[c], mlpi->c_b, 1, __LINE__);
588 break; 589 break;
589 } 590 }
591#endif
590 } 592 }
591 593
592 /* c 7) Optimize quality */ 594 /* c 7) Optimize quality */
@@ -1108,6 +1110,7 @@ mlp_update_quality (struct GAS_MLP_Handle *mlp,
1108 /* Check for network update */ 1110 /* Check for network update */
1109 if (type == GNUNET_ATS_NETWORK_TYPE) 1111 if (type == GNUNET_ATS_NETWORK_TYPE)
1110 { 1112 {
1113#if 0
1111 if (address->atsp_network_type != value) 1114 if (address->atsp_network_type != value)
1112 { 1115 {
1113 LOG (GNUNET_ERROR_TYPE_DEBUG, "Updating network for peer `%s' from `%s' to `%s'\n", 1116 LOG (GNUNET_ERROR_TYPE_DEBUG, "Updating network for peer `%s' from `%s' to `%s'\n",
@@ -1118,6 +1121,7 @@ mlp_update_quality (struct GAS_MLP_Handle *mlp,
1118 1121
1119 old_value = address->atsp_network_type; 1122 old_value = address->atsp_network_type;
1120 address->atsp_network_type = value; 1123 address->atsp_network_type = value;
1124#endif
1121 if (mlpi->c_b == MLP_UNDEFINED) 1125 if (mlpi->c_b == MLP_UNDEFINED)
1122 continue; /* This address is not yet in the matrix*/ 1126 continue; /* This address is not yet in the matrix*/
1123 1127
diff --git a/src/ats/gnunet-service-ats_addresses_simplistic.c b/src/ats/gnunet-service-ats_addresses_simplistic.c
index 7450412c9..039eac7cd 100644
--- a/src/ats/gnunet-service-ats_addresses_simplistic.c
+++ b/src/ats/gnunet-service-ats_addresses_simplistic.c
@@ -785,8 +785,10 @@ GAS_simplistic_address_add (void *solver, struct GNUNET_CONTAINER_MultiHashMap *
785 for (c = 0; c < s->networks; c++) 785 for (c = 0; c < s->networks; c++)
786 { 786 {
787 net = &s->network_entries[c]; 787 net = &s->network_entries[c];
788#if 0
788 if (address->atsp_network_type == net->type) 789 if (address->atsp_network_type == net->type)
789 break; 790 break;
791#endif
790 } 792 }
791 if (NULL == net) 793 if (NULL == net)
792 { 794 {
@@ -954,6 +956,7 @@ GAS_simplistic_address_update (void *solver,
954 956
955 break; 957 break;
956 case GNUNET_ATS_NETWORK_TYPE: 958 case GNUNET_ATS_NETWORK_TYPE:
959#if 0
957 if (address->atsp_network_type != value) 960 if (address->atsp_network_type != value)
958 { 961 {
959 962
@@ -1009,6 +1012,7 @@ GAS_simplistic_address_update (void *solver,
1009 } 1012 }
1010 } 1013 }
1011 } 1014 }
1015#endif
1012 break; 1016 break;
1013 case GNUNET_ATS_ARRAY_TERMINATOR: 1017 case GNUNET_ATS_ARRAY_TERMINATOR:
1014 break; 1018 break;
@@ -1104,6 +1108,7 @@ find_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
1104 *previous_p = current; 1108 *previous_p = current;
1105 return GNUNET_OK; 1109 return GNUNET_OK;
1106 } 1110 }
1111#if 0
1107 if (previous->atsp_distance > current->atsp_distance) 1112 if (previous->atsp_distance > current->atsp_distance)
1108 { 1113 {
1109 /* user shorter distance */ 1114 /* user shorter distance */
@@ -1116,6 +1121,7 @@ find_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
1116 *previous_p = current; 1121 *previous_p = current;
1117 return GNUNET_OK; 1122 return GNUNET_OK;
1118 } 1123 }
1124#endif
1119 /* don't care */ 1125 /* don't care */
1120 return GNUNET_OK; 1126 return GNUNET_OK;
1121} 1127}