]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx: Handle a completely empty dialplan during a context merge
authorMatthew Jordan <mjordan@digium.com>
Sun, 16 Feb 2014 03:23:14 +0000 (03:23 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sun, 16 Feb 2014 03:23:14 +0000 (03:23 +0000)
commitfe6f1d5d0ab7838fdb7267970ff6826e6090aee4
tree6f4ede25ae490d7dbf87b9537056370cdbc75f24
parent374cd971f963c233336eeb140641b494372b269b
pbx: Handle a completely empty dialplan during a context merge

It is highly unlikely, but - at least in Asterisk 12 - theoretically possible
to load Asterisk with no dialplan whatsoever. If that occurs, and some other
module (that is not a pbx module) attempts to merge its contexts into the
dialplan, the existing merge routine will crash. This is because it is not
insane, and rightly believes that you provided some sort of dialplan,
somewhere.

This patch will gracefully merge the contexts in such a case. Note that this
is highly unlikely to occur in 1.8/11, as features will most likely provide
some dialplan via parking. However, in Asterisk 12, parking is now provided
by res_parking, and hence may create its dialplan later.

(closes issue ASTERISK-23297)
Reported by: CJ Oster

Review: https://reviewboard.asterisk.org/r/3222
........

Merged revisions 408200 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 408201 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/pbx.c