summaryrefslogtreecommitdiffstats
path: root/src/socket_wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket_wrapper.c')
-rw-r--r--src/socket_wrapper.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 0236a13..7d92f95 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -728,6 +728,13 @@ static int libc_send(int sockfd, const void *buf, size_t len, int flags)
return swrap.fns.libc_send(sockfd, buf, len, flags);
}
+static int libc_sendmsg(int sockfd, const struct msghdr *msg, int flags)
+{
+ swrap_load_lib_function(SWRAP_LIBSOCKET, sendmsg);
+
+ return swrap.fns.libc_sendmsg(sockfd, msg, flags);
+}
+
/*********************************************************
* SWRAP HELPER FUNCTIONS
*********************************************************/
@@ -3141,7 +3148,7 @@ static ssize_t swrap_sendmsg(int s, const struct msghdr *omsg, int flags)
int bcast = 0;
if (!si) {
- return swrap.fns.libc_sendmsg(s, omsg, flags);
+ return libc_sendmsg(s, omsg, flags);
}
tmp.iov_base = NULL;
@@ -3206,7 +3213,7 @@ static ssize_t swrap_sendmsg(int s, const struct msghdr *omsg, int flags)
msg.msg_namelen = sizeof(un_addr); /* size of address */
/* ignore the any errors in broadcast sends */
- swrap.fns.libc_sendmsg(s, &msg, flags);
+ libc_sendmsg(s, &msg, flags);
}
swrap_dump_packet(si, to, SWRAP_SENDTO, buf, len);
@@ -3215,7 +3222,7 @@ static ssize_t swrap_sendmsg(int s, const struct msghdr *omsg, int flags)
return len;
}
- ret = swrap.fns.libc_sendmsg(s, &msg, flags);
+ ret = libc_sendmsg(s, &msg, flags);
swrap_sendmsg_after(si, &msg, to, ret);