|
|
@ -175,6 +175,8 @@ void TmqhOutputPacketpool(ThreadVars *t, Packet *p)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* \param pq Pointer to the packetqueue from which the packets have to be
|
|
|
|
* \param pq Pointer to the packetqueue from which the packets have to be
|
|
|
|
* returned back to the packetpool
|
|
|
|
* returned back to the packetpool
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \warning this function assumes that the pq does not use locking
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
|
|
|
|
void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -183,12 +185,8 @@ void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
|
|
|
|
if (pq == NULL)
|
|
|
|
if (pq == NULL)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
SCMutexLock(&pq->mutex_q);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while ( (p = PacketDequeue(pq)) != NULL)
|
|
|
|
while ( (p = PacketDequeue(pq)) != NULL)
|
|
|
|
TmqhOutputPacketpool(NULL, p);
|
|
|
|
TmqhOutputPacketpool(NULL, p);
|
|
|
|
|
|
|
|
|
|
|
|
SCMutexUnlock(&pq->mutex_q);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|