Merge branch 'master' into develop

Conflicts:
	CHANGELOG.md
This commit is contained in:
Olof hagsand 2017-09-24 17:08:44 +02:00
commit a691124189
6 changed files with 21 additions and 2 deletions

View file

@ -1,11 +1,13 @@
# Clixon CHANGELOG
## 3.3.3 Upcoming
* netconf client was limited to 8K byte messages. Now limit is 2^32,
* netconf client was limited to 8K byte messages. Now limit is 2^32.
* Added event_poll function.
* Added experimental xml hash for better performance of large lists.
To enable, set XML_CHILD_HASH in clixon_custom.h
* Support for non-line scrolling in CLI, eg wrap lines. Set with:
CLICON_CLI_LINESCROLLING 0
## 3.3.2 Aug 27 2017
### Known issues

View file

@ -146,6 +146,9 @@ cli_syntax_set(clicon_handle h,
cli_syntax_t *stx)
{
struct cli_handle *cl = handle(h);
if (cl->cl_stx)
free(cl->cl_stx);
cl->cl_stx = stx;
return 0;
}

View file

@ -392,6 +392,7 @@ main(int argc, char **argv)
cli_plugin_start(h, argc+1, argv-1);
*(argv-1) = tmp;
cligen_line_scrolling_set(cli_cligen(h), clicon_option_int(h,"CLICON_CLI_LINESCROLLING"));
/* Launch interfactive event loop, unless -1 */
if (restarg != NULL && strlen(restarg)){
char *mode = cli_syntax_mode(h);

View file

@ -119,6 +119,10 @@ CLICON_XMLDB_PLUGIN libdir/xmldb/text.so
# Dont include keys in cvec in cli vars callbacks, ie a & k in 'a <b> k <c>' ignored
# CLICON_CLI_VARONLY 1
# Set to 0 if you want CLI to wrap to next line.
# Set to 1 if you want CLI to scroll sideways when approaching right margin
# CLICON_CLI_LINESCROLLING 1
# FastCGI unix socket. Should be specified in webserver
# Eg in nginx: fastcgi_pass unix:/www-data/clicon_restconf.sock;
CLICON_RESTCONF_PATH /www-data/fastcgi_restconf.sock

View file

@ -32,3 +32,7 @@ CLICON_USE_STARTUP_CONFIG 0
# XMLDB datastore plugin filename (see datastore/ and clixon_xml_db.[ch])
CLICON_XMLDB_PLUGIN /usr/local/lib/xmldb/text.so
#CLICON_XMLDB_PLUGIN /usr/local/lib/xmldb/keyvalue.so
# Set to 0 if you want CLI to wrap to next line.
# Set to 1 if you want CLI to scroll sideways when approaching right margin
CLICON_CLI_LINESCROLLING 0

View file

@ -276,6 +276,11 @@ clicon_option_sanity(clicon_hash_t *copt)
clicon_err(OE_UNIX, 0, "CLICON_BACKEND_PIDFILE not defined in config file");
goto done;
}
/* Default is to use line-scrolling */
if (!hash_lookup(copt, "CLICON_CLI_LINESCROLLING")){
if (hash_add(copt, "CLICON_CLI_LINESCROLLING", "1", strlen("1")+1) < 0)
goto done;
}
retval = 0;
done:
return retval;