diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-27 17:14:31 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-27 17:14:31 +0000 |
commit | c7c4b670f7c18efb4a6ca53efa9b9883c7936b8a (patch) | |
tree | ee45699714f9bdedb5acc8882f8c68e99d567aa7 /channels/chan_gtalk.c | |
parent | 6e96b01e27a06bdd4fc030c06f4493a8d30cc99f (diff) |
Merged revisions 72125 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r72125 | qwell | 2007-06-27 12:10:32 -0500 (Wed, 27 Jun 2007) | 4 lines
Don't modify a variable that we don't want modified. Make a copy of it instead.
Issue 10029, patch by phsultan with slight modifications by me (to remove needless casts).
Note: chan_jingle in trunk does not appear to have the same bug.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72134 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_gtalk.c')
-rw-r--r-- | channels/chan_gtalk.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index abd6d9d8c..18686e15c 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -969,15 +969,14 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i, /* Don't use ast_set_callerid() here because it will * generate a needless NewCallerID event */ if (!strcasecmp(client->name, "guest")) { - if (strchr(i->them, '/')) { - char *aux; - data = ast_strdupa((char *)i->them); - aux = data; - cid = strsep(&aux, "/"); + data = ast_strdupa(i->them); + if (strchr(data, '/')) { + cid = strsep(&data, "/"); } else - cid = i->them; + cid = data; } else { - cid = client->user; + data = ast_strdupa(client->user); + cid = data; } cid = strsep(&cid, "@"); tmp->cid.cid_num = ast_strdup(cid); |