diff --git a/xwords4/relay/cref.cpp b/xwords4/relay/cref.cpp index ac09c0ae6..6488f8f1d 100644 --- a/xwords4/relay/cref.cpp +++ b/xwords4/relay/cref.cpp @@ -372,41 +372,6 @@ CookieRef::pushNotifyDisconEvent( int socket, XWREASON why ) m_eventQueue.push_back( evt ); } -void -CookieRef::pushDestBadEvent() -{ - CRefEvent evt; - evt.type = XWE_DESTBAD; - m_eventQueue.push_back( evt ); -} - -void -CookieRef::pushDestOkEvent( const CRefEvent* oldEvt ) -{ - CRefEvent evt; - memcpy( &evt, oldEvt, sizeof(evt) ); - evt.type = XWE_DESTOK; - m_eventQueue.push_back( evt ); -} - -void -CookieRef::pushCanLockEvent( const CRefEvent* oldEvt ) -{ - CRefEvent evt; - memcpy( &evt, oldEvt, sizeof(evt) ); - evt.type = XWE_CAN_LOCK; - m_eventQueue.push_back( evt ); -} - -void -CookieRef::pushCantLockEvent( const CRefEvent* oldEvt ) -{ - CRefEvent evt; - memcpy( &evt, oldEvt, sizeof(evt) ); - evt.type = XWE_CANT_LOCK; - m_eventQueue.push_back( evt ); -} - void CookieRef::pushLastSocketGoneEvent() { @@ -454,14 +419,6 @@ CookieRef::handleEvents() forward( &evt ); break; - case XWA_CHECKDEST: - checkDest( &evt ); - break; - - case XWA_CHECK_CAN_LOCK: - checkFromServer( &evt ); - break; - case XWA_TIMERDISCONN: disconnectSockets( 0, XWRELAY_ERROR_TIMEOUT ); break; @@ -695,29 +652,6 @@ CookieRef::forward( const CRefEvent* evt ) } } /* forward */ -void -CookieRef::checkDest( const CRefEvent* evt ) -{ - HostID dest = evt->u.fwd.dest; - int destSocket = SocketForHost( dest ); - if ( destSocket == -1 ) { - pushDestBadEvent(); - } else { - pushDestOkEvent( evt ); - } -} /* checkDest */ - -void -CookieRef::checkFromServer( const CRefEvent* evt ) -{ - HostID src = evt->u.fwd.src; - if ( src == HOST_ID_SERVER ) { - pushCanLockEvent( evt ); - } else { - pushCantLockEvent( evt ); - } -} - void CookieRef::send_msg( int socket, HostID id, XWRelayMsg msg, XWREASON why ) { diff --git a/xwords4/relay/cref.h b/xwords4/relay/cref.h index 7924a96c1..0dc38e9b0 100644 --- a/xwords4/relay/cref.h +++ b/xwords4/relay/cref.h @@ -157,10 +157,6 @@ class CookieRef { void pushRemoveSocketEvent( int socket ); void pushNotifyDisconEvent( int socket, XWREASON why ); - void pushDestOkEvent( const CRefEvent* evt ); - void pushCanLockEvent( const CRefEvent* evt ); - void pushCantLockEvent( const CRefEvent* evt ); - void handleEvents(); void sendResponse( const CRefEvent* evt, int initial ); @@ -172,7 +168,6 @@ class CookieRef { void cancelAllConnectedTimer(); void forward( const CRefEvent* evt ); - void checkDest( const CRefEvent* evt ); void checkFromServer( const CRefEvent* evt ); void notifyOthers( int socket, XWRelayMsg msg, XWREASON why );