[asterisk-commits] file: branch file/app_agents r180851 - /team/file/app_agents/apps/app_agents.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 10 13:20:45 CDT 2009


Author: file
Date: Tue Mar 10 13:20:42 2009
New Revision: 180851

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=180851
Log:
Eliminate stray whitespace.

Modified:
    team/file/app_agents/apps/app_agents.c

Modified: team/file/app_agents/apps/app_agents.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/app_agents/apps/app_agents.c?view=diff&rev=180851&r1=180850&r2=180851
==============================================================================
--- team/file/app_agents/apps/app_agents.c (original)
+++ team/file/app_agents/apps/app_agents.c Tue Mar 10 13:20:42 2009
@@ -21,7 +21,7 @@
  * \author Joshua Colp <jcolp at digium.com>
  *
  * \brief Agent Application
- * 
+ *
  * \ingroup applications
  */
 
@@ -97,7 +97,7 @@
 "The option string may contain zero or more of the following characters:\n"
 "       l -- force logout - this will log out a callback agent if logged in\n"
 "       u -- skip pin - do not authenticate the agent\n"
-"       s -- silent - do not play login or logoff sound files\n"; 
+"       s -- silent - do not play login or logoff sound files\n";
 
 static const char app2[] = "AgentCall2";
 static const char synopsis2[] = "Talk to an agent";
@@ -164,7 +164,7 @@
 AST_APP_OPTIONS(login_options, {
 	AST_APP_OPTION('l', OPTION_LOGIN_LOGOUT),
 	AST_APP_OPTION('u', OPTION_LOGIN_SKIP_PIN),
-	AST_APP_OPTION('s', OPTION_LOGIN_SILENT),	
+	AST_APP_OPTION('s', OPTION_LOGIN_SILENT),
 });
 
 /*! \brief Container to hold agents */
@@ -237,7 +237,7 @@
 {
 	if (agent->record) {
 		char filename[MAX_FILENAME_LEN];
-		
+
 		snprintf(filename, sizeof(filename), "%sagent-%s-%s-%d", S_OR(agent->record_directory, ""), agent->name, chan->uniqueid, (int)ast_random());
 		ast_monitor_start(chan, S_OR(agent->record_format, DEFAULT_RECORDING_FORMAT), filename, 1, X_REC_IN | X_REC_OUT);
 		ast_monitor_setjoinfiles(chan, 1);
@@ -708,7 +708,7 @@
 
 	ao2_unlock(agent);
 	ao2_ref(agent, -1);
-	
+
 	return;
 }
 
@@ -716,7 +716,7 @@
 static int agent2_call(struct ast_channel *chan, void *data)
 {
 	struct agent2_agent *agent, tmp;
-	
+
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "%s requires an argument (agent name)\n", app2);
 		return -1;
@@ -913,7 +913,7 @@
 	}
 
 	i = ao2_iterator_init(agents, 0);
-	
+
 	for (; (agent = ao2_iterator_next(&i)); ao2_ref(agent, -1)) {
 		ast_cli(a->fd, "%s(%s) %s\n", agent->name, agent2_type2text(agent->type), agent2_state2text(agent->state));
 		if (agent->state == AGENT2_STATE_NONE || agent->state == AGENT2_STATE_HANGUP) {
@@ -922,7 +922,7 @@
 			total_available++;
 		}
 	}
-	
+
 	ast_cli(a->fd, "%d agents configured [%d available , %d unavailable]\n\n", (total_available+total_unavailable), total_available, total_unavailable);
 
 	return CLI_SUCCESS;
@@ -947,14 +947,14 @@
 	}
 
 	i = ao2_iterator_init(agents, 0);
-	
+
 	for (; (agent = ao2_iterator_next(&i)); ao2_ref(agent, -1)) {
 		if (!(agent->state == AGENT2_STATE_NONE || agent->state == AGENT2_STATE_HANGUP)) {
 			ast_cli(a->fd, "%s(%s) %s\n", agent->name, agent2_type2text(agent->type), agent2_state2text(agent->state));
 			total_available++;
 		}
 	}
-	
+
 	ast_cli(a->fd, "%d agents available\n\n", total_available);
 
 	return CLI_SUCCESS;
@@ -975,18 +975,18 @@
 	i = ao2_iterator_init(agents, 0);
 
 	for (; (agent = ao2_iterator_next(&i)); ao2_ref(agent, -1)) {
-                astman_append(s, "Event: Agents2\r\n"
-                        "Agent: %s\r\n"
-                        "Type: %s\r\n"
-                        "Status: %s\r\n"
-                        "%s"
-                        "\r\n",
-                        agent->name, agent2_type2text(agent->type), agent2_state2text(agent->state), idText);
-	}
-	
+		astman_append(s, "Event: Agents2\r\n"
+			"Agent: %s\r\n"
+			"Type: %s\r\n"
+			"Status: %s\r\n"
+			"%s"
+			"\r\n",
+			agent->name, agent2_type2text(agent->type), agent2_state2text(agent->state), idText);
+	}
+
 	astman_append(s, "Event: Agents2Complete\r\n"
-                "%s"
-                "\r\n",idText);
+		"%s"
+		"\r\n",idText);
 	return 0;
 }
 
@@ -1006,26 +1006,26 @@
 
 	for (; (agent = ao2_iterator_next(&i)); ao2_ref(agent, -1)) {
 		if (!(agent->state == AGENT2_STATE_NONE || agent->state == AGENT2_STATE_HANGUP)) {
-                	astman_append(s, "Event: Agents2Available\r\n"
-                        	"Agent: %s\r\n"
-                        	"Type: %s\r\n"
-                        	"Status: %s\r\n"
-                        	"%s"
-                        	"\r\n",
-                        	agent->name, agent2_type2text(agent->type), agent2_state2text(agent->state), idText);
-		}
-	}
-	
+		astman_append(s, "Event: Agents2Available\r\n"
+			"Agent: %s\r\n"
+			"Type: %s\r\n"
+			"Status: %s\r\n"
+			"%s"
+			"\r\n",
+			agent->name, agent2_type2text(agent->type), agent2_state2text(agent->state), idText);
+		}
+	}
+
 	astman_append(s, "Event: Agents2AvailableComplete\r\n"
-                "%s"
-                "\r\n",idText);
+		"%s"
+		"\r\n",idText);
 	return 0;
 }
 
 /*! \brief CLI commands to interact with things */
 static struct ast_cli_entry cli_agents2[] = {
-        AST_CLI_DEFINE(agents2_show, "Show status of agents"),
-        AST_CLI_DEFINE(agents2_show_available, "Show status of available agents"),
+	AST_CLI_DEFINE(agents2_show, "Show status of agents"),
+	AST_CLI_DEFINE(agents2_show_available, "Show status of available agents"),
 };
 
 /*! \brief Function called when module should be reloaded */
@@ -1072,7 +1072,7 @@
 }
 
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Agents Application",
-                .load = load_module,
-                .unload = unload_module,
-                .reload = reload_module,
+		.load = load_module,
+		.unload = unload_module,
+		.reload = reload_module,
 		);




More information about the asterisk-commits mailing list