From cebe8049fb7239425b3308f43073f70442db171a Mon Sep 17 00:00:00 2001 From: Dusan Durech Date: Sat, 2 May 2009 14:26:14 +0200 Subject: fix bug in server ( server fail when connect two client from one port and one IP ) --- src/base/server.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/base/server.c b/src/base/server.c index 472d71c..10cde36 100644 --- a/src/base/server.c +++ b/src/base/server.c @@ -87,7 +87,11 @@ static proto_cmd_server_t *findCmdProto(client_t * client, char *msg) thisCmd = &proto_cmd_list[i]; if (len >= thisCmd->len && strncmp(msg, thisCmd->name, thisCmd->len) == 0) { - if (thisCmd->tux && client->tux == NULL) { + if (thisCmd->tux == 1 && client->tux == NULL) { + return NULL; + } + + if (thisCmd->tux == 0 && client->tux != NULL) { return NULL; } @@ -206,8 +210,8 @@ static void eventPeriodicSyncClient(void *p_nothink) continue; } - //proto_send_newtux_server(PROTO_SEND_ALL_SEES_TUX, thisClientSend, thisTux); - proto_send_newtux_server(PROTO_SEND_BUT, thisClientSend, thisTux); + proto_send_newtux_server(PROTO_SEND_ALL_SEES_TUX, thisClientSend, thisTux); + //proto_send_newtux_server(PROTO_SEND_BUT, thisClientSend, thisTux); } } -- cgit v1.2.3