[asterisk-commits] dhubbard: branch dhubbard/named_processors r108676 - /team/dhubbard/named_pro...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 13 23:33:10 CDT 2008


Author: dhubbard
Date: Thu Mar 13 23:33:10 2008
New Revision: 108676

URL: http://svn.digium.com/view/asterisk?view=rev&rev=108676
Log:
the device_state structure is no longer needed in app_queue

Modified:
    team/dhubbard/named_processors/apps/app_queue.c

Modified: team/dhubbard/named_processors/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/dhubbard/named_processors/apps/app_queue.c?view=diff&rev=108676&r1=108675&r2=108676
==============================================================================
--- team/dhubbard/named_processors/apps/app_queue.c (original)
+++ team/dhubbard/named_processors/apps/app_queue.c Thu Mar 13 23:33:10 2008
@@ -768,22 +768,6 @@
 	task->_datap = NULL;
 	return 0;
 }
-
-/*! \brief Data used by the device state thread */
-static struct {
-	/*! Set to 1 to stop the thread */
-	unsigned int stop:1;
-	/*! The device state monitoring thread */
-	pthread_t thread;
-	/*! Lock for the state change queue */
-	ast_mutex_t lock;
-	/*! Condition for the state change queue */
-	ast_cond_t cond;
-	/*! Queue of state changes */
-	AST_LIST_HEAD_NOLOCK(, statechange) state_change_q;
-} device_state = {
-	.thread = AST_PTHREADT_NULL,
-};
 
 static void device_state_cb(const struct ast_event *event, void *unused)
 {
@@ -6179,14 +6163,6 @@
 	int res;
 	struct ast_context *con;
 
-	if (device_state.thread != AST_PTHREADT_NULL) {
-		device_state.stop = 1;
-		ast_mutex_lock(&device_state.lock);
-		ast_cond_signal(&device_state.cond);
-		ast_mutex_unlock(&device_state.lock);
-		pthread_join(device_state.thread, NULL);
-	}
-
 	ast_cli_unregister_multiple(cli_queue, sizeof(cli_queue) / sizeof(struct ast_cli_entry));
 	res = ast_manager_unregister("QueueStatus");
 	res |= ast_manager_unregister("Queues");
@@ -6244,9 +6220,6 @@
 	if (queue_persistent_members)
 		reload_queue_members();
 
-	ast_mutex_init(&device_state.lock);
-	ast_cond_init(&device_state.cond, NULL);
-
 	ast_cli_register_multiple(cli_queue, sizeof(cli_queue) / sizeof(struct ast_cli_entry));
 	res = ast_register_application(app, queue_exec, synopsis, descrip);
 	res |= ast_register_application(app_aqm, aqm_exec, app_aqm_synopsis, app_aqm_descrip);




More information about the asterisk-commits mailing list