res_parking: Make manager commands register with module information
authorJonathan Rose <jrose@digium.com>
Fri, 20 Jun 2014 20:57:46 +0000 (20:57 +0000)
committerJonathan Rose <jrose@digium.com>
Fri, 20 Jun 2014 20:57:46 +0000 (20:57 +0000)
Previously module information was not included due to an oversight.

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

Merged revisions 416849 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416850 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/parking/parking_manager.c

index 92854fe..20f8c4e 100644 (file)
@@ -37,6 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #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 @@ static void parking_manager_enable_stasis(void)
 int load_parking_manager(void)
 {
        int res;
+       const struct ast_module_info *module = parking_get_module_info();
 
-       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);
+       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;
 }