From ea6166f8c76207a6cbad63f94902396c23e26a86 Mon Sep 17 00:00:00 2001 From: eehouse Date: Sat, 5 Jun 2010 03:39:16 +0000 Subject: [PATCH] add comms_resetSame that resets relay with existing params. --- xwords4/common/comms.c | 8 ++++++++ xwords4/common/comms.h | 1 + 2 files changed, 9 insertions(+) diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index d5ff6cbe6..1f9f46452 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -290,6 +290,14 @@ cleanupAddrRecs( CommsCtxt* comms ) comms->recs = (AddressRecord*)NULL; } /* cleanupAddrRecs */ + +void +comms_resetSame( CommsCtxt* comms ) +{ + comms_reset( comms, comms->isServer, + comms->r.nPlayersHere, comms->r.nPlayersTotal ); +} + void comms_reset( CommsCtxt* comms, XP_Bool isServer, XP_U16 XP_UNUSED_RELAY(nPlayersHere), diff --git a/xwords4/common/comms.h b/xwords4/common/comms.h index 621f2c5c3..9a9c28d59 100644 --- a/xwords4/common/comms.h +++ b/xwords4/common/comms.h @@ -142,6 +142,7 @@ CommsCtxt* comms_make( MPFORMAL XW_UtilCtxt* util, void comms_reset( CommsCtxt* comms, XP_Bool isServer, XP_U16 nPlayersHere, XP_U16 nPlayersTotal ); +void comms_resetSame( CommsCtxt* comms ); void comms_transportFailed( CommsCtxt* comms ); void comms_destroy( CommsCtxt* comms );