res_srtp: Add support for libsrtp2.1.
[asterisk/asterisk.git] / res / res_manager_devicestate.c
index 25eae87..a506e97 100644 (file)
@@ -106,12 +106,8 @@ static int action_devicestatelist(struct mansession *s, const struct message *m)
        }
        ao2_iterator_destroy(&it_states);
 
-       astman_append(s, "Event: DeviceStateListComplete\r\n");
-       if (!ast_strlen_zero(action_id)) {
-               astman_append(s, "ActionID: %s\r\n", action_id);
-       }
-       astman_append(s, "EventList: Complete\r\n"
-               "ListItems: %d\r\n\r\n", count);
+       astman_send_list_complete_start(s, m, "DeviceStateListComplete", count);
+       astman_send_list_complete_end(s);
 
        return 0;
 }
@@ -147,8 +143,8 @@ static int load_module(void)
 }
 
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Manager Device State Topic Forwarder",
-               .support_level = AST_MODULE_SUPPORT_CORE,
-               .load = load_module,
-               .unload = unload_module,
-               .load_pri = AST_MODPRI_DEVSTATE_CONSUMER,
-       );
+       .support_level = AST_MODULE_SUPPORT_CORE,
+       .load = load_module,
+       .unload = unload_module,
+       .load_pri = AST_MODPRI_DEVSTATE_CONSUMER,
+);