Default parking lot was being destroyed in reload and was not being rebuilt properly.
This patch keeps features.c reload from destroying the default parking lot in 1.6.2.
Bug was caused by a hasty backport which didn't test reload enough times to catch the
problem.
(closes issue ASTERISK-18103)
Reported by: 808blogger
Review: https://reviewboard.asterisk.org/r/1337/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@330490
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
struct ast_parkinglot *p;
struct ao2_iterator iter = ao2_iterator_init(parkinglots, 0);
while ((p = ao2_iterator_next(&iter))) {
- ao2_unlink(parkinglots, p);
- ao2_ref(p,-1);
+ if (p != default_parkinglot) {
+ ao2_unlink(parkinglots, p);
+ ao2_ref(p,-1);
+ }
}
ao2_iterator_destroy(&iter);
}