client session BUGFIX typos
diff --git a/src/session_client_ssh.c b/src/session_client_ssh.c
index afd3df9..d00f1df 100644
--- a/src/session_client_ssh.c
+++ b/src/session_client_ssh.c
@@ -1662,7 +1662,7 @@
new_session->ti.libssh.session = session->ti.libssh.session;
/* create the channel safely */
- if (nc_session_lock(new_session, -1, __func__)) {
+ if (nc_session_lock(new_session, -1, __func__) != 1) {
goto fail;
}
@@ -1671,7 +1671,7 @@
goto fail;
}
- if (nc_session_new_ctx(session, ctx) != EXIT_SUCCESS) {
+ if (nc_session_new_ctx(new_session, ctx) != EXIT_SUCCESS) {
goto fail;
}
ctx = session->ctx;