From 1f3959fc71b35bfe50064702794212abb1a0fdf7 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 6 Jul 2015 21:18:51 -0700 Subject: [PATCH] fix rematch initiated by a guest: needs to be host in the game it creates. --- xwords4/linux/gtkmain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xwords4/linux/gtkmain.c b/xwords4/linux/gtkmain.c index d4d5e8a8e..2f726a50e 100644 --- a/xwords4/linux/gtkmain.c +++ b/xwords4/linux/gtkmain.c @@ -292,9 +292,14 @@ make_rematch( GtkAppGlobals* apg, const CommonGlobals* cGlobals ) /* Create new game. But has no addressing info, so need to set that aside for later. */ + const CommsCtxt* comms = cGlobals->game.comms; CurGameInfo gi = {0}; gi_copy( MPPARM(cGlobals->util->mpool) &gi, cGlobals->gi ); gi.gameID = 0; /* clear so will get generated */ + if ( !!comms ) { + gi.serverRole = SERVER_ISSERVER; + gi.forceChannel = 0; + } game_saveNewGame( MPPARM(cGlobals->util->mpool) &gi, cGlobals->util, &cGlobals->cp, stream ); @@ -304,7 +309,6 @@ make_rematch( GtkAppGlobals* apg, const CommonGlobals* cGlobals ) /* If it's a multi-device game, save enough information with it than when opened it can invite the other device[s] join the rematch. */ - const CommsCtxt* comms = cGlobals->game.comms; if ( !!comms ) { XWStreamCtxt* stream = mem_stream_make( MPPARM(cGlobals->util->mpool) cGlobals->params->vtMgr,