Handle fromdomain properly when there is no @ sign

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2004-04-29 05:01:32 +00:00
parent 01f39a3e51
commit cd788e2ab9
1 changed files with 2 additions and 1 deletions

View File

@ -4071,7 +4071,8 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
if ((a = strchr(fr, '@'))) {
*a = '\0';
strncpy(p->fromdomain, a + 1, sizeof(p->fromdomain) - 1);
}
} else
strncpy(p->fromdomain, fr, sizeof(p->fromdomain) - 1);
}
if (sipdebug)
ast_verbose("Looking for %s in %s\n", c, p->context);