* Internal backend socket protocol changed: uint32_t session-id added, see clixon_proto.h

* * Changed session-id handing. Instead of using pid of peer process, a proper session id generated by the server is used, following RFC6241.
This commit is contained in:
Olof hagsand 2019-10-19 19:52:09 +02:00
parent a387c599e2
commit b624e911b8
23 changed files with 230 additions and 155 deletions

View file

@ -779,6 +779,10 @@ main(int argc,
clicon_err(OE_CFG, errno, "FCGX_OpenSocket");
goto done;
}
#if 1
/* XXX get session id from backend hello */
clicon_session_id_set(h, getpid());
#endif
if (clicon_socket_set(h, sock) < 0)
goto done;
/* umask settings may interfer: we want group to write: this is 774 */

View file

@ -684,8 +684,7 @@ api_data_write(clicon_handle h,
if (cbx)
cbuf_free(cbx);
return retval;
} /* api_data_put */
} /* api_data_write */
/*! Generic REST PUT method
* @param[in] h CLIXON handle

View file

@ -180,7 +180,7 @@ restconf_stream_cb(int s,
clicon_exit_set();
goto done;
}
if (clicon_msg_decode(reply, NULL, &xtop) < 0) /* XXX pass yang_spec */
if (clicon_msg_decode(reply, NULL, NULL, &xtop) < 0) /* XXX pass yang_spec */
goto done;
/* create event */
if ((cb = cbuf_new()) == NULL){