diff options
-rw-r--r-- | src/transport/Makefile.am | 4 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport.c | 2 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_ats.c (renamed from src/transport/gnunet_transport_ats.c) | 53 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_ats.h (renamed from src/transport/gnunet_transport_ats.h) | 0 | ||||
-rw-r--r-- | src/transport/test_transport_ats.c | 2 | ||||
-rw-r--r-- | src/transport/test_transport_ats_multiple_peers.c | 2 |
6 files changed, 10 insertions, 53 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 0f0444f52..daffb6484 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -20,7 +20,7 @@ if HAVE_MHD | |||
20 | endif | 20 | endif |
21 | 21 | ||
22 | if HAVE_LIBGLPK | 22 | if HAVE_LIBGLPK |
23 | TRANSPORT_ATS_SRC = gnunet_transport_ats.c | 23 | TRANSPORT_ATS_SRC = gnunet-service-transport_ats.c |
24 | endif | 24 | endif |
25 | 25 | ||
26 | if USE_COVERAGE | 26 | if USE_COVERAGE |
@@ -318,7 +318,7 @@ TESTS = \ | |||
318 | endif | 318 | endif |
319 | 319 | ||
320 | test_transport_ats_SOURCES = \ | 320 | test_transport_ats_SOURCES = \ |
321 | test_transport_ats.c gnunet_transport_ats.c | 321 | test_transport_ats.c $(TRANSPORT_ATS_SRC) |
322 | test_transport_ats_LDADD = -lm \ | 322 | test_transport_ats_LDADD = -lm \ |
323 | $(top_builddir)/src/transport/libgnunettransportnew.la \ | 323 | $(top_builddir)/src/transport/libgnunettransportnew.la \ |
324 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 324 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 43b988f83..4c6fc8993 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "gnunet_service_lib.h" | 37 | #include "gnunet_service_lib.h" |
38 | #include "gnunet_signatures.h" | 38 | #include "gnunet_signatures.h" |
39 | #include "gnunet_transport_plugin.h" | 39 | #include "gnunet_transport_plugin.h" |
40 | #include "gnunet_transport_ats.h" | 40 | #include "gnunet-service-transport_ats.h" |
41 | #include "transport.h" | 41 | #include "transport.h" |
42 | 42 | ||
43 | 43 | ||
diff --git a/src/transport/gnunet_transport_ats.c b/src/transport/gnunet-service-transport_ats.c index e83549f7e..acbc3878c 100644 --- a/src/transport/gnunet_transport_ats.c +++ b/src/transport/gnunet-service-transport_ats.c | |||
@@ -25,12 +25,16 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "gnunet_transport_ats.h" | 28 | |
29 | #include "gnunet-service-transport_ats.h" | ||
29 | #include "gnunet_transport_service.h" | 30 | #include "gnunet_transport_service.h" |
30 | #include "gnunet_statistics_service.h" | 31 | #include "gnunet_statistics_service.h" |
31 | #include "gnunet_container_lib.h" | 32 | #include "gnunet_container_lib.h" |
32 | 33 | ||
33 | 34 | ||
35 | |||
36 | |||
37 | |||
34 | /* LP/MIP problem object */ | 38 | /* LP/MIP problem object */ |
35 | 39 | ||
36 | #if !HAVE_LIBGLPK | 40 | #if !HAVE_LIBGLPK |
@@ -482,12 +486,6 @@ struct ATS_Handle * ats_init (double D, | |||
482 | GNUNET_TRANSPORT_ATS_AddressNotification address_not, | 486 | GNUNET_TRANSPORT_ATS_AddressNotification address_not, |
483 | GNUNET_TRANSPORT_ATS_ResultCallback res_cb) | 487 | GNUNET_TRANSPORT_ATS_ResultCallback res_cb) |
484 | { | 488 | { |
485 | |||
486 | #if !HAVE_LIBGLPK | ||
487 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
488 | return NULL; | ||
489 | #endif | ||
490 | |||
491 | struct ATS_Handle * ats = NULL; | 489 | struct ATS_Handle * ats = NULL; |
492 | 490 | ||
493 | ats = GNUNET_malloc(sizeof (struct ATS_Handle)); | 491 | ats = GNUNET_malloc(sizeof (struct ATS_Handle)); |
@@ -535,11 +533,6 @@ int ats_create_problem (struct ATS_Handle *ats, | |||
535 | struct ATS_mechanism *mechanisms, | 533 | struct ATS_mechanism *mechanisms, |
536 | int c_m) | 534 | int c_m) |
537 | { | 535 | { |
538 | #if !HAVE_LIBGLPK | ||
539 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
540 | return GNUNET_SYSERR; | ||
541 | #endif | ||
542 | |||
543 | if ((c_p == 0) || (c_m == 0)) | 536 | if ((c_p == 0) || (c_m == 0)) |
544 | return GNUNET_SYSERR; | 537 | return GNUNET_SYSERR; |
545 | 538 | ||
@@ -1011,11 +1004,6 @@ int ats_create_problem (struct ATS_Handle *ats, | |||
1011 | 1004 | ||
1012 | void ats_delete_problem (struct ATS_Handle * ats) | 1005 | void ats_delete_problem (struct ATS_Handle * ats) |
1013 | { | 1006 | { |
1014 | #if !HAVE_LIBGLPK | ||
1015 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
1016 | return; | ||
1017 | #endif | ||
1018 | |||
1019 | #if DEBUG_ATS | 1007 | #if DEBUG_ATS |
1020 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Deleting problem\n"); | 1008 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Deleting problem\n"); |
1021 | #endif | 1009 | #endif |
@@ -1090,12 +1078,6 @@ void ats_solve_problem (struct ATS_Handle * ats, | |||
1090 | unsigned int c_mechs, | 1078 | unsigned int c_mechs, |
1091 | struct ATS_internals *stat) | 1079 | struct ATS_internals *stat) |
1092 | { | 1080 | { |
1093 | #if !HAVE_LIBGLPK | ||
1094 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
1095 | return; | ||
1096 | #endif | ||
1097 | |||
1098 | |||
1099 | int result = GNUNET_SYSERR; | 1081 | int result = GNUNET_SYSERR; |
1100 | int lp_solution = GNUNET_SYSERR; | 1082 | int lp_solution = GNUNET_SYSERR; |
1101 | int mlp_solution = GNUNET_SYSERR; | 1083 | int mlp_solution = GNUNET_SYSERR; |
@@ -1222,11 +1204,6 @@ void ats_solve_problem (struct ATS_Handle * ats, | |||
1222 | 1204 | ||
1223 | void ats_shutdown (struct ATS_Handle * ats) | 1205 | void ats_shutdown (struct ATS_Handle * ats) |
1224 | { | 1206 | { |
1225 | #if !HAVE_LIBGLPK | ||
1226 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
1227 | return; | ||
1228 | #endif | ||
1229 | |||
1230 | #if DEBUG_ATS | 1207 | #if DEBUG_ATS |
1231 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ATS shutdown\n"); | 1208 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ATS shutdown\n"); |
1232 | #endif | 1209 | #endif |
@@ -1238,11 +1215,6 @@ void ats_shutdown (struct ATS_Handle * ats) | |||
1238 | 1215 | ||
1239 | void ats_update_problem_qm (struct ATS_Handle * ats) | 1216 | void ats_update_problem_qm (struct ATS_Handle * ats) |
1240 | { | 1217 | { |
1241 | #if !HAVE_LIBGLPK | ||
1242 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
1243 | return; | ||
1244 | #endif | ||
1245 | |||
1246 | int array_index; | 1218 | int array_index; |
1247 | int row_index; | 1219 | int row_index; |
1248 | int c, c2; | 1220 | int c, c2; |
@@ -1334,11 +1306,6 @@ void | |||
1334 | ats_calculate_bandwidth_distribution (struct ATS_Handle * ats, | 1306 | ats_calculate_bandwidth_distribution (struct ATS_Handle * ats, |
1335 | struct GNUNET_STATISTICS_Handle *stats) | 1307 | struct GNUNET_STATISTICS_Handle *stats) |
1336 | { | 1308 | { |
1337 | #if !HAVE_LIBGLPK | ||
1338 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
1339 | return; | ||
1340 | #endif | ||
1341 | |||
1342 | struct GNUNET_TIME_Absolute start; | 1309 | struct GNUNET_TIME_Absolute start; |
1343 | struct GNUNET_TIME_Relative creation; | 1310 | struct GNUNET_TIME_Relative creation; |
1344 | struct GNUNET_TIME_Relative solving; | 1311 | struct GNUNET_TIME_Relative solving; |
@@ -1541,11 +1508,6 @@ ats_calculate_bandwidth_distribution (struct ATS_Handle * ats, | |||
1541 | 1508 | ||
1542 | int ats_evaluate_results (int result, int solution, char * problem) | 1509 | int ats_evaluate_results (int result, int solution, char * problem) |
1543 | { | 1510 | { |
1544 | #if !HAVE_LIBGLPK | ||
1545 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
1546 | return GNUNET_NO; | ||
1547 | #endif | ||
1548 | |||
1549 | int cont = GNUNET_NO; | 1511 | int cont = GNUNET_NO; |
1550 | #if DEBUG_ATS || VERBOSE_ATS | 1512 | #if DEBUG_ATS || VERBOSE_ATS |
1551 | int error_kind = GNUNET_ERROR_TYPE_DEBUG; | 1513 | int error_kind = GNUNET_ERROR_TYPE_DEBUG; |
@@ -1652,11 +1614,6 @@ return cont; | |||
1652 | 1614 | ||
1653 | void ats_update_problem_cr (struct ATS_Handle * ats) | 1615 | void ats_update_problem_cr (struct ATS_Handle * ats) |
1654 | { | 1616 | { |
1655 | #if !HAVE_LIBGLPK | ||
1656 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS not active\n"); | ||
1657 | return; | ||
1658 | #endif | ||
1659 | |||
1660 | int array_index; | 1617 | int array_index; |
1661 | int row_index; | 1618 | int row_index; |
1662 | int c, c2; | 1619 | int c, c2; |
diff --git a/src/transport/gnunet_transport_ats.h b/src/transport/gnunet-service-transport_ats.h index a6d8f30ba..a6d8f30ba 100644 --- a/src/transport/gnunet_transport_ats.h +++ b/src/transport/gnunet-service-transport_ats.h | |||
diff --git a/src/transport/test_transport_ats.c b/src/transport/test_transport_ats.c index b7e8153d9..c782b97d9 100644 --- a/src/transport/test_transport_ats.c +++ b/src/transport/test_transport_ats.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * @brief testcase for ats functionality without starting peers | 22 | * @brief testcase for ats functionality without starting peers |
23 | */ | 23 | */ |
24 | #include "platform.h" | 24 | #include "platform.h" |
25 | #include "gnunet_transport_ats.h" | 25 | #include "gnunet-service-transport_ats.h" |
26 | #include "gnunet_configuration_lib.h" | 26 | #include "gnunet_configuration_lib.h" |
27 | #include "gnunet_crypto_lib.h" | 27 | #include "gnunet_crypto_lib.h" |
28 | 28 | ||
diff --git a/src/transport/test_transport_ats_multiple_peers.c b/src/transport/test_transport_ats_multiple_peers.c index 6e8752a0b..3ba20455f 100644 --- a/src/transport/test_transport_ats_multiple_peers.c +++ b/src/transport/test_transport_ats_multiple_peers.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "gnunet_testing_lib.h" | 30 | #include "gnunet_testing_lib.h" |
31 | #include "gnunet_transport_service.h" | 31 | #include "gnunet_transport_service.h" |
32 | #include "gauger.h" | 32 | #include "gauger.h" |
33 | #include "gnunet_transport_ats.h" | 33 | #include "gnunet-service-transport_ats.h" |
34 | 34 | ||
35 | #define VERBOSE GNUNET_NO | 35 | #define VERBOSE GNUNET_NO |
36 | 36 | ||