Drop __FUNCTION__ from clixon_debug() calls
This commit is contained in:
parent
d5a8d6b6e1
commit
cf2e27b43d
74 changed files with 619 additions and 578 deletions
|
|
@ -146,7 +146,7 @@ ce_event_cb(clixon_handle h,
|
|||
struct client_entry *ce = (struct client_entry *)arg;
|
||||
cbuf *cbce = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s op:%d", __FUNCTION__, op);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "op:%d", op);
|
||||
switch (op){
|
||||
case 1:
|
||||
/* Risk of recursion here */
|
||||
|
|
@ -282,7 +282,7 @@ backend_monitoring_state_get(clixon_handle h,
|
|||
goto fail;
|
||||
retval = 1;
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%d", retval);
|
||||
if (cb)
|
||||
cbuf_free(cb);
|
||||
return retval;
|
||||
|
|
@ -336,7 +336,7 @@ backend_client_rm(clixon_handle h,
|
|||
}
|
||||
}
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
/* for all streams: XXX better to do it top-level? */
|
||||
stream_ss_delete_all(h, ce_event_cb, (void*)ce);
|
||||
c0 = backend_client_list(h);
|
||||
|
|
@ -378,7 +378,7 @@ clixon_stats_datastore_get(clixon_handle h,
|
|||
size_t sz = 0;
|
||||
cxobj *xn = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s %s", __FUNCTION__, dbname);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", dbname);
|
||||
/* This is the db cache */
|
||||
if ((xt = xmldb_cache_get(h, dbname)) == NULL){
|
||||
/* Trigger cache if no exist (trick to ensure cache is present) */
|
||||
|
|
@ -655,7 +655,7 @@ from_client_edit_config(clixon_handle h,
|
|||
xml_free(xret);
|
||||
if (cbx)
|
||||
cbuf_free(cbx);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s done cbret:%s", __FUNCTION__, cbuf_get(cbret));
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "done cbret:%s", cbuf_get(cbret));
|
||||
return retval;
|
||||
} /* from_client_edit_config */
|
||||
|
||||
|
|
@ -1584,7 +1584,7 @@ from_client_msg(clixon_handle h,
|
|||
int nr = 0;
|
||||
cbuf *cbce = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
yspec = clicon_dbspec_yang(h);
|
||||
/* Return netconf message. Should be filled in by the dispatch(sub) functions
|
||||
* as wither rpc-error or by positive response.
|
||||
|
|
@ -1633,7 +1633,7 @@ from_client_msg(clixon_handle h,
|
|||
if (op_id != 0 && ce->ce_id != op_id && strcmp(rpcname, "create-subscription")){
|
||||
client_entry *ce0;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s Warning: incoming session-id:%u does not match ce_id:%u on socket: %d", __FUNCTION__, op_id, ce->ce_id, ce->ce_s);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "Warning: incoming session-id:%u does not match ce_id:%u on socket: %d", op_id, ce->ce_id, ce->ce_s);
|
||||
/* Copy transport from orig client-entry */
|
||||
if (ce->ce_transport == NULL &&
|
||||
(ce0 = ce_find_byid(backend_client_list(h), op_id)) != NULL &&
|
||||
|
|
@ -1720,7 +1720,7 @@ from_client_msg(clixon_handle h,
|
|||
goto done;
|
||||
}
|
||||
module = yang_argument_get(ymod);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s module:%s rpc:%s ce_id:%u s:%d", __FUNCTION__, module,
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "module:%s rpc:%s ce_id:%u s:%d", module,
|
||||
rpc, ce->ce_id, ce->ce_s);
|
||||
/* Pre-NACM access step */
|
||||
xnacm = NULL;
|
||||
|
|
@ -1812,7 +1812,7 @@ from_client_msg(clixon_handle h,
|
|||
// ok:
|
||||
retval = 0;
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "retval:%d", retval);
|
||||
if (xnacm){
|
||||
xml_free(xnacm);
|
||||
if (clicon_nacm_cache_set(h, NULL) < 0)
|
||||
|
|
@ -1830,7 +1830,7 @@ from_client_msg(clixon_handle h,
|
|||
if (retval < 0 && clixon_err_category() < 0)
|
||||
clixon_log(h, LOG_NOTICE, "%s: Internal error: No clixon_err call on RPC error (message: %s)",
|
||||
__FUNCTION__, rpc?rpc:"");
|
||||
// clixon_debug(CLIXON_DBG_CLIENT, "%s retval:%d", __FUNCTION__, retval);
|
||||
// clixon_debug(CLIXON_DBG_CLIENT, "retval:%d", retval);
|
||||
return retval;// -1 here terminates backend
|
||||
}
|
||||
|
||||
|
|
@ -1853,7 +1853,7 @@ from_client(int s,
|
|||
int eof = 0;
|
||||
cbuf *cbce = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
if (s != ce->ce_s){
|
||||
clixon_err(OE_NETCONF, EINVAL, "Internal error: s != ce->ce_s");
|
||||
goto done;
|
||||
|
|
@ -1871,7 +1871,7 @@ from_client(int s,
|
|||
goto done;
|
||||
retval = 0;
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s retval=%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "retval=%d", retval);
|
||||
if (cbce)
|
||||
cbuf_free(cbce);
|
||||
if (msg)
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ candidate_validate(clixon_handle h,
|
|||
cxobj *xret = NULL;
|
||||
int ret;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
if (db == NULL || cbret == NULL){
|
||||
clixon_err(OE_CFG, EINVAL, "db or cbret is NULL");
|
||||
goto done;
|
||||
|
|
@ -913,7 +913,7 @@ from_client_validate(clixon_handle h,
|
|||
int ret;
|
||||
char *db;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
if ((db = netconf_db_find(xe, "source")) == NULL){
|
||||
if (netconf_missing_element(cbret, "protocol", "source", NULL) < 0)
|
||||
goto done;
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ get_statedata(clixon_handle h,
|
|||
cbuf *cb = NULL;
|
||||
cxobj *xerr = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
if ((yspec = clicon_dbspec_yang(h)) == NULL){
|
||||
clixon_err(OE_YANG, ENOENT, "No yang spec");
|
||||
goto done;
|
||||
|
|
@ -373,7 +373,7 @@ get_statedata(clixon_handle h,
|
|||
} /* switch wdef */
|
||||
retval = 1; /* OK */
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%d", retval);
|
||||
if (xerr)
|
||||
xml_free(xerr);
|
||||
if (x1)
|
||||
|
|
@ -872,7 +872,7 @@ get_common(clixon_handle h,
|
|||
char *wdefstr;
|
||||
|
||||
wdef = WITHDEFAULTS_EXPLICIT;
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
username = clicon_username_get(h);
|
||||
if ((yspec = clicon_dbspec_yang(h)) == NULL){
|
||||
clixon_err(OE_YANG, ENOENT, "No yang spec9");
|
||||
|
|
@ -1049,7 +1049,7 @@ get_common(clixon_handle h,
|
|||
ok:
|
||||
retval = 0;
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "retval:%d", retval);
|
||||
if (xvec)
|
||||
free(xvec);
|
||||
if (xret)
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ backend_terminate(clixon_handle h)
|
|||
int ss;
|
||||
cvec *nsctx;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
if ((ss = clicon_socket_get(h)) != -1)
|
||||
close(ss);
|
||||
/* Disconnect datastore */
|
||||
|
|
@ -142,7 +142,7 @@ backend_terminate(clixon_handle h)
|
|||
if (sockfamily==AF_UNIX && lstat(sockpath, &st) == 0)
|
||||
unlink(sockpath);
|
||||
clixon_event_exit();
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s done", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "done");
|
||||
clixon_err_exit();
|
||||
clixon_log_exit();
|
||||
backend_handle_exit(h); /* Also deletes streams. Cannot use h after this. */
|
||||
|
|
@ -172,7 +172,7 @@ backend_sig_term(int arg)
|
|||
static void
|
||||
backend_sig_child(int arg)
|
||||
{
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
clicon_sig_child_set(1);
|
||||
}
|
||||
|
||||
|
|
@ -428,7 +428,7 @@ backend_timer_setup(int fd,
|
|||
struct timeval t;
|
||||
struct timeval t1 = {10, 0};
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
gettimeofday(&now, NULL);
|
||||
|
||||
backend_client_print(h, stderr);
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ clixon_plugin_reset_all(clixon_handle h,
|
|||
int retval = -1;
|
||||
clixon_plugin_t *cp = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
/* Loop through all plugins, call callbacks in each */
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if (clixon_plugin_reset_one(cp, h, db) < 0)
|
||||
|
|
@ -179,7 +179,7 @@ clixon_plugin_pre_daemon_all(clixon_handle h)
|
|||
int retval = -1;
|
||||
clixon_plugin_t *cp = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
/* Loop through all plugins, call callbacks in each */
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if (clixon_plugin_pre_daemon_one(cp, h) < 0)
|
||||
|
|
@ -242,7 +242,7 @@ clixon_plugin_daemon_all(clixon_handle h)
|
|||
int retval = -1;
|
||||
clixon_plugin_t *cp = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
/* Loop through all plugins, call callbacks in each */
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if (clixon_plugin_daemon_one(cp, h) < 0)
|
||||
|
|
@ -347,7 +347,7 @@ clixon_plugin_statedata_all(clixon_handle h,
|
|||
cbuf *cberr = NULL;
|
||||
cxobj *xerr = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if ((ret = clixon_plugin_statedata_one(cp, h, nsc, xpath, &x)) < 0)
|
||||
goto done;
|
||||
|
|
@ -373,7 +373,7 @@ clixon_plugin_statedata_all(clixon_handle h,
|
|||
x = NULL;
|
||||
continue;
|
||||
}
|
||||
clixon_debug_xml(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, x, "%s %s STATE:", __FUNCTION__, clixon_plugin_name_get(cp));
|
||||
clixon_debug_xml(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, x, "%s STATE:", clixon_plugin_name_get(cp));
|
||||
/* XXX: ret == 0 invalid yang binding should be handled as internal error */
|
||||
if ((ret = xml_bind_yang(h, x, YB_MODULE, yspec, &xerr)) < 0)
|
||||
goto done;
|
||||
|
|
@ -473,7 +473,7 @@ clixon_plugin_lockdb_all(clixon_handle h,
|
|||
int retval = -1;
|
||||
clixon_plugin_t *cp = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if (clixon_plugin_lockdb_one(cp, h, db, lock, id) < 0)
|
||||
goto done;
|
||||
|
|
@ -657,7 +657,7 @@ plugin_transaction_begin_all(clixon_handle h,
|
|||
int retval = -1;
|
||||
clixon_plugin_t *cp = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if (plugin_transaction_begin_one(cp, h, td) < 0)
|
||||
goto done;
|
||||
|
|
@ -1003,7 +1003,7 @@ plugin_transaction_end_all(clixon_handle h,
|
|||
int retval = -1;
|
||||
clixon_plugin_t *cp = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if (plugin_transaction_end_one(cp, h, td) < 0)
|
||||
goto done;
|
||||
|
|
@ -1056,7 +1056,7 @@ plugin_transaction_abort_all(clixon_handle h,
|
|||
int retval = -1;
|
||||
clixon_plugin_t *cp = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if (plugin_transaction_abort_one(cp, h, td) < 0)
|
||||
; /* dont abort on error */
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ restconf_pseudo_set_inline(clixon_handle h,
|
|||
cxobj *xrestconf;
|
||||
cbuf *cb = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
if (clixon_process_argv_get(h, RESTCONF_PROCESS, &argv, &argc) < 0)
|
||||
goto done;
|
||||
if ((xrestconf = xpath_first(xt, NULL, "restconf")) != NULL)
|
||||
|
|
@ -174,7 +174,7 @@ restconf_pseudo_set_inline(clixon_handle h,
|
|||
clixon_err(OE_XML, errno, "stdup");
|
||||
goto done;
|
||||
}
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s str:%s", __FUNCTION__, str);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "str:%s", str);
|
||||
if (argv[i+1])
|
||||
free(argv[i+1]);
|
||||
argv[i+1] = str;
|
||||
|
|
@ -203,7 +203,7 @@ restconf_rpc_wrapper(clixon_handle h,
|
|||
int retval = -1;
|
||||
cxobj *xt = NULL;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
switch (*operation){
|
||||
case PROC_OP_STOP:
|
||||
/* if RPC op is stop, stop the service */
|
||||
|
|
@ -349,7 +349,7 @@ restconf_pseudo_process_validate(clixon_handle h,
|
|||
int retval = -1;
|
||||
cxobj *xtarget;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
xtarget = transaction_target(td);
|
||||
/* If ssl-enable is true and (at least a) socket has ssl,
|
||||
* then server-cert-path and server-key-path must exist */
|
||||
|
|
@ -381,7 +381,7 @@ restconf_pseudo_process_commit(clixon_handle h,
|
|||
cxobj *cx;
|
||||
int enabled = 0;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
xtarget = transaction_target(td);
|
||||
xsource = transaction_src(td);
|
||||
if (xpath_first(xtarget, NULL, "/restconf[enable='true']") != NULL)
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ backend_accept_client(int fd,
|
|||
uid_t guid;
|
||||
#endif
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "");
|
||||
len = sizeof(from);
|
||||
if ((s = accept(fd, &from, &len)) < 0){
|
||||
clixon_err(OE_UNIX, errno, "accept");
|
||||
|
|
|
|||
|
|
@ -279,8 +279,8 @@ transaction_dbg(clixon_handle h,
|
|||
goto done;
|
||||
}
|
||||
if (i)
|
||||
clixon_debug(dbglevel, "%s %" PRIu64 " %s del: %s",
|
||||
__FUNCTION__, td->td_id, msg, cbuf_get(cb));
|
||||
clixon_debug(dbglevel, "%" PRIu64 " %s del: %s",
|
||||
td->td_id, msg, cbuf_get(cb));
|
||||
cbuf_reset(cb);
|
||||
for (i=0; i<td->td_alen; i++){
|
||||
xn = td->td_avec[i];
|
||||
|
|
@ -288,8 +288,8 @@ transaction_dbg(clixon_handle h,
|
|||
goto done;
|
||||
}
|
||||
if (i)
|
||||
clixon_debug(dbglevel, "%s %" PRIu64 " %s add: %s",
|
||||
__FUNCTION__, td->td_id, msg, cbuf_get(cb));
|
||||
clixon_debug(dbglevel, "%" PRIu64 " %s add: %s",
|
||||
td->td_id, msg, cbuf_get(cb));
|
||||
cbuf_reset(cb);
|
||||
for (i=0; i<td->td_clen; i++){
|
||||
if (td->td_scvec){
|
||||
|
|
@ -302,8 +302,8 @@ transaction_dbg(clixon_handle h,
|
|||
goto done;
|
||||
}
|
||||
if (i)
|
||||
clixon_debug(dbglevel, "%s %" PRIu64 " %s change: %s",
|
||||
__FUNCTION__, td->td_id, msg, cbuf_get(cb));
|
||||
clixon_debug(dbglevel, "%" PRIu64 " %s change: %s",
|
||||
td->td_id, msg, cbuf_get(cb));
|
||||
done:
|
||||
if (cb)
|
||||
cbuf_free(cb);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue