Misc formatting
This commit is contained in:
parent
f42a5ba87e
commit
58358fb6da
5 changed files with 14 additions and 14 deletions
|
|
@ -68,7 +68,7 @@
|
||||||
#define CLIXON_DBG_YANG 0x00000020 /* YANG processing */
|
#define CLIXON_DBG_YANG 0x00000020 /* YANG processing */
|
||||||
#define CLIXON_DBG_BACKEND 0x00000040 /* Backend-specific */
|
#define CLIXON_DBG_BACKEND 0x00000040 /* Backend-specific */
|
||||||
#define CLIXON_DBG_CLI 0x00000080 /* CLI frontend */
|
#define CLIXON_DBG_CLI 0x00000080 /* CLI frontend */
|
||||||
#define CLIXON_DBG_NETCONF 0x00000100 /* NETCONF frontend */
|
#define CLIXON_DBG_NETCONF 0x00000100 /* NETCONF frontend/client */
|
||||||
#define CLIXON_DBG_RESTCONF 0x00000200 /* RESTCONF frontend */
|
#define CLIXON_DBG_RESTCONF 0x00000200 /* RESTCONF frontend */
|
||||||
#define CLIXON_DBG_SNMP 0x00000400 /* SNMP frontend */
|
#define CLIXON_DBG_SNMP 0x00000400 /* SNMP frontend */
|
||||||
#define CLIXON_DBG_NACM 0x00000800 /* NACM processing */
|
#define CLIXON_DBG_NACM 0x00000800 /* NACM processing */
|
||||||
|
|
|
||||||
|
|
@ -282,13 +282,10 @@ cxobj *xml_find_type(cxobj *xn_parent, const char *prefix, const char *name,
|
||||||
char *xml_find_value(cxobj *xn_parent, const char *name);
|
char *xml_find_value(cxobj *xn_parent, const char *name);
|
||||||
char *xml_find_body(cxobj *xn, const char *name);
|
char *xml_find_body(cxobj *xn, const char *name);
|
||||||
cxobj *xml_find_body_obj(cxobj *xt, const char *name, char *val);
|
cxobj *xml_find_body_obj(cxobj *xt, const char *name, char *val);
|
||||||
|
|
||||||
int xml_free(cxobj *xn);
|
int xml_free(cxobj *xn);
|
||||||
|
|
||||||
int xml_copy_one(cxobj *xn0, cxobj *xn1);
|
int xml_copy_one(cxobj *xn0, cxobj *xn1);
|
||||||
int xml_copy(cxobj *x0, cxobj *x1);
|
int xml_copy(cxobj *x0, cxobj *x1);
|
||||||
cxobj *xml_dup(cxobj *x0);
|
cxobj *xml_dup(cxobj *x0);
|
||||||
|
|
||||||
int cxvec_dup(cxobj **vec0, int len0, cxobj ***vec1, int *len1);
|
int cxvec_dup(cxobj **vec0, int len0, cxobj ***vec1, int *len1);
|
||||||
int cxvec_append(cxobj *x, cxobj ***vec, int *len);
|
int cxvec_append(cxobj *x, cxobj ***vec, int *len);
|
||||||
int cxvec_prepend(cxobj *x, cxobj ***vec, int *len);
|
int cxvec_prepend(cxobj *x, cxobj ***vec, int *len);
|
||||||
|
|
@ -297,7 +294,6 @@ int xml_apply0(cxobj *xn, enum cxobj_type type, xml_applyfn_t fn, void *ar
|
||||||
int xml_apply_ancestor(cxobj *xn, xml_applyfn_t fn, void *arg);
|
int xml_apply_ancestor(cxobj *xn, xml_applyfn_t fn, void *arg);
|
||||||
int xml_isancestor(cxobj *x, cxobj *xp);
|
int xml_isancestor(cxobj *x, cxobj *xp);
|
||||||
cxobj *xml_root(cxobj *xn);
|
cxobj *xml_root(cxobj *xn);
|
||||||
|
|
||||||
int xml_operation(char *opstr, enum operation_type *op);
|
int xml_operation(char *opstr, enum operation_type *op);
|
||||||
char *xml_operation2str(enum operation_type op);
|
char *xml_operation2str(enum operation_type op);
|
||||||
int xml_attr_insert2val(char *instr, enum insert_type *ins);
|
int xml_attr_insert2val(char *instr, enum insert_type *ins);
|
||||||
|
|
|
||||||
|
|
@ -402,7 +402,7 @@ clixon_client_connect(clixon_handle h,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Connect client to clixon backend according to config and return a socket
|
/*! Disconnect client
|
||||||
*
|
*
|
||||||
* @param[in] ch Clixon client session handle
|
* @param[in] ch Clixon client session handle
|
||||||
* @retval 0 OK
|
* @retval 0 OK
|
||||||
|
|
|
||||||
|
|
@ -265,10 +265,10 @@ clicon_rpc_connect_unix(clixon_handle h,
|
||||||
* @see clicon_rpc But this is one-shot rpc: open, send, get reply and close.
|
* @see clicon_rpc But this is one-shot rpc: open, send, get reply and close.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
clicon_rpc_connect_inet(clixon_handle h,
|
clicon_rpc_connect_inet(clixon_handle h,
|
||||||
char *dst,
|
char *dst,
|
||||||
uint16_t port,
|
uint16_t port,
|
||||||
int *sock0)
|
int *sock0)
|
||||||
{
|
{
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
int s = -1;
|
int s = -1;
|
||||||
|
|
@ -290,7 +290,7 @@ clicon_rpc_connect_inet(clixon_handle h,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (connect(s, (struct sockaddr*)&addr, sizeof(addr)) < 0){
|
if (connect(s, (struct sockaddr*)&addr, sizeof(addr)) < 0){
|
||||||
clixon_err(OE_CFG, errno, "connecting socket inet4");
|
clixon_err(OE_CFG, errno, "connecting socket inet");
|
||||||
close(s);
|
close(s);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
@ -651,10 +651,14 @@ clicon_rpc(int sock,
|
||||||
{
|
{
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
struct clicon_msg *reply = NULL;
|
struct clicon_msg *reply = NULL;
|
||||||
cbuf *cbsend = cbuf_new();
|
cbuf *cbsend = NULL;
|
||||||
cbuf *cbrcv = NULL;
|
cbuf *cbrcv = NULL;
|
||||||
|
|
||||||
clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "");
|
clixon_debug(CLIXON_DBG_MSG | CLIXON_DBG_DETAIL, "");
|
||||||
|
if ((cbsend = cbuf_new()) == NULL){
|
||||||
|
clixon_err(OE_UNIX, errno, "cbuf_new");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
cprintf(cbsend, "%s", msg->op_body);
|
cprintf(cbsend, "%s", msg->op_body);
|
||||||
if (clixon_msg_send11(sock, descr, cbsend) < 0)
|
if (clixon_msg_send11(sock, descr, cbsend) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
||||||
|
|
@ -571,8 +571,8 @@ xml_diff(cxobj *x0,
|
||||||
* @see text_diff2cbuf Diff buffer in curly
|
* @see text_diff2cbuf Diff buffer in curly
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
xml_tree_equal(cxobj *x0,
|
xml_tree_equal(cxobj *x0,
|
||||||
cxobj *x1)
|
cxobj *x1)
|
||||||
{
|
{
|
||||||
int retval = 1; /* Not equal */
|
int retval = 1; /* Not equal */
|
||||||
int eq;
|
int eq;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue