Should fix socket binding issues in cygwin.

This commit is contained in:
Thulinma 2012-05-14 18:18:15 +02:00
parent 9d8da4797f
commit d44eda44fe
3 changed files with 41 additions and 17 deletions

View file

@ -82,14 +82,15 @@ int main(int argc, char ** argv){
//setup a new server socket, for the correct interface and port
server_socket = Socket::Server(C.listen_port, C.interface);
#if DEBUG >= 3
fprintf(stderr, "Made a listening socket on %s:%i...\n", C.interface.c_str(), C.listen_port);
#endif
if (!server_socket.connected()){
#if DEBUG >= 1
fprintf(stderr, "Error: could not make listening socket\n");
#endif
return 1;
}else{
#if DEBUG >= 3
fprintf(stderr, "Made a listening socket on %s:%i...\n", C.interface.c_str(), C.listen_port);
#endif
}
Util::setUser(C.username);