[asterisk-commits] junky: branch junky/cli-tls r204380 - /team/junky/cli-tls/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 29 23:01:33 CDT 2009
Author: junky
Date: Mon Jun 29 23:01:29 2009
New Revision: 204380
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=204380
Log:
tried to make progress, commit this so we can check the code together.
Modified:
team/junky/cli-tls/main/logger.c
team/junky/cli-tls/main/pbx.c
Modified: team/junky/cli-tls/main/logger.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/main/logger.c?view=diff&rev=204380&r1=204379&r2=204380
==============================================================================
--- team/junky/cli-tls/main/logger.c (original)
+++ team/junky/cli-tls/main/logger.c Mon Jun 29 23:01:29 2009
@@ -1113,9 +1113,6 @@
/* If filters are enabled
ignore if the string doesnt match these filters
- if (AST_LIST_EMPTY(&ast_cli_filters)) {
-
- }
if ((filter = ast_threadstorage_get(&filter_channels, sizeof(*filter)))) {
if (filter->chan) {
@@ -1124,6 +1121,7 @@
}
*/
+
/* Build string */
va_start(ap, fmt);
res = ast_str_set_va(&buf, BUFSIZ, fmt, ap);
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=204380&r1=204379&r2=204380
==============================================================================
--- team/junky/cli-tls/main/pbx.c (original)
+++ team/junky/cli-tls/main/pbx.c Mon Jun 29 23:01:29 2009
@@ -785,12 +785,22 @@
/* List of channels used for filtering */
AST_LIST_HEAD_NOLOCK(ast_channels, logger_filter_list_item);
+//AST_LIST_HEAD_NOLOCK(ast_channels, ast_channel);
+//AST_LIST_HEAD_NOLOCK(ast_channels, filter_channel);
struct logger_filter_list_item {
struct ast_channels list;
struct ast_channel *chan;
AST_LIST_ENTRY(logger_filter_list_item) next;
};
+
+
+/*
+struct filter_channel {
+ struct ast_frames list;
+ struct ast_channel *chan;
+};
+*/
static void filter_channel_cleanup(void *data);
@@ -3152,6 +3162,8 @@
static char *handle_ts_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct logger_filter_list_item *filter;
+ struct logger_filter_list_item *fi;
+ //struct ast_channel *chan;
switch (cmd) {
case CLI_INIT:
@@ -3170,15 +3182,12 @@
if ((filter = ast_threadstorage_get(&filter_channels, sizeof(*filter)))) {
- ast_log(LOG_WARNING, "filter is there");
- AST_LIST_TRAVERSE_SAFE_BEGIN(&filter->list, filter, next) {
+ //ast_log(LOG_WARNING, "filter is there\n");
+ //AST_LIST_TRAVERSE_SAFE_BEGIN(&filter->list, chan, chan_list) {
+ AST_LIST_TRAVERSE_SAFE_BEGIN(&filter->list, fi, next) {
ast_log(LOG_WARNING, "filter!!!\n");
}
AST_LIST_TRAVERSE_SAFE_END;
-
- if ( filter->chan) {
- ast_log(LOG_WARNING, "channel is there\n");
- }
}
/*
AST_LIST_TRAVERSE(&ast_channels, filter, next) {
@@ -10094,26 +10103,30 @@
if ((filter = ast_threadstorage_get(&filter_channels, sizeof(*filter)))) {
ast_log(LOG_WARNING, "ive to remove \n");
}
- */
while ((filter = AST_LIST_REMOVE_HEAD(&filter->list, next))) {
ast_log(LOG_WARNING, "filter has been removed.\n");
ast_free(filter);
}
+ */
}
//http://pastebin.ca/1474652
int tls_add_channel(struct ast_channel *chan){
struct logger_filter_list_item *filter;
+ struct logger_filter_list_item *fi;
int res = 0;
if ((filter = ast_threadstorage_get(&filter_channels, sizeof(*filter)))) {
ast_log(LOG_WARNING, "Adding channel(%s) to channels_list\n", chan->name);
- filter = ast_calloc(1, sizeof(*filter));
- filter->chan = chan;
- ast_log(LOG_WARNING, "TLS channel name is:%s\n", filter->chan->name);
- AST_LIST_INSERT_HEAD(&filter->list, filter, next);
+ fi = ast_calloc(1, sizeof(*fi));
+ fi->chan = chan;
+ ast_log(LOG_WARNING, "TLS channel name is:%s\n", fi->chan->name);
+ //AST_LIST_INSERT_HEAD(&filter->list, chan, chan_list);
+ AST_LIST_INSERT_HEAD(&filter->list, fi, next);
+ //AST_RWLIST_INSERT_HEAD(&ast_channels, filter, next);
+ //AST_RWLIST_INSERT_HEAD(&filter->list, chan, chan_list);
//AST_RWLIST_INSERT_HEAD(&ast_channels, filter, next);
} else {
ast_log(LOG_WARNING, "Out of memory\n");
More information about the asterisk-commits
mailing list