[asterisk-commits] qwell: trunk r55556 - in /trunk: ./ channels/
res/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Feb 20 09:56:58 MST 2007
Author: qwell
Date: Tue Feb 20 10:56:58 2007
New Revision: 55556
URL: http://svn.digium.com/view/asterisk?view=rev&rev=55556
Log:
Merged revisions 55555 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r55555 | qwell | 2007-02-20 10:53:45 -0600 (Tue, 20 Feb 2007) | 4 lines
No need to cast nor free with strdupa (thanks file)
55555!
........
Modified:
trunk/ (props changed)
trunk/channels/chan_gtalk.c
trunk/channels/chan_jingle.c
trunk/res/res_jabber.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_gtalk.c?view=diff&rev=55556&r1=55555&r2=55556
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Tue Feb 20 10:56:58 2007
@@ -258,10 +258,9 @@
struct gtalk *gtalk = NULL;
char *domain = NULL , *s = NULL;
if(strchr(connection, '@')) {
- s = ast_strdupa((char *) connection);
+ s = ast_strdupa(connection);
domain = strsep(&s, "@");
ast_verbose("OOOOH domain = %s\n", domain);
- free(s);
}
gtalk = ASTOBJ_CONTAINER_FIND(>alk_list, name);
if (!gtalk && strchr(name, '@'))
@@ -876,13 +875,11 @@
}
if(strchr(tmp->us, '/')) {
- data = ast_strdupa((char *) tmp->us);
+ data = ast_strdupa(tmp->us);
exten = strsep(&data, "/");
} else
exten = tmp->us;
ast_copy_string(tmp->exten, exten, sizeof(tmp->exten));
- if(data)
- free(data);
ast_mutex_init(&tmp->lock);
ast_mutex_lock(>alklock);
tmp->next = client->p;
@@ -1480,15 +1477,13 @@
struct ast_channel *chan = NULL;
if (data) {
- s = ast_strdupa((char *) data);
+ s = ast_strdupa(data);
if (s) {
sender = strsep(&s, "/");
if (sender && (sender[0] != '\0'))
to = strsep(&s, "/");
if (!to) {
ast_log(LOG_ERROR, "Bad arguments in Gtalk Dialstring: %s\n", (char*) data);
- if (s)
- free(s);
return NULL;
}
}
@@ -1496,8 +1491,6 @@
client = find_gtalk(to, sender);
if (!client) {
ast_log(LOG_WARNING, "Could not find recipient.\n");
- if (s)
- free(s);
return NULL;
}
p = gtalk_alloc(client, strchr(sender, '@') ? sender : client->connection->jid->full, strchr(to, '@') ? to : client->user, NULL);
Modified: trunk/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_jingle.c?view=diff&rev=55556&r1=55555&r2=55556
==============================================================================
--- trunk/channels/chan_jingle.c (original)
+++ trunk/channels/chan_jingle.c Tue Feb 20 10:56:58 2007
@@ -1360,15 +1360,13 @@
struct ast_channel *chan = NULL;
if (data) {
- s = ast_strdupa((char *) data);
+ s = ast_strdupa(data);
if (s) {
sender = strsep(&s, "/");
if (sender && (sender[0] != '\0'))
to = strsep(&s, "/");
if (!to) {
ast_log(LOG_ERROR, "Bad arguments in Jingle Dialstring: %s\n", (char*) data);
- if (s)
- free(s);
return NULL;
}
}
@@ -1376,8 +1374,6 @@
client = find_jingle(to, sender);
if (!client) {
ast_log(LOG_WARNING, "Could not find recipient.\n");
- if (s)
- free(s);
return NULL;
}
p = jingle_alloc(client, to, NULL);
Modified: trunk/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_jabber.c?view=diff&rev=55556&r1=55555&r2=55556
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Tue Feb 20 10:56:58 2007
@@ -344,7 +344,7 @@
ast_log(LOG_ERROR, "This application requires arguments.\n");
return 0;
}
- s = ast_strdupa((char *) data);
+ s = ast_strdupa(data);
if (s) {
sender = strsep(&s, "|");
if (sender && (sender[0] != '\0')) {
@@ -404,7 +404,7 @@
ast_log(LOG_ERROR, "This application requires arguments.\n");
return 0;
}
- s = ast_strdupa((char *) data);
+ s = ast_strdupa(data);
if (s) {
sender = strsep(&s, "|");
if (sender && (sender[0] != '\0')) {
More information about the asterisk-commits
mailing list