Fix segfault on answer.

Only update/change RTP source if RTP has already been started and 
connected to the subchannel.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Damien Wedhorn 2011-12-22 21:12:57 +00:00
parent cf0c9830bf
commit 48f9a8f668
1 changed files with 6 additions and 2 deletions

View File

@ -4812,10 +4812,14 @@ static int skinny_indicate(struct ast_channel *ast, int ind, const void *data, s
case AST_CONTROL_PROCEEDING:
break;
case AST_CONTROL_SRCUPDATE:
ast_rtp_instance_update_source(sub->rtp);
if (sub->rtp) {
ast_rtp_instance_update_source(sub->rtp);
}
break;
case AST_CONTROL_SRCCHANGE:
ast_rtp_instance_change_source(sub->rtp);
if (sub->rtp) {
ast_rtp_instance_change_source(sub->rtp);
}
break;
case AST_CONTROL_CONNECTED_LINE:
update_connectedline(sub, data, datalen);