Index: /trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 30414)
+++ /trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 30415)
@@ -61,10 +61,4 @@
 #endif
 
-#ifdef RT_OS_WINDOWS
-# define ICMP_SEND_ECHO(event, routine, addr, data, datasize, ipopt)                                        \
-                IcmpSendEcho2(pData->icmp_socket.sh, (event), NULL, NULL, (addr), (data), (datasize),       \
-                               (ipopt), pData->pvIcmpBuffer, pData->szIcmpBuffer, 1)
-#endif /* RT_OS_WINDOWS */
-
 /* The message sent when emulating PING */
 /* Be nice and tell them it's just a psuedo-ping packet */
@@ -355,5 +349,5 @@
         /* min 8 bytes payload */
         icmpstat.icps_tooshort++;
-        goto end_error;
+        goto end_error_free_m;
     }
 
@@ -364,5 +358,5 @@
     {
         icmpstat.icps_checksum++;
-        goto end_error;
+        goto end_error_free_m;
     }
 
@@ -373,5 +367,5 @@
         {
             LogRel(("NAT: not enought memory to allocate the buffer\n"));
-            goto end_error;
+            goto end_error_free_m;
         }
         m_copydata(m, 0, icmplen, icp_buf);
@@ -443,5 +437,5 @@
                         goto done;
                     }
-                    
+
                     LogRel((dfd,"icmp_input udp sendto tx errno = %d-%s\n",
                                 errno, strerror(errno)));
@@ -454,10 +448,20 @@
                 memset(&ipopt, 0, sizeof(IP_OPTION_INFORMATION));
                 ipopt.Ttl = ip->ip_ttl;
-                status = ICMP_SEND_ECHO(pData->phEvents[VBOX_ICMP_EVENT_INDEX], notify_slirp, addr.sin_addr.s_addr,
-                                icp->icmp_data, icmplen - ICMP_MINLEN, &ipopt);
+                status = IcmpSendEcho2(pData->icmp_socket.sh /*=handle*/,
+                                       pData->phEvents[VBOX_ICMP_EVENT_INDEX] /*=Event*/,
+                                       NULL /*=ApcRoutine*/,
+                                       NULL /*=ApcContext*/,
+                                       addr.sin_addr.s_addr /*=DestinationAddress*/,
+                                       icp->icmp_data /*=RequestData*/,
+                                       icmplen - ICMP_MINLEN /*=RequestSize*/,
+                                       &ipopt /*=RequestOptions*/,
+                                       pData->pvIcmpBuffer /*=ReplyBuffer*/,
+                                       pData->szIcmpBuffer /*=ReplySize*/,
+                                       1 /*=Timeout in ms*/);
                 error = GetLastError();
-                if (   status != 0 
+                if (   status != 0
                     || error == ERROR_IO_PENDING)
                 {
+                    /* no error! */
                     m->m_so = &pData->icmp_socket;
                     icmp_attach(pData, m);
@@ -489,7 +493,7 @@
         case ICMP_UNREACH:
         case ICMP_TIMXCEED:
-            /* @todo(vvl): both up cases comes from guest, 
-             *  indeed right solution would be find the socket 
-             *  corresponding to ICMP data and close it.  
+            /* @todo(vvl): both up cases comes from guest,
+             *  indeed right solution would be find the socket
+             *  corresponding to ICMP data and close it.
              */
         case ICMP_PARAMPROB:
@@ -504,6 +508,6 @@
             icmpstat.icps_badtype++;
     } /* switch */
-    
-end_error:
+
+end_error_free_m:
     m_freem(pData, m);
 
