aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-19 01:00:57 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-19 01:00:57 +0000
commit21cbb8bb6832b87a3fe1dcc915c0ac69a9a7c73a (patch)
tree5a78268aec79198822639f0fcdc73bbc41984d18 /channels
parent6a1a45a5205299fb33bae0358d0e6f38e2987f4f (diff)
Extend the thread storage API such that a custom initialization function can
be called for each thread specific object after they are allocated. Note that there was already the ability to define a custom cleanup function. Also, if the custom cleanup function is used, it *MUST* call free on the thread specific object at the end. There is no way to have this magically done that I can think of because the cleanup function registered with the pthread implementation will only call the function back with a pointer to the thread specific object, not the parent ast_threadstorage object. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45623 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
-rw-r--r--channels/chan_skinny.c4
-rw-r--r--channels/iax2-parser.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index a715e60e5..18b232587 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1143,7 +1143,7 @@ static struct ast_register_list {
} regl;
/*! \brief A per-thread temporary pvt structure */
-AST_THREADSTORAGE(ts_temp_pvt, temp_pvt_init);
+AST_THREADSTORAGE(ts_temp_pvt);
/*! \todo Move the sip_auth list to AST_LIST */
static struct sip_auth *authl = NULL; /*!< Authentication list for realm authentication */
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 20b715263..fdd8389ef 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -135,10 +135,10 @@ static struct ast_jb_conf default_jbconf =
};
static struct ast_jb_conf global_jbconf;
-AST_THREADSTORAGE(device2str_threadbuf, device2str_threadbuf_init);
+AST_THREADSTORAGE(device2str_threadbuf);
#define DEVICE2STR_BUFSIZE 15
-AST_THREADSTORAGE(control2str_threadbuf, control2str_threadbuf_init);
+AST_THREADSTORAGE(control2str_threadbuf);
#define CONTROL2STR_BUFSIZE 100
/*********************
diff --git a/channels/iax2-parser.c b/channels/iax2-parser.c
index 0a524e253..09e04c432 100644
--- a/channels/iax2-parser.c
+++ b/channels/iax2-parser.c
@@ -53,7 +53,7 @@ static int oframes = 0;
static void frame_cache_cleanup(void *data);
/*! \brief A per-thread cache of iax_frame structures */
-AST_THREADSTORAGE_CUSTOM(frame_cache, frame_cache_init, frame_cache_cleanup);
+AST_THREADSTORAGE_CUSTOM(frame_cache, NULL, frame_cache_cleanup);
/*! \brief This is just so iax_frames, a list head struct for holding a list of
* iax_frame structures, is defined. */