mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-10 06:38:34 +01:00
Fix coding mistake in networking socket receive functions.
This commit is contained in:
parent
8e9d3e8f3a
commit
58a57cc91b
1 changed files with 3 additions and 3 deletions
|
@ -793,7 +793,7 @@ int ReceiveMessagesOnConnection( HSteamNetConnection hConn, SteamNetworkingMessa
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
SteamNetworkingMessage_t *msg = NULL;
|
SteamNetworkingMessage_t *msg = NULL;
|
||||||
int messages = 0;
|
int messages = 0;
|
||||||
while ((msg = get_steam_message_connection(hConn)) && messages < nMaxMessages) {
|
while (messages < nMaxMessages && (msg = get_steam_message_connection(hConn))) {
|
||||||
ppOutMessages[messages] = msg;
|
ppOutMessages[messages] = msg;
|
||||||
++messages;
|
++messages;
|
||||||
}
|
}
|
||||||
|
@ -821,7 +821,7 @@ int ReceiveMessagesOnListenSocket( HSteamListenSocket hSocket, SteamNetworkingMe
|
||||||
auto socket_conn = std::begin(connect_sockets);
|
auto socket_conn = std::begin(connect_sockets);
|
||||||
while (socket_conn != std::end(connect_sockets) && messages < nMaxMessages) {
|
while (socket_conn != std::end(connect_sockets) && messages < nMaxMessages) {
|
||||||
if (socket_conn->second.listen_socket_id == hSocket) {
|
if (socket_conn->second.listen_socket_id == hSocket) {
|
||||||
while ((msg = get_steam_message_connection(socket_conn->first)) && messages < nMaxMessages) {
|
while (messages < nMaxMessages && (msg = get_steam_message_connection(socket_conn->first))) {
|
||||||
ppOutMessages[messages] = msg;
|
ppOutMessages[messages] = msg;
|
||||||
++messages;
|
++messages;
|
||||||
}
|
}
|
||||||
|
@ -1197,7 +1197,7 @@ int ReceiveMessagesOnPollGroup( HSteamNetPollGroup hPollGroup, SteamNetworkingMe
|
||||||
int messages = 0;
|
int messages = 0;
|
||||||
|
|
||||||
for (auto c : group->second) {
|
for (auto c : group->second) {
|
||||||
while ((msg = get_steam_message_connection(c)) && messages < nMaxMessages) {
|
while (messages < nMaxMessages && (msg = get_steam_message_connection(c))) {
|
||||||
ppOutMessages[messages] = msg;
|
ppOutMessages[messages] = msg;
|
||||||
++messages;
|
++messages;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue