[asterisk-commits] russell: trunk r387690 - in /trunk: ./ apps/app_meetme.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 6 10:58:33 CDT 2013
Author: russell
Date: Mon May 6 10:58:32 2013
New Revision: 387690
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387690
Log:
Make SLA reload more paranoid.
Reload support was originally not included for SLA. It was added later,
but in a fairly non-traditional way. It basically sets a flag
indicating that a reload is pending, and then waits for a time where it
thinks everything SLA related is idle and unused, and *then* executes
the reload. It does this because the reload process is destructive. It
starts by throwing everything away and starting over.
There are a number of problems with this approach. One of them is that
the check to see if anything in use was incomplete. This patch makes it
more complete and thus less likely for a crash to occur during reload
processing. However, this approach still has problems so some much more
significant reworking of this code will need to come in as a next step.
Patch credit and testing by CoreDial, LLC.
........
Merged revisions 387688 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 387689 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/apps/app_meetme.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=387690&r1=387689&r2=387690
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Mon May 6 10:58:32 2013
@@ -6447,8 +6447,8 @@
struct sla_station *station;
struct sla_trunk *trunk;
- if (!AST_LIST_EMPTY(&sla.event_q) || !AST_LIST_EMPTY(&sla.ringing_trunks)
- || !AST_LIST_EMPTY(&sla.ringing_stations)) {
+ if (!AST_LIST_EMPTY(&sla.event_q) || !AST_LIST_EMPTY(&sla.ringing_trunks)
+ || !AST_LIST_EMPTY(&sla.ringing_stations) || !AST_LIST_EMPTY(&sla.failed_stations)) {
return;
}
@@ -6464,8 +6464,9 @@
AST_RWLIST_RDLOCK(&sla_trunks);
AST_RWLIST_TRAVERSE(&sla_trunks, trunk, entry) {
- if (trunk->ref_count)
+ if (trunk->ref_count || trunk->chan || trunk->active_stations || trunk->hold_stations) {
break;
+ }
}
AST_RWLIST_UNLOCK(&sla_trunks);
if (trunk) {
@@ -6718,7 +6719,7 @@
return 0;
}
- AST_RWLIST_RDLOCK(&sla_stations);
+ AST_RWLIST_WRLOCK(&sla_stations);
station = sla_find_station(station_name);
if (station)
ast_atomic_fetchadd_int((int *) &station->ref_count, 1);
@@ -6930,7 +6931,7 @@
}
}
- AST_RWLIST_RDLOCK(&sla_trunks);
+ AST_RWLIST_WRLOCK(&sla_trunks);
trunk = sla_find_trunk(args.trunk_name);
if (trunk)
ast_atomic_fetchadd_int((int *) &trunk->ref_count, 1);
More information about the asterisk-commits
mailing list