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().
This commit is contained in:
Zack Middleton 2017-06-01 18:39:23 -05:00
parent 0a19ae0306
commit bd067540f5

View file

@ -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;