[asterisk-commits] kmoore: branch kmoore/stasis-channel_events-take2 r384811 - in /team/kmoore/s...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 5 09:58:20 CDT 2013


Author: kmoore
Date: Fri Apr  5 09:58:17 2013
New Revision: 384811

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384811
Log:
move the string container to strings.c/h

Modified:
    team/kmoore/stasis-channel_events-take2/apps/app_stasis.c
    team/kmoore/stasis-channel_events-take2/include/asterisk/astobj2.h
    team/kmoore/stasis-channel_events-take2/include/asterisk/strings.h
    team/kmoore/stasis-channel_events-take2/main/astobj2.c
    team/kmoore/stasis-channel_events-take2/main/strings.c

Modified: team/kmoore/stasis-channel_events-take2/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-channel_events-take2/apps/app_stasis.c?view=diff&rev=384811&r1=384810&r2=384811
==============================================================================
--- team/kmoore/stasis-channel_events-take2/apps/app_stasis.c (original)
+++ team/kmoore/stasis-channel_events-take2/apps/app_stasis.c Fri Apr  5 09:58:17 2013
@@ -142,7 +142,7 @@
 	app->handler = handler;
 	app->data = data;
 
-	app->channels = ao2_str_container_alloc(APP_CHANNELS_BUCKETS);
+	app->channels = ast_str_container_alloc(APP_CHANNELS_BUCKETS);
 	if (!app->channels) {
 		return NULL;
 	}

Modified: team/kmoore/stasis-channel_events-take2/include/asterisk/astobj2.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-channel_events-take2/include/asterisk/astobj2.h?view=diff&rev=384811&r1=384810&r2=384811
==============================================================================
--- team/kmoore/stasis-channel_events-take2/include/asterisk/astobj2.h (original)
+++ team/kmoore/stasis-channel_events-take2/include/asterisk/astobj2.h Fri Apr  5 09:58:17 2013
@@ -1884,12 +1884,4 @@
 #endif
 void ao2_iterator_cleanup(struct ao2_iterator *iter);
 
-/*!
- * \since 12
- * \brief Allocates a hash container for bare strings
- * \retval AO2 container for strings
- * \retval NULL if allocation failed
- */
-struct ao2_container *ao2_str_container_alloc(int buckets);
-
 #endif /* _ASTERISK_ASTOBJ2_H */

Modified: team/kmoore/stasis-channel_events-take2/include/asterisk/strings.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-channel_events-take2/include/asterisk/strings.h?view=diff&rev=384811&r1=384810&r2=384811
==============================================================================
--- team/kmoore/stasis-channel_events-take2/include/asterisk/strings.h (original)
+++ team/kmoore/stasis-channel_events-take2/include/asterisk/strings.h Fri Apr  5 09:58:17 2013
@@ -1013,4 +1013,12 @@
 	return abs(hash);
 }
 
+/*!
+ * \since 12
+ * \brief Allocates a hash container for bare strings
+ * \retval AO2 container for strings
+ * \retval NULL if allocation failed
+ */
+struct ao2_container *ast_str_container_alloc(int buckets);
+
 #endif /* _ASTERISK_STRINGS_H */

Modified: team/kmoore/stasis-channel_events-take2/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-channel_events-take2/main/astobj2.c?view=diff&rev=384811&r1=384810&r2=384811
==============================================================================
--- team/kmoore/stasis-channel_events-take2/main/astobj2.c (original)
+++ team/kmoore/stasis-channel_events-take2/main/astobj2.c Fri Apr  5 09:58:17 2013
@@ -5715,17 +5715,3 @@
 	return 0;
 }
 
-static int str_hash(const void *obj, const int flags)
-{
-	return ast_str_hash(obj);
-}
-
-static int str_cmp(void *lhs, void *rhs, int flags)
-{
-	return strcmp(lhs, rhs) ? 0 : CMP_MATCH;
-}
-
-struct ao2_container *ao2_str_container_alloc(int buckets)
-{
-	return ao2_container_alloc(buckets, str_hash, str_cmp);
-}

Modified: team/kmoore/stasis-channel_events-take2/main/strings.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-channel_events-take2/main/strings.c?view=diff&rev=384811&r1=384810&r2=384811
==============================================================================
--- team/kmoore/stasis-channel_events-take2/main/strings.c (original)
+++ team/kmoore/stasis-channel_events-take2/main/strings.c Fri Apr  5 09:58:17 2013
@@ -160,3 +160,17 @@
 	return (*buf)->__AST_STR_STR;
 }
 
+static int str_hash(const void *obj, const int flags)
+{
+	return ast_str_hash(obj);
+}
+
+static int str_cmp(void *lhs, void *rhs, int flags)
+{
+	return strcmp(lhs, rhs) ? 0 : CMP_MATCH;
+}
+
+struct ao2_container *ast_str_container_alloc(int buckets)
+{
+	return ao2_container_alloc(buckets, str_hash, str_cmp);
+}




More information about the asterisk-commits mailing list