Hi Benjamin,
On 2013-06-21 Benjamin Franksen wrote:
> On Friday, June 21, 2013 11:18:07 Benjamin Franksen wrote:
> > The errlog facility provides errlogAddListener, and errlogRemoveListener.
> > Unfortunately, the latter is broken, as there is no way to specify the
> > listener's private data. So if I have two listeners which differ only in
> > their private data (such as when using two instances of feller), then I
> > can only remove them all at once, not each one separately.
Actually errlogRemoveListener() will only delete the *first* listener in the
list that matches (there's a 'break' which stops the loop once it finds a
match).
WARNING: Kludge Ahead! If feller keeps a list of its own registrations it
could remove all its listeners up to the one it wants to delete and then add
the others back again (but that would change their order in the list, so it
would have to adjust its list accordingly; algorithm testing highly
recommended!).
> > The attached patch file rectifies that by adding an
> > errlogRemoveSingleListener function to the API that allows to remove
> > single instances.
Thanks, I will consider this for the 3.15 branch.
> In the meantime, I wonder how to proceed with the feller module.
...
> Better ideas would be much appreciated.
You could just register one listener and keep your own list of clients which
that listener traverses when it gets called. Now you can delete specific
entries at leisure because you own the list.
- Andrew
--
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock
- Replies:
- Re: Problem in errlogRemoveListener Benjamin Franksen
- References:
- Problem in errlogRemoveListener Benjamin Franksen
- Re: Problem in errlogRemoveListener Benjamin Franksen
- Navigate by Date:
- Prev:
Re: help setting up XY table control with EPICS StreamerClass Tim Mooney
- Next:
Re: help setting up XY table control with EPICS StreamerClass Zenon Szalata
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Problem in errlogRemoveListener Benjamin Franksen
- Next:
Re: Problem in errlogRemoveListener Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|