summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2009-12-03 00:08:55 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2009-12-03 00:08:55 +0000
commit7e0a2db236b424064efc14379b17d87f2def2483 (patch)
tree841ecef346092fe3d2611419c1ade7c8bb03dd1e /include/asterisk
parent2081809b077db32dec931b45e8e2fc9dacd4fb23 (diff)
Fix multiple issues with musiconhold, which led to classes not getting destroyed properly.
* Classes are now tracked past removal from the core container, and module removal is actively prevented until all references are freed. * A hanging reference stored in the channel has been removed. This could have caused a mismatch and the music state not properly cleared, if two or more reloads occurred between MOH being stopped and MOH being restarted. * In certain circumstances, duplicate classes were possible. * A race existed at reload time between a process being killed and the thread responsible for reading from the related pipe respawning that process. * Several reference counts have also been corrected. At least one could have caused deleted classes to stick around forever, consuming resources. This originally manifested as MOH external processes that were not killed at reload time. (closes issue #16279, closes issue #16207) Reported by: parisioa, dcabot Patches: 20091202__issue16279__2.diff.txt uploaded by tilghman (license 14) Tested by: parisioa, tilghman git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/astobj2.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index 6caa4a7c4..689b639b5 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -207,7 +207,7 @@ were called to appear in /tmp/refs, you can do this sort of thing:
#ifdef REF_DEBUG
#define dialog_ref(arg1,arg2) dialog_ref_debug((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
#define dialog_unref(arg1,arg2) dialog_unref_debug((arg1),(arg2), __FILE__, __LINE__, __PRETTY_FUNCTION__)
-static struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, char *tag, char *file, int line, const char *func)
+static struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, char *tag, const char *file, int line, const char *func)
{
if (p)
ao2_ref_debug(p, 1, tag, file, line, func);
@@ -216,7 +216,7 @@ static struct sip_pvt *dialog_ref_debug(struct sip_pvt *p, char *tag, char *file
return p;
}
-static struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, char *tag, char *file, int line, const char *func)
+static struct sip_pvt *dialog_unref_debug(struct sip_pvt *p, char *tag, const char *file, int line, const char *func)
{
if (p)
ao2_ref_debug(p, -1, tag, file, line, func);