[asterisk-commits] irroot: branch irroot/t38gateway-1.8 r321756 - in /team/irroot/t38gateway-1.8...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 3 13:55:16 CDT 2011
Author: irroot
Date: Fri Jun 3 13:55:12 2011
New Revision: 321756
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321756
Log:
Fixup Merge
Modified:
team/irroot/t38gateway-1.8/ (props changed)
team/irroot/t38gateway-1.8/cel/cel_odbc.c (props changed)
team/irroot/t38gateway-1.8/configs/cel_odbc.conf.sample (props changed)
team/irroot/t38gateway-1.8/configs/queues.conf.sample
team/irroot/t38gateway-1.8/configure
team/irroot/t38gateway-1.8/contrib/realtime/mysql/iaxfriends.sql (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/mysql/meetme.sql (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/mysql/sipfriends.sql (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/mysql/voicemail.sql (props changed)
team/irroot/t38gateway-1.8/contrib/realtime/postgresql/realtime.sql (props changed)
team/irroot/t38gateway-1.8/sounds/Makefile (props changed)
team/irroot/t38gateway-1.8/tests/test_astobj2.c
Propchange: team/irroot/t38gateway-1.8/
------------------------------------------------------------------------------
automerge = *
Propchange: team/irroot/t38gateway-1.8/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,4 +1,4 @@
/be/branches/C.3:256426
-/branches/1.8:318979-321681
+/branches/1.8:318979-321755
/team/irroot/distrotech-customers-1.8:319062-319063
/team/irroot/t38gateway-trunk:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/cel/cel_odbc.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,5 +1,5 @@
/be/branches/C.3/cel/cel_adaptive_odbc.c:256426
-/branches/1.8/cel/cel_odbc.c:318979-321681
+/branches/1.8/cel/cel_odbc.c:318979-321755
/team/irroot/distrotech-customers-1.8/cel/cel_odbc.c:319062-319063,321553
/team/irroot/distrotech-customers-trunk/cel/cel_odbc.c:321552
/team/irroot/t38gateway-trunk/cel/cel_odbc.c:318977-319016,319067,319070-319071,320879-321512,321514-321541
Propchange: team/irroot/t38gateway-1.8/configs/cel_odbc.conf.sample
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,5 +1,5 @@
/be/branches/C.3/configs/cel_adaptive_odbc.conf.sample:256426
-/branches/1.8/configs/cel_odbc.conf.sample:318979-321681
+/branches/1.8/configs/cel_odbc.conf.sample:318979-321755
/team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample:319062-319063,321553
/team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample:321552
/team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample:318977-319016,319067,319070-319071,320879-321512,321514-321541
Modified: team/irroot/t38gateway-1.8/configs/queues.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/configs/queues.conf.sample?view=diff&rev=321756&r1=321755&r2=321756
==============================================================================
--- team/irroot/t38gateway-1.8/configs/queues.conf.sample (original)
+++ team/irroot/t38gateway-1.8/configs/queues.conf.sample Fri Jun 3 13:55:12 2011
@@ -318,6 +318,8 @@
;queue-callswaiting = queue-callswaiting
; ("The current est. holdtime is")
;queue-holdtime = queue-holdtime
+ ; ("minute.")
+;queue-minute = queue-minute
; ("minutes.")
;queue-minutes = queue-minutes
; ("seconds.")
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/mysql/iaxfriends.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,4 +1,4 @@
-/branches/1.8/contrib/realtime/mysql/iaxfriends.sql:318979-321681
+/branches/1.8/contrib/realtime/mysql/iaxfriends.sql:318979-321755
/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/iaxfriends.sql:319062-319063,321553
/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/iaxfriends.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/mysql/iaxfriends.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/mysql/meetme.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,4 +1,4 @@
-/branches/1.8/contrib/realtime/mysql/meetme.sql:318979-321681
+/branches/1.8/contrib/realtime/mysql/meetme.sql:318979-321755
/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/meetme.sql:319062-319063,321553
/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/meetme.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/mysql/meetme.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/mysql/sipfriends.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,4 +1,4 @@
-/branches/1.8/contrib/realtime/mysql/sipfriends.sql:318979-321681
+/branches/1.8/contrib/realtime/mysql/sipfriends.sql:318979-321755
/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/sipfriends.sql:319062-319063,321553
/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/sipfriends.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/mysql/sipfriends.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/mysql/voicemail.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,4 +1,4 @@
-/branches/1.8/contrib/realtime/mysql/voicemail.sql:318979-321681
+/branches/1.8/contrib/realtime/mysql/voicemail.sql:318979-321755
/team/irroot/distrotech-customers-1.8/contrib/realtime/mysql/voicemail.sql:319062-319063,321553
/team/irroot/distrotech-customers-trunk/contrib/realtime/mysql/voicemail.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/mysql/voicemail.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/contrib/realtime/postgresql/realtime.sql
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,4 +1,4 @@
-/branches/1.8/contrib/realtime/postgresql/realtime.sql:318979-321681
+/branches/1.8/contrib/realtime/postgresql/realtime.sql:318979-321755
/team/irroot/distrotech-customers-1.8/contrib/realtime/postgresql/realtime.sql:319062-319063,321553
/team/irroot/distrotech-customers-trunk/contrib/realtime/postgresql/realtime.sql:321552
/team/irroot/t38gateway-trunk/contrib/realtime/postgresql/realtime.sql:318977-319016,319067,319070-319071,320879
Propchange: team/irroot/t38gateway-1.8/sounds/Makefile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 3 13:55:12 2011
@@ -1,5 +1,5 @@
/be/branches/C.3/sounds/Makefile:256426
-/branches/1.8/sounds/Makefile:318979-321681
+/branches/1.8/sounds/Makefile:318979-321755
/team/irroot/distrotech-customers-1.8/sounds/Makefile:319062-319063,321553
/team/irroot/distrotech-customers-trunk/sounds/Makefile:321552
/team/irroot/t38gateway-trunk/sounds/Makefile:318977-319016,319067,319070-319071,320879-321512,321514-321541
Modified: team/irroot/t38gateway-1.8/tests/test_astobj2.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/tests/test_astobj2.c?view=diff&rev=321756&r1=321755&r2=321756
==============================================================================
--- team/irroot/t38gateway-1.8/tests/test_astobj2.c (original)
+++ team/irroot/t38gateway-1.8/tests/test_astobj2.c Fri Jun 3 13:55:12 2011
@@ -364,16 +364,148 @@
return res;
}
+AST_TEST_DEFINE(astobj2_test_2)
+{
+ int res = AST_TEST_PASS;
+ struct ao2_container *c;
+ struct ao2_iterator i;
+ struct test_obj *obj;
+ int num;
+ static const int NUM_OBJS = 5;
+ int destructor_count = NUM_OBJS;
+ struct test_obj tmp_obj = { "", };
+
+ switch (cmd) {
+ case TEST_INIT:
+ info->name = "astobj2_test2";
+ info->category = "/main/astobj2/";
+ info->summary = "Test a certain scenario using ao2 iterators";
+ info->description =
+ "This test is aimed at testing for a specific regression that occurred. "
+ "Add some objects into a container. Mix finds and iteration and make "
+ "sure that the iterator still sees all objects.";
+ return AST_TEST_NOT_RUN;
+ case TEST_EXECUTE:
+ break;
+ }
+
+ c = ao2_container_alloc(1, NULL, test_cmp_cb);
+ if (!c) {
+ ast_test_status_update(test, "ao2_container_alloc failed.\n");
+ res = AST_TEST_FAIL;
+ goto cleanup;
+ }
+
+ for (num = 1; num <= NUM_OBJS; num++) {
+ if (!(obj = ao2_alloc(sizeof(struct test_obj), test_obj_destructor))) {
+ ast_test_status_update(test, "ao2_alloc failed.\n");
+ res = AST_TEST_FAIL;
+ goto cleanup;
+ }
+ obj->destructor_count = &destructor_count;
+ obj->i = num;
+ ao2_link(c, obj);
+ ao2_ref(obj, -1);
+ if (ao2_container_count(c) != num) {
+ ast_test_status_update(test, "container did not link correctly\n");
+ res = AST_TEST_FAIL;
+ }
+ }
+
+ /*
+ * Iteration take 1. Just make sure we see all NUM_OBJS objects.
+ */
+ num = 0;
+ i = ao2_iterator_init(c, 0);
+ while ((obj = ao2_iterator_next(&i))) {
+ num++;
+ ao2_ref(obj, -1);
+ }
+ ao2_iterator_destroy(&i);
+
+ if (num != NUM_OBJS) {
+ ast_test_status_update(test, "iterate take 1, expected '%d', only saw '%d' objects\n",
+ NUM_OBJS, num);
+ res = AST_TEST_FAIL;
+ }
+
+ /*
+ * Iteration take 2. Do a find for the last object, then iterate and make
+ * sure we find all NUM_OBJS objects.
+ */
+ tmp_obj.i = NUM_OBJS;
+ obj = ao2_find(c, &tmp_obj, OBJ_POINTER);
+ if (!obj) {
+ ast_test_status_update(test, "ao2_find() failed.\n");
+ res = AST_TEST_FAIL;
+ } else {
+ ao2_ref(obj, -1);
+ }
+
+ num = 0;
+ i = ao2_iterator_init(c, 0);
+ while ((obj = ao2_iterator_next(&i))) {
+ num++;
+ ao2_ref(obj, -1);
+ }
+ ao2_iterator_destroy(&i);
+
+ if (num != NUM_OBJS) {
+ ast_test_status_update(test, "iterate take 2, expected '%d', only saw '%d' objects\n",
+ NUM_OBJS, num);
+ res = AST_TEST_FAIL;
+ }
+
+ /*
+ * Iteration take 3. Do a find for an object while in the middle
+ * of iterating;
+ */
+ num = 0;
+ i = ao2_iterator_init(c, 0);
+ while ((obj = ao2_iterator_next(&i))) {
+ if (num == 1) {
+ struct test_obj *obj2;
+ tmp_obj.i = NUM_OBJS - 1;
+ obj2 = ao2_find(c, &tmp_obj, OBJ_POINTER);
+ if (!obj2) {
+ ast_test_status_update(test, "ao2_find() failed.\n");
+ res = AST_TEST_FAIL;
+ } else {
+ ao2_ref(obj2, -1);
+ }
+ }
+ num++;
+ ao2_ref(obj, -1);
+ }
+ ao2_iterator_destroy(&i);
+
+ if (num != NUM_OBJS) {
+ ast_test_status_update(test, "iterate take 3, expected '%d', only saw '%d' objects\n",
+ NUM_OBJS, num);
+ res = AST_TEST_FAIL;
+ }
+
+
+cleanup:
+ if (c) {
+ ao2_ref(c, -1);
+ }
+
+ return res;
+}
+
static int unload_module(void)
{
AST_TEST_UNREGISTER(astobj2_test_1);
+ AST_TEST_UNREGISTER(astobj2_test_2);
return 0;
}
static int load_module(void)
{
AST_TEST_REGISTER(astobj2_test_1);
+ AST_TEST_REGISTER(astobj2_test_2);
return AST_MODULE_LOAD_SUCCESS;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "ASTOBJ2 Unit Test");
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "ASTOBJ2 Unit Tests");
More information about the asterisk-commits
mailing list