[asterisk-commits] pabelanger: branch pabelanger/issue16343 r259187 - in /team/pabelanger/issue1...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 26 19:56:25 CDT 2010


Author: pabelanger
Date: Mon Apr 26 19:56:21 2010
New Revision: 259187

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=259187
Log:
More changes to use AST_CLI_YESNO. Moved channelvars, but this is still a memory leak?

Modified:
    team/pabelanger/issue16343/channels/chan_sip.c
    team/pabelanger/issue16343/main/manager.c

Modified: team/pabelanger/issue16343/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue16343/channels/chan_sip.c?view=diff&rev=259187&r1=259186&r2=259187
==============================================================================
--- team/pabelanger/issue16343/channels/chan_sip.c (original)
+++ team/pabelanger/issue16343/channels/chan_sip.c Mon Apr 26 19:56:21 2010
@@ -15511,7 +15511,7 @@
 		ast_cli(fd, ")\n");
 
 		ast_cli(fd, "  Auto-Framing :  %s \n", AST_CLI_YESNO(peer->autoframing));
-		ast_cli(fd, "  100 on REG   : %s\n", ast_test_flag(&peer->flags[1], SIP_PAGE2_REGISTERTRYING) ? "Yes" : "No");
+		ast_cli(fd, "  100 on REG   : %s\n", AST_CLI_YESNO(ast_test_flag(&peer->flags[1], SIP_PAGE2_REGISTERTRYING)));
 		ast_cli(fd, "  Status       : ");
 		peer_status(peer, status, sizeof(status));
 		ast_cli(fd, "%s\n", status);
@@ -15530,7 +15530,7 @@
 		ast_cli(fd, "  Min-Sess     : %d secs\n", peer->stimer.st_min_se);
 		ast_cli(fd, "  RTP Engine   : %s\n", peer->engine);
 		ast_cli(fd, "  Parkinglot   : %s\n", peer->parkinglot);
-		ast_cli(fd, "  Use Reason   : %s\n", ast_test_flag(&peer->flags[1], SIP_PAGE2_Q850_REASON) ? "Yes" : "No");
+		ast_cli(fd, "  Use Reason   : %s\n", AST_CLI_YESNO(ast_test_flag(&peer->flags[1], SIP_PAGE2_Q850_REASON)));
 		ast_cli(fd, "\n");
 		peer = unref_peer(peer, "sip_show_peer: unref_peer: done with peer ptr");
 	} else  if (peer && type == 1) { /* manager listing */
@@ -16126,7 +16126,7 @@
  	ast_cli(a->fd, "  Timer T1:               %d\n", global_t1);
 	ast_cli(a->fd, "  Timer T1 minimum:       %d\n", global_t1min);
  	ast_cli(a->fd, "  Timer B:                %d\n", global_timer_b);
-	ast_cli(a->fd, "  No premature media:     %s\n", global_prematuremediafilter ? "Yes" : "No");
+	ast_cli(a->fd, "  No premature media:     %s\n", AST_CLI_YESNO(global_prematuremediafilter));
 
 	ast_cli(a->fd, "\nDefault Settings:\n");
 	ast_cli(a->fd, "-----------------\n");
@@ -16180,7 +16180,7 @@
 	ASTOBJ_CONTAINER_TRAVERSE(&submwil, 1, do {
 		ASTOBJ_RDLOCK(iterator);
 		snprintf(host, sizeof(host), "%s:%d", iterator->hostname, iterator->portno ? iterator->portno : STANDARD_SIP_PORT);
-		ast_cli(a->fd, FORMAT, host, iterator->username, iterator->mailbox, iterator->subscribed ? "Yes" : "No");
+		ast_cli(a->fd, FORMAT, host, iterator->username, iterator->mailbox, AST_CLI_YESNO(iterator->subscribed));
 		ASTOBJ_UNLOCK(iterator);
 	} while(0));
 

Modified: team/pabelanger/issue16343/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/issue16343/main/manager.c?view=diff&rev=259187&r1=259186&r2=259187
==============================================================================
--- team/pabelanger/issue16343/main/manager.c (original)
+++ team/pabelanger/issue16343/main/manager.c Mon Apr 26 19:56:21 2010
@@ -3751,9 +3751,9 @@
 			ast_config_AST_RUN_USER,
 			ast_config_AST_RUN_GROUP,
 			option_maxfiles,
-			ast_realtime_enabled() ? "Yes" : "No",
-			check_cdr_enabled() ? "Yes" : "No",
-			check_webmanager_enabled() ? "Yes" : "No"
+			AST_CLI_YESNO(ast_realtime_enabled()),
+			AST_CLI_YESNO(check_cdr_enabled()),
+			AST_CLI_YESNO(check_webmanager_enabled())
 			);
 	return 0;
 }
@@ -5728,9 +5728,9 @@
 		} else if (!strcasecmp(var->name, "httptimeout")) {
 			newhttptimeout = atoi(val);
 		} else if (!strcasecmp(var->name, "channelvars")) {
-			manager_channelvars = ast_strdup(val);
 			struct manager_channel_variable *mcv;
 			char *remaining = ast_strdupa(val), *next;
+			manager_channelvars = ast_strdup(val);
 			AST_RWLIST_WRLOCK(&channelvars);
 			while ((next = strsep(&remaining, ",|"))) {
 				if (!(mcv = ast_calloc(1, sizeof(*mcv) + strlen(next) + 1))) {




More information about the asterisk-commits mailing list