Better QUEUE_FlushMessages().
This commit is contained in:
parent
4a150e7753
commit
d37b69cdc8
|
@ -435,8 +435,15 @@ void QUEUE_FlushMessages( HQUEUE16 hQueue )
|
||||||
MESSAGEQUEUE *senderQ = (MESSAGEQUEUE*)GlobalLock16( queue->hSendingTask);
|
MESSAGEQUEUE *senderQ = (MESSAGEQUEUE*)GlobalLock16( queue->hSendingTask);
|
||||||
QSMCTRL* CtrlPtr = queue->smResultCurrent;
|
QSMCTRL* CtrlPtr = queue->smResultCurrent;
|
||||||
|
|
||||||
|
TRACE(msg,"Flushing queue %04x:\n", hQueue );
|
||||||
|
|
||||||
while( senderQ )
|
while( senderQ )
|
||||||
{
|
{
|
||||||
|
if( !CtrlPtr )
|
||||||
|
CtrlPtr = senderQ->smResultInit;
|
||||||
|
|
||||||
|
TRACE(msg,"\tfrom queue %04x, smResult %08x\n", queue->hSendingTask, (unsigned)CtrlPtr );
|
||||||
|
|
||||||
if( !(queue->hSendingTask = senderQ->hPrevSendingTask) )
|
if( !(queue->hSendingTask = senderQ->hPrevSendingTask) )
|
||||||
queue->wakeBits &= ~QS_SENDMESSAGE;
|
queue->wakeBits &= ~QS_SENDMESSAGE;
|
||||||
QUEUE_SetWakeBit( senderQ, QS_SMPARAMSFREE );
|
QUEUE_SetWakeBit( senderQ, QS_SMPARAMSFREE );
|
||||||
|
@ -448,8 +455,8 @@ void QUEUE_FlushMessages( HQUEUE16 hQueue )
|
||||||
senderQ->smResult = queue->smResultCurrent;
|
senderQ->smResult = queue->smResultCurrent;
|
||||||
QUEUE_SetWakeBit( senderQ, QS_SMRESULT);
|
QUEUE_SetWakeBit( senderQ, QS_SMRESULT);
|
||||||
|
|
||||||
if( (senderQ = (MESSAGEQUEUE*)GlobalLock16( queue->hSendingTask)) )
|
senderQ = (MESSAGEQUEUE*)GlobalLock16( queue->hSendingTask);
|
||||||
CtrlPtr = senderQ->smResultInit;
|
CtrlPtr = NULL;
|
||||||
}
|
}
|
||||||
queue->InSendMessageHandle = 0;
|
queue->InSendMessageHandle = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue