summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_listen.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2005-02-04 03:35:12 +0000
committerjsorg71 <jsorg71>2005-02-04 03:35:12 +0000
commit63c49195a62cf40c0260cf04a63212a445fbfaca (patch)
tree9c0554b071205f68e14d689b33fa8ae2d6475e1a /xrdp/xrdp_listen.c
parent0aff0efb522745ba9f9d64a505c22ef23a386cff (diff)
downloadxrdp-proprietary-63c49195a62cf40c0260cf04a63212a445fbfaca.tar.gz
xrdp-proprietary-63c49195a62cf40c0260cf04a63212a445fbfaca.zip
if sck is closed, don't write or read it again, other small fixes
Diffstat (limited to 'xrdp/xrdp_listen.c')
-rw-r--r--xrdp/xrdp_listen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xrdp/xrdp_listen.c b/xrdp/xrdp_listen.c
index f46cb187..92de0b99 100644
--- a/xrdp/xrdp_listen.c
+++ b/xrdp/xrdp_listen.c
@@ -139,7 +139,12 @@ int xrdp_listen_main_loop(struct xrdp_listen* self)
self->status = 1;
self->sck = g_tcp_socket();
g_tcp_set_non_blocking(self->sck);
- g_tcp_bind(self->sck, "3389");
+ if (g_tcp_bind(self->sck, "3389") != 0)
+ {
+ g_printf("bind error in xrdp_listen_main_loop\n\r");
+ g_tcp_close(self->sck);
+ return 1;
+ }
error = g_tcp_listen(self->sck);
if (error == 0)
{