diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-02-17 22:30:53 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-02-17 22:30:53 +0000 |
commit | fdffefb8032922ce7ffe4c00816072a8ff2148fc (patch) | |
tree | bc7313151a429c45d8bab8ad8b9dd32f4e51335f /src/libunixonacid/skaclient_server_ack.c | |
parent | a896ca2a8c617e5e00ffd5fc9e69331ad754e5b3 (diff) | |
download | skalibs-fdffefb8032922ce7ffe4c00816072a8ff2148fc.tar.xz |
More types changes
New disize
Add size_t to the autotypes list
Delete redundant and replace-libc files
dev_t/ino_t pass
Big size_t pass
More things missing, still not operational yet
Diffstat (limited to 'src/libunixonacid/skaclient_server_ack.c')
-rw-r--r-- | src/libunixonacid/skaclient_server_ack.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libunixonacid/skaclient_server_ack.c b/src/libunixonacid/skaclient_server_ack.c index 31ee9fe..6b59563 100644 --- a/src/libunixonacid/skaclient_server_ack.c +++ b/src/libunixonacid/skaclient_server_ack.c @@ -1,21 +1,22 @@ /* ISC license. */ +#include <sys/types.h> #include <errno.h> -#include <skalibs/bytestr.h> +#include <string.h> #include <skalibs/djbunix.h> #include <skalibs/error.h> #include <skalibs/skaclient.h> #include <skalibs/unixmessage.h> #include <skalibs/webipc.h> -int skaclient_server_ack (unixmessage_t const *clientmsg, unixmessage_sender_t *out, unixmessage_sender_t *asyncout, char const *before, unsigned int beforelen, char const *after, unsigned int afterlen) +int skaclient_server_ack (unixmessage_t const *clientmsg, unixmessage_sender_t *out, unixmessage_sender_t *asyncout, char const *before, size_t beforelen, char const *after, size_t afterlen) { int fd[2] ; unixmessage_t m = { .s = (char *)after, .len = afterlen, .fds = fd, .nfds = 1 } ; static unsigned char const bits = 0xff ; if (clientmsg->nfds || clientmsg->len != beforelen - || byte_diff(clientmsg->s, beforelen, before)) return (errno = EPROTO, 0) ; + || memcmp(clientmsg->s, before, beforelen)) return (errno = EPROTO, 0) ; if (ipc_pair_nbcoe(fd) < 0) return 0 ; unixmessage_sender_init(asyncout, fd[1]) ; if (!unixmessage_put_and_close(out, &m, &bits)) |