diff options
Diffstat (limited to '')
-rw-r--r-- | src/server.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp index f93238c..abf4c5b 100644 --- a/src/server.cpp +++ b/src/server.cpp | |||
@@ -53,7 +53,8 @@ void Bu::Server::scan() | |||
53 | { | 53 | { |
54 | if( hServers.has( j ) ) | 54 | if( hServers.has( j ) ) |
55 | { | 55 | { |
56 | addClient( hServers.get( j )->accept() ); | 56 | ServerSocket *pSrv = hServers.get( j ); |
57 | addClient( pSrv->accept(), pSrv->getPort() ); | ||
57 | } | 58 | } |
58 | else | 59 | else |
59 | { | 60 | { |
@@ -63,11 +64,13 @@ void Bu::Server::scan() | |||
63 | } | 64 | } |
64 | } | 65 | } |
65 | 66 | ||
66 | void Bu::Server::addClient( int nSocket ) | 67 | void Bu::Server::addClient( int nSocket, int nPort ) |
67 | { | 68 | { |
68 | FD_SET( nSocket, &fdActive ); | 69 | FD_SET( nSocket, &fdActive ); |
69 | 70 | ||
70 | Client *c = new Client(); | 71 | Client *c = new Client(); |
71 | hClients.insert( nSocket, c ); | 72 | hClients.insert( nSocket, c ); |
73 | |||
74 | onNewConnection( c, nPort ); | ||
72 | } | 75 | } |
73 | 76 | ||