Merge "features: Fix channel datastore access." into 13

This commit is contained in:
Joshua Colp
2016-07-01 09:59:40 -05:00
committed by Gerrit Code Review
2 changed files with 11 additions and 4 deletions

View File

@@ -1543,8 +1543,13 @@ static void testsuite_notify_feature_success(struct ast_channel *chan, const cha
{
#ifdef TEST_FRAMEWORK
char *feature = "unknown";
struct ast_featuremap_config *featuremap = ast_get_chan_featuremap_config(chan);
struct ast_features_xfer_config *xfer = ast_get_chan_features_xfer_config(chan);
struct ast_featuremap_config *featuremap;
struct ast_features_xfer_config *xfer;
ast_channel_lock(chan);
featuremap = ast_get_chan_featuremap_config(chan);
xfer = ast_get_chan_features_xfer_config(chan);
ast_channel_unlock(chan);
if (featuremap) {
if (!strcmp(dtmf, featuremap->blindxfer)) {

View File

@@ -767,8 +767,8 @@ static int action_bridge(struct mansession *s, const struct message *m)
astman_send_error(s, m, buf);
return 0;
}
xfer_cfg_a = ast_get_chan_features_xfer_config(chana);
ast_channel_lock(chana);
xfer_cfg_a = ast_get_chan_features_xfer_config(chana);
chana_exten = ast_strdupa(ast_channel_exten(chana));
chana_context = ast_strdupa(ast_channel_context(chana));
chana_priority = ast_channel_priority(chana);
@@ -783,8 +783,8 @@ static int action_bridge(struct mansession *s, const struct message *m)
astman_send_error(s, m, buf);
return 0;
}
xfer_cfg_b = ast_get_chan_features_xfer_config(chanb);
ast_channel_lock(chanb);
xfer_cfg_b = ast_get_chan_features_xfer_config(chanb);
chanb_exten = ast_strdupa(ast_channel_exten(chanb));
chanb_context = ast_strdupa(ast_channel_context(chanb));
chanb_priority = ast_channel_priority(chanb);
@@ -1098,7 +1098,9 @@ static int bridge_exec(struct ast_channel *chan, const char *data)
goto done;
}
ast_channel_lock(current_dest_chan);
xfer_cfg = ast_get_chan_features_xfer_config(current_dest_chan);
ast_channel_unlock(current_dest_chan);
bridge_add_failed = ast_bridge_add_channel(bridge, current_dest_chan, peer_features,
ast_test_flag(&opts, BRIDGE_OPT_PLAYTONE),
xfer_cfg ? xfer_cfg->xfersound : NULL);