libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded syste


From: Marcel Rutten
Subject: Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.
Date: Tue, 23 Jan 2018 19:23:29 +0100

Thanks Christian,

I checked the error; "Invalid argument".

> But I've not yet heard about a buggy accept4() implementation...

This is a first, then :-) :
I blocked accept4() in favour of accept(), and now it works. Don't ask why.

Anyway, this is the software environment:
kernel 2.6.36, glibc 2.10.1. (as I said already, old stuff). Processor ARM 926 EJS, arm-linux-gnueabi.
Thanks everyone for your comments. I learned something from all of you.

@Silvio: Thanks for looking up the code, I'll save it for reference, it may be very useful in the future.


On 22 January 2018 at 23:43, Christian Grothoff <address@hidden> wrote:
-1 can be *normal*, as MHD calls 'accept()' (possibly via multiple
threads when using a thread pool) until there are no more clients.  You
should check what errno says.

Also, in case accept4() is buggy on your platform, it is an
optimization; so you could #undef HAVE_ACCEPT4 if accept() +
setsockopt() works better. But I've not yet heard about a buggy
accept4() implementation...

Happy hacking!

Christian

On 01/22/2018 11:32 PM, Marcel Rutten wrote:
> Found it. accept4() returns an invalid socket.
> I will carry on tomorrow, it's almost midnight in my time zone ...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]