[asterisk-commits] russell: branch russell/chan_refcount r82342 - in /team/russell/chan_refcount...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 13 14:54:01 CDT 2007
Author: russell
Date: Thu Sep 13 14:54:00 2007
New Revision: 82342
URL: http://svn.digium.com/view/asterisk?view=rev&rev=82342
Log:
add ast_channel_callback() which runs an ao2_callback on the channels container
Modified:
team/russell/chan_refcount/include/asterisk/channel.h
team/russell/chan_refcount/main/channel.c
Modified: team/russell/chan_refcount/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/include/asterisk/channel.h?view=diff&rev=82342&r1=82341&r2=82342
==============================================================================
--- team/russell/chan_refcount/include/asterisk/channel.h (original)
+++ team/russell/chan_refcount/include/asterisk/channel.h Thu Sep 13 14:54:00 2007
@@ -1520,6 +1520,13 @@
struct ast_channel *ast_channel_iterator_next(struct ast_channel_iterator *i);
+
+/*!
+ * \brief Call a function with every active channel
+ */
+void ast_channel_callback(ao2_callback_fn *cb_fn, void *arg);
+
+
struct ast_channel *ast_channel_get_by_name(const char *name);
struct ast_channel *ast_channel_get_by_name_prefix(const char *name, size_t name_len);
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=82342&r1=82341&r2=82342
==============================================================================
--- team/russell/chan_refcount/main/channel.c (original)
+++ team/russell/chan_refcount/main/channel.c Thu Sep 13 14:54:00 2007
@@ -1138,6 +1138,11 @@
return channel_find_locked(chan, NULL, 0, context, exten);
}
#endif
+
+void ast_channel_callback(ao2_callback_fn *cb_fn, void *arg)
+{
+ ao2_callback(channels, OBJ_NODATA, cb_fn, arg);
+}
struct ast_channel_iterator {
struct ao2_iterator i;
More information about the asterisk-commits
mailing list