diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d1c52a2..92cf17ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,7 +61,6 @@ Users may have to change how they access the system * Imported (as a sub-spec): clixon-clispec.yang * Removed obsolete options: * `CLICON_YANG_LIST_CHECK` - * `CLICON_RESTCONF_PATH` (moved to restconf/fcgi-path) * Fixed: Configure option `CLICON_RESTCONF_PRETTY` was marked as obsolete but was still used. * `CLICON_RESTCONF_PRETTY` is now obsolete for sure * Instead restconf/pretty is used with API function restconf_pretty_get() diff --git a/apps/restconf/restconf_main_fcgi.c b/apps/restconf/restconf_main_fcgi.c index 7bd08d0f..e886789d 100644 --- a/apps/restconf/restconf_main_fcgi.c +++ b/apps/restconf/restconf_main_fcgi.c @@ -211,7 +211,7 @@ main(int argc, FCGX_Request request; FCGX_Request *req = &request; int c; - char *sockpath; + char *sockpath = NULL; char *path; clicon_handle h; char *dir; @@ -523,6 +523,17 @@ main(int argc, clicon_err(OE_DAEMON, EFAULT, "Restconf daemon config not found or disabled"); goto done; } + /* XXX see restconf_config_init access directly */ + if ((sockpath = clicon_option_str(h, "CLICON_RESTCONF_PATH")) == NULL){ + clicon_err(OE_CFG, errno, "No CLICON_RESTCONF_PATH in clixon configure file"); + goto done; + } + /* XXX CLICON_RESTCONF_PATH is marked as obsolete and should use + * fcgi-socket in clixon-restconf.yang instead */ + if ((sockpath = clicon_option_str(h, "CLICON_RESTCONF_PATH")) == NULL){ + clicon_err(OE_CFG, errno, "No CLICON_RESTCONF_PATH in clixon configure file"); + goto done; + } if (FCGX_Init() != 0){ /* How to cleanup memory after this? */ clicon_err(OE_CFG, errno, "FCGX_Init"); goto done; diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index 3c21c08c..d10cd223 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -106,6 +106,13 @@ Use `/* */`. Use `//` only for temporal comments. Do not use "======", ">>>>>" or "<<<<<<" in comments since git merge conflict uses that. +### Format ints + +Use: +- %zu for size_t +- PRIu64 for uint64 +- %p for pointers + ## How to work in git Clixon uses semantic versioning (https://semver.org). diff --git a/lib/clixon/clixon_handle.h b/lib/clixon/clixon_handle.h index 1f6b54c6..6dfa05a6 100644 --- a/lib/clixon/clixon_handle.h +++ b/lib/clixon/clixon_handle.h @@ -53,11 +53,8 @@ typedef void *clicon_handle; typedef void *plghndl_t; /*! Indirect output functions to print with something else than fprintf - * @param[in] h Clicon handle - * @param[in] xn Request: - * @param[out] cbret Return xml tree, eg ...,