diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-04-22 11:54:31 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-04-22 11:54:31 +0000 |
commit | f6d5fcfa0fa2a62f9583fa44dbee035c0adfcc88 (patch) | |
tree | 206cd7e9606bf5488f70e6eddb3aadbb35bafe1b /src/libunixonacid/unixmessage_sender_free.c | |
parent | e9fce4390ad8673239a51facd6bbd9ffb5eb7e68 (diff) | |
download | skalibs-f6d5fcfa0fa2a62f9583fa44dbee035c0adfcc88.tar.xz |
Fix closecb support wherever a unixmessage may get dropped; add closecb support to unixconnection
Diffstat (limited to 'src/libunixonacid/unixmessage_sender_free.c')
-rw-r--r-- | src/libunixonacid/unixmessage_sender_free.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 } } |