diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-14 16:50:18 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-14 16:50:18 +0300 |
commit | 56cccc6da257000049292016e1bda822c3934967 (patch) | |
tree | 37fd48e6a025521ca3365901b087c8800c546bca /src/microhttpd/internal.h | |
parent | 947ab9361f6ed36141ff4adfc8265b728d0f2cf9 (diff) | |
download | libmicrohttpd-56cccc6da257000049292016e1bda822c3934967.tar.gz libmicrohttpd-56cccc6da257000049292016e1bda822c3934967.zip |
epoll FD is not MHD_socket type, adjust and unify usage
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r-- | src/microhttpd/internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index 6e5ea67e..be751c2e 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -66,6 +66,15 @@ | |||
66 | 66 | ||
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Close FD and abort execution if error is detected. | ||
70 | * @param fd the FD to close | ||
71 | */ | ||
72 | #define MHD_fd_close_chk_(fd) do { \ | ||
73 | if (0 == close ((fd)) && (EBADF == errno)) \ | ||
74 | MHD_PANIC(_("Failed to close FD.\n")); \ | ||
75 | } while(0) | ||
76 | |||
77 | /** | ||
69 | * Should we perform additional sanity checks at runtime (on our internal | 78 | * Should we perform additional sanity checks at runtime (on our internal |
70 | * invariants)? This may lead to aborts, but can be useful for debugging. | 79 | * invariants)? This may lead to aborts, but can be useful for debugging. |
71 | */ | 80 | */ |