[asterisk-commits] file: trunk r174844 - /trunk/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 11 08:44:47 CST 2009


Author: file
Date: Wed Feb 11 08:44:47 2009
New Revision: 174844

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=174844
Log:
Tell the device state core a change happened when a channel is freed but not a specific state.
We need to do this because while we know that the freeing of the channel may cause something to become
not in use we do not know this for sure. There may be another channel that is still up which would cause
it to be in use.
(closes issue #13238)
Reported by: kowalma
Patches:
      20090121__bug13238.diff.txt uploaded by Corydon76 (license 14)
Tested by: alecdavis

Modified:
    trunk/main/channel.c

Modified: trunk/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/channel.c?view=diff&rev=174844&r1=174843&r2=174844
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Wed Feb 11 08:44:47 2009
@@ -1410,7 +1410,10 @@
 	ast_free(chan);
 	AST_RWLIST_UNLOCK(&channels);
 
-	ast_devstate_changed_literal(AST_DEVICE_NOT_INUSE, name);
+	/* Queue an unknown state, because, while we know that this particular
+	 * instance is dead, we don't know the state of all other possible
+	 * instances. */
+	ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, name);
 }
 
 struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid)




More information about the asterisk-commits mailing list