From f6d5fcfa0fa2a62f9583fa44dbee035c0adfcc88 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 22 Apr 2016 11:54:31 +0000 Subject: Fix closecb support wherever a unixmessage may get dropped; add closecb support to unixconnection --- src/libunixonacid/unixmessage_sender_free.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libunixonacid/unixmessage_sender_free.c') diff --git a/src/libunixonacid/unixmessage_sender_free.c b/src/libunixonacid/unixmessage_sender_free.c index 6ef0f42..a976827 100644 --- a/src/libunixonacid/unixmessage_sender_free.c +++ b/src/libunixonacid/unixmessage_sender_free.c @@ -16,9 +16,9 @@ void unixmessage_sender_free (unixmessage_sender_t *b) for (; i < n ; i++) { register int fd = genalloc_s(int, &b->fds)[i] ; - if (fd < 0) fd_close(-(fd+1)) ; + if (fd < 0) (*b->closecb)(-(fd+1), b->closecbdata) ; #ifdef SKALIBS_HASANCILAUTOCLOSE - else fd_close(fd) ; + else (*b->closecb)(fd, b->closecbdata) ; #endif } } -- cgit v1.2.3