aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-07 19:00:37 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-07 19:00:37 +0000
commit206e7279dbbfbd760da7c0233829bde1c62d4878 (patch)
tree41d4f8bf72c0dc7f33ae7e9c2db5d28abfd553e0 /main
parentbb605129de768a91dd543d1ab1af04fc73628a65 (diff)
Merged revisions 268653,268731 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r268653 | tilghman | 2010-06-07 12:14:40 -0500 (Mon, 07 Jun 2010) | 2 lines Avoid unloading res_smdi twice. (closes issue #17237) Reported by: pabelanger ........ r268731 | tilghman | 2010-06-07 13:59:27 -0500 (Mon, 07 Jun 2010) | 4 lines Event well was going dry. (issue #17234) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@268732 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/manager.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/manager.c b/main/manager.c
index 1932fde9a..32884b7be 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -360,6 +360,11 @@ static void purge_events(void)
}
AST_RWLIST_TRAVERSE_SAFE_BEGIN(&all_events, ev, eq_next) {
+ /* Never release the last event */
+ if (!AST_RWLIST_NEXT(ev, eq_next)) {
+ break;
+ }
+
/* 2.5 times whatever the HTTP timeout is (maximum 2.5 hours) is the maximum time that we will definitely cache an event */
if (ev->usecount == 0 && ast_tvdiff_sec(now, ev->tv) > (httptimeout > 3600 ? 3600 : httptimeout) * 2.5) {
AST_RWLIST_REMOVE_CURRENT(eq_next);