commit -- fix stash pop err
This commit is contained in:
parent
4950c32dd5
commit
63b2654b54
|
@ -119,7 +119,6 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
||||||
|
|
||||||
chan_id = atoi(szchanid);
|
chan_id = atoi(szchanid);
|
||||||
|
|
||||||
|
|
||||||
if (ftdm_span_find_by_name(span_name, &span) == FTDM_SUCCESS) {
|
if (ftdm_span_find_by_name(span_name, &span) == FTDM_SUCCESS) {
|
||||||
span_id = ftdm_span_get_id(span);
|
span_id = ftdm_span_get_id(span);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -542,6 +542,12 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
||||||
else {
|
else {
|
||||||
/* context already present */
|
/* context already present */
|
||||||
memcpy(new_ctxtId, &inc_cmd->contextId,sizeof(MgMgcoContextId));
|
memcpy(new_ctxtId, &inc_cmd->contextId,sizeof(MgMgcoContextId));
|
||||||
|
mg_ctxt = megaco_get_context(mg_profile, inc_cmd->contextId.val.val);
|
||||||
|
if(NULL == mg_ctxt){
|
||||||
|
mg_util_set_err_string(&errTxt, " Resource Failure ");
|
||||||
|
err_code = MGT_MGCO_RSP_CODE_RSRC_ERROR;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
|
@ -565,6 +571,17 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
||||||
/* allocate rtp term and associated the same to context */
|
/* allocate rtp term and associated the same to context */
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
}else{ /* Physical termination */
|
}else{ /* Physical termination */
|
||||||
|
printf("termId->name.lcl.val[%s]\n",termId->name.lcl.val);
|
||||||
|
term = megaco_find_termination(mg_profile, (char*)termId->name.lcl.val);
|
||||||
|
|
||||||
|
if(NULL == term){
|
||||||
|
mg_util_set_err_string(&errTxt, " Resource Failure ");
|
||||||
|
err_code = MGT_MGCO_RSP_CODE_RSRC_ERROR;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO," Allocated Termination[%p] with term name[%s]\n", (void*)term, term->name);
|
||||||
|
|
||||||
|
|
||||||
/* get physical termination */
|
/* get physical termination */
|
||||||
}
|
}
|
||||||
|
@ -672,9 +689,10 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
||||||
MgMgcoLocalDesc *local;
|
MgMgcoLocalDesc *local;
|
||||||
CmSdpInfoSet *psdp;
|
CmSdpInfoSet *psdp;
|
||||||
char* ipAddress[4];// = "192.168.1.1";
|
char* ipAddress[4];// = "192.168.1.1";
|
||||||
|
char* dup = strdup((char*)term->u.rtp.local_addr);
|
||||||
MgMgcoMediaDesc* media = &desc->u.media;
|
MgMgcoMediaDesc* media = &desc->u.media;
|
||||||
|
|
||||||
switch_split((char*)term->u.rtp.local_addr,'.',ipAddress);
|
switch_split(dup,'.',ipAddress);
|
||||||
|
|
||||||
printf("ipAddress[0]=%s, ipAddress[1]=%s, ipAddress[2]=%s,ipAddress[3]=%s\n",ipAddress[0],ipAddress[1],ipAddress[2],ipAddress[3]);
|
printf("ipAddress[0]=%s, ipAddress[1]=%s, ipAddress[2]=%s,ipAddress[3]=%s\n",ipAddress[0],ipAddress[1],ipAddress[2],ipAddress[3]);
|
||||||
|
|
||||||
|
@ -812,8 +830,7 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
||||||
MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.type),CM_SDP_PORT_INT);
|
MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.type),CM_SDP_PORT_INT);
|
||||||
MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.u.portInt.pres),1);
|
MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.u.portInt.pres),1);
|
||||||
MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.u.portInt.port.type), CM_SDP_SPEC);
|
MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.u.portInt.port.type), CM_SDP_SPEC);
|
||||||
//MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.u.portInt.port.val), term->u.rtp.local_port);
|
MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.u.portInt.port.val), term->u.rtp.local_port);
|
||||||
MG_INIT_TOKEN_VALUE(&(media->field.id.u.port.u.portInt.port.val), 2904);
|
|
||||||
|
|
||||||
if (mgUtlGrowList((void ***)&media->field.par.pflst, sizeof(CmSdpMedProtoFmts),
|
if (mgUtlGrowList((void ***)&media->field.par.pflst, sizeof(CmSdpMedProtoFmts),
|
||||||
&media->field.par.numProtFmts, &rsp.u.mgCmdRsp[0]->memCp) != ROK)
|
&media->field.par.numProtFmts, &rsp.u.mgCmdRsp[0]->memCp) != ROK)
|
||||||
|
@ -852,6 +869,8 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
||||||
MG_INIT_TOKEN_VALUE(&(media->attrSet.attr[0]->u.ptime), term->u.rtp.ptime);
|
MG_INIT_TOKEN_VALUE(&(media->attrSet.attr[0]->u.ptime), term->u.rtp.ptime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(dup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -431,6 +431,8 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Received unknown command [%s] in event.\n", !command ? "null" : command);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Received unknown command [%s] in event.\n", !command ? "null" : command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
|
static switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
|
||||||
|
|
Loading…
Reference in New Issue