mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
Merged revisions 38903-38904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38903 | russell | 2006-08-05 01:07:39 -0400 (Sat, 05 Aug 2006) | 2 lines suppress a compiler warning about the usage of a potentially uninitialized variable ........ r38904 | russell | 2006-08-05 01:08:50 -0400 (Sat, 05 Aug 2006) | 10 lines Fix an issue that would cause a NewCallerID manager event to be generated before the channel's NewChannel event. This was due to a somewhat recent change that included using ast_set_callerid() where it wasn't before. This function should not be used in the channel driver "new" functions. (issue #7654, fixed by me) Also, fix a couple minor bugs in usecount handling. chan_iax2 could have increased the usecount but then returned an error. The place where chan_sip increased the usecount did not call ast_update_usecount() ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -864,7 +864,13 @@ static struct ast_channel *phone_new(struct phone_pvt *i, int state, char *conte
|
||||
strncpy(tmp->exten, "s", sizeof(tmp->exten) - 1);
|
||||
if (!ast_strlen_zero(i->language))
|
||||
ast_string_field_set(tmp, language, i->language);
|
||||
ast_set_callerid(tmp, i->cid_num, i->cid_name, i->cid_num);
|
||||
|
||||
/* Don't use ast_set_callerid() here because it will
|
||||
* generate a NewCallerID event before the NewChannel event */
|
||||
tmp->cid.cid_num = ast_strdup(i->cid_num);
|
||||
tmp->cid.cid_ani = ast_strdup(i->cid_num);
|
||||
tmp->cid.cid_name = ast_strdup(i->cid_name);
|
||||
|
||||
i->owner = tmp;
|
||||
ast_mutex_lock(&usecnt_lock);
|
||||
usecnt++;
|
||||
|
Reference in New Issue
Block a user