Revert -r430452 It needs to be redone for the next major AMI version change instead.

ASTERISK-24049


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/42/42/1
Richard Mudgett 10 years ago
parent 9065488ddd
commit c7ea108e02

@ -2532,7 +2532,7 @@ static int action_agents(struct mansession *s, const struct message *m)
} else {
id_text[0] = '\0';
}
astman_send_listack(s, m, "Agents will follow");
astman_send_listack(s, m, "Agents will follow", "start");
iter = ao2_iterator_init(agents, 0);
for (; (agent = ao2_iterator_next(&iter)); ao2_ref(agent, -1)) {

@ -2883,7 +2883,7 @@ static int action_confbridgelist(struct mansession *s, const struct message *m)
return 0;
}
astman_send_listack(s, m, "Confbridge user list will follow");
astman_send_listack(s, m, "Confbridge user list will follow", "start");
ao2_lock(conference);
AST_LIST_TRAVERSE(&conference->active_list, user, list) {
@ -2920,7 +2920,7 @@ static int action_confbridgelistrooms(struct mansession *s, const struct message
return 0;
}
astman_send_listack(s, m, "Confbridge conferences will follow");
astman_send_listack(s, m, "Confbridge conferences will follow", "start");
/* Traverse the conference list */
iter = ao2_iterator_init(conference_bridges, 0);

@ -5530,7 +5530,7 @@ static int action_meetmelist(struct mansession *s, const struct message *m)
return 0;
}
astman_send_listack(s, m, "Meetme user list will follow");
astman_send_listack(s, m, "Meetme user list will follow", "start");
/* Find the right conference */
AST_LIST_LOCK(&confs);
@ -5603,7 +5603,7 @@ static int action_meetmelistrooms(struct mansession *s, const struct message *m)
return 0;
}
astman_send_listack(s, m, "Meetme conferences will follow");
astman_send_listack(s, m, "Meetme conferences will follow", "start");
now = time(NULL);

