Re: errcode hides Comm::ListenStateData::errcode.

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Mon, 02 Aug 2010 11:00:54 -0600

On 08/02/2010 09:12 AM, noc_at_squid-cache.org wrote:
> "../../../src/comm/ListenStateData.cc", line 189: Error: errcode hides Comm::ListenStateData::errcode.

There are more related problems here, besides name hiding.

* Comm::ListenStateData::setListen() sets errcode member on some
failures but those failures are not propagated to the caller. That seems
wrong.

* The "and accept takes a callback to call" part of the
Comm::ListenStateData::setListen() comment does not seem to correspond
to the actual setListen() code. May belong to the constructor instead.

* Comm::ListenStateData::notify sets param.errcode but not this->errcode.

* The errcode member documentation ("errno code if any happened so far")
is inconsistent with the code because some errors are ignored.

If the errcode member is not meant for outside use, perhaps it is not
needed at all. If it is needed outside, its definition should be
reviewed and value should be updated accordingly.

HTH,

Alex.
Received on Mon Aug 02 2010 - 17:01:04 MDT

This archive was generated by hypermail 2.2.0 : Tue Aug 03 2010 - 12:00:04 MDT