[asterisk-dev] [Code Review] 3222: pbx: If someone managed to get Asterisk to load with no dialplan at all, survive

Matt Jordan reviewboard at asterisk.org
Sat Feb 15 21:24:00 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3222/
-----------------------------------------------------------

(Updated Feb. 15, 2014, 9:24 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Bugs: ASTERISK-23297
    https://issues.asterisk.org/jira/browse/ASTERISK-23297


Repository: Asterisk


Description
-------

Currently, if you load Asterisk with an empty extensions.conf, and you noload all other pbx modules (such as pbx_ael), then loading a later module - such as res_parking - that attempts to add something to the dialplan will explode.

This is because ast_merge_contexts_and_delete assumes there is at least one context loaded.

This patch modifies the routine to simply set the contexts_table/contexts pointers to the merged entries if they don't exist yet.

Note that this is probably a problem in 1.8/11, however, it probably never occurred due to features.c creating the parking extensions. Now that the core no longer does that, it's slightly more plausible to end up in this situation. It still wouldn't hurt to apply this patch to 1.8/11 as well.


Diffs
-----

  ./branches/12/main/pbx.c 407935 

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


Testing
-------

The slightly contrived scenario no longer crashes.


Thanks,

Matt Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140216/fd627a7a/attachment.html>


More information about the asterisk-dev mailing list