[Asterisk-code-review] app_queue: Only send QueueMemberStatus if status changes. (asterisk[16])

Joshua Colp asteriskteam at digium.com
Fri Mar 19 04:58:19 CDT 2021


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15636 )


Change subject: app_queue: Only send QueueMemberStatus if status changes.
......................................................................

app_queue: Only send QueueMemberStatus if status changes.

If a queue member was updated with the same status multiple
times each time a QueueMemberStatus event would be sent
which would be a duplicate of the previous.

This change makes it so that the QueueMemberStatus event is
only sent if the status actually changes.

ASTERISK-29355

Change-Id: I580c60d992a0a8f2bea8b91c868771b3b490d116
---
M apps/app_queue.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/36/15636/1

diff --git a/apps/app_queue.c b/apps/app_queue.c
index e0bec9c..334f41d 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2460,9 +2460,9 @@
 		 * happen when there is latency in the connection to the member.
 		 */
 		pending_members_remove(m);
-	}
 
-	queue_publish_member_blob(queue_member_status_type(), queue_member_blob_create(q, m));
+		queue_publish_member_blob(queue_member_status_type(), queue_member_blob_create(q, m));
+	}
 }
 
 /*!

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15636
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I580c60d992a0a8f2bea8b91c868771b3b490d116
Gerrit-Change-Number: 15636
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210319/e6452847/attachment-0001.html>


More information about the asterisk-code-review mailing list