[asterisk-commits] russell: branch russell/sla_updates r57077 - /team/russell/sla_updates/apps/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 28 11:10:34 MST 2007


Author: russell
Date: Wed Feb 28 12:10:34 2007
New Revision: 57077

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57077
Log:
Change the formatting of the SLA CLI commands

Modified:
    team/russell/sla_updates/apps/app_meetme.c

Modified: team/russell/sla_updates/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/russell/sla_updates/apps/app_meetme.c?view=diff&rev=57077&r1=57076&r2=57077
==============================================================================
--- team/russell/sla_updates/apps/app_meetme.c (original)
+++ team/russell/sla_updates/apps/app_meetme.c Wed Feb 28 12:10:34 2007
@@ -998,31 +998,34 @@
 	const struct sla_trunk *trunk;
 
 	ast_cli(fd, "\n"
-	            "--- Configured SLA Trunks -----------------------------------\n"
-	            "-------------------------------------------------------------\n"
-	            "---\n");
+	            "=============================================================\n"
+	            "=== Configured SLA Trunks ===================================\n"
+	            "=============================================================\n"
+	            "===\n");
 	AST_RWLIST_RDLOCK(&sla_trunks);
 	AST_RWLIST_TRAVERSE(&sla_trunks, trunk, entry) {
 		struct sla_station_ref *station_ref;
 		char ring_timeout[16] = "(none)";
 		if (trunk->ring_timeout)
 			snprintf(ring_timeout, sizeof(ring_timeout), "%u Seconds", trunk->ring_timeout);
-		ast_cli(fd, "--- Trunk Name:      %s\n"
-		            "--- ==> Device:      %s\n"
-					"--- ==> AutoContext: %s\n"
-					"--- ==> RingTimeout: %s\n"
-					"--- ==> Stations ...\n",
+		ast_cli(fd, "=== ---------------------------------------------------------\n"
+		            "=== Trunk Name:      %s\n"
+		            "=== ==> Device:      %s\n"
+					"=== ==> AutoContext: %s\n"
+					"=== ==> RingTimeout: %s\n"
+					"=== ==> Stations ...\n",
 					trunk->name, trunk->device, 
 					S_OR(trunk->autocontext, "(none)"), 
 					ring_timeout);
 		AST_RWLIST_RDLOCK(&sla_stations);
 		AST_LIST_TRAVERSE(&trunk->stations, station_ref, entry)
-			ast_cli(fd, "---    ==> Station name: %s\n", station_ref->station->name);
+			ast_cli(fd, "===    ==> Station name: %s\n", station_ref->station->name);
 		AST_RWLIST_UNLOCK(&sla_stations);
-		ast_cli(fd, "---\n");
+		ast_cli(fd, "=== ---------------------------------------------------------\n"
+		            "===\n");
 	}
 	AST_RWLIST_UNLOCK(&sla_trunks);
-	ast_cli(fd, "-------------------------------------------------------------\n"
+	ast_cli(fd, "=============================================================\n"
 	            "\n");
 
 	return RESULT_SUCCESS;
@@ -1050,9 +1053,10 @@
 	const struct sla_station *station;
 
 	ast_cli(fd, "\n" 
-	            "--- Configured SLA Stations ---------------------------------\n"
-	            "-------------------------------------------------------------\n"
-	            "---\n");
+	            "=============================================================\n"
+	            "=== Configured SLA Stations =================================\n"
+	            "=============================================================\n"
+	            "===\n");
 	AST_RWLIST_RDLOCK(&sla_stations);
 	AST_RWLIST_TRAVERSE(&sla_stations, station, entry) {
 		struct sla_trunk_ref *trunk_ref;
@@ -1066,12 +1070,13 @@
 			snprintf(ring_delay, sizeof(ring_delay), 
 				"%u", station->ring_delay);
 		}
-		ast_cli(fd, "--- Station Name:    %s\n"
-		            "--- ==> Device:      %s\n"
-					"--- ==> AutoContext: %s\n"
-					"--- ==> RingTimeout: %s\n"
-					"--- ==> RingDelay:   %s\n"
-					"--- ==> Trunks ...\n",
+		ast_cli(fd, "=== ---------------------------------------------------------\n"
+		            "=== Station Name:    %s\n"
+		            "=== ==> Device:      %s\n"
+					"=== ==> AutoContext: %s\n"
+					"=== ==> RingTimeout: %s\n"
+					"=== ==> RingDelay:   %s\n"
+					"=== ==> Trunks ...\n",
 					station->name, station->device,
 					S_OR(station->autocontext, "(none)"), 
 					ring_timeout, ring_delay);
@@ -1087,19 +1092,20 @@
 					"%u", trunk_ref->ring_delay);
 			} else
 				strcpy(ring_delay, "(none)");
-			ast_cli(fd, "---    ==> Trunk Name: %s\n"
-			            "---       ==> State:       %s\n"
-			            "---       ==> RingTimeout: %s\n"
-			            "---       ==> RingDelay:   %s\n",
+			ast_cli(fd, "===    ==> Trunk Name: %s\n"
+			            "===       ==> State:       %s\n"
+			            "===       ==> RingTimeout: %s\n"
+			            "===       ==> RingDelay:   %s\n",
 			            trunk_ref->trunk->name,
 			            trunkstate2str(trunk_ref->state),
 			            ring_timeout, ring_delay);
 		}
 		AST_RWLIST_UNLOCK(&sla_trunks);
-		ast_cli(fd, "---\n");
+		ast_cli(fd, "=== ---------------------------------------------------------\n"
+		            "===\n");
 	}
 	AST_RWLIST_UNLOCK(&sla_stations);
-	ast_cli(fd, "-------------------------------------------------------------\n"
+	ast_cli(fd, "============================================================\n"
 	            "\n");
 
 	return RESULT_SUCCESS;



More information about the asterisk-commits mailing list