fix an issue
This commit is contained in:
@@ -502,9 +502,11 @@ int main (int argc, char **argv)
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
char *path = "/data/data/com.github.shadowsocks/sock_path";
|
||||
unlink(path);
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_UNIX;
|
||||
strncpy(addr.sun_path, "/data/data/com.github.shadowsocks/sock_path", sizeof(addr.sun_path)-1);
|
||||
strncpy(addr.sun_path, path, sizeof(addr.sun_path)-1);
|
||||
|
||||
if (bind(sock, (struct sockaddr*)&addr, sizeof(addr)) == -1) {
|
||||
BLog(BLOG_ERROR, "bind() failed: %s (sock = %d)\n", strerror(errno), sock);
|
||||
|
||||
@@ -336,7 +336,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
|
||||
|
||||
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
|
||||
|
||||
Console.runCommand(cmd.mkString(" "))
|
||||
Console.runCommand(cmd)
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user