summaryrefslogtreecommitdiff
path: root/src/server/sv_main.c
diff options
context:
space:
mode:
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]));