aboutsummaryrefslogtreecommitdiff
path: root/libssh/options.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-10-15 17:17:36 +0200
committerAndreas Schneider <mail@cynapses.org>2009-10-15 17:17:36 +0200
commit7b7280e728466f2ce9e9faeb840093224ef5d3e3 (patch)
tree770d42898c9a0e0730d5b7c4d50c9473c2a0b472 /libssh/options.c
parent2523ed0779843e6074717cdcdf8bcaffb4b87ad9 (diff)
downloadlibssh-7b7280e728466f2ce9e9faeb840093224ef5d3e3.tar.gz
libssh-7b7280e728466f2ce9e9faeb840093224ef5d3e3.tar.xz
libssh-7b7280e728466f2ce9e9faeb840093224ef5d3e3.zip
Added option to set log_verbosity in the server.
Diffstat (limited to 'libssh/options.c')
-rw-r--r--libssh/options.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/libssh/options.c b/libssh/options.c
index 31a5232a..0cc5be7c 100644
--- a/libssh/options.c
+++ b/libssh/options.c
@@ -677,6 +677,33 @@ int ssh_bind_options_set(ssh_bind sshbind, enum ssh_bind_options_e type,
sshbind->bindport = i & 0xffff;
}
break;
+ case SSH_BIND_OPTIONS_LOG_VERBOSITY:
+ if (value == NULL) {
+ ssh_set_error_invalid(sshbind, __FUNCTION__);
+ return -1;
+ } else {
+ int *x = (int *) value;
+ sshbind->log_verbosity = *x & 0xffff;
+ }
+ break;
+ case SSH_BIND_OPTIONS_LOG_VERBOSITY_STR:
+ if (value == NULL) {
+ sshbind->log_verbosity = 0;
+ } else {
+ q = strdup(value);
+ if (q == NULL) {
+ ssh_set_error_oom(sshbind);
+ return -1;
+ }
+ i = strtol(q, &p, 10);
+ if (q == p) {
+ SAFE_FREE(q);
+ }
+ SAFE_FREE(q);
+
+ sshbind->log_verbosity = i & 0xffff;
+ }
+ break;
case SSH_BIND_OPTIONS_DSAKEY:
if (value == NULL) {
ssh_set_error_invalid(sshbind, __FUNCTION__);