Don't use literal for CLIXON_DBG_XXX
This commit is contained in:
parent
2a90faf012
commit
86667a0190
6 changed files with 12 additions and 12 deletions
|
|
@ -769,7 +769,7 @@ get_list_pagination(clixon_handle h,
|
||||||
if ((ret = xml_bind_yang(h, xret, YB_MODULE, yspec, &xerr)) < 0)
|
if ((ret = xml_bind_yang(h, xret, YB_MODULE, yspec, &xerr)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (ret == 0){
|
if (ret == 0){
|
||||||
clixon_debug_xml(1, xret, "Yang bind pagination state");
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xret, "Yang bind pagination state");
|
||||||
if (clixon_netconf_internal_error(xerr,
|
if (clixon_netconf_internal_error(xerr,
|
||||||
". Internal error, state callback returned invalid XML",
|
". Internal error, state callback returned invalid XML",
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
|
|
@ -1018,7 +1018,7 @@ get_common(clixon_handle h,
|
||||||
(ret = xml_yang_validate_add(h, xret, &xerr)) < 0)
|
(ret = xml_yang_validate_add(h, xret, &xerr)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (ret == 0){
|
if (ret == 0){
|
||||||
clixon_debug_xml(1, xret, "VALIDATE_STATE");
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xret, "VALIDATE_STATE");
|
||||||
if (clixon_netconf_internal_error(xerr,
|
if (clixon_netconf_internal_error(xerr,
|
||||||
". Internal error, state callback returned invalid XML",
|
". Internal error, state callback returned invalid XML",
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,7 @@ netconf_input_packet(clixon_handle h,
|
||||||
netconf_framing_type framing;
|
netconf_framing_type framing;
|
||||||
|
|
||||||
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
|
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
|
||||||
clixon_debug_xml(1, xreq, "%s", __FUNCTION__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xreq, "%s", __FUNCTION__);
|
||||||
rpcname = xml_name(xreq);
|
rpcname = xml_name(xreq);
|
||||||
rpcprefix = xml_prefix(xreq);
|
rpcprefix = xml_prefix(xreq);
|
||||||
framing = clicon_data_int_get(h, NETCONF_FRAMING_TYPE);
|
framing = clicon_data_int_get(h, NETCONF_FRAMING_TYPE);
|
||||||
|
|
|
||||||
|
|
@ -496,7 +496,7 @@ api_data_write(clixon_handle h,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (namespace == NULL){
|
if (namespace == NULL){
|
||||||
clixon_debug_xml(1, xparent, "%s xparent:", __FUNCTION__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xparent, "%s xparent:", __FUNCTION__);
|
||||||
/* XXX */
|
/* XXX */
|
||||||
}
|
}
|
||||||
/* Set xmlns="" default namespace attribute (if diff from default) */
|
/* Set xmlns="" default namespace attribute (if diff from default) */
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@ yang_patch_do_edit(clixon_handle h,
|
||||||
yang_stmt *ybot = NULL;
|
yang_stmt *ybot = NULL;
|
||||||
yang_stmt *ymod;
|
yang_stmt *ymod;
|
||||||
|
|
||||||
clixon_debug_xml(1, xn, "%s %d xn:", __FUNCTION__, __LINE__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xn, "%s %d xn:", __FUNCTION__, __LINE__);
|
||||||
/* Create cbufs:s */
|
/* Create cbufs:s */
|
||||||
if ((simple_patch_request_uri = cbuf_new()) == NULL){
|
if ((simple_patch_request_uri = cbuf_new()) == NULL){
|
||||||
clixon_err(OE_UNIX, errno, "cbuf_new");
|
clixon_err(OE_UNIX, errno, "cbuf_new");
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ api_data_post(clixon_handle h,
|
||||||
if (restconf_insert_attributes(xdata, qvec) < 0)
|
if (restconf_insert_attributes(xdata, qvec) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
#if 1
|
#if 1
|
||||||
clixon_debug_xml(1, xdata, "%s xdata:", __FUNCTION__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xdata, "%s xdata:", __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Create text buffer for transfer to backend */
|
/* Create text buffer for transfer to backend */
|
||||||
|
|
@ -491,7 +491,7 @@ api_operations_post_input(clixon_handle h,
|
||||||
* <data><input xmlns="urn:example:clixon">...</input></data>
|
* <data><input xmlns="urn:example:clixon">...</input></data>
|
||||||
*/
|
*/
|
||||||
#if 1
|
#if 1
|
||||||
clixon_debug_xml(1, xdata, "%s xdata:", __FUNCTION__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xdata, "%s xdata:", __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
/* Validate that exactly only <input> tag */
|
/* Validate that exactly only <input> tag */
|
||||||
if ((xinput = xml_child_i_type(xdata, 0, CX_ELMNT)) == NULL ||
|
if ((xinput = xml_child_i_type(xdata, 0, CX_ELMNT)) == NULL ||
|
||||||
|
|
@ -588,7 +588,7 @@ api_operations_post_output(clixon_handle h,
|
||||||
xml_name_set(xoutput, "output");
|
xml_name_set(xoutput, "output");
|
||||||
/* xoutput should now look: <output><x xmlns="uri">0</x></output> */
|
/* xoutput should now look: <output><x xmlns="uri">0</x></output> */
|
||||||
#if 1
|
#if 1
|
||||||
clixon_debug_xml(1, xoutput, "%s xoutput:", __FUNCTION__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xoutput, "%s xoutput:", __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
/* Remove original netconf default namespace. Somewhat unsure what "output" belongs to? */
|
/* Remove original netconf default namespace. Somewhat unsure what "output" belongs to? */
|
||||||
if ((xa = xml_find_type(xoutput, NULL, "xmlns", CX_ATTR)) != NULL)
|
if ((xa = xml_find_type(xoutput, NULL, "xmlns", CX_ATTR)) != NULL)
|
||||||
|
|
@ -803,7 +803,7 @@ api_operations_post(clixon_handle h,
|
||||||
/* Here xtop is:
|
/* Here xtop is:
|
||||||
<rpc username="foo"><myfn xmlns="uri"><x>42</x></myfn></rpc> */
|
<rpc username="foo"><myfn xmlns="uri"><x>42</x></myfn></rpc> */
|
||||||
#if 1
|
#if 1
|
||||||
clixon_debug_xml(1, xtop, "%s 5. Translate input args:", __FUNCTION__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xtop, "%s 5. Translate input args:", __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
/* 6. Validate outgoing RPC and fill in defaults */
|
/* 6. Validate outgoing RPC and fill in defaults */
|
||||||
if ((ret = xml_bind_yang_rpc(h, xtop, yspec, &xerr)) < 0) /* */
|
if ((ret = xml_bind_yang_rpc(h, xtop, yspec, &xerr)) < 0) /* */
|
||||||
|
|
@ -824,7 +824,7 @@ api_operations_post(clixon_handle h,
|
||||||
* <rpc username="foo"><myfn xmlns="uri"><x>42</x><y>99</y></myfn></rpc>
|
* <rpc username="foo"><myfn xmlns="uri"><x>42</x><y>99</y></myfn></rpc>
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 0
|
||||||
clixon_debug_xml(1, xtop, "%s 6. Validate and defaults:", __FUNCTION__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xtop, "%s 6. Validate and defaults:", __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
/* 7. Send to RPC handler, either local or backend
|
/* 7. Send to RPC handler, either local or backend
|
||||||
* Note (1) xtop is <rpc><method> xbot is <method>
|
* Note (1) xtop is <rpc><method> xbot is <method>
|
||||||
|
|
@ -865,7 +865,7 @@ api_operations_post(clixon_handle h,
|
||||||
* <rpc-reply><x xmlns="uri">0</x></rpc-reply>
|
* <rpc-reply><x xmlns="uri">0</x></rpc-reply>
|
||||||
*/
|
*/
|
||||||
#if 1
|
#if 1
|
||||||
clixon_debug_xml(1, xret, "%s Receive reply:", __FUNCTION__);
|
clixon_debug_xml(CLIXON_DBG_DEFAULT, xret, "%s Receive reply:", __FUNCTION__);
|
||||||
#endif
|
#endif
|
||||||
youtput = yang_find(yrpc, Y_OUTPUT, NULL);
|
youtput = yang_find(yrpc, Y_OUTPUT, NULL);
|
||||||
if ((ret = api_operations_post_output(h, req, xret, yspec, youtput, namespace,
|
if ((ret = api_operations_post_output(h, req, xret, yspec, youtput, namespace,
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ xml2cvec(cxobj *xt,
|
||||||
while ((xc = xml_child_each(xt, xc, CX_ELMNT)) != NULL){
|
while ((xc = xml_child_each(xt, xc, CX_ELMNT)) != NULL){
|
||||||
name = xml_name(xc);
|
name = xml_name(xc);
|
||||||
if ((ys = yang_find_datanode(yt, name)) == NULL){
|
if ((ys = yang_find_datanode(yt, name)) == NULL){
|
||||||
clixon_debug(0, "%s: yang sanity problem: %s in xml but not present in yang under %s",
|
clixon_debug(CLIXON_DBG_ALWAYS, "%s: yang sanity problem: %s in xml but not present in yang under %s",
|
||||||
__FUNCTION__, name, yang_argument_get(yt));
|
__FUNCTION__, name, yang_argument_get(yt));
|
||||||
if ((body = xml_body(xc)) != NULL){
|
if ((body = xml_body(xc)) != NULL){
|
||||||
if ((cv = cv_new(CGV_STRING)) == NULL){
|
if ((cv = cv_new(CGV_STRING)) == NULL){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue