[asterisk-commits] jrose: branch 12 r416849 - /branches/12/res/parking/parking_manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 20 15:46:37 CDT 2014


Author: jrose
Date: Fri Jun 20 15:46:28 2014
New Revision: 416849

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=416849
Log:
res_parking: Make manager commands register with module information

Previously module information was not included due to an oversight.

Review: https://reviewboard.asterisk.org/r/3626/

Modified:
    branches/12/res/parking/parking_manager.c

Modified: branches/12/res/parking/parking_manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/parking/parking_manager.c?view=diff&rev=416849&r1=416848&r2=416849
==============================================================================
--- branches/12/res/parking/parking_manager.c (original)
+++ branches/12/res/parking/parking_manager.c Fri Jun 20 15:46:28 2014
@@ -37,6 +37,7 @@
 #include "asterisk/features.h"
 #include "asterisk/manager.h"
 #include "asterisk/bridge.h"
+#include "asterisk/module.h"
 
 /*** DOCUMENTATION
 	<manager name="Parkinglots" language="en_US">
@@ -665,10 +666,11 @@
 int load_parking_manager(void)
 {
 	int res;
-
-	res = ast_manager_register_xml_core("Parkinglots", EVENT_FLAG_CALL, manager_parking_lot_list);
-	res |= ast_manager_register_xml_core("ParkedCalls", EVENT_FLAG_CALL, manager_parking_status);
-	res |= ast_manager_register_xml_core("Park", EVENT_FLAG_CALL, manager_park);
+	const struct ast_module_info *module = parking_get_module_info();
+
+	res = ast_manager_register2("Parkinglots", EVENT_FLAG_CALL, manager_parking_lot_list, module->self, NULL, NULL);
+	res |= ast_manager_register2("ParkedCalls", EVENT_FLAG_CALL, manager_parking_status, module->self, NULL, NULL);
+	res |= ast_manager_register2("Park", EVENT_FLAG_CALL, manager_park, module->self, NULL, NULL);
 	parking_manager_enable_stasis();
 	return res ? -1 : 0;
 }




More information about the asterisk-commits mailing list