clicon_err: Missed print strerr due to category error.

This commit is contained in:
Olof hagsand 2021-03-30 14:26:22 +02:00
parent 477059f33d
commit 95a820c862
3 changed files with 9 additions and 3 deletions

View file

@ -149,19 +149,24 @@ clicon_err_reset(void)
return 0; return 0;
} }
/*! Find error category struct given name
*/
static struct clixon_err_cats * static struct clixon_err_cats *
find_category(int category) find_category(int category)
{ {
clixon_err_cats *cec = NULL; clixon_err_cats *cec = NULL;
int found = 0;
if ((cec = _err_cat_list) != NULL){ if ((cec = _err_cat_list) != NULL){
do { do {
if (cec->cec_category == category) if (cec->cec_category == category){
found++;
break; break;
}
cec = NEXTQ(clixon_err_cats *, cec); cec = NEXTQ(clixon_err_cats *, cec);
} while (cec && cec != _err_cat_list); } while (cec && cec != _err_cat_list);
} }
return cec; return found?cec:NULL;
} }
/*! Report an error. /*! Report an error.

View file

@ -69,5 +69,6 @@ DATASTORE_TOP="config"
# clixon yang revisions occuring in tests # clixon yang revisions occuring in tests
CLIXON_LIB_REV="2021-03-08" CLIXON_LIB_REV="2021-03-08"
CLIXON_CONFIG_REV="2021-03-08" CLIXON_CONFIG_REV="2021-03-08"
CLIXON_RESTCONF_REV="2020-12-30"
CLIXON_EXAMPLE_REV="2020-12-01" CLIXON_EXAMPLE_REV="2020-12-01"

View file

@ -33,7 +33,7 @@ if [ -d ${TOP_SRCDIR}/example/main/$y ]; then
else else
cp /usr/local/share/clixon/$y $dir/ cp /usr/local/share/clixon/$y $dir/
fi fi
y=clixon-restconf@2020-12-30.yang y=clixon-restconf@${CLIXON_RESTCONF_REV}.yang
if [ -d ${TOP_SRCDIR}/yang/clixon ]; then if [ -d ${TOP_SRCDIR}/yang/clixon ]; then
cp ${TOP_SRCDIR}/yang/clixon/$y $dir/ cp ${TOP_SRCDIR}/yang/clixon/$y $dir/
else else