[asterisk-commits] anthonyl: branch anthonyl/5240-testing r43201 - in /team/anthonyl/5240-testin...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Sep 18 10:47:28 MST 2006


Author: anthonyl
Date: Mon Sep 18 12:47:27 2006
New Revision: 43201

URL: http://svn.digium.com/view/asterisk?rev=43201&view=rev
Log:
5240 patch integration part2

Modified:
    team/anthonyl/5240-testing/include/asterisk/manager.h
    team/anthonyl/5240-testing/main/manager.c

Modified: team/anthonyl/5240-testing/include/asterisk/manager.h
URL: http://svn.digium.com/view/asterisk/team/anthonyl/5240-testing/include/asterisk/manager.h?rev=43201&r1=43200&r2=43201&view=diff
==============================================================================
--- team/anthonyl/5240-testing/include/asterisk/manager.h (original)
+++ team/anthonyl/5240-testing/include/asterisk/manager.h Mon Sep 18 12:47:27 2006
@@ -152,6 +152,7 @@
 int reload_manager(void);
 /*! Add a manager_user to current list of manager */
 int *ast_manager_add(struct ast_manager_user *amu);
+int *ast_manager_user_add(struct ast_manager_user *amu);
 /*! Get an manager by his name */
 struct ast_manager_user *ast_get_manager_by_name_locked(const char *name);
 

Modified: team/anthonyl/5240-testing/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/5240-testing/main/manager.c?rev=43201&r1=43200&r2=43201&view=diff
==============================================================================
--- team/anthonyl/5240-testing/main/manager.c (original)
+++ team/anthonyl/5240-testing/main/manager.c Mon Sep 18 12:47:27 2006
@@ -507,13 +507,12 @@
 " Usage: show manager foobar\n"
 " Display all the infos related to the manager foobar.\n";
 
-
 static struct ast_cli_entry show_managers_cli =
-	{ { "show", "managers", NULL },
+	{ { "manager", "show", "users" },
 	handle_showmanagers, "Show all managers users (connected or not)", showmanagers_help };
 
 static struct ast_cli_entry show_manager_cli =
-{ { "show", "manager", NULL }, handle_showmanager, "Display information on a specific manager", showmanager_help};
+{ { "manager", "show", "user" }, handle_showmanager, "Display information on a specific manager", showmanager_help};
 
 
 static struct ast_cli_entry show_mancmd_cli =
@@ -2479,6 +2478,7 @@
 	int flags;
 	int webenabled = 0;
 	int newhttptimeout = 60;
+	amus = NULL;
 	if (!registered) {
 		/* Register default actions */
 		ast_manager_register2("Ping", 0, action_ping, "Keepalive command", mandescr_ping);
@@ -2505,6 +2505,9 @@
 		ast_cli_register(&show_mancmds_cli);
 		ast_cli_register(&show_manconn_cli);
 		ast_cli_register(&show_maneventq_cli);
+		ast_cli_register(&show_managers_cli);
+		ast_cli_register(&show_manager_cli);
+
 		ast_extension_state_add(NULL, NULL, manager_state_cb, NULL);
 		registered = 1;
 		/* Append placeholder event so master_eventq never runs dry */
@@ -2740,3 +2743,15 @@
 	return RESULT_SUCCESS;
 }
 
+
+int *ast_manager_user_add(struct ast_manager_user *amu) {
+	if (!amu) {
+		ast_log(LOG_DEBUG, "You cant pass NULL to that function");
+		return NULL;
+	}
+	ast_mutex_lock(&amulock);
+	amu->next = amus;
+	amus = amu;
+	ast_mutex_unlock(&amulock);
+	return NULL;
+}



More information about the asterisk-commits mailing list