From 92fd048eef90f88909fcb4081cb78e46dbc639a3 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 15 Dec 2014 15:33:12 -0800 Subject: [PATCH] signature change: return void instead of always returning true --- xwords4/relay/cref.cpp | 13 +++++-------- xwords4/relay/cref.h | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/xwords4/relay/cref.cpp b/xwords4/relay/cref.cpp index f4311fd5a..07436f2c8 100644 --- a/xwords4/relay/cref.cpp +++ b/xwords4/relay/cref.cpp @@ -680,11 +680,10 @@ CookieRef::handleEvents() case XWA_SEND_CONNRSP: { HostID hid; - if ( increasePlayerCounts( &evt, false, &hid, &devID ) ) { - setAllConnectedTimer(); - sendResponse( &evt, true, &devID ); - setAckTimer( hid ); - } + increasePlayerCounts( &evt, false, &hid, &devID ); + setAllConnectedTimer(); + sendResponse( &evt, true, &devID ); + setAckTimer( hid ); } break; @@ -911,7 +910,7 @@ CookieRef::send_stored_messages( HostID dest, const AddrInfo* addr ) } } /* send_stored_messages */ -bool +void CookieRef::increasePlayerCounts( CRefEvent* evt, bool reconn, HostID* hidp, DevIDRelay* devIDp ) { @@ -996,8 +995,6 @@ CookieRef::increasePlayerCounts( CRefEvent* evt, bool reconn, HostID* hidp, logf( XW_LOGVERBOSE1, "%s: here=%d; total=%d", __func__, m_nPlayersHere, m_nPlayersSought ); - - return true; } /* increasePlayerCounts */ void diff --git a/xwords4/relay/cref.h b/xwords4/relay/cref.h index 49537e5c5..508a4485c 100644 --- a/xwords4/relay/cref.h +++ b/xwords4/relay/cref.h @@ -59,7 +59,7 @@ public: m_seed = seed; m_lastHeartbeat = uptime(); m_ackPending = ackPending; - } + } AddrInfo m_addr; int m_nPlayersH; @@ -236,7 +236,7 @@ class CookieRef { const DevIDRelay* devID ); void sendAnyStored( const CRefEvent* evt ); void initPlayerCounts( const CRefEvent* evt ); - bool increasePlayerCounts( CRefEvent* evt, bool reconn, HostID* hidp, + void increasePlayerCounts( CRefEvent* evt, bool reconn, HostID* hidp, DevIDRelay* devID ); void updateAck( HostID hostID, bool keep ); void dropPending( int seed );