/ checks to if owner is set before using it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4751 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
9da2a64cda
commit
8da3b166d6
1 changed files with 13 additions and 7 deletions
|
@ -979,6 +979,7 @@ static inline int monitor_handle_notowned(struct vpb_pvt *p, VPB_EVENT *e)
|
|||
p->callerid[p->dtmf_caller_pos] = '\0';
|
||||
if (option_verbose > 2)
|
||||
ast_verbose(VERBOSE_PREFIX_3 " %s: DTMF CallerID %s\n",p->dev,p->callerid);
|
||||
if (owner){
|
||||
if (owner->cid.cid_num)
|
||||
free(owner->cid.cid_num);
|
||||
owner->cid.cid_num=NULL;
|
||||
|
@ -986,6 +987,11 @@ static inline int monitor_handle_notowned(struct vpb_pvt *p, VPB_EVENT *e)
|
|||
free(owner->cid.cid_name);
|
||||
owner->cid.cid_name=NULL;
|
||||
owner->cid.cid_num = strdup(p->callerid);
|
||||
}
|
||||
else {
|
||||
if (option_verbose > 2)
|
||||
ast_verbose(VERBOSE_PREFIX_3 " %s: DTMF CallerID: no owner to assign CID \n",p->dev);
|
||||
}
|
||||
} else if ( p->dtmf_caller_pos < AST_MAX_EXTENSION ) {
|
||||
if ( p->dtmf_caller_pos >= 0 )
|
||||
p->callerid[p->dtmf_caller_pos] = e->data;
|
||||
|
|
Reference in a new issue