Commit Graph
5111 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) 149db58a06 MHD_quiesce_daemon(): fixed return value if already quiesced
Fixed to return proper documented value when MHD_quiesce_daemon() was
already called for the daemon.
2023-11-21 17:37:12 +03:00
Evgeny Grin (Karlson2k) e35469ec9b Added detection of more conditions to process the data without waiting
If no new or current connections are pending to be processed, it is
a good moment to perform some internal maintenance, like cleanup
2023-11-21 17:37:12 +03:00
Evgeny Grin (Karlson2k) cd4d2f65fc MHD_add_connection(): minor readability improvement 2023-11-16 17:14:14 +03:00
Evgeny Grin (Karlson2k) 050c641bde MHD_add_connection(): added more checks for correct members of sockaddr 2023-11-16 17:05:32 +03:00
Evgeny Grin (Karlson2k) bfa7c5a10c MHD_start_daemon(): fixed leaked listen socket when daemon start failed 2023-11-16 10:04:29 +03:00
Evgeny Grin (Karlson2k) 89021a86ee MHD_start_daemon(): added check for app-provided socket to fit fd_set 2023-11-16 10:03:33 +03:00
Evgeny Grin (Karlson2k) 6cb3cc344e Fixed (again) and improved detection of application-provided socket type
Moved detection part into socket processing from parameters processing
part.
2023-11-16 09:08:41 +03:00
Evgeny Grin (Karlson2k) f5a72d27f3 Implemented new option MHD_OPTION_SOCK_ADDR_LEN
Improved detection of TCP/IP port in application-provided sockaddr.
Added automatic detection of used address facility (sockets type).
Improved support of platforms with sa_len, ss_len, sin_len and sin6_len.
2023-11-16 09:08:40 +03:00
Evgeny Grin (Karlson2k) f73ab43831 microhttpd.h: minor clarification for doxy 2023-11-15 15:28:38 +03:00
Evgeny Grin (Karlson2k) 6ee00803ef Moved check for listen socket to fit fd_set 2023-11-15 15:26:39 +03:00
Evgeny Grin (Karlson2k) dc4bbb0c82 Additional corrections for MHD_OPTION_APP_FD_SETSIZE 2023-11-15 15:22:43 +03:00
Evgeny Grin (Karlson2k) b6737ab39b Added check for signed socket type 2023-11-12 19:26:45 +03:00
Evgeny Grin (Karlson2k) bcdb52984c MHD_start_daemon(): further improved UNIX / IP socket detection 2023-11-12 18:56:20 +03:00
Evgeny Grin (Karlson2k) c7998d3af3 Fixed ignored daemon port when MHD_OPTION_LISTEN_SOCKET or MHD_OPTION_SOCK_ADDR are used as documented 2023-11-12 18:50:22 +03:00
Evgeny Grin (Karlson2k) 75dbfbc716 Implemented and documented MHD_OPTION_LISTEN_SOCKET followed by MHD_INVALID_SOCKET 2023-11-12 11:50:30 +03:00
Evgeny Grin (Karlson2k) a564993122 MHD_start_daemon(): added check for epoll FD to fit fd_set for external polling mode 2023-11-10 17:38:26 +03:00
Evgeny Grin (Karlson2k) c211e198c6 MHD_start_daemon(): added stricter checks for bind() and listen() return values 2023-11-10 17:38:26 +03:00
Evgeny Grin (Karlson2k) 696e040146 MHD_D_DOES_SCKT_FIT_FDSET_(): simplified macro 2023-11-10 17:38:25 +03:00
Evgeny Grin (Karlson2k) 068f4b6b86 MHD_start_daemon(): added some asserts 2023-11-10 17:38:24 +03:00
Evgeny Grin (Karlson2k) e47f63a37b MHD_start_daemon(): mark listen as UNIX based on available information 2023-11-10 17:38:24 +03:00
Evgeny Grin (Karlson2k) aec9938235 daemon.c: moved processing and checking of app-provided listen socket 2023-11-10 17:38:24 +03:00
Evgeny Grin (Karlson2k) cfc790488d .gitlab-ci.yml: removed "keep-going" make flag 2023-11-10 09:33:41 +03:00
Evgeny Grin (Karlson2k) e62cd69da8 Fixed copy-paste error introduced by 2475030dcb 2023-11-09 20:08:32 +03:00
Evgeny Grin (Karlson2k) 2475030dcb Added use of the new internal macro MHD_D_IS_USING_THREAD_PER_CONN_ 2023-11-09 16:53:28 +03:00
Evgeny Grin (Karlson2k) a0de9d3310 Added use of the new internal macro MHD_D_IS_USING_THREADS_()
This should reduce the binary size when compiled without threads support
2023-11-09 12:31:12 +03:00
Evgeny Grin (Karlson2k) ede33803c6 Fixed merge conflict introduced by 32eae456fd 2023-11-08 20:32:53 +03:00
Evgeny Grin (Karlson2k) 32eae456fd Added new function MHD_run_from_select2() with FD_SETSIZE value
Added wrapper macro MHD_run_from_select() to automatically use current
FD_SETSIZE value.
This should complete the support for flexible FD_SETSIZE (which is used
on most platforms with GNU/Linux as notable exception).
This also fixes potential fd_set overrun when sockets with too large
numbers are used.
2023-11-08 20:15:01 +03:00
Evgeny Grin (Karlson2k) 09b7e335d8 Added ignore of MHD_OPTION_APP_FD_SETSIZE when poll() is used 2023-11-08 20:15:01 +03:00
Evgeny Grin (Karlson2k) dcb24300bd Additional corrections for MHD_get_fdset2() 2023-11-08 20:15:00 +03:00
Evgeny Grin (Karlson2k) 8629a47f83 Upgraded connection: added missing check 2023-11-08 16:39:58 +03:00
Evgeny Grin (Karlson2k) cec5aed907 mhd_itc.h: cosmetics 2023-11-08 10:28:19 +03:00
Evgeny Grin (Karlson2k) ce1ca4cf4e MHD_run_from_select(): reworked workaround for missing except_fd_set
It was not compatible with flexible FD_SETSIZE
2023-11-07 21:07:41 +03:00
Evgeny Grin (Karlson2k) c66af7359f daemon.c: cosmetics 2023-11-07 20:56:02 +03:00
Evgeny Grin (Karlson2k) 9bdb68358c Used custom FD_SETSIZE in MHD_get_fdset2() 2023-11-07 20:49:11 +03:00
Evgeny Grin (Karlson2k) 89c1076aac Added MHD_OPTION_APP_FD_SETSIZE and MHD_FEATURE_FLEXIBLE_FD_SETSIZE
This should provide better compatibility with platforms with ability
to override FD_SETSIZE.
The new option is used examples and tests.
2023-11-07 20:49:10 +03:00
Evgeny Grin (Karlson2k) a1954f6098 mhd_sockets.h: cosmetics 2023-11-07 20:49:09 +03:00
Evgeny Grin (Karlson2k) 4a072b3de2 daemon.c: cosmetics 2023-11-07 20:49:09 +03:00
Evgeny Grin (Karlson2k) 827edab065 internal.h: added macros for internal threads modes detection 2023-11-07 20:49:09 +03:00
Evgeny Grin (Karlson2k) b4401abfb7 internal.h: moved some macros
This is a correction for a225047802
2023-11-07 20:49:09 +03:00
Evgeny Grin (Karlson2k) 0813a8b2a0 mhd_sockets.h: directly used detected system FD_SETSIZE 2023-11-07 20:49:03 +03:00
Evgeny Grin (Karlson2k) b20fdf2a40 Correction for cdf9b66c61
Fixed compiler warnings
2023-11-06 19:01:24 +03:00
Evgeny Grin (Karlson2k) cdf9b66c61 Added use of configure-detected system default FD_SETSIZE value 2023-11-02 21:42:20 +03:00
Evgeny Grin (Karlson2k) a225047802 Updated and used macros for polling modes 2023-11-01 15:47:01 +03:00
Evgeny Grin (Karlson2k) 75e2addd08 internal.h: added macros for polling mode detection 2023-11-01 13:51:53 +03:00
Evgeny Grin (Karlson2k) 5f8e3c9b93 Adjusted default value of maximum connections 2023-11-01 13:51:45 +03:00
Evgeny Grin (Karlson2k) 6e98d63538 configure: added detection of FD_SETSIZE value and ability to override it 2023-11-01 13:51:27 +03:00
Evgeny Grin (Karlson2k) 934d0f52df configure: warn if building without threads 2023-11-01 13:51:08 +03:00
Evgeny Grin (Karlson2k) c5a84732d5 configure: cosmetics 2023-11-01 13:46:55 +03:00
Evgeny Grin (Karlson2k) 5d195d9289 microhttpd.h: updated doxy for MHD_USE_PEDANTIC_CHECKS 2023-11-01 13:46:44 +03:00
Evgeny Grin (Karlson2k) 159bbfd5c2 daemon: muted possible compiler warning 2023-11-01 13:46:09 +03:00