aboutsummaryrefslogtreecommitdiffstats
path: root/code/server
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-08-31 19:54:29 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-08-31 19:54:29 +0000
commitc6d2bfb53ab3821c6429355d2c6d1f7f44ef4a14 (patch)
tree1f4bda2c5b9fe6c9a2fb5c2e0035057061cb19bf /code/server
parent60bee81ce803959461493d107ad5a0e568c958c8 (diff)
downloadioquake3-aero-c6d2bfb53ab3821c6429355d2c6d1f7f44ef4a14.tar.gz
ioquake3-aero-c6d2bfb53ab3821c6429355d2c6d1f7f44ef4a14.zip
- Add scope id to ipv6 addresses.
- Clean up a few other ipv6 issues like removing the seemingly unnecessary MacOSX workaround. - Bring ipv6 master server up to speed for dpmaster Thanks go out to Mathieu Olivier for this work. git-svn-id: svn://svn.icculus.org/quake3/trunk@1468 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server')
-rw-r--r--code/server/sv_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/code/server/sv_main.c b/code/server/sv_main.c
index b05a785..4be0af4 100644
--- a/code/server/sv_main.c
+++ b/code/server/sv_main.c
@@ -233,6 +233,7 @@ but not on every player enter or exit.
void SV_MasterHeartbeat( void ) {
static netadr_t adr[MAX_MASTER_SERVERS];
int i;
+ int res;
// "dedicated 1" is for lan play, "dedicated 2" is for inet public play
if ( !com_dedicated || com_dedicated->integer != 2 ) {
@@ -259,7 +260,8 @@ void SV_MasterHeartbeat( void ) {
sv_master[i]->modified = qfalse;
Com_Printf( "Resolving %s\n", sv_master[i]->string );
- if ( !NET_StringToAdr( sv_master[i]->string, &adr[i], NA_UNSPEC ) ) {
+ res = NET_StringToAdr( sv_master[i]->string, &adr[i], NA_UNSPEC );
+ if ( !res ) {
// if the address failed to resolve, clear it
// so we don't take repeated dns hits
Com_Printf( "Couldn't resolve address: %s\n", sv_master[i]->string );
@@ -267,7 +269,8 @@ void SV_MasterHeartbeat( void ) {
sv_master[i]->modified = qfalse;
continue;
}
- if ( !strchr( sv_master[i]->string, ':' ) ) {
+ if ( res == 2 ) {
+ // if no port was specified, use the default master port
adr[i].port = BigShort( PORT_MASTER );
}
Com_Printf( "%s resolved to %s\n", sv_master[i]->string, NET_AdrToStringwPort(adr[i]));
@@ -410,6 +413,7 @@ void SVC_Info( netadr_t from ) {
va("%i", sv_maxclients->integer - sv_privateClients->integer ) );
Info_SetValueForKey( infostring, "gametype", va("%i", sv_gametype->integer ) );
Info_SetValueForKey( infostring, "pure", va("%i", sv_pure->integer ) );
+ Info_SetValueForKey( infostring, "gamename", GAMENAME );
#ifdef USE_VOIP
if (sv_voip->integer) {