(closes issue #10437)

Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-08-13 14:18:04 +00:00
parent d0489c9f50
commit 9a35428295
11 changed files with 1 additions and 29 deletions

View File

@@ -1008,9 +1008,7 @@ static struct ast_channel *oss_new(struct chan_oss_pvt *o, char *ext, char *ctx,
ast_string_field_set(c, language, o->language);
/* Don't use ast_set_callerid() here because it will
* generate a needless NewCallerID event */
c->cid.cid_num = ast_strdup(o->cid_num);
c->cid.cid_ani = ast_strdup(o->cid_num);
c->cid.cid_name = ast_strdup(o->cid_name);
if (!ast_strlen_zero(ext))
c->cid.cid_dnid = ast_strdup(ext);