Author: dlee Date: Thu Aug 8 14:03:16 2013 New Revision: 396415 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396415 Log: Merged revisions 396365-396412 from http://svn.asterisk.org/svn/asterisk/trunk ........
Merged revisions 396413 from http://svn.asterisk.org/svn/asterisk/team/dlee/ari-async-bridge Modified: team/dlee/ASTERISK-21969/ (props changed) team/dlee/ASTERISK-21969/apps/app_queue.c team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_announce.c team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_record.c team/dlee/ASTERISK-21969/channels/chan_bridge_media.c team/dlee/ASTERISK-21969/channels/chan_unistim.c team/dlee/ASTERISK-21969/formats/format_wav_gsm.c team/dlee/ASTERISK-21969/include/asterisk/bridge_features.h team/dlee/ASTERISK-21969/include/asterisk/channel.h team/dlee/ASTERISK-21969/main/bridge.c team/dlee/ASTERISK-21969/main/cdr.c team/dlee/ASTERISK-21969/main/cel.c team/dlee/ASTERISK-21969/main/channel.c team/dlee/ASTERISK-21969/main/channel_internal_api.c team/dlee/ASTERISK-21969/main/features.c team/dlee/ASTERISK-21969/main/manager_bridges.c team/dlee/ASTERISK-21969/main/manager_channels.c team/dlee/ASTERISK-21969/main/utils.c Propchange: team/dlee/ASTERISK-21969/ ------------------------------------------------------------------------------ Binary property 'branch-11-merged' - no diff available. Propchange: team/dlee/ASTERISK-21969/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Aug 8 14:03:16 2013 @@ -1,1 +1,1 @@ -/team/dlee/ari-async-bridge:1-396362 +/team/dlee/ari-async-bridge:1-396414 Modified: team/dlee/ASTERISK-21969/apps/app_queue.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/apps/app_queue.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/apps/app_queue.c (original) +++ team/dlee/ASTERISK-21969/apps/app_queue.c Thu Aug 8 14:03:16 2013 @@ -4584,10 +4584,10 @@ case AST_CONTROL_BUSY: ast_verb(3, "%s is busy\n", ochan_name); ast_channel_publish_dial(qe->chan, o->chan, on, "BUSY"); - do_hang(o); endtime = (long) time(NULL); endtime -= starttime; rna(endtime * 1000, qe, o->chan, on, membername, qe->parent->autopausebusy); + do_hang(o); if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) { if (qe->parent->timeoutrestart) { start_time_tv = ast_tvnow(); Modified: team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_announce.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_announce.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_announce.c (original) +++ team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_announce.c Thu Aug 8 14:03:16 2013 @@ -134,7 +134,7 @@ .send_text = ast_unreal_sendtext, .queryoption = ast_unreal_queryoption, .setoption = ast_unreal_setoption, - .properties = AST_CHAN_TP_ANNOUNCER, + .properties = AST_CHAN_TP_INTERNAL, }; struct ast_channel_tech *conf_announce_get_tech(void) Modified: team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_record.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_record.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_record.c (original) +++ team/dlee/ASTERISK-21969/apps/confbridge/conf_chan_record.c Thu Aug 8 14:03:16 2013 @@ -86,7 +86,7 @@ .call = rec_call, .read = rec_read, .write = rec_write, - .properties = AST_CHAN_TP_RECORDER, + .properties = AST_CHAN_TP_INTERNAL, }; struct ast_channel_tech *conf_record_get_tech(void) Modified: team/dlee/ASTERISK-21969/channels/chan_bridge_media.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/channels/chan_bridge_media.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/channels/chan_bridge_media.c (original) +++ team/dlee/ASTERISK-21969/channels/chan_bridge_media.c Thu Aug 8 14:03:16 2013 @@ -89,7 +89,7 @@ .send_text = ast_unreal_sendtext, .queryoption = ast_unreal_queryoption, .setoption = ast_unreal_setoption, - .properties = AST_CHAN_TP_ANNOUNCER, + .properties = AST_CHAN_TP_INTERNAL, }; static struct ast_channel_tech record_tech = { @@ -111,7 +111,7 @@ .send_text = ast_unreal_sendtext, .queryoption = ast_unreal_queryoption, .setoption = ast_unreal_setoption, - .properties = AST_CHAN_TP_RECORDER, + .properties = AST_CHAN_TP_INTERNAL, }; static struct ast_channel *media_request_helper(struct ast_format_cap *cap, Modified: team/dlee/ASTERISK-21969/channels/chan_unistim.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/channels/chan_unistim.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/channels/chan_unistim.c (original) +++ team/dlee/ASTERISK-21969/channels/chan_unistim.c Thu Aug 8 14:03:16 2013 @@ -2871,7 +2871,11 @@ send_text(TEXT_LINE0, TEXT_NORMAL, pte, ustmtext("Enter the number to dial", pte)); send_text(TEXT_LINE1, TEXT_NORMAL, pte, ustmtext("and press Call", pte)); } - send_text_status(pte, ustmtext("Call Redial BackSp Erase", pte)); + if (ast_strlen_zero(pte->device->redial_number)) { + send_text_status(pte, ustmtext("Call BackSp Erase", pte)); + } else { + send_text_status(pte, ustmtext("Call Redial BackSp Erase", pte)); + } } pte->device->size_phone_number = 0; @@ -3274,6 +3278,8 @@ static void key_call(struct unistimsession *pte, char keycode) { struct unistim_subchannel *sub = get_sub(pte->device, SUB_REAL); + struct unistim_subchannel *sub_3way = get_sub(pte->device, SUB_THREEWAY); + if ((keycode >= KEY_0) && (keycode <= KEY_SHARP)) { if (keycode == KEY_SHARP) { keycode = '#'; @@ -3288,22 +3294,21 @@ switch (keycode) { case KEY_FUNC1: if (ast_channel_state(sub->owner) == AST_STATE_UP) { - if (get_sub(pte->device, SUB_THREEWAY)) { + if (sub_3way) { close_call(pte); } } break; case KEY_FUNC2: - if (ast_channel_state(sub->owner) == AST_STATE_RING) { + if (sub_3way) { transfer_cancel_step2(pte); - } - if (ast_channel_state(sub->owner) == AST_STATE_UP) { + } else if (ast_channel_state(sub->owner) == AST_STATE_UP) { transfer_call_step1(pte); } break; case KEY_HANGUP: case KEY_FUNC4: - if (!get_sub(pte->device, SUB_THREEWAY)) { + if (!sub_3way) { close_call(pte); } break; @@ -3981,13 +3986,24 @@ send_text(TEXT_LINE1, TEXT_NORMAL, pte, pte->device->call_forward); } send_icon(TEXT_LINE0, FAV_ICON_REFLECT + FAV_BLINK_SLOW, pte); - send_text_status(pte, ustmtext("Dial Redial NoFwd ", pte)); + if (ast_strlen_zero(pte->device->redial_number)) { + send_text_status(pte, ustmtext("Dial NoFwd ", pte)); + } else { + send_text_status(pte, ustmtext("Dial Redial NoFwd ", pte)); + } } else { - if ((pte->device->extension == EXTENSION_ASK) || - (pte->device->extension == EXTENSION_TN)) { - send_text_status(pte, ustmtext("Dial Redial Fwd Unregis", pte)); + if ((pte->device->extension == EXTENSION_ASK) || (pte->device->extension == EXTENSION_TN)) { + if (ast_strlen_zero(pte->device->redial_number)) { + send_text_status(pte, ustmtext("Dial Fwd Unregis", pte)); + } else { + send_text_status(pte, ustmtext("Dial Redial Fwd Unregis", pte)); + } } else { - send_text_status(pte, ustmtext("Dial Redial Fwd Pickup", pte)); + if (ast_strlen_zero(pte->device->redial_number)) { + send_text_status(pte, ustmtext("Dial Fwd Pickup", pte)); + } else { + send_text_status(pte, ustmtext("Dial Redial Fwd Pickup", pte)); + } } send_text(TEXT_LINE1, TEXT_NORMAL, pte, pte->device->maintext1); if (pte->device->missed_call == 0) { @@ -4773,8 +4789,8 @@ ast_verb(0, "unistim_hangup(%s) on %s@%s (STATE_%s)\n", ast_channel_name(ast), l->name, l->parent->name, ptestate_tostr(s->state)); } sub_trans = get_sub(d, SUB_THREEWAY); - if (sub_trans && (sub_trans->owner) && (sub->subtype == SUB_REAL) && - (sub->alreadygone == 0)) { + sub_real = get_sub(d, SUB_REAL); + if (sub_trans && (sub_trans->owner) && (sub->subtype == SUB_REAL)) { /* 3rd party busy or congested and transfer_cancel_step2 does not called */ if (unistimdebug) { ast_verb(0, "Threeway call disconnected, switching to real call\n"); } @@ -4782,16 +4798,13 @@ sub_trans->moh = 0; sub_trans->subtype = SUB_REAL; swap_subs(sub_trans, sub); - send_text_status(s, ustmtext(" Transf Hangup", s)); send_callerid_screen(s, sub_trans); unistim_hangup_clean(ast, sub); unistim_unalloc_sub(d, sub); return 0; } - sub_real = get_sub(d, SUB_REAL); - if (sub_real && (sub_real->owner) && (sub->subtype == SUB_THREEWAY) && - (sub->alreadygone == 0)) { + if (sub_real && (sub_real->owner) && (sub->subtype == SUB_THREEWAY)) { /* 3way call cancelled by softkey pressed */ if (unistimdebug) { ast_verb(0, "Real call disconnected, stay in call\n"); } Modified: team/dlee/ASTERISK-21969/formats/format_wav_gsm.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/formats/format_wav_gsm.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/formats/format_wav_gsm.c (original) +++ team/dlee/ASTERISK-21969/formats/format_wav_gsm.c Thu Aug 8 14:03:16 2013 @@ -393,6 +393,17 @@ return 0; } +static void wav_close(struct ast_filestream *s) +{ + if (s->mode == O_RDONLY) { + return; + } + + if (s->filename) { + update_header(s->f); + } +} + static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext) { /* Send a frame from the file to the appropriate channel */ @@ -468,7 +479,6 @@ ast_log(LOG_WARNING, "Bad write (%d/65): %s\n", res, strerror(errno)); return -1; } - update_header(s->f); /* XXX inefficient! */ } return 0; } @@ -560,6 +570,7 @@ .trunc = wav_trunc, .tell = wav_tell, .read = wav_read, + .close = wav_close, .buf_size = 2*GSM_FRAME_SIZE + AST_FRIENDLY_OFFSET, .desc_size = sizeof(struct wavg_desc), }; Modified: team/dlee/ASTERISK-21969/include/asterisk/bridge_features.h URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/include/asterisk/bridge_features.h?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/include/asterisk/bridge_features.h (original) +++ team/dlee/ASTERISK-21969/include/asterisk/bridge_features.h Thu Aug 8 14:03:16 2013 @@ -88,7 +88,6 @@ * parking slot to which it was parked. */ AST_BRIDGE_BUILTIN_PARKCALL, -/* BUGBUG does Monitor and/or MixMonitor require a two party bridge? MixMonitor is used by ConfBridge so maybe it doesn't. */ /*! * DTMF one-touch-record toggle using Monitor app. * @@ -176,7 +175,6 @@ AST_BRIDGE_HOOK_TYPE_TALK, }; -/* BUGBUG Need to be able to selectively remove DTMF, hangup, and interval hooks. */ /*! \brief Structure that is the essence of a feature hook. */ struct ast_bridge_hook { /*! Callback that is called when hook is tripped */ Modified: team/dlee/ASTERISK-21969/include/asterisk/channel.h URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/include/asterisk/channel.h?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/include/asterisk/channel.h (original) +++ team/dlee/ASTERISK-21969/include/asterisk/channel.h Thu Aug 8 14:03:16 2013 @@ -864,15 +864,11 @@ */ AST_CHAN_TP_CREATESJITTER = (1 << 1), /*! - * \brief Channels have this property if they are an implementation detail - * used for announcing messages; i.e. to a bridge + * \brief Channels with this particular technology are an implementation detail of + * Asterisk and should generally not be exposed or manipulated by the outside + * world */ - AST_CHAN_TP_ANNOUNCER = (1 << 2), - /*! - * \brief Channels have this property if they are an implementation detail - * used for recording audio; i.e. from a bridge - */ - AST_CHAN_TP_RECORDER = (1 << 3), + AST_CHAN_TP_INTERNAL = (1 << 2), }; /*! \brief ast_channel flags */ Modified: team/dlee/ASTERISK-21969/main/bridge.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/bridge.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/bridge.c (original) +++ team/dlee/ASTERISK-21969/main/bridge.c Thu Aug 8 14:03:16 2013 @@ -1482,7 +1482,6 @@ ao2_ref(bridge_channel, -1); join_exit:; -/* BUGBUG this is going to cause problems for DTMF atxfer attended bridge between B & C. Maybe an ast_bridge_join_internal() that does not do the after bridge goto for this case. */ ast_bridge_run_after_callback(chan); if (!(ast_channel_softhangup_internal_flag(chan) & AST_SOFTHANGUP_ASYNCGOTO) && !ast_bridge_setup_after_goto(chan)) { @@ -1960,7 +1959,6 @@ int was_in_bridge; int res = 0; -/* BUGBUG need bridge move stasis event and a success/fail event. */ if (bridge_channel->swap) { ast_debug(1, "Moving %p(%s) into bridge %s swapping with %s\n", bridge_channel, ast_channel_name(bridge_channel->chan), dst_bridge->uniqueid, @@ -2198,6 +2196,9 @@ if (!AST_LIST_EMPTY(ast_channel_readq(chan))) { return NULL; } + if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_EMULATE_DTMF)) { + return NULL; + } if (ast_channel_has_audio_frame_or_monitor(chan)) { /* Channel has an active monitor, audiohook, or framehook. */ return NULL; @@ -2241,6 +2242,10 @@ return NULL; } if (!AST_LIST_EMPTY(ast_channel_readq(peer))) { + ast_channel_unlock(peer); + return NULL; + } + if (ast_test_flag(ast_channel_flags(peer), AST_FLAG_EMULATE_DTMF)) { ast_channel_unlock(peer); return NULL; } Modified: team/dlee/ASTERISK-21969/main/cdr.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/cdr.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/cdr.c (original) +++ team/dlee/ASTERISK-21969/main/cdr.c Thu Aug 8 14:03:16 2013 @@ -1818,6 +1818,11 @@ cdr = ao2_find(active_cdrs_by_channel, peer->name, OBJ_KEY); } + if (!cdr) { + ast_log(AST_LOG_WARNING, "No CDR for channel %s\n", caller ? caller->name : peer->name); + return; + } + ao2_lock(cdr); for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) { if (ast_strlen_zero(dial_status)) { @@ -1896,7 +1901,7 @@ /*! \internal \brief Filter channel snapshots by technology */ static int filter_channel_snapshot(struct ast_channel_snapshot *snapshot) { - return snapshot->tech_properties & (AST_CHAN_TP_ANNOUNCER | AST_CHAN_TP_RECORDER); + return snapshot->tech_properties & AST_CHAN_TP_INTERNAL; } /*! \internal \brief Filter a channel cache update */ Modified: team/dlee/ASTERISK-21969/main/cel.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/cel.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/cel.c (original) +++ team/dlee/ASTERISK-21969/main/cel.c Thu Aug 8 14:03:16 2013 @@ -1103,7 +1103,7 @@ if (!snapshot) { return 0; } - return snapshot->tech_properties & (AST_CHAN_TP_ANNOUNCER | AST_CHAN_TP_RECORDER); + return snapshot->tech_properties & AST_CHAN_TP_INTERNAL; } static void cel_snapshot_update_cb(void *data, struct stasis_subscription *sub, Modified: team/dlee/ASTERISK-21969/main/channel.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/channel.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/channel.c (original) +++ team/dlee/ASTERISK-21969/main/channel.c Thu Aug 8 14:03:16 2013 @@ -830,6 +830,16 @@ return NULL; } +/*! \brief Channel technology used to extract a channel from a running application. The + * channel created with this technology will be immediately hung up - most external + * applications won't ever want to see this. + */ +static const struct ast_channel_tech surrogate_tech = { + .type = "Surrogate", + .description = "Surrogate channel used to pull channel from an application", + .properties = AST_CHAN_TP_INTERNAL, +}; + static const struct ast_channel_tech null_tech = { .type = "NULL", .description = "Null channel (should not see this)", @@ -852,6 +862,7 @@ struct ast_sched_context *schedctx; struct ast_timer *timer; struct timeval now; + const struct ast_channel_tech *channel_tech; /* If shutting down, don't allocate any new channels */ if (ast_shutting_down()) { @@ -965,9 +976,6 @@ ast_channel_name_set(tmp, "-**Unknown**"); } - /* Reminder for the future: under what conditions do we NOT want to track cdrs on channels? */ - - /* These 4 variables need to be set up for the cdr_init() to work right */ if (amaflag != AST_AMA_NONE) { ast_channel_amaflags_set(tmp, amaflag); } else { @@ -977,39 +985,39 @@ if (!ast_strlen_zero(acctcode)) { ast_channel_accountcode_set(tmp, acctcode); } + ast_channel_language_set(tmp, ast_defaultlanguage); ast_channel_context_set(tmp, S_OR(context, "default")); ast_channel_exten_set(tmp, S_OR(exten, "s")); ast_channel_priority_set(tmp, 1); - ast_atomic_fetchadd_int(&chancount, +1); - headp = ast_channel_varshead(tmp); AST_LIST_HEAD_INIT_NOLOCK(headp); ast_pbx_hangup_handler_init(tmp); AST_LIST_HEAD_INIT_NOLOCK(ast_channel_datastores(tmp)); - AST_LIST_HEAD_INIT_NOLOCK(ast_channel_autochans(tmp)); - ast_channel_language_set(tmp, ast_defaultlanguage); - - ast_channel_tech_set(tmp, &null_tech); - + channel_tech = ast_get_channel_tech(tech); + if (!channel_tech && !ast_strlen_zero(tech2)) { + channel_tech = ast_get_channel_tech(tech2); + } + if (channel_tech) { + ast_channel_tech_set(tmp, channel_tech); + } else { + ast_channel_tech_set(tmp, &null_tech); + } + + ast_channel_internal_finalize(tmp); + + ast_atomic_fetchadd_int(&chancount, +1); ao2_link(channels, tmp); /* - * And now, since the channel structure is built, and has its name, let's - * call the manager event generator with this Newchannel event. This is the - * proper and correct place to make this call, but you sure do have to pass - * a lot of data into this func to do it here! + * And now, since the channel structure is built, and has its name, let + * the world know of its existance */ - if (ast_get_channel_tech(tech) || (tech2 && ast_get_channel_tech(tech2))) { - ast_channel_publish_snapshot(tmp); - } - - ast_channel_internal_finalize(tmp); - ast_publish_channel_state(tmp); + ast_channel_publish_snapshot(tmp); return tmp; } @@ -6376,7 +6384,7 @@ struct ast_party_connected_line connected; struct ast_party_redirecting redirecting; } exchange; - struct ast_channel *clonechan, *chans[2]; + struct ast_channel *clonechan; struct ast_channel *bridged; struct ast_format rformat; struct ast_format wformat; @@ -6458,42 +6466,6 @@ ast_debug(4, "Actually Masquerading %s(%d) into the structure of %s(%d)\n", ast_channel_name(clonechan), ast_channel_state(clonechan), ast_channel_name(original), ast_channel_state(original)); - - chans[0] = clonechan; - chans[1] = original; - /*** DOCUMENTATION - <managerEventInstance> - <synopsis>Raised when a masquerade occurs between two channels, wherein the Clone channel's internal information replaces the Original channel's information.</synopsis> - <syntax> - <parameter name="Clone"> - <para>The name of the channel whose information will be going into the Original channel.</para> - </parameter> - <parameter name="CloneUniqueid"> - <para>The uniqueid of the channel whose information will be going into the Original channel.</para> - </parameter> - <parameter name="CloneState"> - <para>The current state of the clone channel.</para> - </parameter> - <parameter name="Original"> - <para>The name of the channel whose information will be replaced by the Clone channel's information.</para> - </parameter> - <parameter name="OriginalUniqueid"> - <para>The uniqueid of the channel whose information will be replaced by the Clone channel's information.</para> - </parameter> - <parameter name="OriginalState"> - <para>The current state of the original channel.</para> - </parameter> - </syntax> - </managerEventInstance> - ***/ - ast_manager_event_multichan(EVENT_FLAG_CALL, "Masquerade", 2, chans, - "Clone: %s\r\n" - "CloneUniqueid: %s\r\n" - "CloneState: %s\r\n" - "Original: %s\r\n" - "OriginalUniqueid: %s\r\n" - "OriginalState: %s\r\n", - ast_channel_name(clonechan), ast_channel_uniqueid(clonechan), ast_state2str(ast_channel_state(clonechan)), ast_channel_name(original), ast_channel_uniqueid(original), ast_state2str(ast_channel_state(original))); /* * Remember the original read/write formats. We turn off any @@ -7549,6 +7521,7 @@ ao2_ref(channels, -1); channels = NULL; } + ast_channel_unregister(&surrogate_tech); } void ast_channels_init(void) @@ -7558,6 +7531,8 @@ if (channels) { ao2_container_register("channels", channels, prnt_channel_key); } + + ast_channel_register(&surrogate_tech); ast_stasis_channels_init(); Modified: team/dlee/ASTERISK-21969/main/channel_internal_api.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/channel_internal_api.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/channel_internal_api.c (original) +++ team/dlee/ASTERISK-21969/main/channel_internal_api.c Thu Aug 8 14:03:16 2013 @@ -193,7 +193,6 @@ unsigned short transfercapability; /*!< ISDN Transfer Capability - AST_FLAG_DIGITAL is not enough */ -/* BUGBUG the bridge pointer must change to an ast_channel_bridge pointer because it will never change while the channel is in the bridging system whereas the bridge could change. */ struct ast_bridge *bridge; /*!< Bridge this channel is participating in */ struct ast_bridge_channel *bridge_channel;/*!< The bridge_channel this channel is linked with. */ struct ast_timer *timer; /*!< timer object that provided timingfd */ @@ -426,13 +425,13 @@ if ((assert_on_null)) ast_assert(!ast_strlen_zero(value)); \ if (!strcmp(value, chan->field)) return; \ ast_string_field_set(chan, field, value); \ - if (publish) ast_channel_publish_snapshot(chan); \ + if (publish && ast_channel_internal_is_finalized(chan)) ast_channel_publish_snapshot(chan); \ } \ \ void ast_channel_##field##_build_va(struct ast_channel *chan, const char *fmt, va_list ap) \ { \ ast_string_field_build_va(chan, field, fmt, ap); \ - if (publish) ast_channel_publish_snapshot(chan); \ + if (publish && ast_channel_internal_is_finalized(chan)) ast_channel_publish_snapshot(chan); \ } \ void ast_channel_##field##_build(struct ast_channel *chan, const char *fmt, ...) \ { \ @@ -1481,7 +1480,6 @@ chan->topics = stasis_cp_single_create( ast_channel_cache_all(), topic_name); - if (!chan->topics) { return -1; } Modified: team/dlee/ASTERISK-21969/main/features.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/features.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/features.c (original) +++ team/dlee/ASTERISK-21969/main/features.c Thu Aug 8 14:03:16 2013 @@ -792,7 +792,7 @@ return res; } -/* BUGBUG this really should be made a private function of bridging_basic.c after struct ast_call_feature is made an ao2 object. */ +/* BUGBUG this really should be made a private function of bridge_basic.c after struct ast_call_feature is made an ao2 object. */ int ast_bridge_channel_setup_features(struct ast_bridge_channel *bridge_channel) { int res = 0; Modified: team/dlee/ASTERISK-21969/main/manager_bridges.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/manager_bridges.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/manager_bridges.c (original) +++ team/dlee/ASTERISK-21969/main/manager_bridges.c Thu Aug 8 14:03:16 2013 @@ -381,7 +381,7 @@ } snapshot = stasis_message_data(msg); - if (snapshot->tech_properties & (AST_CHAN_TP_ANNOUNCER | AST_CHAN_TP_RECORDER)) { + if (snapshot->tech_properties & AST_CHAN_TP_INTERNAL) { return 0; } Modified: team/dlee/ASTERISK-21969/main/manager_channels.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/manager_channels.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/manager_channels.c (original) +++ team/dlee/ASTERISK-21969/main/manager_channels.c Thu Aug 8 14:03:16 2013 @@ -383,7 +383,7 @@ return NULL; } - if (snapshot->tech_properties & (AST_CHAN_TP_ANNOUNCER | AST_CHAN_TP_RECORDER)) { + if (snapshot->tech_properties & AST_CHAN_TP_INTERNAL) { ast_free(out); return NULL; } Modified: team/dlee/ASTERISK-21969/main/utils.c URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-21969/main/utils.c?view=diff&rev=396415&r1=396414&r2=396415 ============================================================================== --- team/dlee/ASTERISK-21969/main/utils.c (original) +++ team/dlee/ASTERISK-21969/main/utils.c Thu Aug 8 14:03:16 2013 @@ -862,7 +862,8 @@ for (frame_iterator = 0; frame_iterator < num_frames; ++frame_iterator) { ast_str_append(str, 0, "\t%s\n", symbols[frame_iterator]); } - +/* Prevent MALLOC_DEBUG from complaining */ +#undef free free(symbols); } else { ast_str_append(str, 0, "\tCouldn't retrieve backtrace symbols\n"); -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits
