[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Log if removing cork is unsuccessful
From: |
Václav Pavlín |
Subject: |
Re: [libmicrohttpd] Log if removing cork is unsuccessful |
Date: |
Thu, 10 Jan 2013 11:06:01 +0100 |
Christian Grothoff píše v Čt 10. 01. 2013 v 10:57 +0100:
> On 01/10/2013 10:40 AM, Václav Pavlín wrote:
> There is also again the question of how to possibly handle this
> condition (other than by logging). As it is harmless, a log message may
> confuse more than help -- after all, things are working. So I actually
> consciously decided against doing anything in this particular case. We
> have a similar 'setsockopt' case for IPV6_V6ONLY in daemon.c; again, the
> failure is "mostly harmless" and actual handling of errors is likely to
> do more harm (as in, break stuff) than ignoring the return value.
>
Ok, I've found some article about TCP_CORK where was stated that if
there is some incomplete packet and you don't remove the cork they won't
be sent. But I got your point.
> Coverity is making invalid assumptions. "left" is of type "off_t",
> which can be 32 bit or 64 bit,
> signed or unsigned. SSIZE_MAX is the maximum value of 'ssize_t', which
> can be 32-bit or 64 bit signed; and these are actually only the
> constraints on _common_ platforms; exotic systems might be even more crazy.
>
> So on some platforms this check may be unnecessary, but not on all.
I tried to go through code to check the types but I probably didn't
cover all the branches of IFDEFs. Thanks for explanation.
>
> Happy hacking!
>
> Christian
>
Regards
Vaclav Pavlin