[asterisk-commits] mmichelson: branch mmichelson/threadpool r378654 - /team/mmichelson/threadpoo...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 7 17:11:45 CST 2013
Author: mmichelson
Date: Mon Jan 7 17:11:41 2013
New Revision: 378654
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378654
Log:
Remove tasks from the taskprocessor and free them when taskprocessor is destroyed.
Modified:
team/mmichelson/threadpool/main/taskprocessor.c
Modified: team/mmichelson/threadpool/main/taskprocessor.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/threadpool/main/taskprocessor.c?view=diff&rev=378654&r1=378653&r2=378654
==============================================================================
--- team/mmichelson/threadpool/main/taskprocessor.c (original)
+++ team/mmichelson/threadpool/main/taskprocessor.c Mon Jan 7 17:11:41 2013
@@ -417,6 +417,7 @@
static void tps_taskprocessor_destroy(void *tps)
{
struct ast_taskprocessor *t = tps;
+ struct tps_task *task;
if (!tps) {
ast_log(LOG_ERROR, "missing taskprocessor\n");
@@ -437,6 +438,9 @@
ao2_ref(t->listener, -1);
t->listener = NULL;
}
+ while ((task = AST_LIST_REMOVE_HEAD(&t->tps_queue, list))) {
+ tps_task_free(task);
+ }
}
/* pop the front task and return it */
More information about the asterisk-commits
mailing list