[asterisk-dev] [Code Review] Two new CEL-related fixes

Terry Wilson reviewboard at asterisk.org
Fri May 4 18:01:54 CDT 2012

This is an automatically generated e-mail. To reply, visit:

Review request for Asterisk Developers, Mark Michelson and rmudgett.


This patch fixes to situations that could cause the CEL LINKEDID_END event to be missed.

1) During a core stop gracefully, modules are unloaded when ast_active_channels == 0. The LINKDEDID_END event fires during the channel destructor. This means that occasionally, the cel_* module will be unloaded before the channel is destroyed. It seemed generally useful to wait until the refcount of all channel == 0 before unloading, so I added a channel counter and used it in the shutdown code.

2) During a masquerade, ast_channel_change_linkedid is called. It calls ast_cel_check_retire_linkedid which unrefs the linkedid in the linkedids container in cel.c. It didn't ref the new linkedid. Now it does. I also changed the logic a little, since it used to call ast_channel_linkedid_set() even when it hadn't changed (or was blank, which should be verboten).

(this patch is against trunk, but it will go in 1.8+)


  /trunk/include/asterisk/cel.h 365131 
  /trunk/include/asterisk/channel.h 365131 
  /trunk/main/asterisk.c 365131 
  /trunk/main/cel.c 365131 
  /trunk/main/channel.c 365131 

Diff: https://reviewboard.asterisk.org/r/1900/diff


My CEL test passed 100 times or so and transferred calls no longer show an error.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120504/eb0423b3/attachment.htm>

More information about the asterisk-dev mailing list