Fix: INVALID_SOCKET usage in POSIX code and remove missing test
- control_server.c: Use -1 instead of INVALID_SOCKET on lines 241 and 511 - Makefile.am: Remove test_control_server reference (source file missing)
This commit is contained in:
1 parent
cd169b106a
commit
6ffec2f1e7
2 files changed
+2
-8
No files matched your search
@@ -238,7 +238,7 @@ void control_server_shutdown(struct control_server* server) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Close listening socket */
|
/* Close listening socket */
|
||||||
if (server->listen_fd != INVALID_SOCKET) {
|
if (server->listen_fd >= 0) {
|
||||||
uasync_remove_socket_t(server->ua, server->listen_fd);
|
uasync_remove_socket_t(server->ua, server->listen_fd);
|
||||||
server->listen_socket_id = NULL;
|
server->listen_socket_id = NULL;
|
||||||
}
|
}
|
||||||
@@ -508,7 +508,7 @@ static void close_client(struct control_server* server, struct control_client* c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Remove from uasync */
|
/* Remove from uasync */
|
||||||
if (client->fd != INVALID_SOCKET) {
|
if (client->fd >= 0) {
|
||||||
uasync_remove_socket_t(server->ua, client->fd);
|
uasync_remove_socket_t(server->ua, client->fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ check_PROGRAMS = \
|
|||||||
test_route_lib \
|
test_route_lib \
|
||||||
test_bgp_route_exchange \
|
test_bgp_route_exchange \
|
||||||
test_routing_mesh \
|
test_routing_mesh \
|
||||||
test_control_server \
|
|
||||||
bench_timeout_heap \
|
bench_timeout_heap \
|
||||||
bench_uasync_timeouts
|
bench_uasync_timeouts
|
||||||
|
|
||||||
@@ -205,11 +204,6 @@ bench_uasync_timeouts_SOURCES = bench_uasync_timeouts.c
|
|||||||
bench_uasync_timeouts_CFLAGS = -I$(top_srcdir)/lib
|
bench_uasync_timeouts_CFLAGS = -I$(top_srcdir)/lib
|
||||||
bench_uasync_timeouts_LDADD = $(COMMON_LIBS)
|
bench_uasync_timeouts_LDADD = $(COMMON_LIBS)
|
||||||
|
|
||||||
# Control Server Test - Tests the ETCP monitoring protocol
|
|
||||||
test_control_server_SOURCES = test_control_server.c
|
|
||||||
test_control_server_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib -I$(top_srcdir)/tools/etcpmon
|
|
||||||
test_control_server_LDADD = $(COMMON_LIBS)
|
|
||||||
|
|
||||||
# Build tinycrypt objects before tests that need them
|
# Build tinycrypt objects before tests that need them
|
||||||
BUILT_SOURCES = $(TINYCRYPT_BUILT)
|
BUILT_SOURCES = $(TINYCRYPT_BUILT)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user