EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Asyn/VXI-11 problems
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Mon, 24 Sep 2007 10:43:16 +0200
On Friday 21 September 2007 17:03, Eric Norum wrote:
> On Sep 21, 2007, at 9:52 AM, Andrew Johnson wrote:
> > Eric Norum wrote:
> >>> which leads to pseudo errors; errno should be checked only if the
> >>> return
> >>> value is abnormal. It should be just
> >>>
> >>>     if(stat!=RPC_SUCCESS) {
> >>>         /* error handling */
> >>>     }
> >>
> >> Both the places where this code appears are preceded by
> >> assignments of 0 to errno.   The fact that this was done makes me
> >> think that the code was placed there for a reason.  There appear
> >> to be several substandard versions of RPC libraries out there.
> >
> > That may be true (I have no knowledge), but on vxWorks at least
> > what Ben says is right — if you haven't been handed an error return
> > status you should assume that any value placed in errno has been
> > handled internally by the routine you called.  I believe that older
> > versions of auto-save/ restore suffered from the same
> > misapprehension and generated bogus error messages as a result, but
> > I think Tim Mooney has cleaned them all up now.
>
> The code in question was added by Marty Kraimer -- there's nothing in
> the CVS log to suggest why, though.
> I'm leaning towards doing as Andrew and Benjamin suggest, but I still
> have this niggling feeling that the extra check must have been put
> there for a reason.

What about the following procedure: the extra check gets disabled (#if 
0...#endif) and some comment is added. In case it turns out it is still 
needed for some broken RPC implementation it gets re-added conditionally, 
i.e. only for the target platform where the kludge is necessary.

Cheers
Ben


References:
Asyn/VXI-11 problems Benjamin Franksen
Re: Asyn/VXI-11 problems Andrew Johnson
Re: Asyn/VXI-11 problems Eric Norum

Navigate by Date:
Prev: Re: Asyn/VXI-11 problems Benjamin Franksen
Next: Learning EDM Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Asyn/VXI-11 problems Eric Norum
Next: Re: Asyn/VXI-11 problems Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·