aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-13 22:31:20 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-13 22:31:20 +0000
commit3b5a87505b02df7cc67a64a6957efec32daae99c (patch)
tree52dd87de2c85de9be1c061fa9e7641a5fe877ec7
parent106cd08ff8f130cd9259ba455f3087ab51d8fa5b (diff)
Merged revisions 168578 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r168578 | twilson | 2009-01-13 16:22:34 -0600 (Tue, 13 Jan 2009) | 14 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.0@168580 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 92f3e7829..87d090e05 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -9514,6 +9514,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))
@@ -9524,7 +9526,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);