diff options
Diffstat (limited to 'plugins/Ping/src/rawping.cpp')
-rw-r--r-- | plugins/Ping/src/rawping.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Ping/src/rawping.cpp b/plugins/Ping/src/rawping.cpp index 65bc99a775..007200fa23 100644 --- a/plugins/Ping/src/rawping.cpp +++ b/plugins/Ping/src/rawping.cpp @@ -95,7 +95,7 @@ extern int raw_ping(char *host, int timeout) }
else {
// Not a recognized hostname either!
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: unrecognised host", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: unrecognised host"), 0);
return -1;
}
}
@@ -117,7 +117,7 @@ extern int raw_ping(char *host, int timeout) // send packet
int bwrote = sendto(sd, (char*)packet, sizeof(ICMPHeader), 0, (sockaddr*)&dest, sizeof(dest));
if (bwrote == SOCKET_ERROR) {
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: unable to send", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: unable to send"), 0);
return -1;
}
@@ -149,45 +149,45 @@ extern int raw_ping(char *host, int timeout) if (bread == SOCKET_ERROR) {
if(WSAGetLastError() != WSAETIMEDOUT) {
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: socket error...cycling", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: socket error...cycling"), 0);
}
continue;
}
if(reply_header->proto != ICMP_PROTO)
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: packet not ICMP...cycling", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: packet not ICMP...cycling"), 0);
continue;
if(reply_header->tos != 0)
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: TOS not 0...cycling", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: TOS not 0...cycling"), 0);
continue;
reply = (ICMPHeader *)(recv_buff + reply_header->h_len * 4);
if((unsigned)bread < reply_header->h_len * 4 + sizeof(ICMPHeader)) {
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: short header", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: short header"), 0);
continue;
}
if(reply->id != (USHORT)GetCurrentProcessId())
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: wrong ID...cycling", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: wrong ID...cycling"), 0);
continue;
if(reply->type != PT_ICMP_ECHO_REPLY && reply->type != PT_ICMP_SOURCE_QUENCH) {
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: wrong type...cycling", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: wrong type...cycling"), 0);
continue;
}
//if(reply->seq < seq_no) continue;
//if(reply->seq > seq_no) return -1;
if(reply->seq != seq_no) {
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: wrong sequence number...cycling", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: wrong sequence number...cycling"), 0);
continue;
}
if(reply->type == PT_ICMP_SOURCE_QUENCH) {
char buff[1024];
mir_snprintf(buff, SIZEOF(buff), Translate("Host %s requests that you reduce the amount of traffic you are sending."), host);
- MessageBox(0, buff, Translate(PLUG " Warning"), MB_OK | MB_ICONWARNING);
+ MessageBoxA(0, buff, Translate(PLUG " Warning"), MB_OK | MB_ICONWARNING);
}
if(use_hi_res) {
@@ -197,7 +197,7 @@ extern int raw_ping(char *host, int timeout) } else
return current_time - send_time;
}
- if(options.logging) CallService(PLUG "/Log", (WPARAM)"rawping error: timeout", 0);
+ if(options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: timeout"), 0);
return -1;
}
|