[Asterisk-code-review] manager: Terminate session on write error. (asterisk[16])
Kevin Harwell
asteriskteam at digium.com
Tue Apr 26 15:36:43 CDT 2022
Kevin Harwell has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18426 )
Change subject: manager: Terminate session on write error.
......................................................................
manager: Terminate session on write error.
On a write error to an AMI session a flag was set to
indicate that the write error had occurred, with the
expected result being that the session be terminated.
This was not actually happening and instead writing
would continue to be attempted.
This change adds a check for the write error and causes
the session to actually terminate.
ASTERISK-29948
Change-Id: Icaf5d413d4c0d5dc78292a17287fecc8720a31a5
---
M main/manager.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
George Joseph: Looks good to me, approved
N A: Looks good to me, but someone else must approve
Kevin Harwell: Approved for Submit
diff --git a/main/manager.c b/main/manager.c
index cca4777..3ad33e3 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -6242,7 +6242,7 @@
(s->session->readperm & eqe->category) == eqe->category &&
(s->session->send_events & eqe->category) == eqe->category) {
if (match_filter(s, eqe->eventdata)) {
- if (send_string(s, eqe->eventdata) < 0)
+ if (send_string(s, eqe->eventdata) < 0 || s->write_error)
ret = -1; /* don't send more */
}
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18426
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Icaf5d413d4c0d5dc78292a17287fecc8720a31a5
Gerrit-Change-Number: 18426
Gerrit-PatchSet: 2
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220426/afd5ddb7/attachment.html>
More information about the asterisk-code-review
mailing list