summaryrefslogtreecommitdiff
path: root/src/server/sv_main.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-03 12:31:59 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:03 +0000
commit304d4258d3a49488f570b8ad71931faa7e5d40ba (patch)
treebf9ec15bd9154305ff9fab2943b3daf25024f8a5 /src/server/sv_main.c
parent6e90e4e7861f5cb354487d1fe0f1fd06c385308e (diff)
* Merge ioq3-r1498, by popular demand
Diffstat (limited to 'src/server/sv_main.c')
-rw-r--r--src/server/sv_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/sv_main.c b/src/server/sv_main.c
index 7b66aa6f..01da0f5d 100644
--- a/src/server/sv_main.c
+++ b/src/server/sv_main.c
@@ -225,6 +225,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 ) {
@@ -251,11 +252,13 @@ 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 ) {
Com_Printf( "Couldn't resolve address: %s\n", sv_master[i]->string );
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]));