Skip to content
Snippets Groups Projects
Commit 8f5bf61e authored by Luigi Rizzo's avatar Luigi Rizzo
Browse files

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: https://origsvn.digium.com/svn/asterisk/trunk@16124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent acacae4e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment