From: Jan 'Moskyt' Matejka Date: Mon, 9 Jul 2012 15:15:30 +0000 (+0200) Subject: Fastbuf: fbmulti_close X-Git-Tag: v5.99~127 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e952c8c21a4bf79b15a0d4876de322f495384cb6;p=libucw.git Fastbuf: fbmulti_close --- diff --git a/ucw/fb-multi.c b/ucw/fb-multi.c index e5ab5bdc..23a45611 100644 --- a/ucw/fb-multi.c +++ b/ucw/fb-multi.c @@ -150,6 +150,14 @@ fbmulti_update_capability(struct fastbuf *f) { } } +static void +fbmulti_close(struct fastbuf *f) { + CLIST_FOR_EACH(struct subbuf *, n, *(FB_MULTI(f)->subbufs)) + bclose(n->fb); + + mp_delete(FB_MULTI(f)->mp); +} + struct fastbuf* fbmulti_create(uns bufsize, ...) { @@ -179,6 +187,7 @@ fbmulti_create(uns bufsize, ...) fb_out->name = ""; fbmulti_update_capability(fb_out); + fb_out->close = fbmulti_close; return fb_out; }