summaryrefslogtreecommitdiffstats
path: root/libvncserver/sockets.c
diff options
context:
space:
mode:
authorAmandeep Singh <[email protected]>2013-09-28 17:58:13 +0530
committerMartin T. H. Sandsmark <[email protected]>2014-08-03 14:07:00 +0200
commit012594b970b07c212eaf48ed22333a9d37d017a4 (patch)
treeab2c7cf30c74aaafa8a1be5c44fe43847a9a6387 /libvncserver/sockets.c
parentafd1d329ed117f6e4d8c46eba362b7d5c51184ac (diff)
downloadlibtdevnc-012594b970b07c212eaf48ed22333a9d37d017a4.tar.gz
libtdevnc-012594b970b07c212eaf48ed22333a9d37d017a4.zip
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.
Diffstat (limited to 'libvncserver/sockets.c')
-rw-r--r--libvncserver/sockets.c5
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;