[asterisk-bugs] [Asterisk 0014353]: [patch] RemoveQueueMember could remove realtime members too

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Jan 29 11:58:11 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14353 
====================================================================== 
Reported By:                fiddur
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   14353
Category:                   Applications/app_queue
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     confirmed
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 171829 
Request Review:              
====================================================================== 
Date Submitted:             2009-01-28 06:46 CST
Last Modified:              2009-01-29 11:58 CST
====================================================================== 
Summary:                    [patch] RemoveQueueMember could remove realtime
members too
Description: 
If RemoveQueueMember is called for a realtime member, it only returned
"Member not dynamic".

I added the code to remove realtime members too.  Patch follows.
====================================================================== 

---------------------------------------------------------------------- 
 (0099072) putnopvut (administrator) - 2009-01-29 11:58
 http://bugs.digium.com/view.php?id=14353#c99072 
---------------------------------------------------------------------- 
The inability to remove realtime queue members from Asterisk is a design
decision, not a bug. Realtime configurations are typically treated as
"read-only" by Asterisk. Asterisk will read configuration changes and
update its internals when something changes externally, but Asterisk
typically will not write to a realtime configuration. There are exceptions
to this rule, such as the "paused" column for a queue member in
queues.conf.

Realtime's design goal is to allow for an external configuration source
from Asterisk to be read in. Changes to that external configuration source
should also be updated via some external means instead of through Asterisk.
In my opinion, using Asterisk to update information in realtime defeats the
purpose of using realtime configuration in the first place. If you are
going to attempt to remove a dynamic realtime queue member, then the
logical way of doing so would be to remove the queue member in a similar
way to how it was originally added. Asterisk will see this change and also
remove the queue member from its local container, too.

Now that I have stated my opinion about the philosophical reasons why I
think this should not be added, let me state that this patch you have
provided would not actually cause any ill effects as far as Asterisk is
concerned. As far as your actual patch goes, I think it's fine, except
there is a memory leak in remove_realtime_queue_member. You need to call
ast_variables_destroy on the pointer returned by ast_load_realtime to free
the memory allocated.

Even though I have stated that I don't like the addition of this feature
on principal, I am not going to close this issue as I would like to get the
opinions of other developers to make sure I'm not completely off-base in my
reasoning here. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-29 11:58 putnopvut      Note Added: 0099072                          
======================================================================




More information about the asterisk-bugs mailing list