[asterisk-commits] russell: branch russell/chan_refcount r99640 - /team/russell/chan_refcount/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 22 13:34:11 CST 2008
Author: russell
Date: Tue Jan 22 13:34:11 2008
New Revision: 99640
URL: http://svn.digium.com/view/asterisk?view=rev&rev=99640
Log:
Re-hash the channel on ast_change_name()
Modified:
team/russell/chan_refcount/main/channel.c
Change Statistics:
0 files changed
Modified: team/russell/chan_refcount/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/main/channel.c?view=diff&rev=99640&r1=99639&r2=99640
==============================================================================
--- team/russell/chan_refcount/main/channel.c (original)
+++ team/russell/chan_refcount/main/channel.c Tue Jan 22 13:34:11 2008
@@ -3423,8 +3423,14 @@
void ast_change_name(struct ast_channel *chan, char *newname)
{
+ ast_channel_lock(chan);
manager_event(EVENT_FLAG_CALL, "Rename", "Channel: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", chan->name, newname, chan->uniqueid);
ast_string_field_set(chan, name, newname);
+ ast_channel_unlock(chan);
+
+ /* Re-link, so that the hash value gets re-calculated */
+ ao2_unlink(channels, chan);
+ ao2_link(channels, chan);
}
void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_channel *child)
More information about the asterisk-commits
mailing list