[Asterisk-code-review] app_queue: Deprecate the QueueMemberPause.Reason field (asterisk[master])
Friendly Automation
asteriskteam at digium.com
Wed Jan 15 06:42:30 CST 2020
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13625 )
Change subject: app_queue: Deprecate the QueueMemberPause.Reason field
......................................................................
app_queue: Deprecate the QueueMemberPause.Reason field
The QueueMemberPause AMI event includes two fields that return the
reason a member was paused.
* In release branches, deprecate Reason in favor of PausedReason.
* In master, remove the Reason field entirely.
ASTERISK-28349 #close
Reported by: Niksa Baldun
Change-Id: I01da58f2b0ab927baeee754870f62b51b7b3d296
---
M apps/app_queue.c
A doc/UPGRADE-staging/app_queue_remove_reason.txt
2 files changed, 7 insertions(+), 9 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/apps/app_queue.c b/apps/app_queue.c
index a0cb1f7..8cb3e32 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1145,9 +1145,6 @@
<synopsis>Raised when a member is paused/unpaused in the queue.</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter)" />
- <parameter name="Reason">
- <para>The reason a member was paused.</para>
- </parameter>
</syntax>
<see-also>
<ref type="application">PauseQueueMember</ref>
@@ -7448,7 +7445,7 @@
}
-static int publish_queue_member_pause(struct call_queue *q, struct member *member, const char *reason)
+static int publish_queue_member_pause(struct call_queue *q, struct member *member)
{
struct ast_json *json_blob = queue_member_blob_create(q, member);
@@ -7456,10 +7453,6 @@
return -1;
}
- if (!ast_strlen_zero(reason)) {
- ast_json_object_set(json_blob, "Reason", ast_json_string_create(reason));
- }
-
queue_publish_member_blob(queue_member_pause_type(), json_blob);
return 0;
@@ -7520,7 +7513,7 @@
ast_queue_log(q->name, "NONE", mem->membername, (paused ? "PAUSE" : "UNPAUSE"),
"%s", S_OR(reason, ""));
- publish_queue_member_pause(q, mem, reason);
+ publish_queue_member_pause(q, mem);
}
static int set_member_paused(const char *queuename, const char *interface, const char *reason, int paused)
diff --git a/doc/UPGRADE-staging/app_queue_remove_reason.txt b/doc/UPGRADE-staging/app_queue_remove_reason.txt
new file mode 100644
index 0000000..e333e2c
--- /dev/null
+++ b/doc/UPGRADE-staging/app_queue_remove_reason.txt
@@ -0,0 +1,5 @@
+Subject: app_queue
+Master-Only: True
+
+The 'Reason' header in the QueueMemberPause AMI Event has been
+removed. The 'PausedReason' header should be used instead.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13625
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I01da58f2b0ab927baeee754870f62b51b7b3d296
Gerrit-Change-Number: 13625
Gerrit-PatchSet: 6
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200115/33c0f549/attachment-0001.html>
More information about the asterisk-code-review
mailing list