From b21832e8d922351169ab4d06e7993ed401fe0924 Mon Sep 17 00:00:00 2001 From: Dusan Durech Date: Sun, 1 Mar 2009 18:09:11 +0100 Subject: API to UDP and TCP has been modified so that they can be used independet from protocols IPv4 and IPv6 --- src/base/server.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/base/server.c') diff --git a/src/base/server.c b/src/base/server.c index 2112927..6471b46 100644 --- a/src/base/server.c +++ b/src/base/server.c @@ -238,13 +238,21 @@ int initServer(char *ip4, int port4, char *ip6, int port6) setServerMaxClients(SERVER_MAX_CLIENTS); setServerTimer(); + //printf("%s %d %s %d\n", ip4, port4, ip6, port6); ret = initUdpServer(ip4, port4, ip6, port6); if (ret == 0) { return -1; } - initDownServer(ip4, port4); + if( ip4 != NULL ) + { + initDownServer(ip4, port4); + } + else if( ip6 != NULL ) + { + initDownServer(ip6, port6); + } return ret; } -- cgit v1.2.3