diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-29 16:00:51 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-29 16:00:51 +0000 |
commit | 9aeb117db9b66c3d1f974567120998540fdd1a4d (patch) | |
tree | a86903c8c4838e2bff91d760e9df09b7446dcc73 /indications.c | |
parent | fb8b94f57778150bf2280bb238e9746001f65615 (diff) |
mention issues with the protection of the list used in indications.c
(part of work done to figure out what is used and what is not in lock.h)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16124 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'indications.c')
-rw-r--r-- | indications.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indications.c b/indications.c index 799c1921c..2d2ca6896 100644 --- a/indications.c +++ b/indications.c @@ -336,6 +336,16 @@ static struct tone_zone *current_tonezone; /* Protect the tone_zones list (highly unlikely that two things would change * it at the same time, but still! */ AST_MUTEX_DEFINE_EXPORTED(tzlock); +/* XXX note - this is the only instance of AST_MUTEX_DEFINE_EXPORTED() + * in the entire asterisk code base, and should be replaced by a static one. + * The mutex is declared exported because it is accessed + * by other files, namely res/snmp/agent.c and res/res_indications.c. + * However there are also unprotected accesses to the list, because + * some of the functions below export pointers to the elements, so + * the entire mechanism is useless. + * This needs to be fixed by providing functions to navigate in the + * list, and refcounts to prevent entries from being destroyed. + */ /* Set global indication country */ int ast_set_indication_country(const char *country) |