sock ipv4

This commit is contained in:
Olof hagsand 2018-07-24 22:27:52 +02:00
parent b7eb89962d
commit c6a62b96de
3 changed files with 10 additions and 8 deletions

View file

@ -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;

View file

@ -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;
}

View file

@ -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";