[asterisk-commits] twilson: trunk r168578 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 13 16:22:34 CST 2009


Author: twilson
Date: Tue Jan 13 16:22:34 2009
New Revision: 168578

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168578
Log:
Merged revisions 168551 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168551 | twilson | 2009-01-13 12:34:14 -0600 (Tue, 13 Jan 2009) | 7 lines
  
  Don't pass a value with a side effect to a macro
  
  (closes issue #14176)
  Reported by: paraeco
  Patches: 
        chan_sip.c.diff uploaded by paraeco (license 658)
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=168578&r1=168577&r2=168578
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jan 13 16:22:34 2009
@@ -10609,6 +10609,8 @@
 	}
 
 	if ((fromdomain = strchr(r->username, '@'))) {
+		/* the domain name is just behind '@' */
+		fromdomain++ ;
 		/* We have a domain in the username for registration */
 		snprintf(from, sizeof(from), "<sip:%s>;tag=%s", r->username, p->tag);
 		if (!ast_strlen_zero(p->theirtag))
@@ -10619,7 +10621,7 @@
 		/* If the registration username contains '@', then the domain should be used as
 		   the equivalent of "fromdomain" for the registration */
 		if (ast_strlen_zero(p->fromdomain)) {
-			ast_string_field_set(p, fromdomain, ++fromdomain);
+			ast_string_field_set(p, fromdomain, fromdomain);
 		}
 	} else {
 		snprintf(from, sizeof(from), "<sip:%s@%s>;tag=%s", r->username, p->tohost, p->tag);




More information about the asterisk-commits mailing list