From: Volker Lendecke Date: Sat, 6 Dec 2014 10:28:16 +0000 (+0100) Subject: lib: Use iov_buf in unix_msg X-Git-Url: http://git.samba.org/?a=commitdiff_plain;ds=sidebyside;h=dc38f646af4582a3adffda20d7bb0e449df5e22e;p=obnox%2Fsamba%2Fsamba-obnox.git lib: Use iov_buf in unix_msg Now that iov_buf does not pull in talloc we can use it Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/unix_msg/unix_msg.c b/source3/lib/unix_msg/unix_msg.c index 7ca506a85c6..78b29c2d071 100644 --- a/source3/lib/unix_msg/unix_msg.c +++ b/source3/lib/unix_msg/unix_msg.c @@ -23,6 +23,7 @@ #include "system/network.h" #include "dlinklist.h" #include "pthreadpool/pthreadpool.h" +#include "lib/iov_buf.h" #include /* @@ -77,7 +78,6 @@ struct unix_dgram_ctx { char path[]; }; -static ssize_t iov_buflen(const struct iovec *iov, int iovlen); static void unix_dgram_recv_handler(struct poll_watch *w, int fd, short events, void *private_data); @@ -583,10 +583,7 @@ static int queue_msg(struct unix_dgram_send_queue *q, } #endif /* HAVE_STRUCT_MSGHDR_MSG_CONTROL */ - for (i=0; imsgs, msg, struct unix_dgram_msg); return 0; @@ -1106,21 +1103,3 @@ int unix_msg_free(struct unix_msg_ctx *ctx) free(ctx); return 0; } - -static ssize_t iov_buflen(const struct iovec *iov, int iovlen) -{ - size_t buflen = 0; - int i; - - for (i=0; i