* fhandler_socket.cc (get_inet_addr): Make externally available.

* autoload.cc (GetUdpTable): Define.
	* syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64
	to check for local socket file.  Create socket with type returned by
	get_inet_addr.  If connect on UDP socket works, test if there's
	really a listening peer, otherwise fall back to Windows event log.
	(try_connect_syslogd): Use syslogd_inited flag to check if syslogd
	is available.
This commit is contained in:
Corinna Vinschen
2011-03-29 11:07:23 +00:00
parent d7d8e7ce07
commit 39735c85f2
4 changed files with 56 additions and 23 deletions

View File

@ -63,7 +63,7 @@ adjust_socket_file_mode (mode_t mode)
}
/* cygwin internal: map sockaddr into internet domain address */
static int
int
get_inet_addr (const struct sockaddr *in, int inlen,
struct sockaddr_storage *out, int *outlen,
int *type = NULL, int *secret = NULL)