summaryrefslogtreecommitdiff
path: root/doc/janitor-projects.txt
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2008-03-28 22:50:46 +0000
committerRussell Bryant <russell@russellbryant.com>2008-03-28 22:50:46 +0000
commitafd878357717fc46e8edc3369216aa6e5de2e80c (patch)
tree27d037081f39ba34ef502014db779c90433e7d6c /doc/janitor-projects.txt
parent16b2720cd4dfdc9a741abfc2cf1080a2642d2507 (diff)
Make some notes about common usage of pbx_builtin_getvar_helper() that is not
thread-safe. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'doc/janitor-projects.txt')
-rw-r--r--doc/janitor-projects.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/janitor-projects.txt b/doc/janitor-projects.txt
index 9d89ef18c..b111204f0 100644
--- a/doc/janitor-projects.txt
+++ b/doc/janitor-projects.txt
@@ -1,3 +1,15 @@
+ -- There a bunch of places where the result of pbx_builtin_getvar_helper()
+ gets stored and used. This is not threadsafe. This code should be replaced
+ with the following thread-safe version:
+
+ const char *var;
+
+ ast_channel_lock(chan);
+ if ((var = pbx_builtin_getvar_helper(chan, "MYVAR"))) {
+ var = ast_strdupa(var);
+ }
+ ast_channel_unlock(chan);
+
-- Convert all existing uses of astobj.h to astobj2.h
-- (chan_sip already in progress in a branch)