From 8e624e9919040e2ec99be764394bb33a2bc77fd9 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Tue, 7 Jan 2020 19:47:55 +0100 Subject: Seems to work fine with my space navigator. The client <-> server logic is not implemeted yet, though. --- src/config/parameters/parse_config_file.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/config/parameters') diff --git a/src/config/parameters/parse_config_file.c b/src/config/parameters/parse_config_file.c index c01090d..00e9d4c 100644 --- a/src/config/parameters/parse_config_file.c +++ b/src/config/parameters/parse_config_file.c @@ -82,23 +82,24 @@ static int read_axis_options break; case ',': - i = 0; - option[i] = '\n'; + option[i] = '\0'; /* We parsed a new option and there is a least another. */ (void) relabsd_axis_enable_option_from_name(option, axis_name, axis); + i = 0; + break; case '\n': - option[i] = '\n'; + option[i] = '\0'; (void) relabsd_axis_enable_option_from_name(option, axis_name, axis); return 1; case EOF: - option[i] = '\n'; + option[i] = '\0'; (void) relabsd_axis_enable_option_from_name(option, axis_name, axis); @@ -181,7 +182,7 @@ static int parse_timeout_configuration_line relabsd_parameters_set_timeout(timeout_msec, parameters); - return 0; + return 1; } /* @@ -203,7 +204,11 @@ static int parse_axis_configuration_line if (axis_index == RELABSD_UNKNOWN) { - if (RELABSD_IS_PREFIX("TO", axis_name)) + if + ( + RELABSD_IS_PREFIX("TO", axis_name) + || RELABSD_IS_PREFIX("to", axis_name) + ) { return parse_timeout_configuration_line(file, parameters); } -- cgit v1.2.3-70-g09d2