[asterisk-commits] junky: branch junky/cli-tls r212243 - in /team/junky/cli-tls: channels/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 13 22:13:12 CDT 2009
Author: junky
Date: Thu Aug 13 22:13:07 2009
New Revision: 212243
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212243
Log:
Since in not using all drivers, i forgot few old ast_tls_add_channel().
When looking at my review (reviewboard), i realized few whitespaces were forgot.
Modified:
team/junky/cli-tls/channels/chan_alsa.c
team/junky/cli-tls/channels/chan_dahdi.c
team/junky/cli-tls/channels/chan_gtalk.c
team/junky/cli-tls/channels/chan_h323.c
team/junky/cli-tls/channels/chan_jingle.c
team/junky/cli-tls/channels/chan_misdn.c
team/junky/cli-tls/channels/chan_multicast_rtp.c
team/junky/cli-tls/channels/chan_nbs.c
team/junky/cli-tls/channels/chan_sip.c
team/junky/cli-tls/channels/chan_usbradio.c
team/junky/cli-tls/channels/chan_vpb.cc
team/junky/cli-tls/main/logger.c
Modified: team/junky/cli-tls/channels/chan_alsa.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_alsa.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_alsa.c (original)
+++ team/junky/cli-tls/channels/chan_alsa.c Thu Aug 13 22:13:07 2009
@@ -538,8 +538,8 @@
if (!(tmp = ast_channel_alloc(1, state, 0, 0, "", p->exten, p->context, linkedid, 0, "ALSA/%s", indevname)))
return NULL;
-
- ast_tls_add_channel(tmp);
+
+ ast_channel_threadassoc_add(tmp);
tmp->tech = &alsa_tech;
ast_channel_set_fd(tmp, 0, readdev);
tmp->nativeformats = AST_FORMAT_SLINEAR;
@@ -561,6 +561,7 @@
ast_hangup(tmp);
tmp = NULL;
}
+ ast_channel_threadassoc_del(tmp);
}
return tmp;
Modified: team/junky/cli-tls/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_dahdi.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_dahdi.c (original)
+++ team/junky/cli-tls/channels/chan_dahdi.c Thu Aug 13 22:13:07 2009
@@ -8049,7 +8049,7 @@
tmp = ast_channel_alloc(0, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, linkedid, i->amaflags, "DAHDI/%s", ast_str_buffer(chan_name));
if (!tmp)
return NULL;
- ast_tls_add_channel(tmp);
+ ast_channel_threadassoc_add(tmp);
tmp->tech = &dahdi_tech;
memset(&ps, 0, sizeof(ps));
ps.channo = i->channel;
@@ -8207,6 +8207,7 @@
i->owner = NULL;
return NULL;
}
+ ast_channel_threadassoc_del(tmp);
}
ast_module_ref(ast_module_info->self);
Modified: team/junky/cli-tls/channels/chan_gtalk.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_gtalk.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_gtalk.c (original)
+++ team/junky/cli-tls/channels/chan_gtalk.c Thu Aug 13 22:13:07 2009
@@ -1002,7 +1002,7 @@
ast_log(LOG_WARNING, "Unable to allocate Gtalk channel structure!\n");
return NULL;
}
- ast_tls_add_channel(tmp);
+ ast_channel_threadassoc_add(tmp);
tmp->tech = >alk_tech;
/* Select our native format based on codec preference until we receive
@@ -1069,6 +1069,7 @@
ast_hangup(tmp);
tmp = NULL;
} else {
+ ast_channel_threadassoc_del(tmp);
manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
"Channel: %s\r\nChanneltype: %s\r\nGtalk-SID: %s\r\n",
i->owner ? i->owner->name : "", "Gtalk", i->sid);
Modified: team/junky/cli-tls/channels/chan_h323.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_h323.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_h323.c (original)
+++ team/junky/cli-tls/channels/chan_h323.c Thu Aug 13 22:13:07 2009
@@ -1017,7 +1017,7 @@
ast_module_ref(ast_module_info->self);
ast_mutex_lock(&pvt->lock);
if (ch) {
- ast_tls_add_channel(ch);
+ ast_channel_threadassoc_add(ch);
ch->tech = &oh323_tech;
if (!(fmt = pvt->jointcapability) && !(fmt = pvt->options.capability))
@@ -1091,6 +1091,7 @@
ast_hangup(ch);
ch = NULL;
}
+ ast_channel_threadassoc_del(ch);
}
} else {
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
Modified: team/junky/cli-tls/channels/chan_jingle.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_jingle.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_jingle.c (original)
+++ team/junky/cli-tls/channels/chan_jingle.c Thu Aug 13 22:13:07 2009
@@ -805,7 +805,7 @@
ast_log(LOG_WARNING, "Unable to allocate Jingle channel structure!\n");
return NULL;
}
- ast_tls_add_channel(tmp);
+ ast_channel_threadassoc_add(tmp);
tmp->tech = &jingle_tech;
/* Select our native format based on codec preference until we receive
@@ -869,6 +869,7 @@
ast_hangup(tmp);
tmp = NULL;
}
+ ast_channel_threadassoc_del(tmp);
return tmp;
}
@@ -1042,6 +1043,7 @@
jingle_response(client, pak, "service-unavailable", NULL);
break;
case AST_PBX_SUCCESS:
+ ast_channel_threadassoc_del(chan);
jingle_response(client, pak, NULL, NULL);
jingle_create_candidates(client, p,
iks_find_attrib(pak->query, JINGLE_SID),
Modified: team/junky/cli-tls/channels/chan_misdn.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_misdn.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_misdn.c (original)
+++ team/junky/cli-tls/channels/chan_misdn.c Thu Aug 13 22:13:07 2009
@@ -7789,7 +7789,7 @@
tmp = ast_channel_alloc(1, state, cid_num, cid_name, "", exten, "", linkedid, 0, "%s/%s%d-u%d", misdn_type, c ? "" : "tmp", chan_offset + c, glob_channel++);
if (tmp) {
- ast_tls_add_channel(tmp);
+ ast_channel_threadassoc_add(tmp);
chan_misdn_log(2, 0, " --> * NEW CHANNEL dialed:%s caller:%s\n", exten, callerid);
tmp->nativeformats = prefformat;
@@ -8275,7 +8275,7 @@
misdn_lib_send_event(bc, bc->nt ? EVENT_RELEASE_COMPLETE : EVENT_DISCONNECT);
}
-
+ ast_channel_threadassoc_del(tmp);
while (!ast_strlen_zero(predial)) {
fr.frametype = AST_FRAME_DTMF;
@@ -8461,6 +8461,7 @@
misdn_lib_send_event(bc, EVENT_RELEASE);
}
}
+ ast_channel_threadassoc_del(tmp);
}
static void wait_for_digits(struct chan_list *ch, struct misdn_bchannel *bc, struct ast_channel *chan)
@@ -8554,6 +8555,7 @@
ast_log(LOG_WARNING, "Unable to start pbx channel %s!\n", chan->name);
ast_channel_release(chan);
} else {
+ ast_channel_threadassoc_del(chan);
ast_verb(1, "Started pbx for call completion notify channel %s\n", chan->name);
}
}
Modified: team/junky/cli-tls/channels/chan_multicast_rtp.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_multicast_rtp.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_multicast_rtp.c (original)
+++ team/junky/cli-tls/channels/chan_multicast_rtp.c Thu Aug 13 22:13:07 2009
@@ -146,7 +146,7 @@
}
ast_rtp_instance_set_remote_address(instance, &destination_address);
-
+
ast_channel_threadassoc_add(chan);
chan->tech = &multicast_rtp_tech;
Modified: team/junky/cli-tls/channels/chan_nbs.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_nbs.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_nbs.c (original)
+++ team/junky/cli-tls/channels/chan_nbs.c Thu Aug 13 22:13:07 2009
@@ -224,7 +224,7 @@
struct ast_channel *tmp;
tmp = ast_channel_alloc(1, state, 0, 0, "", "s", context, linkedid, 0, "NBS/%s", i->stream);
if (tmp) {
- ast_tls_add_channel(tmp);
+ ast_channel_threadassoc_add(tmp);
tmp->tech = &nbs_tech;
ast_channel_set_fd(tmp, 0, nbs_fd(i->nbs));
tmp->nativeformats = prefformat;
@@ -245,6 +245,7 @@
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
ast_hangup(tmp);
}
+ ast_channel_threadassoc_add(tmp);
}
} else
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
Modified: team/junky/cli-tls/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_sip.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_sip.c (original)
+++ team/junky/cli-tls/channels/chan_sip.c Thu Aug 13 22:13:07 2009
@@ -19058,8 +19058,6 @@
}
return -1;
}
-
-
ast_channel_threadassoc_add(transferer);
ast_channel_threadassoc_add(transferee);
Modified: team/junky/cli-tls/channels/chan_usbradio.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_usbradio.c?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_usbradio.c (original)
+++ team/junky/cli-tls/channels/chan_usbradio.c Thu Aug 13 22:13:07 2009
@@ -2187,7 +2187,7 @@
c = ast_channel_alloc(1, state, o->cid_num, o->cid_name, "", ext, ctx, linkedid, 0, "Radio/%s", o->name);
if (c == NULL)
return NULL;
- ast_tls_add_channel(c);
+ ast_channel_threadassoc_add(c);
c->tech = &usbradio_tech;
if (o->sounddev < 0)
setformat(o, O_RDWR);
@@ -2218,6 +2218,7 @@
/* XXX what about the channel itself ? */
/* XXX what about usecnt ? */
}
+ ast_channel_threadassoc_del(c);
}
return c;
Modified: team/junky/cli-tls/channels/chan_vpb.cc
URL: http://svn.asterisk.org/svn-view/asterisk/team/junky/cli-tls/channels/chan_vpb.cc?view=diff&rev=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/channels/chan_vpb.cc (original)
+++ team/junky/cli-tls/channels/chan_vpb.cc Thu Aug 13 22:13:07 2009
@@ -2477,7 +2477,7 @@
return NULL;
}
ast_verb(4, "%s: New call for context [%s]\n", me->dev, context);
-
+
tmp = ast_channel_alloc(1, state, 0, 0, "", me->ext, me->context, linkedid, 0, "%s", me->dev);
if (tmp) {
ast_channel_threadassoc_add(tmp);
@@ -2534,7 +2534,7 @@
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
ast_hangup(tmp);
- }
+ }
ast_channel_threadassoc_del(tmp);
}
} else {
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=212243&r1=212242&r2=212243
==============================================================================
--- team/junky/cli-tls/main/logger.c (original)
+++ team/junky/cli-tls/main/logger.c Thu Aug 13 22:13:07 2009
@@ -215,7 +215,7 @@
void junky_printf(const char *msg);
static void __attribute__((format(printf, 1,2))) my_printf(const char *str, ...);
static int ast_filter_reset(void);
-static int ast_filter_remove(const char *name);
+static int ast_filter_remove(const char *name);
static int ast_filter_add(const char *type, const char *name);
//#define PRINTF_DEBUG 1 /* TODO just for debugging now */
@@ -774,7 +774,6 @@
}
AST_RWLIST_UNLOCK(&logchannels);
ast_cli(a->fd, "\n");
-
return CLI_SUCCESS;
}
@@ -909,8 +908,7 @@
count = ast_filter_reset();
ast_cli(a->fd, "%d CLI filters have been sucessfully removed.\n", count);
-
- return CLI_SUCCESS;
+ return CLI_SUCCESS;
}
@@ -1121,7 +1119,7 @@
return -1;
}
- count = ast_filter_add(type,name);
+ count = ast_filter_add(type,name);
astman_append(s, "Response: Success\r\n%s\r\n", idText);
return 0;
}
@@ -1147,7 +1145,7 @@
if (count > 0) {
astman_append(s, "Response: Success\r\n%s\r\n", idText);
} else {
- astman_send_error(s, m, "That filter doesn't exist");
+ astman_send_error(s, m, "That filter doesn't exist");
}
return 0;
}
@@ -1187,7 +1185,7 @@
if (count > 0) {
astman_append(s, "Response: Success\r\n%s", idText);
} else {
- astman_send_error(s, m, "No filters are currently enabled.");
+ astman_send_error(s, m, "No filters are currently enabled.");
}
return 0;
@@ -1774,7 +1772,6 @@
}
}
AST_LIST_TRAVERSE_SAFE_END;
-
return res;
}
@@ -1787,23 +1784,10 @@
{
struct ast_channels *channels = data;
struct logger_filter_list_item *filter;
-
- printf("%s is called. data=%p\n", __PRETTY_FUNCTION__, data );
- /*
- if (channels) {
- junky_printf("filter is there\n");
- if ( filter->chan) {
- my_printf("chan is there [%p]\n",filter->chan);
- }
- //ast_free(filter);
- }
- */
+
+ my_printf("%s is called. data=%p\n", __PRETTY_FUNCTION__, data );
while ((filter = AST_LIST_REMOVE_HEAD(channels, next))) {
- ast_log(LOG_WARNING, "filter will be removed.\n");
- if ( filter->chan) {
- ast_log(LOG_WARNING, "chan is there(%s) \n", filter->chan->name);
- }
- ast_log(LOG_WARNING, "filter[%s] will be removed\n", filter->chan->name);
+ my_printf("filter[%s] will be removed\n", filter->chan->name);
ast_free(filter);
}
}
@@ -1834,7 +1818,7 @@
return res;
}
my_printf("chan is %s\n", filter->chan->name);
-
+
AST_LIST_TRAVERSE(&ast_cli_filters, c, filter_list) {
if ( c->type == 1 ) {
ast_copy_string(comparator, filter->chan->name, sizeof(comparator));
More information about the asterisk-commits
mailing list