* fhandler_socket.cc (get_inet_addr): Rearrange for better readability.
Make waiting loop interruptible and cancelable. Check for SYSTEM DOS flag before reading the file. Change return value to return 0 on success, SOCKET_ERROR on failure. (fhandler_socket::bind): Only set R/O DOS flag on filesystems not supporting ACLs. (fhandler_socket::connect): Accommodate changed return values from get_inet_addr. Use SOCKET_ERROR instead of -1. (fhandler_socket::sendto): Accommodate changed return values from get_inet_addr. * syslog.cc (connect_syslogd): Ditto.
This commit is contained in:
@ -206,7 +206,7 @@ connect_syslogd ()
|
||||
syslogd_sock = -1;
|
||||
sun.sun_family = AF_LOCAL;
|
||||
strncpy (sun.sun_path, _PATH_LOG, sizeof sun.sun_path);
|
||||
if (!get_inet_addr ((struct sockaddr *) &sun, sizeof sun, &sst, &len, &type))
|
||||
if (get_inet_addr ((struct sockaddr *) &sun, sizeof sun, &sst, &len, &type))
|
||||
return;
|
||||
if ((fd = cygwin_socket (AF_LOCAL, type, 0)) < 0)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user