session BUGFIX proper ps locking error cleanup
diff --git a/src/session_server_ssh.c b/src/session_server_ssh.c
index de7bccb..c9d5bf6 100644
--- a/src/session_server_ssh.c
+++ b/src/session_server_ssh.c
@@ -1227,6 +1227,7 @@
API NC_MSG_TYPE
nc_ps_accept_ssh_channel(struct nc_pollsession *ps, struct nc_session **session)
{
+ uint8_t q_id;
NC_MSG_TYPE msgtype;
struct nc_session *new_session = NULL;
uint16_t i;
@@ -1240,7 +1241,7 @@
}
/* LOCK */
- if (nc_ps_lock(ps)) {
+ if (nc_ps_lock(ps, &q_id)) {
return NC_MSG_ERROR;
}
@@ -1266,7 +1267,7 @@
}
/* UNLOCK */
- nc_ps_unlock(ps);
+ nc_ps_unlock(ps, q_id);
if (!new_session) {
ERR("No session with a NETCONF SSH channel ready was found.");