[asterisk-commits] qwell: trunk r72134 - in /trunk: ./ channels/chan_gtalk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 27 12:14:32 CDT 2007


Author: qwell
Date: Wed Jun 27 12:14:31 2007
New Revision: 72134

URL: http://svn.digium.com/view/asterisk?view=rev&rev=72134
Log:
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.

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_gtalk.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=72134&r1=72133&r2=72134
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Wed Jun 27 12:14:31 2007
@@ -969,15 +969,14 @@
 	/* 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);




More information about the asterisk-commits mailing list