[ioquake3] 78/136: Fix hitch when opening Team Arena find friend menu
Simon McVittie
smcv at debian.org
Thu Jun 15 09:09:12 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository ioquake3.
commit bd067540f5670185624e100818936654516490a0
Author: Zack Middleton <zack at cloemail.com>
Date: Thu Jun 1 18:39:23 2017 -0500
Fix hitch when opening Team Arena find friend menu
Opening the find friend menu in the Team Arena server browser
hitches due to trying to resolve blank host names.
In UI_BuildFindPlayerList() status requests that are initial or
completed state or have timed out get reset. This means it starts
with MAX_SERVERSTATUSREQUESTS (16) blank host names. So just ignore
them in UI_GetServerStatusInfo().
---
code/ui/ui_main.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c
index 4fbe6cb..f064932 100644
--- a/code/ui/ui_main.c
+++ b/code/ui/ui_main.c
@@ -3920,11 +3920,21 @@ static int UI_GetServerStatusInfo( const char *serverAddress, serverStatusInfo_t
char *p, *score, *ping, *name;
int i, len;
+ if (info) {
+ memset(info, 0, sizeof(*info));
+ }
+
+ // ignore initial unset addresses
+ if (serverAddress && *serverAddress == '\0') {
+ return qfalse;
+ }
+
+ // reset server status request for this address
if (!info) {
trap_LAN_ServerStatus( serverAddress, NULL, 0);
return qfalse;
}
- memset(info, 0, sizeof(*info));
+
if ( trap_LAN_ServerStatus( serverAddress, info->text, sizeof(info->text)) ) {
Q_strncpyz(info->address, serverAddress, sizeof(info->address));
p = info->text;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list