From 059780ff9bee752140ead535526c4343fc0e8064 Mon Sep 17 00:00:00 2001 From: sxyoxygen <42184617+sxyoxygen@users.noreply.github.com> Date: Wed, 8 Aug 2018 01:56:37 +0800 Subject: [PATCH] Update local.c --- src/local.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/local.c b/src/local.c index 11091d59..6a8474e5 100644 --- a/src/local.c +++ b/src/local.c @@ -1863,7 +1863,7 @@ main(int argc, char **argv) ev_signal_start(EV_DEFAULT, &sigchld_watcher); #endif - if (strcmp(local_addr, ":") > 0) + if (ss_is_ipv6addr(local_addr)) LOGI("listening at [%s]:%s", local_addr, local_port); else LOGI("listening at %s:%s", local_addr, local_port); @@ -2045,7 +2045,7 @@ _start_ss_local_server(profile_t profile, ss_local_callback callback, void *udat listen_ctx.iface = NULL; listen_ctx.mptcp = mptcp; - if (strcmp(local_addr, ":") > 0) + if (ss_is_ipv6addr(local_addr)) LOGI("listening at [%s]:%s", local_addr, local_port_str); else LOGI("listening at %s:%s", local_addr, local_port_str);