From 5ab34253772410af36dcfecb5607ba46925220c5 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sun, 22 Nov 2009 16:30:20 +0000 Subject: [PATCH] allow default relay port, like name, to be set at compile time --- xwords4/common/comms.c | 2 +- xwords4/common/comtypes.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index e1a71f7da..c956a54a6 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -715,7 +715,7 @@ comms_getInitialAddr( CommsAddrRec* addr ) #if defined XWFEATURE_RELAY addr->conType = COMMS_CONN_RELAY; /* for temporary ease in debugging */ addr->u.ip_relay.ipAddr = 0L; /* force 'em to set it */ - addr->u.ip_relay.port = 10999; + addr->u.ip_relay.port = RELAY_PORT_DEFAULT; { char* name = RELAY_NAME_DEFAULT; char* room = RELAY_ROOM_DEFAULT; diff --git a/xwords4/common/comtypes.h b/xwords4/common/comtypes.h index 9f60edfbf..c6a7c215f 100644 --- a/xwords4/common/comtypes.h +++ b/xwords4/common/comtypes.h @@ -171,6 +171,9 @@ typedef struct CommonPrefs { #ifndef RELAY_ROOM_DEFAULT # define RELAY_ROOM_DEFAULT "Room 1" #endif +#ifndef RELAY_PORT_DEFAULT +# define RELAY_PORT_DEFAULT 10999 +#endif #ifdef MEM_DEBUG # define XP_MALLOC(pool,nbytes) \