@ -9472,7 +9472,7 @@ static int manager_queues_summary(struct mansession *s, const struct message *m)
struct ao2_iterator queue_iter;
struct ao2_iterator mem_iter;
astman_send_listack(s, m, "Queue summary will follow");
astman_send_listack(s, m, "Queue summary will follow", "start");
time(&now);
idText[0] = '\0';
if (!ast_strlen_zero(id)) {
@ -9549,7 +9549,7 @@ static int manager_queues_status(struct mansession *s, const struct message *m)
struct ao2_iterator queue_iter;
struct ao2_iterator mem_iter;
astman_send_listack(s, m, "Queue status will follow");
astman_send_listack(s, m, "Queue status will follow", "start");
time(&now);
idText[0] = '\0';
if (!ast_strlen_zero(id)) {

@ -13065,7 +13065,7 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
return RESULT_SUCCESS;
}
astman_send_listack(s, m, "Voicemail user list will follow");
astman_send_listack(s, m, "Voicemail user list will follow", "start");
AST_LIST_TRAVERSE(&users, vmu, list) {
char dirname[256];

@ -16082,7 +16082,7 @@ static int action_dahdishowchannels(struct mansession *s, const struct message *
snprintf(idText, sizeof(idText), "ActionID: %s\r\n", id);
}
astman_send_listack(s, m, "DAHDI channel status will follow");
astman_send_listack(s, m, "DAHDI channel status will follow", "start");
ast_mutex_lock(&iflock);
@ -16176,7 +16176,7 @@ static int action_prishowspans(struct mansession *s, const struct message *m)
action_id[0] = '\0';
}
astman_send_listack(s, m, "Span status will follow");
astman_send_listack(s, m, "Span status will follow", "start");
count = 0;
for (idx = 0; idx < ARRAY_LEN(pris); ++idx) {

@ -7252,7 +7252,7 @@ static int manager_iax2_show_peers(struct mansession *s, const struct message *m
if (!ast_strlen_zero(id))
snprintf(idtext, sizeof(idtext), "ActionID: %s\r\n", id);
astman_send_listack(s, m, "Peer status list will follow");
astman_send_listack(s, m, "Peer status list will follow", "start");
/* List the peers in separate manager events */
__iax2_show_peers(-1, &total, s, 3, a);
@ -7288,7 +7288,7 @@ static int manager_iax2_show_peer_list(struct mansession *s, const struct messag
snprintf(cont.idtext, sizeof(cont.idtext), "ActionID: %s\r\n", id);
}
astman_send_listack(s, m, "IAX Peer status list will follow");
astman_send_listack(s, m, "IAX Peer status list will follow", "start");
i = ao2_iterator_init(peers, 0);
for (; (peer = ao2_iterator_next(&i)); peer_unref(peer)) {
@ -7378,7 +7378,7 @@ static int manager_iax2_show_registry(struct mansession *s, const struct message
if (!ast_strlen_zero(id))
snprintf(idtext, sizeof(idtext), "ActionID: %s\r\n", id);
astman_send_listack(s, m, "Registrations will follow");
astman_send_listack(s, m, "Registrations will follow", "start");
AST_LIST_LOCK(&registrations);
AST_LIST_TRAVERSE(&registrations, reg, entry) {

@ -19223,7 +19223,7 @@ static int manager_show_registry(struct mansession *s, const struct message *m)
if (!ast_strlen_zero(id))
snprintf(idtext, sizeof(idtext), "ActionID: %s\r\n", id);
astman_send_listack(s, m, "Registrations will follow");
astman_send_listack(s, m, "Registrations will follow", "start");
iter = ao2_iterator_init(registry_list, 0);
while ((iterator = ao2_t_iterator_next(&iter, "manager_show_registry iter"))) {
@ -19275,7 +19275,7 @@ static int manager_sip_show_peers(struct mansession *s, const struct message *m)
if (!ast_strlen_zero(id))
snprintf(idtext, sizeof(idtext), "ActionID: %s\r\n", id);
astman_send_listack(s, m, "Peer status list will follow");
astman_send_listack(s, m, "Peer status list will follow", "start");
/* List the peers in separate manager events */
_sip_show_peers(-1, &total, s, m, 3, a);
@ -20067,7 +20067,7 @@ static int manager_sip_peer_status(struct mansession *s, const struct message *m
}
}
astman_send_listack(s, m, "Peer status will follow");
astman_send_listack(s, m, "Peer status will follow", "start");
if (!peer) {
struct ao2_iterator i = ao2_iterator_init(peers, 0);

@ -4138,7 +4138,7 @@ static int manager_skinny_show_devices(struct mansession *s, const struct messag
const char *a[] = {"skinny", "show", "devices"};
int total = 0;
astman_send_listack(s, m, "Device status list will follow");
astman_send_listack(s, m, "Device status list will follow", "start");
/* List the devices in separate manager events */
_skinny_show_devices(-1, &total, s, m, 3, a);
@ -4380,7 +4380,7 @@ static int manager_skinny_show_lines(struct mansession *s, const struct message
const char *a[] = {"skinny", "show", "lines"};
int total = 0;
astman_send_listack(s, m, "Line status list will follow");
astman_send_listack(s, m, "Line status list will follow", "start");
/* List the lines in separate manager events */
_skinny_show_lines(-1, &total, s, m, 3, a);

@ -305,13 +305,14 @@ void astman_send_ack(struct mansession *s, const struct message *m, char *msg);
* \param s - AMI session control struct.
* \param m - AMI action request that started the list.
* \param msg - Message contents describing the list to follow.
* \param listflag - Not used. Historically always set to "start".
*
* \note You need to call astman_send_list_complete_start() and
* astman_send_list_complete_end() to send the AMI list completion event.
*
* \return Nothing
*/
void astman_send_listack(struct mansession *s, const struct message *m, char *msg);
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag);
/*!
* \brief Start the list complete event.

@ -5209,7 +5209,7 @@ static int manager_bridge_tech_list(struct mansession *s, const struct message *
ast_str_set(&id_text, 0, "ActionID: %s\r\n", id);
}
astman_send_listack(s, m, "Bridge technology listing will follow");
astman_send_listack(s, m, "Bridge technology listing will follow", "start");
AST_RWLIST_RDLOCK(&bridge_technologies);
AST_RWLIST_TRAVERSE(&bridge_technologies, cur, entry) {

@ -864,7 +864,7 @@ static int manager_dbget(struct mansession *s, const struct message *m)
if (res) {
astman_send_error(s, m, "Database entry not found");
} else {
astman_send_listack(s, m, "Result will follow");
astman_send_listack(s, m, "Result will follow", "start");
astman_append(s, "Event: DBGetResponse\r\n"
"Family: %s\r\n"

@ -2919,7 +2919,7 @@ static void astman_start_ack(struct mansession *s, const struct message *m)
astman_send_response_full(s, m, "Success", MSG_MOREDATA, NULL);
}
void astman_send_listack(struct mansession *s, const struct message *m, char *msg)
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag)
{
astman_send_response_full(s, m, "Success", msg, "Start");
}
@ -4203,7 +4203,7 @@ static int action_hangup(struct mansession *s, const struct message *m)
return 0;
}
astman_send_listack(s, m, "Channels hung up will follow");
astman_send_listack(s, m, "Channels hung up will follow", "start");
iter = ast_channel_iterator_all_new();
if (iter) {
@ -4481,7 +4481,7 @@ static int action_status(struct mansession *s, const struct message *m)
}
}
astman_send_listack(s, m, "Channel status will follow");
astman_send_listack(s, m, "Channel status will follow", "start");
if (!ast_strlen_zero(id)) {
snprintf(id_text, sizeof(id_text), "ActionID: %s\r\n", id);
@ -5908,7 +5908,7 @@ static int action_coreshowchannels(struct mansession *s, const struct message *m
return 0;
}
astman_send_listack(s, m, "Channels will follow");
astman_send_listack(s, m, "Channels will follow", "start");
it_chans = ao2_iterator_init(channels, 0);
for (; (msg = ao2_iterator_next(&it_chans)); ao2_ref(msg, -1)) {

@ -414,7 +414,7 @@ static int manager_bridges_list(struct mansession *s, const struct message *m)
return -1;
}
astman_send_listack(s, m, "Bridge listing will follow");
astman_send_listack(s, m, "Bridge listing will follow", "start");
if (!ast_strlen_zero(type_filter)) {
char *type_filter_dup = ast_strdupa(type_filter);
@ -506,7 +506,7 @@ static int manager_bridge_info(struct mansession *s, const struct message *m)
return -1;
}
astman_send_listack(s, m, "Bridge channel listing will follow");
astman_send_listack(s, m, "Bridge channel listing will follow", "start");
list_data.id_text = ast_str_buffer(id_text);
list_data.count = 0;

@ -8147,7 +8147,7 @@ static char *handle_debug_dialplan(struct ast_cli_entry *e, int cmd, struct ast_
/*! \brief Send ack once */
static void manager_dpsendack(struct mansession *s, const struct message *m)
{
astman_send_listack(s, m, "DialPlan list will follow");
astman_send_listack(s, m, "DialPlan list will follow", "start");
}
/*! \brief Show dialplan extensions
@ -12010,7 +12010,7 @@ static int action_extensionstatelist(struct mansession *s, const struct message
return 0;
}
astman_send_listack(s, m, "Extension Statuses will follow");
astman_send_listack(s, m, "Extension Statuses will follow", "start");
ao2_lock(hints);
it_hints = ao2_iterator_init(hints, 0);

@ -255,7 +255,7 @@ static void manager_parking_status_single_lot(struct mansession *s, const struct
return;
}
astman_send_listack(s, m, "Parked calls will follow");
astman_send_listack(s, m, "Parked calls will follow", "start");
iter_users = ao2_iterator_init(curlot->parked_users, 0);
while ((curuser = ao2_iterator_next(&iter_users))) {
@ -308,7 +308,7 @@ static void manager_parking_status_all_lots(struct mansession *s, const struct m
return;
}
astman_send_listack(s, m, "Parked calls will follow");
astman_send_listack(s, m, "Parked calls will follow", "start");
iter_lots = ao2_iterator_init(lot_container, 0);
while ((curlot = ao2_iterator_next(&iter_lots))) {
@ -422,7 +422,7 @@ static int manager_parking_lot_list(struct mansession *s, const struct message *
return 0;
}
astman_send_listack(s, m, "Parking lots will follow");
astman_send_listack(s, m, "Parking lots will follow", "start");
list_data.id_text = id_text;
list_data.count = 0;

@ -4200,7 +4200,7 @@ static int manager_fax_sessions(struct mansession *s, const struct message *m)
snprintf(id_text, sizeof(id_text), "ActionID: %s\r\n", action_id);
}
astman_send_listack(s, m, "FAXSessionsEntry event list will follow");
astman_send_listack(s, m, "FAXSessionsEntry event list will follow", "Start");
iter = ao2_iterator_init(faxregistry.container, 0);
while ((session = ao2_iterator_next(&iter))) {

@ -85,7 +85,7 @@ static int action_devicestatelist(struct mansession *s, const struct message *m)
return 0;
}
astman_send_listack(s, m, "Device State Changes will follow");
astman_send_listack(s, m, "Device State Changes will follow", "start");
it_states = ao2_iterator_init(device_states, 0);
for (; (msg = ao2_iterator_next(&it_states)); ao2_ref(msg, -1)) {

@ -85,7 +85,7 @@ static int action_presencestatelist(struct mansession *s, const struct message *
return 0;
}
astman_send_listack(s, m, "Presence State Changes will follow");
astman_send_listack(s, m, "Presence State Changes will follow", "start");
it_states = ao2_iterator_init(presence_states, 0);
for (; (msg = ao2_iterator_next(&it_states)); ao2_ref(msg, -1)) {

@ -197,7 +197,7 @@ static int mwi_mailbox_get(struct mansession *s, const struct message *m)
return 0;
}
astman_send_listack(s, m, "Mailboxes will follow");
astman_send_listack(s, m, "Mailboxes will follow", "start");
id = astman_get_header(m, "ActionID");
if (!ast_strlen_zero(id)) {

@ -1162,7 +1162,8 @@ static int ami_show_endpoint(struct mansession *s, const struct message *m)
return -1;
}
astman_send_listack(s, m, "Following are Events for each object associated with the the Endpoint");
astman_send_listack(s, m, "Following are Events for each object associated with the the Endpoint",
"start");
/* the endpoint detail needs to always come first so apply as such */
if (format_ami_endpoint(endpoint, &ami) ||
@ -1245,7 +1246,8 @@ static int ami_show_endpoints(struct mansession *s, const struct message *m)
return 0;
}
astman_send_listack(s, m, "A listing of Endpoints follows, presented as EndpointList events");
astman_send_listack(s, m, "A listing of Endpoints follows, presented as EndpointList events",
"start");
ao2_callback(endpoints, OBJ_NODATA, format_ami_endpoints, &ami);

@ -1420,7 +1420,8 @@ static int ami_show_outbound_registrations(struct mansession *s,
return -1;
}
astman_send_listack(s, m, "Following are Events for each Outbound registration");
astman_send_listack(s, m, "Following are Events for each Outbound registration",
"start");
ao2_callback(regs, OBJ_NODATA, ami_outbound_registration_detail, &ami_outbound);

@ -3262,7 +3262,8 @@ static int ami_show_subscriptions_inbound(struct mansession *s, const struct mes
struct ast_sip_ami ami = { .s = s, .m = m, .action_id = astman_get_header(m, "ActionID"), };
int num;
astman_send_listack(s, m, "Following are Events for each inbound Subscription");
astman_send_listack(s, m, "Following are Events for each inbound Subscription",
"start");
num = for_each_subscription(ami_subscription_detail_inbound, &ami);
@ -3276,7 +3277,8 @@ static int ami_show_subscriptions_outbound(struct mansession *s, const struct me
struct ast_sip_ami ami = { .s = s, .m = m, .action_id = astman_get_header(m, "ActionID"), };
int num;
astman_send_listack(s, m, "Following are Events for each outbound Subscription");
astman_send_listack(s, m, "Following are Events for each outbound Subscription",
"start");
num = for_each_subscription(ami_subscription_detail_outbound, &ami);
@ -3320,7 +3322,8 @@ static int ami_show_resource_lists(struct mansession *s, const struct message *m
return 0;
}
astman_send_listack(s, m, "A listing of resource lists follows, presented as ResourceListDetail events");
astman_send_listack(s, m, "A listing of resource lists follows, presented as ResourceListDetail events",
"start");
ao2_callback(lists, OBJ_NODATA, format_ami_resource_lists, &ami);

@ -767,7 +767,8 @@ static int ami_show_registrations(struct mansession *s, const struct message *m)
int count = 0;
struct ast_sip_ami ami = { .s = s, .m = m, .arg = &count, .action_id = astman_get_header(m, "ActionID"), };
astman_send_listack(s, m, "Following are Events for each Inbound registration");
astman_send_listack(s, m, "Following are Events for each Inbound registration",
"start");
ami_registrations_endpoints(&ami);

Loading…
Cancel
Save