[svn-commits] mmichelson: branch group/CCSS r229668 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Nov 12 09:55:57 CST 2009


Author: mmichelson
Date: Thu Nov 12 09:55:54 2009
New Revision: 229668

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=229668
Log:
Change some stupid logic to not be so stupid.


Modified:
    team/group/CCSS/channels/chan_sip.c

Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=229668&r1=229667&r2=229668
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Thu Nov 12 09:55:54 2009
@@ -1735,14 +1735,6 @@
 };
 
 /*!
- * \brief call-completion event state compositor
- *
- * The container is of sip_esc_entries. These can
- * be looked up by their entity ID.
- */
-struct ao2_container *cc_esc;
-
-/*!
  * \brief The Event State Compositors
  *
  * An Event State Compositor is an entity which
@@ -1757,9 +1749,9 @@
 static struct event_state_compositor {
 	enum subscriptiontype event;
 	const char * name;
-	struct ao2_container **compositor;
+	struct ao2_container *compositor;
 } event_state_compositors [] = {
-	{CALL_COMPLETION, "call-completion", &cc_esc},
+	{CALL_COMPLETION, "call-completion", },
 };
 
 static const int ESC_MAX_BUCKETS = 37;
@@ -1804,7 +1796,7 @@
 	struct sip_esc_entry *entry;
 	struct sip_esc_entry finder = { .entity_id = (char *)entity_id };
 
-	entry = ao2_find(*esc->compositor, &finder, OBJ_POINTER);
+	entry = ao2_find(esc->compositor, &finder, OBJ_POINTER);
 
 	return entry;
 }
@@ -1862,7 +1854,7 @@
 	/* XXX Need to bump refcount here. Scheduler will have a reference */
 	esc_entry->sched_id = ast_sched_add(sched, expires_ms, publish_expire, esc_entry);
 
-	ao2_link(*esc->compositor, esc_entry);
+	ao2_link(esc->compositor, esc_entry);
 	return esc_entry;
 }
 
@@ -1870,7 +1862,7 @@
 {
 	int i, res = 0;
 	for (i = 0; i < ARRAY_LEN(event_state_compositors); i++) {
-		if (!((*event_state_compositors[i].compositor) = 
+		if (!((event_state_compositors[i].compositor) = 
 					ao2_container_alloc(ESC_MAX_BUCKETS, esc_hash_fn, esc_cmp_fn))) {
 			res = -1;
 		}
@@ -22518,6 +22510,7 @@
 	 * goes away automatically. Now, there of course may be specific actions to be taken by ESCs as a result of receiving
 	 * a PUBLISH remove request.
 	 */
+
 	/* XXX STUB */
 	return 0;
 }




More information about the svn-commits mailing list