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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 6 22:27:27 CST 2008


Author: dhubbard
Date: Thu Mar  6 22:27:26 2008
New Revision: 106551

URL: http://svn.digium.com/view/asterisk?view=rev&rev=106551
Log:
remove redundant information

Modified:
    team/dhubbard/named_processors/res/res_testobserver.c
    team/dhubbard/named_processors/res/sandbox/configuration.c
    team/dhubbard/named_processors/res/sandbox/simobject.c
    team/dhubbard/named_processors/res/sandbox/task.c
    team/dhubbard/named_processors/res/sandbox/taskconsumer.c
    team/dhubbard/named_processors/res/sandbox/taskprocessor.c
    team/dhubbard/named_processors/res/sandbox/taskproducer.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=106551&r1=106550&r2=106551
==============================================================================
--- team/dhubbard/named_processors/res/res_testobserver.c (original)
+++ team/dhubbard/named_processors/res/res_testobserver.c Thu Mar  6 22:27:26 2008
@@ -135,7 +135,7 @@
 
 	i = (struct taskprocessor_singleton_info*)data;
 	if (!i) {
-		ast_log(LOG_ERROR, "cannot start thread_function loop without a taskprocessor_singleton_info structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot start thread_function loop without a taskprocessor_singleton_info structure.\n");
 		return NULL;
 	}
 
