summaryrefslogtreecommitdiff
path: root/src/libunixonacid/unixmessage_sender_init.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-01-18 23:56:21 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-01-18 23:56:21 +0000
commitc9c7e241a7b68f67e0cc8a7d3874510dced532d6 (patch)
treeb4615c00c3f3c2f7265013b153688496df21f387 /src/libunixonacid/unixmessage_sender_init.c
parentdb086527035619204569f79672b7a01fc26d8aa4 (diff)
downloadskalibs-c9c7e241a7b68f67e0cc8a7d3874510dced532d6.tar.xz
Add support for advanced closing callbacks to unixmessage_sender_flush.
(Typically, this will be used for refcounting when broadcasting copies of the same fd.)
Diffstat (limited to 'src/libunixonacid/unixmessage_sender_init.c')
-rw-r--r--src/libunixonacid/unixmessage_sender_init.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libunixonacid/unixmessage_sender_init.c b/src/libunixonacid/unixmessage_sender_init.c
index d986f29..71a8b3b 100644
--- a/src/libunixonacid/unixmessage_sender_init.c
+++ b/src/libunixonacid/unixmessage_sender_init.c
@@ -1,15 +1,8 @@
/* ISC license. */
-#include <skalibs/stralloc.h>
-#include <skalibs/genalloc.h>
#include <skalibs/unixmessage.h>
void unixmessage_sender_init (unixmessage_sender_t *b, int fd)
{
- b->fd = fd ;
- b->data = stralloc_zero ;
- b->fds = genalloc_zero ;
- b->offsets = genalloc_zero ;
- b->head = 0 ;
- b->shorty = 0 ;
+ unixmessage_sender_init_withclosecb(b, fd, &unixmessage_sender_closecb, 0) ;
}