[asterisk-commits] russell: branch russell/chan_refcount r82357 - /team/russell/chan_refcount/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 13 17:45:20 CDT 2007
Author: russell
Date: Thu Sep 13 17:45:20 2007
New Revision: 82357
URL: http://svn.digium.com/view/asterisk?view=rev&rev=82357
Log:
convert a use of finding a channel
Modified:
team/russell/chan_refcount/main/devicestate.c
Modified: team/russell/chan_refcount/main/devicestate.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/main/devicestate.c?view=diff&rev=82357&r1=82356&r2=82357
==============================================================================
--- team/russell/chan_refcount/main/devicestate.c (original)
+++ team/russell/chan_refcount/main/devicestate.c Thu Sep 13 17:45:20 2007
@@ -258,9 +258,8 @@
ast_copy_string(match, device, sizeof(match)-1);
strcat(match, "-");
- chan = ast_get_channel_by_name_prefix_locked(match, strlen(match));
-
- if (!chan)
+
+ if (!(chan = ast_channel_get_by_name_prefix(match, strlen(match))))
return AST_DEVICE_UNKNOWN;
if (chan->_state == AST_STATE_RINGING)
@@ -268,7 +267,7 @@
else
res = AST_DEVICE_INUSE;
- ast_channel_unlock(chan);
+ ast_channel_unref(chan);
return res;
}
More information about the asterisk-commits
mailing list