From: Kapil Gupta Date: Fri, 10 Aug 2012 16:23:03 +0000 (-0400) Subject: fixing issue X-Git-Tag: v1.2.3^2~71^2^2~72^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb0187ba9462db626c02dae4925036f20b6e5cfb;p=thirdparty%2Ffreeswitch.git fixing issue --- diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway.c b/src/mod/endpoints/mod_media_gateway/media_gateway.c index 3590762cb5..3b12dadfeb 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway.c @@ -143,6 +143,7 @@ switch_status_t megaco_activate_termination(mg_termination_t *term) /* A UUID is present, check if the channel still exists */ switch_core_session_t *session; if ((session = switch_core_session_locate(term->uuid))) { + switch_channel_t *channel = switch_core_session_get_channel(session); switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "command", "media_modify"); switch_core_session_receive_event(session, &var_event); @@ -373,6 +374,7 @@ void megaco_termination_destroy(mg_termination_t *term) free(term->active_events); term->active_events = NULL; } + term->context = NULL; switch_clear_flag(term, MGT_ALLOCATED); switch_clear_flag(term, MGT_ACTIVE); @@ -412,6 +414,7 @@ switch_status_t megaco_context_add_termination(mg_context_t *ctx, mg_termination return SWITCH_STATUS_FALSE; } + term->context = ctx; if (ctx->terminations[0]) { ctx->terminations[1] = term; } else if (ctx->terminations[1]) {