summaryrefslogtreecommitdiffstats
path: root/vnc
diff options
context:
space:
mode:
authorLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-26 13:33:23 -0700
committerLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-26 13:33:23 -0700
commit27055d5762d23ae3996e7e41ef45ef6454fa2d65 (patch)
treeb45025733988961e08bde0c7e495f73c939a9937 /vnc
parentfde7be5151f7db096610cb59ca964e22e6af79fb (diff)
downloadxrdp-proprietary-27055d5762d23ae3996e7e41ef45ef6454fa2d65.tar.gz
xrdp-proprietary-27055d5762d23ae3996e7e41ef45ef6454fa2d65.zip
coverity: improper use of negative value
Diffstat (limited to 'vnc')
-rw-r--r--vnc/vnc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vnc/vnc.c b/vnc/vnc.c
index 979033e5..780c3629 100644
--- a/vnc/vnc.c
+++ b/vnc/vnc.c
@@ -967,7 +967,14 @@ lib_mod_connect(struct vnc *v)
make_stream(s);
g_sprintf(con_port, "%s", v->port);
make_stream(pixel_format);
+
v->sck = g_tcp_socket();
+ if (v->sck < 0)
+ {
+ v->server_msg(v, "VNC error: socket create error, g_tcp_socket() failed", 0);
+ return 1;
+ }
+
v->sck_obj = g_create_wait_obj_from_socket(v->sck, 0);
v->sck_closed = 0;
g_sprintf(text, "VNC connecting to %s %s", v->ip, con_port);