[asterisk-commits] dhubbard: branch dhubbard/named_processors r107010 - in /team/dhubbard/named_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Mar 8 22:07:24 CST 2008


Author: dhubbard
Date: Sat Mar  8 22:07:23 2008
New Revision: 107010

URL: http://svn.digium.com/view/asterisk?view=rev&rev=107010
Log:
russell squashes some bugs

Modified:
    team/dhubbard/named_processors/res/res_testobserver.c
    team/dhubbard/named_processors/res/sandbox/taskprocessor.c

Modified: team/dhubbard/named_processors/res/res_testobserver.c
URL: http://svn.digium.com/view/asterisk/team/dhubbard/named_processors/res/res_testobserver.c?view=diff&rev=107010&r1=107009&r2=107010
==============================================================================
--- team/dhubbard/named_processors/res/res_testobserver.c (original)
+++ team/dhubbard/named_processors/res/res_testobserver.c Sat Mar  8 22:07:23 2008
@@ -229,14 +229,13 @@
 	for (count=MAX_TEST_PROCESSORS; count > 0; count--) {
 		snprintf(tbuf, sizeof(tbuf), "sillyprocessor-%d", count-1);
 		ast_log(LOG_NOTICE, "-- testobserver -- unloading %s\n", tbuf);
-		if (!exists_taskprocessor_singleton(tbuf)) {
+		if (exists_taskprocessor_singleton(tbuf)) {
 			if (stop_taskprocessor_singleton(tbuf) < 0) {
 				ast_log(LOG_ERROR, "can't stop \'%s\' taskprocessor singleton\n", tbuf);
 				return -1;
 			}	
 		}	
 	}
-	wait_for_all_taskprocessors_to_stop();
 	ast_log(LOG_NOTICE, "-- testobserver -- unload complete.\n");
 	usleep(100);
 	res = ast_unregister_application(app);

Modified: team/dhubbard/named_processors/res/sandbox/taskprocessor.c
URL: http://svn.digium.com/view/asterisk/team/dhubbard/named_processors/res/sandbox/taskprocessor.c?view=diff&rev=107010&r1=107009&r2=107010
==============================================================================
--- team/dhubbard/named_processors/res/sandbox/taskprocessor.c (original)
+++ team/dhubbard/named_processors/res/sandbox/taskprocessor.c Sat Mar  8 22:07:23 2008
@@ -213,7 +213,7 @@
 	index = size_of_taskprocessor_singleton_list();
 	ast_log(LOG_DEBUG, "found taskprocessor %s at index %d\n", name, index);
 	pthread_attr_init(&_attribute[index]);
-	pthread_attr_setdetachstate(&_attribute[index], PTHREAD_CREATE_DETACHED);
+	//pthread_attr_setdetachstate(&_attribute[index], PTHREAD_CREATE_DETACHED);
 	/* stay stopped if we are supposed to be stopped */
 	if (p->_poll_thread == AST_PTHREADT_STOP) {
 		ast_log(LOG_DEBUG, "poll thread == AST_PTHREADT_STOP.\n");
@@ -272,18 +272,18 @@
 {
 	int pending;
 	int stop_waiting = 0;
-	//struct taskprocessor_singleton_info* n = NULL;
+	struct taskprocessor_singleton_info* n = NULL;
 
 	while (!stop_waiting) {
 		pending = 0;
 		AST_LIST_LOCK(&_taskprocessor_singletons);
 		if (_taskprocessor_singletons_list_size > 0) 
-//		AST_LIST_TRAVERSE(&_taskprocessor_singletons, n, list) {
-//			if (!n->_is_purged) {
-//				pending++;
+		AST_LIST_TRAVERSE(&_taskprocessor_singletons, n, list) {
+			if (!n->_is_purged) {
+				pending++;
 				break;
-//			}
-//		}
+			}
+		}
 		AST_LIST_UNLOCK(&_taskprocessor_singletons);
 		if (!pending) {
 			stop_waiting++;




More information about the asterisk-commits mailing list