mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
cleanup
This commit is contained in:
parent
073271fe61
commit
bb2a2dacae
1 changed files with 3 additions and 24 deletions
|
@ -2169,9 +2169,7 @@ typedef XP_S16 (*MsgProc)( CommsCtxt* comms, XWEnv xwe, MsgQueueElem* msg,
|
||||||
typedef struct _SendElemData {
|
typedef struct _SendElemData {
|
||||||
CommsCtxt* comms;
|
CommsCtxt* comms;
|
||||||
XWEnv xwe;
|
XWEnv xwe;
|
||||||
MsgProc msgProc;
|
|
||||||
CommsConnType filter;
|
CommsConnType filter;
|
||||||
void* msgClosure;
|
|
||||||
XP_U16 count;
|
XP_U16 count;
|
||||||
XP_Bool success;
|
XP_Bool success;
|
||||||
} SendElemData;
|
} SendElemData;
|
||||||
|
@ -2180,8 +2178,7 @@ static ForEachAct
|
||||||
sendElemProc( MsgQueueElem* elem, void* closure )
|
sendElemProc( MsgQueueElem* elem, void* closure )
|
||||||
{
|
{
|
||||||
SendElemData* sedp = (SendElemData*)closure;
|
SendElemData* sedp = (SendElemData*)closure;
|
||||||
XP_S16 len = (*sedp->msgProc)( sedp->comms, sedp->xwe, elem,
|
XP_S16 len = sendMsg( sedp->comms, sedp->xwe, elem, sedp->filter );
|
||||||
sedp->filter, sedp->msgClosure );
|
|
||||||
if ( 0 > len ) {
|
if ( 0 > len ) {
|
||||||
sedp->success = XP_FALSE;
|
sedp->success = XP_FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2191,9 +2188,8 @@ sendElemProc( MsgQueueElem* elem, void* closure )
|
||||||
return FEA_OK;
|
return FEA_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static XP_S16
|
XP_S16
|
||||||
resendImpl( CommsCtxt* comms, XWEnv xwe, CommsConnType filter, XP_Bool force,
|
comms_resendAll( CommsCtxt* comms, XWEnv xwe, CommsConnType filter, XP_Bool force )
|
||||||
MsgProc proc, void* closure )
|
|
||||||
{
|
{
|
||||||
XP_S16 count = 0;
|
XP_S16 count = 0;
|
||||||
XP_ASSERT( !!comms );
|
XP_ASSERT( !!comms );
|
||||||
|
@ -2207,8 +2203,6 @@ resendImpl( CommsCtxt* comms, XWEnv xwe, CommsConnType filter, XP_Bool force,
|
||||||
.success = XP_TRUE,
|
.success = XP_TRUE,
|
||||||
.comms = comms,
|
.comms = comms,
|
||||||
.xwe = xwe,
|
.xwe = xwe,
|
||||||
.msgProc = proc,
|
|
||||||
.msgClosure = closure,
|
|
||||||
.filter = filter,
|
.filter = filter,
|
||||||
};
|
};
|
||||||
forEachElem( comms, sendElemProc, &sed );
|
forEachElem( comms, sendElemProc, &sed );
|
||||||
|
@ -2222,21 +2216,6 @@ resendImpl( CommsCtxt* comms, XWEnv xwe, CommsConnType filter, XP_Bool force,
|
||||||
}
|
}
|
||||||
XP_LOGFF( TAGFMT() "=> %d", TAGPRMS, count );
|
XP_LOGFF( TAGFMT() "=> %d", TAGPRMS, count );
|
||||||
return count;
|
return count;
|
||||||
} /* resendImpl */
|
|
||||||
|
|
||||||
static XP_S16
|
|
||||||
sendMsgWrapper( CommsCtxt* comms, XWEnv xwe, MsgQueueElem* msg, CommsConnType filter,
|
|
||||||
void* XP_UNUSED(closure) )
|
|
||||||
{
|
|
||||||
return sendMsg( comms, xwe, msg, filter );
|
|
||||||
}
|
|
||||||
|
|
||||||
XP_S16
|
|
||||||
comms_resendAll( CommsCtxt* comms, XWEnv xwe, CommsConnType filter, XP_Bool force )
|
|
||||||
{
|
|
||||||
XP_S16 result = resendImpl( comms, xwe, filter, force, sendMsgWrapper, NULL );
|
|
||||||
// LOG_RETURNF( "%d", result );
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XWFEATURE_COMMSACK
|
#ifdef XWFEATURE_COMMSACK
|
||||||
|
|
Loading…
Reference in a new issue