|
|
|
@ -49,6 +49,7 @@ typedef enum { |
|
|
|
SECTION_TCP_PROXY_SERVER, |
|
|
|
SECTION_TCP_PROXY_SERVER, |
|
|
|
SECTION_MSG_TRANSPORT, |
|
|
|
SECTION_MSG_TRANSPORT, |
|
|
|
SECTION_NETWORK, |
|
|
|
SECTION_NETWORK, |
|
|
|
|
|
|
|
SECTION_GUI, |
|
|
|
SECTION_NTP |
|
|
|
SECTION_NTP |
|
|
|
} section_type_t; |
|
|
|
} section_type_t; |
|
|
|
|
|
|
|
|
|
|
|
@ -765,6 +766,7 @@ static section_type_t parse_section_header(const char *line, char *name, size_t |
|
|
|
if (strcasecmp(section, "tcp_proxy_server") == 0) return SECTION_TCP_PROXY_SERVER; |
|
|
|
if (strcasecmp(section, "tcp_proxy_server") == 0) return SECTION_TCP_PROXY_SERVER; |
|
|
|
if (strcasecmp(section, "msg_transport") == 0) return SECTION_MSG_TRANSPORT; |
|
|
|
if (strcasecmp(section, "msg_transport") == 0) return SECTION_MSG_TRANSPORT; |
|
|
|
if (strcasecmp(section, "ntp") == 0) return SECTION_NTP; |
|
|
|
if (strcasecmp(section, "ntp") == 0) return SECTION_NTP; |
|
|
|
|
|
|
|
if (strcasecmp(section, "gui") == 0) return SECTION_GUI; |
|
|
|
|
|
|
|
|
|
|
|
char *colon = strchr(section, ':'); |
|
|
|
char *colon = strchr(section, ':'); |
|
|
|
if (!colon) return SECTION_UNKNOWN; |
|
|
|
if (!colon) return SECTION_UNKNOWN; |
|
|
|
@ -996,6 +998,8 @@ static struct utun_config* parse_config_internal(FILE *fp, const char *filename) |
|
|
|
DEBUG_ERROR(DEBUG_CATEGORY_CONFIG, "%s:%d: Unknown ntp option '%s'. Valid: enabled, server, interval", filename, line_num, key); |
|
|
|
DEBUG_ERROR(DEBUG_CATEGORY_CONFIG, "%s:%d: Unknown ntp option '%s'. Valid: enabled, server, interval", filename, line_num, key); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case SECTION_GUI: |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_CONFIG, "%s:%d: Key outside section: %s", filename, line_num, key); |
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_CONFIG, "%s:%d: Key outside section: %s", filename, line_num, key); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|