iphlpapi: Use winediag for icmp failure.

This commit is contained in:
Roderick Colenbrander 2009-12-08 14:14:21 +01:00 committed by Alexandre Julliard
parent 6a8aae0bec
commit 715a398899
1 changed files with 2 additions and 1 deletions

View File

@ -99,6 +99,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(icmp); WINE_DEFAULT_DEBUG_CHANNEL(icmp);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
typedef struct { typedef struct {
@ -153,7 +154,7 @@ HANDLE WINAPI IcmpCreateFile(VOID)
int sid=socket(AF_INET,SOCK_RAW,IPPROTO_ICMP); int sid=socket(AF_INET,SOCK_RAW,IPPROTO_ICMP);
if (sid < 0) { if (sid < 0) {
MESSAGE("WARNING: Trying to use ICMP (network ping) will fail unless running as root\n"); ERR_(winediag)("Failed to use ICMP (network ping), this requires special permissions.\n");
SetLastError(ERROR_ACCESS_DENIED); SetLastError(ERROR_ACCESS_DENIED);
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }