diff options
author | Terry Wilson <twilson@digium.com> | 2009-01-13 22:22:34 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2009-01-13 22:22:34 +0000 |
commit | 938191bc194c4526edf75b2a3c9e682616def032 (patch) | |
tree | 0ba03ff0e6e3754705a4f044d67b3cd805c04157 /channels | |
parent | 453b4cb8fbec96b4fa2aae10002ca982089eabd1 (diff) |
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)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0a066c7dc..de914872e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10609,6 +10609,8 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char * } 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 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char * /* 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); |