mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 04:05:53 +01:00
Patched to compile.
This commit is contained in:
parent
6b9ebc3ccb
commit
239b9c7992
|
@ -1094,7 +1094,7 @@ DWORD WINAPI _MS_Thread(LPVOID lpParam) {
|
||||||
void* _MS_Thread(void *arg) {
|
void* _MS_Thread(void *arg) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SOCKET _sockudp = NULL;
|
SOCKET _sockudp = INVALID_SOCKET;
|
||||||
struct _sIPPort {
|
struct _sIPPort {
|
||||||
UBYTE bFirst;
|
UBYTE bFirst;
|
||||||
UBYTE bSecond;
|
UBYTE bSecond;
|
||||||
|
@ -1107,7 +1107,7 @@ void* _MS_Thread(void *arg) {
|
||||||
_sockudp = socket(AF_INET, SOCK_DGRAM, 0);
|
_sockudp = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (_sockudp == INVALID_SOCKET){
|
if (_sockudp == INVALID_SOCKET){
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_sIPPort* pServerIP = (_sIPPort*)(_szIPPortBuffer);
|
_sIPPort* pServerIP = (_sIPPort*)(_szIPPortBuffer);
|
||||||
|
@ -1137,7 +1137,7 @@ void* _MS_Thread(void *arg) {
|
||||||
(sockaddr *) &sinServer, sizeof(sinServer));
|
(sockaddr *) &sinServer, sizeof(sinServer));
|
||||||
|
|
||||||
sockaddr_in _sinClient;
|
sockaddr_in _sinClient;
|
||||||
int _iClientLength = sizeof(_sinClient);
|
socklen_t _iClientLength = sizeof(_sinClient);
|
||||||
|
|
||||||
fd_set readfds_udp; // declare a read set
|
fd_set readfds_udp; // declare a read set
|
||||||
struct timeval timeout_udp; // declare a timeval for our timer
|
struct timeval timeout_udp; // declare a timeval for our timer
|
||||||
|
@ -1159,7 +1159,7 @@ void* _MS_Thread(void *arg) {
|
||||||
sPch = strstr(_szBuffer, "\\gamename\\serioussamse\\");
|
sPch = strstr(_szBuffer, "\\gamename\\serioussamse\\");
|
||||||
if(!sPch) {
|
if(!sPch) {
|
||||||
CPrintF("Unknown query server response!\n");
|
CPrintF("Unknown query server response!\n");
|
||||||
return -1;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
CTString strPlayers;
|
CTString strPlayers;
|
||||||
|
@ -1298,7 +1298,7 @@ DWORD WINAPI _LocalNet_Thread(LPVOID lpParam) {
|
||||||
void* _LocalNet_Thread(void *arg) {
|
void* _LocalNet_Thread(void *arg) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SOCKET _sockudp = NULL;
|
SOCKET _sockudp = INVALID_SOCKET;
|
||||||
struct _sIPPort {
|
struct _sIPPort {
|
||||||
UBYTE bFirst;
|
UBYTE bFirst;
|
||||||
UBYTE bSecond;
|
UBYTE bSecond;
|
||||||
|
@ -1315,7 +1315,7 @@ void* _LocalNet_Thread(void *arg) {
|
||||||
delete[] _szIPPortBufferLocal;
|
delete[] _szIPPortBufferLocal;
|
||||||
}
|
}
|
||||||
_szIPPortBufferLocal = NULL;
|
_szIPPortBufferLocal = NULL;
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_sIPPort* pServerIP = (_sIPPort*)(_szIPPortBufferLocal);
|
_sIPPort* pServerIP = (_sIPPort*)(_szIPPortBufferLocal);
|
||||||
|
@ -1345,7 +1345,7 @@ void* _LocalNet_Thread(void *arg) {
|
||||||
(sockaddr *) &sinServer, sizeof(sinServer));
|
(sockaddr *) &sinServer, sizeof(sinServer));
|
||||||
|
|
||||||
sockaddr_in _sinClient;
|
sockaddr_in _sinClient;
|
||||||
int _iClientLength = sizeof(_sinClient);
|
socklen_t _iClientLength = sizeof(_sinClient);
|
||||||
|
|
||||||
fd_set readfds_udp; // declare a read set
|
fd_set readfds_udp; // declare a read set
|
||||||
struct timeval timeout_udp; // declare a timeval for our timer
|
struct timeval timeout_udp; // declare a timeval for our timer
|
||||||
|
@ -1372,7 +1372,7 @@ void* _LocalNet_Thread(void *arg) {
|
||||||
}
|
}
|
||||||
_szIPPortBufferLocal = NULL;
|
_szIPPortBufferLocal = NULL;
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
return -1;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
CTString strPlayers;
|
CTString strPlayers;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user