From d965d155a3c9132b1004a9343b9aee5c3e34bff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Thu, 22 Nov 2007 20:27:36 +0000 Subject: [PATCH] simplify framestore flush a bit --- transports.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/transports.c b/transports.c index 18041de4..ea5b470f 100644 --- a/transports.c +++ b/transports.c @@ -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); + } }