[svn-commits] kpfleming: trunk r82835 - in /trunk: ./ apps/app_queue.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Sep 18 14:06:35 CDT 2007


Author: kpfleming
Date: Tue Sep 18 14:06:34 2007
New Revision: 82835

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82835
Log:
Merged revisions 82834 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82834 | kpfleming | 2007-09-18 13:59:52 -0500 (Tue, 18 Sep 2007) | 2 lines

there is no need for conditional logic to select ->interface or ->membername, snince ->membername will always be populated

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_queue.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=82835&r1=82834&r2=82835
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue Sep 18 14:06:34 2007
@@ -3981,7 +3981,6 @@
 	if (q) {
 		int buflen = 0, count = 0;
 		struct ao2_iterator mem_iter = ao2_iterator_init(q->members, 0);
-		const char *name_to_list;
 
 		while ((m = ao2_iterator_next(&mem_iter))) {
 			/* strcat() is always faster than printf() */
@@ -3989,9 +3988,8 @@
 				strncat(buf + buflen, ",", len - buflen - 1);
 				buflen++;
 			}
-			name_to_list = ast_strlen_zero(m->membername) ? m->interface : m->membername;
-			strncat(buf + buflen, name_to_list, len - buflen - 1);
-			buflen += strlen(name_to_list);
+			strncat(buf + buflen, m->membername, len - buflen - 1);
+			buflen += strlen(m->membername);
 			/* Safeguard against overflow (negative length) */
 			if (buflen >= len - 2) {
 				ao2_ref(m, -1);
@@ -4294,7 +4292,7 @@
 			do_print(s, fd, "   Members: ");
 			mem_iter = ao2_iterator_init(q->members, 0);
 			while ((mem = ao2_iterator_next(&mem_iter))) {
-				ast_str_set(&out, 0, "      %s", ast_strlen_zero(mem->membername) ? mem->interface : mem->membername);
+				ast_str_set(&out, 0, "      %s", mem->membername);
 				if (mem->penalty)
 					ast_str_append(&out, 0, " with penalty %d", mem->penalty);
 				ast_str_append(&out, 0, "%s%s%s (%s)",
@@ -4814,7 +4812,7 @@
 				if (++which > state) {
 					char *tmp;
 					ast_mutex_unlock(&q->lock);
-					tmp = ast_strdup((ast_strlen_zero(m->membername) ? m->interface : m->membername));
+					tmp = m->membername;
 					ao2_ref(m, -1);
 					return tmp;
 				}




More information about the svn-commits mailing list