diff options
author | dscho <dscho> | 2003-07-30 09:42:36 +0000 |
---|---|---|
committer | dscho <dscho> | 2003-07-30 09:42:36 +0000 |
commit | eeb2061dfb03ea11ba028b33037fa0805d22e6a4 (patch) | |
tree | dce009b7b0b68b8660aa01ae543883a0e36bf287 /libvncclient/listen.c | |
parent | 964aa1628f2cc4fac17c22dc89fc2439bd87b00e (diff) | |
download | libtdevnc-eeb2061dfb03ea11ba028b33037fa0805d22e6a4.tar.gz libtdevnc-eeb2061dfb03ea11ba028b33037fa0805d22e6a4.zip |
API change: Bool, KeySym, Pixel get prefix "rfb"; constants in rfbconfig.h get prefix "LIBVNCSERVER_"
Diffstat (limited to 'libvncclient/listen.c')
-rw-r--r-- | libvncclient/listen.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libvncclient/listen.c b/libvncclient/listen.c index 2461dcf..1e6f68b 100644 --- a/libvncclient/listen.c +++ b/libvncclient/listen.c @@ -43,7 +43,8 @@ listenForIncomingConnections(rfbClient* client) listenSocket = ListenAtTcpPort(client->listenPort); - if ((listenSocket < 0)) exit(1); + if ((listenSocket < 0)) + return; rfbClientLog("%s -listen: Listening on port %d\n", client->programName,client->listenPort); @@ -66,8 +67,10 @@ listenForIncomingConnections(rfbClient* client) if (FD_ISSET(listenSocket, &fds)) { client->sock = AcceptTcpConnection(listenSocket); - if (client->sock < 0) exit(1); - if (!SetNonBlocking(client->sock)) exit(1); + if (client->sock < 0) + return; + if (!SetNonBlocking(client->sock)) + return; /* Now fork off a new process to deal with it... */ @@ -75,7 +78,7 @@ listenForIncomingConnections(rfbClient* client) case -1: perror("fork"); - exit(1); + return; case 0: /* child - return to caller */ |