Fixed version of you code:
bool bf_httpsrv_shutdown(struct bf_httpsrv *srv) { MHD_socket fd;
uint8_t shutdown_attempts; /* Max 256. */ if (srv && srv->listening) {
fd = MHD_quiesce_daemon(srv->mhd); if (fd != MHD_INVALID_SOCKET) {
srv->listening = false; close(fd); if (! srv->forced_shutdown) {
sh
Dude, thanks for fixing it, I'm going to study the changes and apply it
here. :-)
I've got a situation that locks the shutdown even using this fix, but I
need to create a small project simulating the problem, I'm going to do it
now ...
On Tue, Mar 28, 2017 at 12:08 PM, Evgeny Grin wrote:
> Fixe
Done. The entire code is: https://pastebin.com/gNY2MwSY . I've used "curl
http://localhost:8080; echo" to test it.
Commenting the code: the locking happens at line 39 (MHD_stop_daemon(d)). I
don't know it the stop function offer some option to force the server
stopping, but I think we really don't
Oops, I meant:
static int dh(void *cls, struct MHD_Connection *con, const char *url,
const char *method, const char *version,
const char *upload_data, size_t *upload_data_size, void
**con_cls) {
const char *page = "I love MHD!";
struct MHD_Daemon *d;
struct MHD_Response *
On 03/27/2017 08:03 PM, Alex Reynolds wrote:
> I have an API that reads a subset of data from an archive and writes it to
> a FILE*. I can use this API to write this data subset to a temporary file
> via mkstemp() and fdopen().
>
> I am currently using MHD_create_response_from_callback() to read c
I need to compile a slightly older version of MHD, and manually adding -lrt
at the end of my libraries string (i.e., LIB) in the build ended up fixing
this, so I'd expect that to be the case with your patch as well (other
changes notwithstanding). Thanks for the help!
Regards,
Alex
> Date: Tue,