mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
AMI: Revert non-backwards compatible changes from earlier commit.
* Reverted the change to astman_send_listack() to not use the listflag parameter and always set the value to "Start" so the start capitalization is consistent. Unfortunately changing the case of a returned value is not a backward compatible change so for now FAXSessions is going to have to remain inconsistent with all of the other AMI list actions. * Reverted the minor protocol error fix in action_getconfig() when no requested categories are found. Each line needs to be formatted as "Header: text". Caught by the testsuite. ASTERISK-24049 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -305,7 +305,7 @@ void astman_send_ack(struct mansession *s, const struct message *m, char *msg);
|
|||||||
* \param s - AMI session control struct.
|
* \param s - AMI session control struct.
|
||||||
* \param m - AMI action request that started the list.
|
* \param m - AMI action request that started the list.
|
||||||
* \param msg - Message contents describing the list to follow.
|
* \param msg - Message contents describing the list to follow.
|
||||||
* \param listflag - Not used. Historically always set to "start".
|
* \param listflag - Should always be set to "start".
|
||||||
*
|
*
|
||||||
* \note You need to call astman_send_list_complete_start() and
|
* \note You need to call astman_send_list_complete_start() and
|
||||||
* astman_send_list_complete_end() to send the AMI list completion event.
|
* astman_send_list_complete_end() to send the AMI list completion event.
|
||||||
|
@@ -2913,7 +2913,7 @@ static void astman_start_ack(struct mansession *s, const struct message *m)
|
|||||||
|
|
||||||
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag)
|
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag)
|
||||||
{
|
{
|
||||||
astman_send_response_full(s, m, "Success", msg, "Start");
|
astman_send_response_full(s, m, "Success", msg, listflag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void astman_send_list_complete_start(struct mansession *s, const struct message *m, const char *event_name, int count)
|
void astman_send_list_complete_start(struct mansession *s, const struct message *m, const char *event_name, int count)
|
||||||
@@ -3358,7 +3358,7 @@ static int action_getconfig(struct mansession *s, const struct message *m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ast_strlen_zero(category) && catcount == 0) { /* TODO: actually, a config with no categories doesn't even get loaded */
|
if (!ast_strlen_zero(category) && catcount == 0) { /* TODO: actually, a config with no categories doesn't even get loaded */
|
||||||
astman_append(s, "Error: No categories found\r\n");
|
astman_append(s, "No categories found\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_config_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
@@ -3396,7 +3396,7 @@ static int action_listcategories(struct mansession *s, const struct message *m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (catcount == 0) { /* TODO: actually, a config with no categories doesn't even get loaded */
|
if (catcount == 0) { /* TODO: actually, a config with no categories doesn't even get loaded */
|
||||||
astman_append(s, "Error: No categories found\r\n");
|
astman_append(s, "Error: no categories found\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_config_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
|
Reference in New Issue
Block a user