diff options
author | Amandeep Singh <aman.dedman@gmail.com> | 2013-09-28 17:58:13 +0530 |
---|---|---|
committer | Martin T. H. Sandsmark <martin.sandsmark@kde.org> | 2014-08-03 14:07:00 +0200 |
commit | 012594b970b07c212eaf48ed22333a9d37d017a4 (patch) | |
tree | ab2c7cf30c74aaafa8a1be5c44fe43847a9a6387 | |
parent | afd1d329ed117f6e4d8c46eba362b7d5c51184ac (diff) | |
download | libvncserver-012594b970b07c212eaf48ed22333a9d37d017a4.zip libvncserver-012594b970b07c212eaf48ed22333a9d37d017a4.tar.gz |
allow rfbInitSockets with non-ready states.
This allows for reinitializations of e. g. sockets in a SHUTDOWN state.
The only state that doesn't make sense to reinitialize are READY states.
-rw-r--r-- | libvncserver/sockets.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c index ddd8450..d2f814b 100644 --- a/libvncserver/sockets.c +++ b/libvncserver/sockets.c @@ -122,8 +122,9 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen) { in_addr_t iface = rfbScreen->listenInterface; - if (rfbScreen->socketState!=RFB_SOCKET_INIT) - return; + if (rfbScreen->socketState == RFB_SOCKET_READY) { + return; + } rfbScreen->socketState = RFB_SOCKET_READY; |