@@ -161,16 +161,16 @@
 			/* stuff is in the queue */
 			t = pop_task_from_taskprocessor_singleton(i);
 			if (!t) {
-				ast_log(LOG_ERROR, "Huh?? size of queue is not zero(%ld), but the queue popped a NULL!  FILE: %s, LINE: %d\n", qsize, __FILE__, __LINE__);
+				ast_log(LOG_ERROR, "Huh?? size of queue is not zero(%ld), but the queue popped a NULL!\n", qsize);
 				continue;
 			}
 			if (!t->execute) {
-				ast_log(LOG_ERROR, "task is missing its execute callback.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+				ast_log(LOG_ERROR, "task is missing its execute callback.\n");
 				release_task(t);
 				continue;
 			}
 			if (t->execute(t) < 0) {
-				ast_log(LOG_ERROR, "task::execute() returned failure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+				ast_log(LOG_ERROR, "execute() returned failure.\n");
 			}
 			ast_mutex_lock(&i->_taskprocessor_lock);
 			if (i->_stats) {
@@ -284,10 +284,9 @@
 	return AST_MODULE_LOAD_SUCCESS;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "sandbox application",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "test sandbox application",
 		.load = load_module,
 		.unload = unload_module,
 		);
 
-//AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "testobserver Application");
-
+

Modified: team/dhubbard/named_processors/res/sandbox/configuration.c
URL: http://svn.digium.com/view/asterisk/team/dhubbard/named_processors/res/sandbox/configuration.c?view=diff&rev=106551&r1=106550&r2=106551
==============================================================================
--- team/dhubbard/named_processors/res/sandbox/configuration.c (original)
+++ team/dhubbard/named_processors/res/sandbox/configuration.c Thu Mar  6 22:27:26 2008
@@ -167,7 +167,7 @@
 	/* load configuration file */
 	cfg = ast_config_load(resx_configuration_file(), config_flags);
 	if (!cfg) {
-		ast_log(LOG_ERROR, "Unable to load config \'%s\'.  FILE: %s, LINE: %d\n", resx_configuration_file(), __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "Unable to load config \'%s\'.\n", resx_configuration_file());
 		return -1;
 	}
 	
@@ -195,7 +195,7 @@
 	ast_log(LOG_DEBUG, "parsing configuration\n");
 	
 	if (__resx_initialize_resx_config_options() < 0) {
-		ast_log(LOG_WARNING, "ummmm...the gosintas are starting off on the wrong foot.  FILE: %s, LINE: %d.\n", __FILE__, __LINE__);
+		ast_log(LOG_WARNING, "configuration options failed to initialize\n");
 	}
 	if (__resx_parse_cfg_section_general() < 0) {
 		ast_log(LOG_ERROR, "__resx_parse_cfg_section_general() failure\n");

Modified: team/dhubbard/named_processors/res/sandbox/simobject.c
URL: http://svn.digium.com/view/asterisk/team/dhubbard/named_processors/res/sandbox/simobject.c?view=diff&rev=106551&r1=106550&r2=106551
==============================================================================
--- team/dhubbard/named_processors/res/sandbox/simobject.c (original)
+++ team/dhubbard/named_processors/res/sandbox/simobject.c Thu Mar  6 22:27:26 2008
@@ -31,13 +31,13 @@
 
 	t = get_taskprocessor_singleton(named_taskprocessor);
 	if (!t) {
-		ast_log(LOG_ERROR, "could not locate taskprocessor named \'%s\' for simobject \'%s\' construction.  FILE: %s, LINE: %d\n"
-			, named_taskprocessor, name, __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "could not locate taskprocessor named \'%s\' for simobject \'%s\' construction.\n"
+			, named_taskprocessor, name);
 		return NULL;
 	}
 	s = malloc(sizeof(struct simobject));
 	if (!s) {
-		ast_log(LOG_ERROR, "cannot allocate memory for a simobject structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot allocate memory for a simobject structure.\n");
 		return NULL;
 	}
 	memset(s, 0, sizeof(struct simobject));
@@ -58,13 +58,13 @@
 
 	t = get_taskprocessor_singleton(named_taskprocessor);
 	if (!t) {
-		ast_log(LOG_ERROR, "could not locate taskprocessor named \'%s\' for sim-producer \'%s\' construction.  FILE: %s, LINE: %d\n"
-			, named_taskprocessor, name, __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "could not locate taskprocessor named \'%s\' for sim-producer \'%s\' construction.\n"
+			, named_taskprocessor, name);
 		return NULL;
 	}
 	s = malloc(sizeof(struct simobject));
 	if (!s) {
-		ast_log(LOG_ERROR, "cannot allocate memory for a simobject structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot allocate memory for a simobject structure.\n");
 		return NULL;
 	}
 	memset(s, 0, sizeof(struct simobject));
@@ -100,13 +100,13 @@
 
 	t = get_taskprocessor_singleton(named_taskprocessor);
 	if (!t) {
-		ast_log(LOG_ERROR, "could not locate taskprocessor named \'%s\' for sim-consumer \'%s\' construction.  FILE: %s, LINE: %d\n"
-			, named_taskprocessor, name, __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "could not locate taskprocessor named \'%s\' for sim-consumer \'%s\' construction.\n"
+			, named_taskprocessor, name);
 		return NULL;
 	}
 	s = malloc(sizeof(struct simobject));
 	if (!s) {
-		ast_log(LOG_ERROR, "cannot allocate memory for a simobject structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot allocate memory for a simobject structure.\n");
 		return NULL;
 	}
 	memset(s, 0, sizeof(struct simobject));
@@ -156,7 +156,7 @@
 		t->_p_consumer = s->_consumer;
 		t->execute = simobject_taskhandler;
 		if (s->_producer->queue_task && (s->_producer->queue_task(s->_producer, t) < 0)) {
-			ast_log(LOG_WARNING, "simobject \'%s\' failed to queue task!  FILE: %s, LINE: %d\n", s->_name, __FILE__, __LINE__);
+			ast_log(LOG_WARNING, "simobject \'%s\' failed to queue task!\n", s->_name);
 			return -1;
 		}
 		ast_log(LOG_DEBUG, "simobject \'%s\' queued task: 0x%ld to processor \'%s\'\n", s->_name, (unsigned long)t->_id, s->_producer->_taskprocessor->_name);
@@ -214,7 +214,7 @@
 
 	i = (struct taskprocessor_singleton_info*)data;
 	if (!i) {
-		ast_log(LOG_ERROR, "cannot start thread_function loop without a taskprocessor_singleton_info structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot start thread_function loop without a taskprocessor_singleton_info structure.\n");
 		return NULL;
 	}
 	snprintf(name, sizeof(name), "%s", i->_name);

Modified: team/dhubbard/named_processors/res/sandbox/task.c
URL: http://svn.digium.com/view/asterisk/team/dhubbard/named_processors/res/sandbox/task.c?view=diff&rev=106551&r1=106550&r2=106551
==============================================================================
--- team/dhubbard/named_processors/res/sandbox/task.c (original)
+++ team/dhubbard/named_processors/res/sandbox/task.c Thu Mar  6 22:27:26 2008
@@ -62,7 +62,7 @@
 		AST_LIST_UNLOCK(&_task_pool);
 		usleep(1);
 		if (lock_failures > 10000) {
-			ast_log(LOG_ERROR, "\n\tcannot lock task pool.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+			ast_log(LOG_ERROR, "\n\tcannot lock task pool.\n");
 			return NULL;
 		}
 		AST_LIST_LOCK(&_task_pool);
@@ -71,7 +71,7 @@
 	if (_global_kill_taskpool != 0) {
 		ast_mutex_unlock(&_global_kill_taskpool_lock);
 		AST_LIST_UNLOCK(&_task_pool);
-		ast_log(LOG_NOTICE, "task pool is no longer available to requestors.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_NOTICE, "task pool is no longer available to requestors.\n");
 		return NULL;
 	}
 	if (AST_LIST_EMPTY(&_task_pool)) {
@@ -139,7 +139,7 @@
 		AST_LIST_UNLOCK(&_task_pool);
 		usleep(1);
 		if (lock_failures > 10000) {
-			ast_log(LOG_ERROR, "\n\tcannot lock task pool.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+			ast_log(LOG_ERROR, "\n\tcannot lock task pool.\n");
 			return 0;
 		}
 		AST_LIST_LOCK(&_task_pool);

Modified: team/dhubbard/named_processors/res/sandbox/taskconsumer.c
URL: http://svn.digium.com/view/asterisk/team/dhubbard/named_processors/res/sandbox/taskconsumer.c?view=diff&rev=106551&r1=106550&r2=106551
==============================================================================
--- team/dhubbard/named_processors/res/sandbox/taskconsumer.c (original)
+++ team/dhubbard/named_processors/res/sandbox/taskconsumer.c Thu Mar  6 22:27:26 2008
@@ -41,7 +41,7 @@
 	struct taskconsumer* c = NULL;
 	c = malloc(sizeof(struct taskconsumer));
 	if (!c) {
-		ast_log(LOG_ERROR, "cannot allocate memory for a taskconsumer structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot allocate memory for a taskconsumer structure.\n");
 		return NULL;
 	}
 	memset(c, 0, sizeof(struct taskconsumer));

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=106551&r1=106550&r2=106551
==============================================================================
--- team/dhubbard/named_processors/res/sandbox/taskprocessor.c (original)
+++ team/dhubbard/named_processors/res/sandbox/taskprocessor.c Thu Mar  6 22:27:26 2008
@@ -172,7 +172,7 @@
 	struct taskprocessor_singleton_info* t = NULL;
 	t = malloc(sizeof(struct taskprocessor_singleton_info));
 	if (!t) {
-		ast_log(LOG_ERROR, "cannot allocate memory for a taskprocessor_singleton_info structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot allocate memory for a taskprocessor_singleton_info structure.\n");
 		return NULL;
 	}
 	memset(t, 0, sizeof(struct taskprocessor_singleton_info));
@@ -185,7 +185,7 @@
 	t->_poll_thread = AST_PTHREADT_NULL;
 	t->_stats = malloc(sizeof(struct taskprocessor_singleton_stats));
 	if (!t->_stats) {
-		ast_log(LOG_ERROR, "cannot allocate memory for a taskprocessor_singleton_stats structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot allocate memory for a taskprocessor_singleton_stats structure.\n");
 		free(t);
 		return NULL;
 	}
@@ -201,7 +201,7 @@
 
 	p = default_taskprocessor_constructor(1);
 	if (!p) {
-		ast_log(LOG_ERROR, "we can't create a taskprocessor_singleton because the default constructor failed.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "we can't create a taskprocessor_singleton because the default constructor failed.\n");
 		return -1;
 	}
 	snprintf(p->_name, sizeof(p->_name), "%s", name);
@@ -216,13 +216,13 @@
 	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.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_DEBUG, "poll thread == AST_PTHREADT_STOP.\n");
 		return 0;
 	}
 	ast_mutex_lock(&p->_taskprocessor_lock);
 	if (p->_poll_thread == pthread_self()) {
 		ast_mutex_unlock(&p->_taskprocessor_lock);
-		ast_log(LOG_DEBUG, "cannot kill myself.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_DEBUG, "cannot kill myself.\n");
 		return -1;
 	}
 	if (p->_poll_thread != AST_PTHREADT_NULL) {
@@ -232,7 +232,7 @@
 		/* create it */
 		if (ast_pthread_create(&p->_poll_thread, &_attribute[index], func, p) < 0) {
 			ast_mutex_unlock(&p->_taskprocessor_lock);
-			ast_log(LOG_ERROR, "failed to create thread \'%s\'.  FILE: %s, LINE: %d\n", p->_name, __FILE__, __LINE__);
+			ast_log(LOG_ERROR, "failed to create thread \'%s\'.\n", p->_name);
 			return -1;
 		}
 	}
@@ -253,7 +253,7 @@
 	struct taskprocessor_singleton_info* p;
 	p = get_taskprocessor_singleton(name);
 	if (!p) {
-		ast_log(LOG_ERROR, "no taskprocessor named \'%s\' to stop.  FILE: %s, LINE: %d\n", name, __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "no taskprocessor named \'%s\' to stop.\n", name);
 		return -1;
 	}
 	p->_poll_thread_run = 0;
@@ -296,15 +296,15 @@
 int destruct_taskprocessor_singleton(struct taskprocessor_singleton_info* t)
 {
 	if (!t) {
-		ast_log(LOG_ERROR, "can't destruct a NULL taskprocessor_singleton.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "can't destruct a NULL taskprocessor_singleton.\n");
 		return -1;
 	}
 	if (t->_poll_thread_run) {
-		ast_log(LOG_ERROR, "stop the taskprocessor before trying to destruct it.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "stop the taskprocessor before trying to destruct it.\n");
 		return -1;
 	}
 	if (remove_taskprocessor_singleton(t->_name) < 0) {
-		ast_log(LOG_WARNING, "cannot remove taskprocessor_singleton \'%s\'.  FILE: %s, LINE: %d\n", t->_name, __FILE__, __LINE__);
+		ast_log(LOG_WARNING, "cannot remove taskprocessor_singleton \'%s\'.\n", t->_name);
 	}
 	if (t->_stats) {
 		free(t->_stats);
@@ -354,7 +354,7 @@
 	struct taskprocessor_singleton_info* n;
 
 	if (!name) {
-		ast_log(LOG_WARNING, "requesting a nameless taskprocessor!!!  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_WARNING, "requesting a nameless taskprocessor!!!\n");
 		return NULL;
 	}
 	AST_LIST_LOCK(&_taskprocessor_singletons);
@@ -403,7 +403,7 @@
 	int lock_failures = 0;
 
 	if ((!tp) || (!t)) {
-		ast_log(LOG_ERROR, "a taskprocessor (0x%ld) and a task (0x%ld) are required and missing.  FILE: %s, LINE: %d\n", (long)tp, (long)t, __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "a taskprocessor (0x%ld) and a task (0x%ld) are required and missing.\n", (long)tp, (long)t);
 		return -1;
 	}
 	AST_LIST_LOCK(&tp->_queue);
@@ -412,7 +412,7 @@
 		AST_LIST_UNLOCK(&tp->_queue);
 		usleep(1);
 		if (lock_failures > 10000) {
-			ast_log(LOG_ERROR, "cannot lock taskprocessor.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+			ast_log(LOG_ERROR, "cannot lock taskprocessor.\n");
 			return -1;
 		}
 		AST_LIST_LOCK(&tp->_queue);
@@ -437,7 +437,7 @@
 		AST_LIST_UNLOCK(&tp->_queue);
 		usleep(1);
 		if (lock_failures > 10000) {
-			ast_log(LOG_ERROR, "cannot lock taskprocessor.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+			ast_log(LOG_ERROR, "cannot lock taskprocessor.\n");
 			return t;
 		}
 		AST_LIST_LOCK(&tp->_queue);
@@ -462,7 +462,7 @@
 		AST_LIST_UNLOCK(&tp->_queue);
 		usleep(1);
 		if (lock_failures > 10000) {
-			ast_log(LOG_ERROR, "cannot lock taskprocessor.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+			ast_log(LOG_ERROR, "cannot lock taskprocessor.\n");
 			return size;
 		}
 		AST_LIST_LOCK(&tp->_queue);

Modified: team/dhubbard/named_processors/res/sandbox/taskproducer.c
URL: http://svn.digium.com/view/asterisk/team/dhubbard/named_processors/res/sandbox/taskproducer.c?view=diff&rev=106551&r1=106550&r2=106551
==============================================================================
--- team/dhubbard/named_processors/res/sandbox/taskproducer.c (original)
+++ team/dhubbard/named_processors/res/sandbox/taskproducer.c Thu Mar  6 22:27:26 2008
@@ -28,17 +28,17 @@
 static int default_queue_task(struct taskproducer* producer, struct a_task* task)
 {
 	if ((!producer) || (!task)) {
-		ast_log(LOG_ERROR, "a taskproducer: 0x%ld and a task: 0x%ld are required for this operation.  FILE: %s, LINE: %d\n"
+		ast_log(LOG_ERROR, "a taskproducer: 0x%ld and a task: 0x%ld are required for this operation.\n"
 			, (unsigned long)producer
 			, (unsigned long)task
-			, __FILE__, __LINE__);
+			);
 		return -1;
 	}
 	if (push_task_to_taskprocessor_singleton(producer->_taskprocessor, task) < 0) {
-		ast_log(LOG_ERROR, "we failed to push task: 0x%ld to taskprocessor \'%s\'.  FILE: %s, LINE: %d\n"
+		ast_log(LOG_ERROR, "we failed to push task: 0x%ld to taskprocessor \'%s\'.\n"
 			, (unsigned long)task->_id
 			, (producer->_taskprocessor)?producer->_taskprocessor->_name:"<null>"
-			, __FILE__, __LINE__);
+			);
 		return -1;
 	}
 	producer->_tasks_produced++;
@@ -55,7 +55,7 @@
 	struct taskproducer* p = NULL;
 	p = malloc(sizeof(struct taskproducer));
 	if (!p) {
-		ast_log(LOG_ERROR, "cannot allocate memory for a taskproducer structure.  FILE: %s, LINE: %d\n", __FILE__, __LINE__);
+		ast_log(LOG_ERROR, "cannot allocate memory for a taskproducer structure.\n");
 		return NULL;
 	}
 	memset(p, 0, sizeof(struct taskproducer));




More information about the asterisk-commits mailing list