diff options
Diffstat (limited to 'sesman/tools')
-rw-r--r-- | sesman/tools/sesadmin.c | 6 | ||||
-rw-r--r-- | sesman/tools/sesrun.c | 3 | ||||
-rw-r--r-- | sesman/tools/sestest.c | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c index 979a22f9..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); 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); |