[Asterisk-code-review] app confbridge: Fix reference to cfg in menu template handler (asterisk[13])

George Joseph asteriskteam at digium.com
Thu May 4 18:18:38 CDT 2017


Hello Jenkins2, Joshua Colp,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/5579

to look at the new patch set (#2).

Change subject: app_confbridge:  Fix reference to cfg in menu_template_handler
......................................................................

app_confbridge:  Fix reference to cfg in menu_template_handler

menu_template_handler wasn't properly accounting for the fact that
it might be called both during a load/reload and by a dialplan
function.  In both cases it was attempting to use the "pending"
config which wasn't valid in the latter case.  aco_process_config
is also partly to blame because it wasn't properly cleaning
"pending" up when a reload was done and no changes were made.
Both of these contributed to a crash if CONFBRIDGE(menu,template)
was called in a dialplan.

* aco_process_config now sets info->internal->pending to NULL
  after it unreffs it.
* menu_template_handler now checks pending and if it's NULL,
  uses the global object (current config).

Luckily there's no other place in the codebase where
aco_pending_config is used outside of aco_process_config.

ASTERISK-25506 #close
Reported-by: Frederic LE FOLL

Change-Id: Ib349a17d3d088f092480b19addd7122fcaac21a7
---
M apps/confbridge/conf_config_parser.c
M main/config_options.c
2 files changed, 21 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/79/5579/2
-- 
To view, visit https://gerrit.asterisk.org/5579
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib349a17d3d088f092480b19addd7122fcaac21a7
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list