Re: [libmicrohttpd] [PATCH] code style: remove tabs from source code

2018-01-24 Thread Christian Grothoff
Hi Moritz,


Removing tabs might be desirable, but this patch destroys indentation
(see stark example below), which is not.

My 2 cents.

Happy hacking!

Christian

On 01/24/2018 02:23 PM, Moritz Warning wrote:
>if (url == NULL)
>   {
> - MHD_stop_daemon (d);
> - return 16;
> +  MHD_stop_daemon (d);
> +  return 16;
>   }



signature.asc
Description: OpenPGP digital signature


Re: [libmicrohttpd] [PATCH] code style: remove tabs from source code

2018-01-24 Thread Moritz Warning
Hi Christian,

I agree with you and Tim. It breaks some indentations. But it was broken before 
like this in other places, too.
Replacing the tabs with two spaces seem to be a step into the right direction 
to me.
I am not able to contribute more work right now.
Well, do as you like. :-)

have fun,
mwarning

On 01/24/2018 02:52 PM, Christian Grothoff wrote:
> Hi Moritz,
> 
> 
> Removing tabs might be desirable, but this patch destroys indentation
> (see stark example below), which is not.
> 
> My 2 cents.
> 
> Happy hacking!
> 
> Christian
> 
> On 01/24/2018 02:23 PM, Moritz Warning wrote:
>>if (url == NULL)
>>   {
>> -MHD_stop_daemon (d);
>> -return 16;
>> +  MHD_stop_daemon (d);
>> +  return 16;
>>   }
> 




signature.asc
Description: OpenPGP digital signature


Re: [libmicrohttpd] Unable to connect to libmicrohttpd in embedded system.

2018-01-24 Thread silvioprog
You're welcome buddy! :-)

On Tue, Jan 23, 2018 at 3:23 PM, Marcel Rutten  wrote:

> 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 
> 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 ...
>>
>
-- 
Silvio Clécio