diff --git a/apps/backend/backend_socket.c b/apps/backend/backend_socket.c index a2587044..ec32fb53 100644 --- a/apps/backend/backend_socket.c +++ b/apps/backend/backend_socket.c @@ -74,7 +74,8 @@ #include "backend_handle.h" static int -config_socket_init_ipv4(clicon_handle h, char *dst) +config_socket_init_ipv4(clicon_handle h, + char *dst) { int s; struct sockaddr_in addr; @@ -116,7 +117,8 @@ config_socket_init_ipv4(clicon_handle h, char *dst) * and group according to CLICON_SOCK_GROUP option. */ static int -config_socket_init_unix(clicon_handle h, char *sock) +config_socket_init_unix(clicon_handle h, + char *sock) { int s; struct sockaddr_un addr; @@ -197,7 +199,7 @@ backend_socket_init(clicon_handle h) */ int backend_accept_client(int fd, - void *arg) + void *arg) { int retval = -1; clicon_handle h = (clicon_handle)arg; diff --git a/lib/src/clixon_xml_db.c b/lib/src/clixon_xml_db.c index b909385b..e29c7c30 100644 --- a/lib/src/clixon_xml_db.c +++ b/lib/src/clixon_xml_db.c @@ -143,10 +143,8 @@ xmldb_plugin_unload(clicon_handle h) xmldb_handle xh; char *error; - if ((handle = clicon_xmldb_plugin_get(h)) == NULL){ - clicon_err(OE_PLUGIN, errno, "No plugin handle"); - goto done; - } + if ((handle = clicon_xmldb_plugin_get(h)) == NULL) + goto ok; /* OK, may not have been initialized */ /* If connected storage handle then disconnect */ if ((xh = clicon_xmldb_handle_get(h)) != NULL) xmldb_disconnect(h); /* sets xmldb handle to NULL */ @@ -165,8 +163,9 @@ xmldb_plugin_unload(clicon_handle h) clicon_err(OE_PLUGIN, errno, "dlclose: %s", error ? error : "Unknown error"); /* Just report no -1 return*/ } + ok: retval = 0; - done: + // done: return retval; } diff --git a/yang/clixon-config@2018-04-30.yang b/yang/clixon-config@2018-04-30.yang index 164d108b..c629a3c7 100644 --- a/yang/clixon-config@2018-04-30.yang +++ b/yang/clixon-config@2018-04-30.yang @@ -248,6 +248,7 @@ module clixon-config { } leaf CLICON_SOCK { type string; + mandatory true; description "If family above is AF_UNIX: Unix socket for communicating with clixon_backend. If family is AF_INET: IPv4 address";