[asterisk-dev] bug_7506 changes for 1.4, trunk

Russell Bryant russell at digium.com
Tue Nov 7 20:19:00 MST 2006


Steve Murphy wrote:
> The Minimal way to do what I did, would be to leave the channel_alloc
> call alone, and
> make a new function to simply report the newchannel event, and use this
> pretty much 
> everywhere the setstate call is being used in the current code. Setstate
> would still
> be modified to just generate the Newstate report, and nothing else. And
> ast_request would
> not generate any Newchannel events anymore, either. In other words, the
> generation of the Newchannel event does not have to be bound so tightly
> to the channel_alloc() call.  The 
> side-affects of leaving it as a separate action is that future channel
> writers might forget to include the call in their channel code, and
> inadvertently generate some bugs that way.
> 
> What do my fellow developers want me to do? What's best? Just commit
> what I have, and
> be done with it, or toss a chunk of it out, and rewrite it? I think I
> could have it ready late tomorrow if I do this.

I personally prefer the way you have done it.  I think it would be kind of silly 
to make it so you have to remember to explicitly call another function for the 
manager event to be generated.  That would almost surely be forgotten in the 
future.  The way you have it makes it transparent and makes sure that it will 
never be overlooked.

-- 
Russell Bryant
Software Engineer
Digium, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: russell.vcf
Type: text/x-vcard
Size: 266 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20061107/5451d723/russell-0001.vcf


More information about the asterisk-dev mailing list