/* Function: void msgqueue_flush(MsgQueue_t *msgq) Purpose : flush all messages from message queue Params : msgq - queue to flush  */
void msgqueue_flush(MsgQueue_t *msgq)
/* Function: void msgqueue_flush(MsgQueue_t *msgq) Purpose : flush all messages from message queue Params : msgq - queue to flush  */
void msgqueue_flush(MsgQueue_t *msgq)
{
	struct msgqueue_entry *mq, *mqnext;
	for (mq = msgq->qe; mq; mq = mqnext) {
		mqnext = mq->next;
		mqe_free(msgq, mq);
	}
	msgq->qe = NULL;
}