diff options
| author | Dusan Durech <dusan.d@Centrum.sk> | 2009-05-02 14:26:14 +0200 |
|---|---|---|
| committer | Dusan Durech <dusan.d@Centrum.sk> | 2009-05-02 14:26:14 +0200 |
| commit | cebe8049fb7239425b3308f43073f70442db171a (patch) | |
| tree | 0fa7c51e6b3a930b7c6d3268baa54d946d25239a | |
| parent | b0c3502e6ce02371be6b401538b5b6718a71f414 (diff) | |
fix bug in server ( server fail when connect two client from one port and one IP )
| -rw-r--r-- | src/base/server.c | 10 |
1 files 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); } } |