#ifdef WIN32
#include <winsock.h>
#else
-#include <netdb.h>
-#include <netinet/in.h>
-//#include <arpa/inet.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <errno.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
#endif
// for Z_Malloc/Z_Free in quake
int i = WSAGetLastError();
switch (i)
{
- case WSAEINTR: return "WSAEINTR";
+ case WSAEINTR: return "WSAEINTR";
case WSAEBADF: return "WSAEBADF";
- case WSAEACCES: return "WSAEACCES";
+ case WSAEACCES: return "WSAEACCES";
case WSAEFAULT: return "WSAEFAULT";
case WSAEINVAL: return "WSAEINVAL";
case WSAEMFILE: return "WSAEMFILE";
case WSAEREMOTE: return "WSAEREMOTE";
case WSAEDISCON: return "WSAEDISCON";
case 0: return "no error";
- default: return "unknown WSAE error";
+ default: return "unknown WSAE error";
}
#else
return strerror(errno);
continue;
}
#ifndef STANDALONETEST
- if (p->sentdoubletime && Sys_DoubleTime() < p->sentdoubletime)
+ if (cl_netlocalping.value && (Sys_DoubleTime() - cl_netlocalping.value * (1.0 / 1000.0)) < p->sentdoubletime)
continue;
#endif
if (value == 0 && p->destinationport == lhnetsocket->address.addressdata.loop.port)
p->next->prev = p;
p->prev->next = p;
#ifndef STANDALONETEST
- if (cl_netlocalping_min.value || cl_netlocalping_max.value)
- p->sentdoubletime = Sys_DoubleTime() + lhrandom(cl_netlocalping_min.value, cl_netlocalping_max.value) * (0.5 / 1000.0);
+ p->sentdoubletime = Sys_DoubleTime();
#endif
value = contentlength;
}