From 47004a0e08c2692f1dc4da0bbea2887ffc5969c4 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 17 Nov 2023 09:00:43 -0800 Subject: [PATCH] linux: remove ask to accept duplicate invitations --- xwords4/common/game.c | 10 +++++----- xwords4/linux/cursesmain.c | 7 ++++--- xwords4/linux/gtkmain.c | 8 +++++--- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/xwords4/common/game.c b/xwords4/common/game.c index 0b8768415..2459b5784 100644 --- a/xwords4/common/game.c +++ b/xwords4/common/game.c @@ -250,9 +250,9 @@ game_makeRematch( const XWGame* oldGame, XWEnv xwe, XW_UtilCtxt* newUtil, selfAddrP = &selfAddr; } - if ( game_makeNewGame( MPPARM(newUtil->mpool) xwe, newGame, newUtil->gameInfo, - selfAddrP, (CommsAddrRec*)NULL, newUtil, - (DrawCtx*)NULL, newCp, procs ) ) { + if ( game_makeNewGame( MPPARM(newUtil->mpool) xwe, newGame, + newUtil->gameInfo, selfAddrP, (CommsAddrRec*)NULL, + newUtil, (DrawCtx*)NULL, newCp, procs ) ) { const CurGameInfo* newGI = newUtil->gameInfo; for ( int ii = 0; ii < ra.nAddrs; ++ii ) { @@ -1043,7 +1043,8 @@ player_timePenalty( CurGameInfo* gi, XP_U16 playerNum ) void game_logGI( const CurGameInfo* gi, const char* msg, const char* func, int line ) { - XP_LOGFF( "msg: %s from %s() line %d; addr: %p", msg, func, line, gi ); + XP_LOGFF( "msg: %s from %s() line %d; gameID: %X", msg, func, line, + !!gi ? gi->gameID:0 ); if ( !!gi ) { XP_LOGF( " nPlayers: %d", gi->nPlayers ); for ( XP_U16 ii = 0; ii < gi->nPlayers; ++ii ) { @@ -1053,7 +1054,6 @@ game_logGI( const CurGameInfo* gi, const char* msg, const char* func, int line ) } XP_LOGF( " forceChannel: %d", gi->forceChannel ); XP_LOGF( " serverRole: %d", gi->serverRole ); - XP_LOGF( " gameID: %d", gi->gameID ); XP_LOGF( " dictName: %s", gi->dictName ); XP_LOGF( " isoCode: %s", gi->isoCodeStr ); } diff --git a/xwords4/linux/cursesmain.c b/xwords4/linux/cursesmain.c index 94e36fc43..f656320e2 100644 --- a/xwords4/linux/cursesmain.c +++ b/xwords4/linux/cursesmain.c @@ -1193,9 +1193,10 @@ inviteReceivedCurses( void* closure, const NetLaunchInfo* invite ) gdb_getRowsForGameID( aGlobals->cag.params->pDb, invite->gameID, rowids, &nRowIDs ); bool doIt = 0 == nRowIDs; if ( ! doIt && !!aGlobals->mainWin ) { - const gchar* question = "Duplicate invitation received. Accept anyway?"; - const char* buttons[] = { "Yes", "No" }; - doIt = 0 == cursesask( aGlobals->mainWin, question, VSIZE(buttons), buttons ); + XP_LOGFF( "duplicate invite; not creating game" ); + /* const gchar* question = "Duplicate invitation received. Accept anyway?"; */ + /* const char* buttons[] = { "Yes", "No" }; */ + /* doIt = 0 == cursesask( aGlobals->mainWin, question, VSIZE(buttons), buttons ); */ } if ( doIt ) { cb_dims dims; diff --git a/xwords4/linux/gtkmain.c b/xwords4/linux/gtkmain.c index e5d0934df..daf360cb3 100644 --- a/xwords4/linux/gtkmain.c +++ b/xwords4/linux/gtkmain.c @@ -756,9 +756,11 @@ inviteReceivedGTK( void* closure, const NetLaunchInfo* invite ) bool doIt = 0 == nRowIDs; if ( ! doIt ) { - doIt = GTK_RESPONSE_YES == gtkask( apg->window, - "Duplicate invitation received. Accept anyway?", - GTK_BUTTONS_YES_NO, NULL ); + doIt = XP_FALSE; + XP_LOGFF( "duplicate invite; not creating game" ); + /* doIt = GTK_RESPONSE_YES == gtkask( apg->window, */ + /* "Duplicate invitation received. Accept anyway?", */ + /* GTK_BUTTONS_YES_NO, NULL ); */ } if ( doIt ) { gameFromInvite( apg, invite );