[asterisk-commits] rmudgett: trunk r329335 - in /trunk: ./ main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 22 16:15:32 CDT 2011
Author: rmudgett
Date: Fri Jul 22 16:15:28 2011
New Revision: 329335
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=329335
Log:
Merged revisions 329334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
........
r329334 | rmudgett | 2011-07-22 16:14:22 -0500 (Fri, 22 Jul 2011) | 1 line
Make use less redundant loop construct for iterating over hints.
........
Modified:
trunk/ (props changed)
trunk/main/pbx.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-10-merged (original)
+++ branch-10-merged Fri Jul 22 16:15:28 2011
@@ -1,1 +1,1 @@
-/branches/10:1-328075,328120,328162,328207,328247,328317,328329,328428-328429,328448,328451,328541,328609,328611,328664,328717,328771,328824,328879,328936,328992,329055,329145,329200,329204,329257,329331
+/branches/10:1-328075,328120,328162,328207,328247,328317,328329,328428-328429,328448,328451,328541,328609,328611,328664,328717,328771,328824,328879,328936,328992,329055,329145,329200,329204,329257,329331,329334
Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=329335&r1=329334&r2=329335
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Fri Jul 22 16:15:28 2011
@@ -6084,7 +6084,7 @@
ast_cli(a->fd, "\n -= Registered Asterisk Dial Plan Hints =-\n");
i = ao2_iterator_init(hints, 0);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
ao2_lock(hint);
if (!hint->exten) {
/* The extension has already been destroyed */
@@ -6123,7 +6123,7 @@
/* walk through all hints */
i = ao2_iterator_init(hints, 0);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
ao2_lock(hint);
if (!hint->exten) {
/* The extension has already been destroyed */
@@ -6172,7 +6172,7 @@
extenlen = strlen(a->argv[3]);
i = ao2_iterator_init(hints, 0);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
ao2_lock(hint);
if (!hint->exten) {
/* The extension has already been destroyed */
@@ -7414,7 +7414,7 @@
/* preserve all watchers for hints */
i = ao2_iterator_init(hints, AO2_ITERATOR_DONTLOCK);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
if (ao2_container_count(hint->callbacks)) {
ao2_lock(hint);
if (!hint->exten) {
@@ -10207,7 +10207,7 @@
}
i = ao2_iterator_init(hints, 0);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
watchers = ao2_container_count(hint->callbacks);
data_hint = ast_data_add_node(data_root, "hint");
if (!data_hint) {
More information about the asterisk-commits
mailing list