simplify framestore flush a bit

This commit is contained in:
Andreas Öman 2007-11-22 20:27:36 +00:00
parent c8de40dd03
commit d965d155a3

View file

@ -61,8 +61,7 @@ void
transport_purge(th_transport_t *t)
{
th_stream_t *st;
th_pkt_t *pkt, *next;
th_pkt_t *pkt;
if(LIST_FIRST(&t->tht_subscriptions))
return;
@ -138,11 +137,9 @@ transport_purge(th_transport_t *t)
/* Flush framestore */
for(pkt = TAILQ_FIRST(&st->st_pktq); pkt != NULL; pkt = next) {
next = TAILQ_NEXT(pkt, pkt_queue_link);
while((pkt = TAILQ_FIRST(&st->st_pktq)) != NULL)
pkt_unstore(pkt);
}
assert(TAILQ_FIRST(&st->st_pktq) == NULL);
}
}