[asterisk-commits] twilson: branch 1.4 r168551 - /branches/1.4/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 13 12:34:14 CST 2009
Author: twilson
Date: Tue Jan 13 12:34:14 2009
New Revision: 168551
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168551
Log:
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:
branches/1.4/channels/chan_sip.c
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=168551&r1=168550&r2=168551
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Tue Jan 13 12:34:14 2009
@@ -7753,6 +7753,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))
@@ -7763,7 +7765,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