[asterisk-commits] jpeeler: branch jpeeler/bug12269 r148114 - /team/jpeeler/bug12269/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 9 18:19:36 CDT 2008


Author: jpeeler
Date: Thu Oct  9 18:19:36 2008
New Revision: 148114

URL: http://svn.digium.com/view/asterisk?view=rev&rev=148114
Log:
get rid of owning_app as that is the whole point of this fix

Modified:
    team/jpeeler/bug12269/channels/chan_agent.c

Modified: team/jpeeler/bug12269/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/bug12269/channels/chan_agent.c?view=diff&rev=148114&r1=148113&r2=148114
==============================================================================
--- team/jpeeler/bug12269/channels/chan_agent.c (original)
+++ team/jpeeler/bug12269/channels/chan_agent.c Thu Oct  9 18:19:36 2008
@@ -197,7 +197,6 @@
 	ast_mutex_t app_lock;          /**< Synchronization between owning applications */
 	int app_lock_flag;
 	ast_cond_t app_complete_cond;
-	volatile pthread_t owning_app; /**< Owning application thread id */
 	volatile int app_sleep_cond;   /**< Sleep condition for the login app */
 	struct ast_channel *owner;     /**< Agent */
 	char loginchan[80];            /**< channel they logged in from */
@@ -384,7 +383,6 @@
 		ast_mutex_init(&p->app_lock);
 		ast_cond_init(&p->app_complete_cond, NULL);
 		p->app_lock_flag = 0;
-		p->owning_app = (pthread_t) -1;
 		p->app_sleep_cond = 1;
 		p->group = group;
 		p->pending = pending;
@@ -944,7 +942,7 @@
 		}
 		/* Release ownership of the agent to other threads (presumably running the login app). */
 		if (ast_strlen_zero(p->loginchan)) {
-ast_log(LOG_NOTICE, "jpeeler: attempting to release app_lock in thread %p with p->owning_app=%p\n", (void *) pthread_self(), (void *) p->owning_app);
+ast_log(LOG_NOTICE, "jpeeler: attempting to release app_lock in thread %p\n", (void *) pthread_self());
 			ast_mutex_lock(&p->app_lock);
 			p->app_lock_flag = 0;
 			ast_cond_signal(&p->app_complete_cond);
@@ -1126,8 +1124,6 @@
 	} 
 	if (p->chan)
 		ast_indicate(p->chan, AST_CONTROL_UNHOLD);
-	p->owning_app = pthread_self();
-ast_log(LOG_NOTICE, "jpeeler: p->owning_app = %p\n", (void *) p->owning_app);
 	/* After the above step, there should not be any blockers. */
 	if (p->chan) {
 		if (ast_test_flag(p->chan, AST_FLAG_BLOCKING)) {
@@ -2282,7 +2278,6 @@
 							}
 ast_log(LOG_NOTICE, "jpeeler: app_lock obtained by thread %p\n", (void *) pthread_self());
 							ast_mutex_lock(&p->lock);
-							p->owning_app = pthread_self();
 							ast_mutex_unlock(&p->lock);
 							if (p->ackcall > 1) 
 								res = agent_ack_sleep(p);




More information about the asterisk-commits mailing list