Discriminate APP debugging

This commit is contained in:
Philip Prindeville 2024-01-04 15:40:53 -07:00 committed by Olof Hagsand
parent 063c8d664f
commit 0ec1e0a686
36 changed files with 366 additions and 365 deletions

View file

@ -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_DEFAULT, "%s op:%d", __FUNCTION__, op);
clixon_debug(CLIXON_DBG_CLIENT, "%s op:%d", __FUNCTION__, 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_DEFAULT, "%s %d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_CLIENT, "%s %d", __FUNCTION__, retval);
if (cb)
cbuf_free(cb);
return retval;
@ -321,10 +321,10 @@ backend_client_rm(clixon_handle h,
if (if_feature(yspec, "ietf-netconf", "confirmed-commit")) {
if (confirmed_commit_state_get(h) == EPHEMERAL) {
/* See if this client is the origin */
clixon_debug(CLIXON_DBG_DEFAULT, "session_id: %u, confirmed_commit.session_id: %u", ce->ce_id, confirmed_commit_session_id_get(h));
clixon_debug(CLIXON_DBG_CLIENT, "session_id: %u, confirmed_commit.session_id: %u", ce->ce_id, confirmed_commit_session_id_get(h));
if (myid == confirmed_commit_session_id_get(h)) {
clixon_debug(CLIXON_DBG_DEFAULT, "ok, rolling back");
clixon_debug(CLIXON_DBG_CLIENT, "ok, rolling back");
clixon_log(h, LOG_NOTICE, "a client with an active ephemeral confirmed-commit has disconnected; rolling back");
/* do_rollback errors are logged internally and there is no client to report errors to, so errors are
@ -336,7 +336,7 @@ backend_client_rm(clixon_handle h,
}
}
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
/* 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_DEFAULT | CLIXON_DBG_DETAIL, "%s %s", __FUNCTION__, dbname);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s %s", __FUNCTION__, 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_DEFAULT, "%s done cbret:%s", __FUNCTION__, cbuf_get(cbret));
clixon_debug(CLIXON_DBG_CLIENT, "%s done cbret:%s", __FUNCTION__, 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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
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_DEFAULT, "%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, "%s Warning: incoming session-id:%u does not match ce_id:%u on socket: %d", __FUNCTION__, 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_DEFAULT, "%s module:%s rpc:%s ce_id:%u s:%d", __FUNCTION__, module,
clixon_debug(CLIXON_DBG_CLIENT, "%s module:%s rpc:%s ce_id:%u s:%d", __FUNCTION__, 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_DEFAULT | CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, 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_DEFAULT, "%s retval:%d", __FUNCTION__, retval);
// clixon_debug(CLIXON_DBG_CLIENT, "%s retval:%d", __FUNCTION__, 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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
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_DEFAULT | CLIXON_DBG_DETAIL, "%s retval=%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s retval=%d", __FUNCTION__, retval);
if (cbce)
cbuf_free(cbce);
if (msg)

View file

@ -178,7 +178,7 @@ startup_common(clixon_handle h,
if (clicon_option_bool(h, "CLICON_XMLDB_MODSTATE"))
if ((msdiff = modstate_diff_new()) == NULL)
goto done;
clixon_debug(CLIXON_DBG_DEFAULT, "Reading initial config from %s", db);
clixon_debug(CLIXON_DBG_CLIENT, "Reading initial config from %s", db);
/* Get the startup datastore WITHOUT binding to YANG, sorting and default setting.
* It is done below, later in this function
*/
@ -203,7 +203,7 @@ startup_common(clixon_handle h,
if (xmldb_get0(h, db, YB_NONE, NULL, "/", 0, 0, &xt, msdiff, &xerr) < 0)
goto done;
}
clixon_debug_xml(CLIXON_DBG_DEFAULT | CLIXON_DBG_DETAIL, xt, "startup");
clixon_debug_xml(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, xt, "startup");
if (msdiff && msdiff->md_status == 0){ // Possibly check for CLICON_XMLDB_MODSTATE
clixon_log(h, LOG_WARNING, "Modstate expected in startup datastore but not found\n"
"This may indicate that the datastore is not initialized corrrectly, such as copy/pasted.\n"
@ -213,7 +213,7 @@ startup_common(clixon_handle h,
clixon_err(OE_YANG, 0, "Yang spec not set");
goto done;
}
clixon_debug(CLIXON_DBG_DEFAULT, "Reading startup config done");
clixon_debug(CLIXON_DBG_CLIENT, "Reading startup config done");
/* Clear flags xpath for get */
xml_apply0(xt, CX_ELMNT, (xml_applyfn_t*)xml_flag_reset,
(void*)(XML_FLAG_MARK|XML_FLAG_CHANGE));
@ -302,7 +302,7 @@ startup_common(clixon_handle h,
/* 5. Make generic validation on all new or changed data.
Note this is only call that uses 3-values */
clixon_debug(CLIXON_DBG_DEFAULT, "Validating startup %s", db);
clixon_debug(CLIXON_DBG_CLIENT, "Validating startup %s", db);
if ((ret = generic_validate(h, yspec, td, &xret)) < 0)
goto done;
if (ret == 0){
@ -590,7 +590,7 @@ candidate_validate(clixon_handle h,
cxobj *xret = NULL;
int ret;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
if (db == NULL || cbret == NULL){
clixon_err(OE_CFG, EINVAL, "db or cbret is NULL");
goto done;
@ -822,14 +822,14 @@ from_client_commit(clixon_handle h,
goto ok;
}
if ((ret = candidate_commit(h, xe, "candidate", myid, 0, cbret)) < 0){ /* Assume validation fail, nofatal */
clixon_debug(CLIXON_DBG_DEFAULT, "Commit candidate failed");
clixon_debug(CLIXON_DBG_CLIENT, "Commit candidate failed");
if (ret < 0)
if (netconf_operation_failed(cbret, "application", clixon_err_reason())< 0)
goto done;
goto ok;
}
if (ret == 0)
clixon_debug(CLIXON_DBG_DEFAULT, "Commit candidate failed");
clixon_debug(CLIXON_DBG_CLIENT, "Commit candidate failed");
else
cprintf(cbret, "<rpc-reply xmlns=\"%s\"><ok/></rpc-reply>", NETCONF_BASE_NAMESPACE);
ok:
@ -913,7 +913,7 @@ from_client_validate(clixon_handle h,
int ret;
char *db;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
if ((db = netconf_db_find(xe, "source")) == NULL){
if (netconf_missing_element(cbret, "protocol", "source", NULL) < 0)
goto done;
@ -959,7 +959,7 @@ from_client_restart_one(clixon_handle h,
if (clixon_resource_check(h, &wh, clixon_plugin_name_get(cp), __FUNCTION__) < 0)
goto done;
if ((retval = resetfn(h, db)) < 0) {
clixon_debug(CLIXON_DBG_DEFAULT, "plugin_start() failed");
clixon_debug(CLIXON_DBG_CLIENT, "plugin_start() failed");
goto done;
}
if (clixon_resource_check(h, &wh, clixon_plugin_name_get(cp), __FUNCTION__) < 0)

View file

@ -457,7 +457,7 @@ check_valid_confirming_commit(clixon_handle h,
"not issued on the same session as the confirmed-commit");
goto invalid;
default:
clixon_debug(CLIXON_DBG_DEFAULT, "commit-confirmed state !? %d", confirmed_commit_state_get(h));
clixon_debug(CLIXON_DBG_CLIENT, "commit-confirmed state !? %d", confirmed_commit_state_get(h));
goto invalid;
}
retval = 1; // valid

View file

@ -218,7 +218,7 @@ get_statedata(clixon_handle h,
cbuf *cb = NULL;
cxobj *xerr = NULL;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
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_DEFAULT, "%s %d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_CLIENT, "%s %d", __FUNCTION__, retval);
if (xerr)
xml_free(xerr);
if (x1)
@ -769,7 +769,7 @@ get_list_pagination(clixon_handle h,
if ((ret = xml_bind_yang(h, xret, YB_MODULE, yspec, &xerr)) < 0)
goto done;
if (ret == 0){
clixon_debug_xml(CLIXON_DBG_DEFAULT, xret, "Yang bind pagination state");
clixon_debug_xml(CLIXON_DBG_CLIENT, xret, "Yang bind pagination state");
if (clixon_netconf_internal_error(xerr,
". Internal error, state callback returned invalid XML",
NULL) < 0)
@ -872,7 +872,7 @@ get_common(clixon_handle h,
char *wdefstr;
wdef = WITHDEFAULTS_EXPLICIT;
clixon_debug(CLIXON_DBG_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
username = clicon_username_get(h);
if ((yspec = clicon_dbspec_yang(h)) == NULL){
clixon_err(OE_YANG, ENOENT, "No yang spec9");
@ -1018,7 +1018,7 @@ get_common(clixon_handle h,
(ret = xml_yang_validate_add(h, xret, &xerr)) < 0)
goto done;
if (ret == 0){
clixon_debug_xml(CLIXON_DBG_DEFAULT, xret, "VALIDATE_STATE");
clixon_debug_xml(CLIXON_DBG_CLIENT, xret, "VALIDATE_STATE");
if (clixon_netconf_internal_error(xerr,
". Internal error, state callback returned invalid XML",
NULL) < 0)
@ -1049,7 +1049,7 @@ get_common(clixon_handle h,
ok:
retval = 0;
done:
clixon_debug(CLIXON_DBG_DEFAULT | CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s retval:%d", __FUNCTION__, retval);
if (xvec)
free(xvec);
if (xret)

View file

@ -100,7 +100,7 @@ backend_terminate(clixon_handle h)
int ss;
cvec *nsctx;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
if ((ss = clicon_socket_get(h)) != -1)
close(ss);
/* Disconnect datastore */
@ -143,7 +143,7 @@ backend_terminate(clixon_handle h)
unlink(sockpath);
backend_handle_exit(h); /* Also deletes streams. Cannot use h after this. */
clixon_event_exit();
clixon_debug(CLIXON_DBG_DEFAULT, "%s done", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s done", __FUNCTION__);
clixon_err_exit();
clixon_log_exit();
return 0;
@ -172,7 +172,7 @@ backend_sig_term(int arg)
static void
backend_sig_child(int arg)
{
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
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_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
gettimeofday(&now, NULL);
backend_client_print(h, stderr);

View file

@ -117,7 +117,7 @@ clixon_plugin_reset_all(clixon_handle h,
int retval = -1;
clixon_plugin_t *cp = NULL;
clixon_debug(CLIXON_DBG_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
/* 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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
/* 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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
/* 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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
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_DEFAULT | CLIXON_DBG_DETAIL, x, "%s %s STATE:", __FUNCTION__, clixon_plugin_name_get(cp));
clixon_debug_xml(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, x, "%s %s STATE:", __FUNCTION__, 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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
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_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
if (plugin_transaction_abort_one(cp, h, td) < 0)
; /* dont abort on error */

View file

@ -154,7 +154,7 @@ restconf_pseudo_set_inline(clixon_handle h,
cxobj *xrestconf;
cbuf *cb = NULL;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
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_DEFAULT, "%s str:%s", __FUNCTION__, str);
clixon_debug(CLIXON_DBG_CLIENT, "%s str:%s", __FUNCTION__, 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_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
switch (*operation){
case PROC_OP_STOP:
/* if RPC op is stop, stop the service */
@ -283,24 +283,24 @@ restconf_pseudo_process_control(clixon_handle h)
cprintf(cb, "%s/clixon_restconf", dir0);
pgm = cbuf_get(cb);
if (stat(pgm, &fstat) == 0){ /* Sanity check: program exists */
clixon_debug(CLIXON_DBG_DEFAULT, "Found %s", pgm);
clixon_debug(CLIXON_DBG_CLIENT, "Found %s", pgm);
found++;
}
else
clixon_debug(CLIXON_DBG_DEFAULT, "Not found: %s", pgm);
clixon_debug(CLIXON_DBG_CLIENT, "Not found: %s", pgm);
}
if (!found &&
(dir1 = CLIXON_CONFIG_SBINDIR) != NULL){
cbuf_reset(cb);
cprintf(cb, "%s/clixon_restconf", dir1);
pgm = cbuf_get(cb);
clixon_debug(CLIXON_DBG_DEFAULT, "Looking for %s", pgm);
clixon_debug(CLIXON_DBG_CLIENT, "Looking for %s", pgm);
if (stat(pgm, &fstat) == 0){ /* Sanity check: program exists */
clixon_debug(CLIXON_DBG_DEFAULT, "Found %s", pgm);
clixon_debug(CLIXON_DBG_CLIENT, "Found %s", pgm);
found++;
}
else
clixon_debug(CLIXON_DBG_DEFAULT, "Not found: %s", pgm);
clixon_debug(CLIXON_DBG_CLIENT, "Not found: %s", pgm);
}
if (!found){
clixon_err(OE_RESTCONF, 0, "clixon_restconf not found in neither CLICON_RESTCONF_INSTALLDIR(%s) nor CLIXON_CONFIG_SBINDIR(%s). Try overriding with CLICON_RESTCONF_INSTALLDIR",
@ -349,7 +349,7 @@ restconf_pseudo_process_validate(clixon_handle h,
int retval = -1;
cxobj *xtarget;
clixon_debug(CLIXON_DBG_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
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_DEFAULT, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
xtarget = transaction_target(td);
xsource = transaction_src(td);
if (xpath_first(xtarget, NULL, "/restconf[enable='true']") != NULL)

View file

@ -111,7 +111,7 @@ config_socket_init_ipv4(clixon_handle h,
clixon_err(OE_UNIX, errno, "bind");
goto err;
}
clixon_debug(CLIXON_DBG_DEFAULT, "Listen on server socket at %s:%hu", dst, port);
clixon_debug(CLIXON_DBG_CLIENT, "Listen on server socket at %s:%hu", dst, port);
if (listen(s, 5) < 0){
clixon_err(OE_UNIX, errno, "listen");
goto err;
@ -178,7 +178,7 @@ config_socket_init_unix(clixon_handle h,
clixon_err(OE_UNIX, errno, "lchown(%s, %s)", sock, config_group);
goto err;
}
clixon_debug(CLIXON_DBG_DEFAULT, "Listen on server socket at %s", addr.sun_path);
clixon_debug(CLIXON_DBG_CLIENT, "Listen on server socket at %s", addr.sun_path);
if (listen(s, 5) < 0){
clixon_err(OE_UNIX, errno, "listen");
goto err;
@ -245,7 +245,7 @@ backend_accept_client(int fd,
uid_t guid;
#endif
clixon_debug(CLIXON_DBG_DEFAULT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
clixon_debug(CLIXON_DBG_CLIENT | CLIXON_DBG_DETAIL, "%s", __FUNCTION__);
len = sizeof(from);
if ((s = accept(fd, &from, &len)) < 0){
clixon_err(OE_UNIX, errno, "accept");