[asterisk-commits] junky: branch junky/cli-tls r199854 - in /team/junky/cli-tls/main: frame.c pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 9 23:17:30 CDT 2009


Author: junky
Date: Tue Jun  9 23:17:13 2009
New Revision: 199854

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=199854
Log:
put the TLS in ast_pbx_start()
Also created the container 



Modified:
    team/junky/cli-tls/main/frame.c
    team/junky/cli-tls/main/pbx.c

Modified: team/junky/cli-tls/main/frame.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/main/frame.c?view=diff&rev=199854&r1=199853&r2=199854
==============================================================================
--- team/junky/cli-tls/main/frame.c (original)
+++ team/junky/cli-tls/main/frame.c Tue Jun  9 23:17:13 2009
@@ -338,6 +338,8 @@
 		ast_free(f);
 	
 	ast_free(frames);
+
+	ast_log(LOG_WARNING, "frame_cache_cleanup has been called.\n");
 }
 #endif
 

Modified: team/junky/cli-tls/main/pbx.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/main/pbx.c?view=diff&rev=199854&r1=199853&r2=199854
==============================================================================
--- team/junky/cli-tls/main/pbx.c (original)
+++ team/junky/cli-tls/main/pbx.c Tue Jun  9 23:17:13 2009
@@ -775,9 +775,19 @@
 struct ast_app;
 
 static struct ast_taskprocessor *device_state_tps;
+static void logger_channel_cleanup(void *data);
 
 AST_THREADSTORAGE(switch_data);
 AST_THREADSTORAGE(extensionstate_buf);
+AST_THREADSTORAGE_CUSTOM(logger_channel, NULL, logger_channel_cleanup);
+
+/* List of channels used for filtering */
+AST_LIST_HEAD_NOLOCK(ast_channels, ast_channel);
+
+struct ast_logger_channels {
+        struct ast_channels list;
+};
+
 
 /*!
    \brief ast_exten: An extension
@@ -995,6 +1005,10 @@
 	int replace, const char *extension, int priority, const char *label, const char *callerid,
 	const char *application, void *data, void (*datad)(void *),
 	const char *registrar, int lockconts, int lockhints);
+
+
+
+
 
 /* a func for qsort to use to sort a char array */
 static int compare_char(const void *a, const void *b)
@@ -4884,6 +4898,7 @@
 enum ast_pbx_result ast_pbx_start(struct ast_channel *c)
 {
 	pthread_t t;
+	struct ast_logger_channels *channels;
 
 	if (!c) {
 		ast_log(LOG_WARNING, "Asked to start thread on NULL channel?\n");
@@ -4898,6 +4913,14 @@
 		ast_log(LOG_WARNING, "Failed to create new channel thread\n");
 		decrease_call_count();
 		return AST_PBX_FAILED;
+	}
+
+	ast_log(LOG_WARNING, "New thread started. (channel name=%s)\n", c->name);
+	if ((channels = ast_threadstorage_get(&logger_channel, sizeof(*c)))) {
+		ast_log(LOG_WARNING, "Adding channel(%s) to channels_list\n", c->name);
+		AST_LIST_INSERT_HEAD(&channels->list, c, chan_list);	
+	} else {
+		ast_log(LOG_WARNING, "obj already exists\n");
 	}
 
 	return AST_PBX_SUCCESS;
@@ -9883,3 +9906,9 @@
 
 	return ret;
 }
+
+static void logger_channel_cleanup(void *data)
+{
+	ast_log(LOG_WARNING, "logger_channel_cleanup is called.\n");
+}
+




More information about the asterisk-commits mailing list