mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-02 16:03:45 +00:00
fix some issues
This commit is contained in:
+3
-3
@@ -182,14 +182,14 @@ int protect_socket(void (*protect_cb)(int ret, void *data), void *data, int fd)
|
||||
int remotefd;
|
||||
struct sockaddr_un addr;
|
||||
|
||||
// Setup
|
||||
setnonblocking(remotefd);
|
||||
|
||||
if ( (remotefd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
|
||||
LOGE("[android] socket() failed: %s (socket fd = %d)\n", strerror(errno), remotefd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Setup
|
||||
setnonblocking(remotefd);
|
||||
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sun_family = AF_UNIX;
|
||||
strncpy(addr.sun_path, "/data/data/com.github.shadowsocks/protect_path", sizeof(addr.sun_path)-1);
|
||||
|
||||
Reference in New Issue
Block a user