diff options
author | Laxmikant Rashinkar <lk@Ubuntu-12.04-32bit> | 2014-10-11 14:49:46 -0700 |
---|---|---|
committer | Laxmikant Rashinkar <lk@Ubuntu-12.04-32bit> | 2014-10-11 14:49:46 -0700 |
commit | 8c316b46b8d6b1cb3cf32165daf817030aac1a47 (patch) | |
tree | 089c5741cb2a914501e5ab28898a5c71c4c4103b /sesman/tools | |
parent | 5b6b74577fda4bbcd0a02a585d783c59d68953da (diff) | |
parent | bc7a6b9bc66afe4adf7c232c94e41694319d4155 (diff) | |
download | xrdp-proprietary-8c316b46b8d6b1cb3cf32165daf817030aac1a47.tar.gz xrdp-proprietary-8c316b46b8d6b1cb3cf32165daf817030aac1a47.zip |
Merge branch 'devel'
Diffstat (limited to 'sesman/tools')
-rw-r--r-- | sesman/tools/dis.c | 7 | ||||
-rw-r--r-- | sesman/tools/sesadmin.c | 16 | ||||
-rw-r--r-- | sesman/tools/sesrun.c | 3 | ||||
-rw-r--r-- | sesman/tools/sestest.c | 3 |
4 files changed, 23 insertions, 6 deletions
diff --git a/sesman/tools/dis.c b/sesman/tools/dis.c index adcc3ee0..a21fbac4 100644 --- a/sesman/tools/dis.c +++ b/sesman/tools/dis.c @@ -58,7 +58,12 @@ int main(int argc, char **argv) return 1; } - sck = socket(PF_UNIX, SOCK_DGRAM, 0); + if ((sck = socket(PF_UNIX, SOCK_DGRAM, 0)) < 0) + { + printf("socket open error\n"); + return 1; + } + len = sizeof(sa); if (sendto(sck, "sig", 4, 0, (struct sockaddr *)&sa, len) > 0) diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c index 25af850b..32789c6d 100644 --- a/sesman/tools/sesadmin.c +++ b/sesman/tools/sesadmin.c @@ -107,6 +107,12 @@ int main(int argc, char **argv) scp_init(&logging); sock = g_tcp_socket(); + if (sock < 0) + { + LOG_DBG("Socket open error, g_tcp_socket() failed\n"); + return 1; + } + s = scp_session_create(); c = scp_connection_create(sock); @@ -179,16 +185,16 @@ void cmndList(struct SCP_CONNECTION *c) (dsl[idx]).idle_days, (dsl[idx]).idle_hours, (dsl[idx]).idle_minutes, \ (dsl[idx]).conn_year, (dsl[idx]).conn_month, (dsl[idx]).conn_day, (dsl[idx]).conn_hour, (dsl[idx]).conn_minute); } - - if (0 != dsl) - { - g_free(dsl); - } } else { printf("No sessions.\n"); } + + if (0 != dsl) + { + g_free(dsl); + } } void cmndKill(struct SCP_CONNECTION *c, struct SCP_SESSION *s) diff --git a/sesman/tools/sesrun.c b/sesman/tools/sesrun.c index 7ac10102..a9181583 100644 --- a/sesman/tools/sesrun.c +++ b/sesman/tools/sesrun.c @@ -75,7 +75,10 @@ main(int argc, char **argv) init_stream(in_s, 8192); make_stream(out_s); init_stream(out_s, 8192); + sck = g_tcp_socket(); + if (sck < 0) + return 1; if (g_tcp_connect(sck, argv[1], g_cfg.listen_port) == 0) { diff --git a/sesman/tools/sestest.c b/sesman/tools/sestest.c index f2823eb6..d42b31de 100644 --- a/sesman/tools/sestest.c +++ b/sesman/tools/sestest.c @@ -38,6 +38,9 @@ int main(int argc, char **argv) scp_init(&log); sock = g_tcp_socket(); + if (sock < 0) + return 1; + s = scp_session_create(); c = scp_connection_create(sock); |