add tcp test; minor fix
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Mon, 23 Dec 2019 08:29:57 +0000 (17:29 +0900)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Mon, 23 Dec 2019 08:29:57 +0000 (17:29 +0900)
src/transport/Makefile.am
src/transport/gnunet-communicator-tcp.c

index 5d0ba2218fb2b895efa311bc6375c2385a980cab..26a37c8bc01396e2aebaff8cd629b86c59011460 100644 (file)
@@ -588,7 +588,8 @@ check_PROGRAMS += \
 test_transport_api_slow_ats
 endif
 check_PROGRAMS += \
-test_communicator_basic_unix
+test_communicator_basic_unix \
+test_communicator_basic_tcp
 if HAVE_EXPERIMENTAL
 check_PROGRAMS += \
   test_transport_address_switch_udp \
@@ -789,6 +790,14 @@ test_communicator_basic_unix_LDADD = \
  $(top_builddir)/src/testing/libgnunettesting.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
+test_communicator_basic_tcp_SOURCES = \
+ test_communicator_basic.c
+test_communicator_basic_tcp_LDADD = \
+ libgnunettransporttesting2.la \
+ $(top_builddir)/src/testing/libgnunettesting.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
+
 test_plugin_unix_SOURCES = \
  test_plugin_transport.c
 test_plugin_unix_LDADD = \
@@ -1487,4 +1496,6 @@ test_transport_api_slow_ats_peer2.conf \
   tcp_server_legacy.c \
   tcp_service_legacy.c \
 test_communicator_unix_peer1.conf \
-test_communicator_unix_peer2.conf
+test_communicator_unix_peer2.conf \
+test_communicator_tcp_peer1.conf \
+test_communicator_tcp_peer2.conf
index 098bb95233c232f68b5be0b9fe151b8efe7fcf1c..70cbb731a06964135c289b7f06669c19b17ee458 100644 (file)
@@ -2081,10 +2081,10 @@ run (void *cls,
   (void) cls;
   cfg = c;
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_filename (cfg,
-                                               COMMUNICATOR_CONFIG_SECTION,
-                                               "BINDTO",
-                                               &bindto))
+      GNUNET_CONFIGURATION_get_value_string (cfg,
+                                             COMMUNICATOR_CONFIG_SECTION,
+                                             "BINDTO",
+                                             &bindto))
   {
     GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
                                COMMUNICATOR_CONFIG_SECTION,