mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-28 19:53:46 +00:00
Refine #1739
This commit is contained in:
@@ -295,6 +295,8 @@ read_jconf(const char *file)
|
||||
} else if (strcmp(name, "mode") == 0) {
|
||||
char *mode_str = to_string(value);
|
||||
|
||||
if (mode_str == NULL)
|
||||
conf.mode = TCP_ONLY;
|
||||
if (strcmp(mode_str, "tcp_only") == 0)
|
||||
conf.mode = TCP_ONLY;
|
||||
else if (strcmp(mode_str, "tcp_and_udp") == 0)
|
||||
@@ -304,6 +306,7 @@ read_jconf(const char *file)
|
||||
else
|
||||
LOGI("ignore unknown mode: %s, use tcp_only as fallback",
|
||||
mode_str);
|
||||
|
||||
ss_free(mode_str);
|
||||
} else if (strcmp(name, "mtu") == 0) {
|
||||
check_json_value_type(value, json_integer,
|
||||
|
||||
Reference in New Issue
Block a user