diff options
author | Simon Rettberg | 2015-11-24 12:30:46 +0100 |
---|---|---|
committer | Simon Rettberg | 2015-11-24 12:30:46 +0100 |
commit | 7b51c287a60d2f202fb131eeed9d1bf19b65a7a3 (patch) | |
tree | 031573c708b50aeafe9a6fe6f0992b3ae6456e7c /src/fuse/helper.h | |
parent | [SERVER] Fix race condition potentially leading to use after release (diff) | |
download | dnbd3-7b51c287a60d2f202fb131eeed9d1bf19b65a7a3.tar.gz dnbd3-7b51c287a60d2f202fb131eeed9d1bf19b65a7a3.tar.xz dnbd3-7b51c287a60d2f202fb131eeed9d1bf19b65a7a3.zip |
[FUSE] Mid-refactoring, does not compile
Diffstat (limited to 'src/fuse/helper.h')
-rw-r--r-- | src/fuse/helper.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fuse/helper.h b/src/fuse/helper.h index bbba44c..35cdc8a 100644 --- a/src/fuse/helper.h +++ b/src/fuse/helper.h @@ -4,6 +4,9 @@ #include <netdb.h> #include <stdbool.h> #include <stdint.h> +#include <string.h> + +#include "../types.h" typedef struct log_info { @@ -21,4 +24,9 @@ bool sock_printable(struct sockaddr *addr, socklen_t addrLen, char *output, int int connect_to_server(char *server_adress, int port); +static inline bool isSameAddressPort(const dnbd3_host_t * const a, const dnbd3_host_t * const b) +{ + return (a->type == b->type) && (a->port == b->port) && (0 == memcmp( a->addr, b->addr, (a->type == AF_INET ? 4 : 16) )); +} + #endif |