[Asterisk-code-review] app_amd: Fix infinite loop on silent calls (...asterisk[master])
Friendly Automation
asteriskteam at digium.com
Tue Apr 30 10:07:31 CDT 2019
Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11318 )
Change subject: app_amd: Fix infinite loop on silent calls
......................................................................
app_amd: Fix infinite loop on silent calls
The total time logic will now be executed on calls which
do not pass any media.
ASTERISK-28143
Change-Id: I24726bd29d7e467fc721ca265363417234b22855
---
M apps/app_amd.c
1 file changed, 9 insertions(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/apps/app_amd.c b/apps/app_amd.c
index 3f805bb..5285287 100644
--- a/apps/app_amd.c
+++ b/apps/app_amd.c
@@ -280,7 +280,7 @@
int ms = 0;
/* Figure out how long we waited */
- if (res > 0) {
+ if (res >= 0) {
ms = 2 * maxWaitTimeForFrame - res;
}
@@ -410,6 +410,14 @@
}
}
+ } else {
+ iTotalTime += ms;
+ if (iTotalTime >= totalAnalysisTime) {
+ ast_frfree(f);
+ strcpy(amdStatus , "NOTSURE");
+ sprintf(amdCause , "TOOLONG-%d", iTotalTime);
+ break;
+ }
}
ast_frfree(f);
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11318
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I24726bd29d7e467fc721ca265363417234b22855
Gerrit-Change-Number: 11318
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Abhay Gupta <abhay at avissol.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190430/b8e38715/attachment-0001.html>
More information about the asterisk-code-review
mailing list