From 736f5f80347a39f6b82cda8a4ddc1f7d88fcc2f5 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 10 Apr 2014 20:46:24 -0400 Subject: [PATCH] Added TCP test to build system. --- auto_tests/Makefile.inc | 11 ++++++++--- toxcore/Makefile.inc | 4 ++++ toxcore/TCP_client.c | 6 ------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/auto_tests/Makefile.inc b/auto_tests/Makefile.inc index 27fe6f762..a8771695d 100644 --- a/auto_tests/Makefile.inc +++ b/auto_tests/Makefile.inc @@ -1,7 +1,7 @@ if BUILD_TESTS -TESTS = messenger_autotest crypto_test network_test assoc_test onion_test tox_test -check_PROGRAMS = messenger_autotest crypto_test network_test assoc_test onion_test tox_test +TESTS = messenger_autotest crypto_test network_test assoc_test onion_test TCP_test tox_test +check_PROGRAMS = messenger_autotest crypto_test network_test assoc_test onion_test TCP_test tox_test AUTOTEST_CFLAGS = \ @@ -52,7 +52,6 @@ assoc_test_CFLAGS = $(AUTOTEST_CFLAGS) assoc_test_LDADD = $(AUTOTEST_LDADD) - onion_test_SOURCES = ../auto_tests/onion_test.c onion_test_CFLAGS = $(AUTOTEST_CFLAGS) @@ -60,6 +59,12 @@ onion_test_CFLAGS = $(AUTOTEST_CFLAGS) onion_test_LDADD = $(AUTOTEST_LDADD) +TCP_test_SOURCES = ../auto_tests/TCP_test.c + +TCP_test_CFLAGS = $(AUTOTEST_CFLAGS) + +TCP_test_LDADD = $(AUTOTEST_LDADD) + tox_test_SOURCES = ../auto_tests/tox_test.c diff --git a/toxcore/Makefile.inc b/toxcore/Makefile.inc index 8912965e2..5e5292674 100644 --- a/toxcore/Makefile.inc +++ b/toxcore/Makefile.inc @@ -35,6 +35,10 @@ libtoxcore_la_SOURCES = ../toxcore/DHT.h \ ../toxcore/onion_announce.c \ ../toxcore/onion_client.h \ ../toxcore/onion_client.c \ + ../toxcore/TCP_client.h \ + ../toxcore/TCP_client.c \ + ../toxcore/TCP_server.h \ + ../toxcore/TCP_server.c \ ../toxcore/misc_tools.h libtoxcore_la_CFLAGS = -I$(top_srcdir) \ diff --git a/toxcore/TCP_client.c b/toxcore/TCP_client.c index 29b4e7e77..437429b90 100644 --- a/toxcore/TCP_client.c +++ b/toxcore/TCP_client.c @@ -130,12 +130,6 @@ static int send_pending_data(TCP_Client_Connection *con) return -1; } -static int send_disconnect_packet(TCP_Client_Connection *TCP_connection) -{ - - return 0; -} - /* Create new TCP connection to ip_port/public_key */ TCP_Client_Connection *new_TCP_connection(IP_Port ip_port, uint8_t *public_key, uint8_t *self_public_key,