* 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:
Corinna Vinschen
2011-05-11 08:20:17 +00:00
parent 3bcc74a9ae
commit 933d2af50d
3 changed files with 134 additions and 92 deletions

View File

@ -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;