[asterisk-commits] russell: branch russell/res_monkeys r81321 - /team/russell/res_monkeys/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 28 17:48:50 CDT 2007
Author: russell
Date: Tue Aug 28 17:48:49 2007
New Revision: 81321
URL: http://svn.digium.com/view/asterisk?view=rev&rev=81321
Log:
fix a bug in the chan thread datastore destruction
Modified:
team/russell/res_monkeys/main/channel.c
Modified: team/russell/res_monkeys/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/russell/res_monkeys/main/channel.c?view=diff&rev=81321&r1=81320&r2=81321
==============================================================================
--- team/russell/res_monkeys/main/channel.c (original)
+++ team/russell/res_monkeys/main/channel.c Tue Aug 28 17:48:49 2007
@@ -4774,6 +4774,12 @@
ast_channel_lock(chan);
datastore = ast_channel_datastore_find(chan, &chanthread_datastore_info, id_str);
+ if (!datastore) {
+ ast_channel_unlock(chan);
+ ast_log(LOG_ERROR, "No datastore found for id '%s' on channel '%s'\n",
+ id_str, chan->name);
+ return NULL;
+ }
thread_args = datastore->data;
datastore->data = NULL;
ast_channel_unlock(chan);
@@ -4818,6 +4824,8 @@
return -1;
}
+ datastore->data = thread_args;
+
ast_channel_lock(chan);
ast_channel_datastore_add(chan, datastore);
res = ast_pthread_create_background(&thread_args->thread_id, NULL, start_func, thread_args);
More information about the asterisk-commits
mailing list