session CHANGE server ctx locking

Also some other bugfixes.
diff --git a/src/session_client.c b/src/session_client.c
index 4818ee3..20a0660 100644
--- a/src/session_client.c
+++ b/src/session_client.c
@@ -479,7 +479,7 @@
 
     /* we read rpc-reply, want a notif */
     if (!msgid && (msgtype == NC_MSG_REPLY)) {
-        /* just check that message-id is fine */
+        /* just check that there is a message-id */
         str_msgid = lyxml_get_attr(xml, "message-id", NULL);
         if (!str_msgid) {
             pthread_mutex_unlock(session->ti_lock);
@@ -487,14 +487,6 @@
             lyxml_free(session->ctx, xml);
             goto next_message;
         }
-        cur_msgid = strtoul(str_msgid, &ptr, 10);
-        if (ptr[0]) {
-            pthread_mutex_unlock(session->ti_lock);
-            ERR("Session %u: received a <rpc-reply> with an invalid message-id (\"%s\"), discarding.",
-                session->id, str_msgid);
-            lyxml_free(session->ctx, xml);
-            goto next_message;
-        }
 
         cont_ptr = &session->replies;
         while (*cont_ptr) {