NULL->/ for state callbacks. Clarified socket close error
This commit is contained in:
parent
1079fcad47
commit
916c1aabd7
2 changed files with 3 additions and 3 deletions
|
|
@ -336,7 +336,7 @@ clixon_stats_get(clicon_handle h,
|
||||||
|
|
||||||
/*! Get system state-data, including streams and plugins
|
/*! Get system state-data, including streams and plugins
|
||||||
* @param[in] h Clicon handle
|
* @param[in] h Clicon handle
|
||||||
* @param[in] xpath Xpath selection, not used but may be to filter early
|
* @param[in] xpath XPath selection, may be used to filter early
|
||||||
* @param[in] nsc XML Namespace context for xpath
|
* @param[in] nsc XML Namespace context for xpath
|
||||||
* @param[in] content config/state or both
|
* @param[in] content config/state or both
|
||||||
* @param[in,out] xret Existing XML tree, merge x into this
|
* @param[in,out] xret Existing XML tree, merge x into this
|
||||||
|
|
@ -1095,7 +1095,7 @@ from_client_get(clicon_handle h,
|
||||||
* get state data from plugins as defined by plugin_statedata(), if any
|
* get state data from plugins as defined by plugin_statedata(), if any
|
||||||
*/
|
*/
|
||||||
clicon_err_reset();
|
clicon_err_reset();
|
||||||
if ((ret = client_statedata(h, xpath, nsc, content, &xret)) < 0)
|
if ((ret = client_statedata(h, xpath?xpath:"/", nsc, content, &xret)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (ret == 0){ /* Error from callback (error in xret) */
|
if (ret == 0){ /* Error from callback (error in xret) */
|
||||||
if (clicon_xml2cbuf(cbret, xret, 0, 0, -1) < 0)
|
if (clicon_xml2cbuf(cbret, xret, 0, 0, -1) < 0)
|
||||||
|
|
|
||||||
|
|
@ -522,7 +522,7 @@ clicon_rpc(int s,
|
||||||
if (clicon_msg_rcv(s, &reply, &eof) < 0)
|
if (clicon_msg_rcv(s, &reply, &eof) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (eof){
|
if (eof){
|
||||||
clicon_err(OE_PROTO, ESHUTDOWN, "Socket unexpected close");
|
clicon_err(OE_PROTO, ESHUTDOWN, "Unexpected close of CLICON_SOCK. Clixon backend daemon may have crashed.");
|
||||||
close(s);
|
close(s);
|
||||||
errno = ESHUTDOWN;
|
errno = ESHUTDOWN;
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue