From 97dd838cda8d308170bbb73ce8863cc73f7a457c Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Thu, 15 Apr 2004 00:02:07 +0000 Subject: [PATCH] Fix name properly git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2692 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b3fdec8c83..4621db4656 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3961,8 +3961,11 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq) *a = '\0'; } if (fr) { - if ((a = strchr(fr, '@')) || (a = strchr(fr, ';'))) { + if ((a = strchr(fr, ';'))) *a = '\0'; + if ((a = strchr(fr, '@'))) { + *a = '\0'; + strncpy(p->fromdomain, a + 1, sizeof(p->fromdomain) - 1); } } if (sipdebug)