Fix name properly
authorMark Spencer <markster@digium.com>
Thu, 15 Apr 2004 00:02:07 +0000 (00:02 +0000)
committerMark Spencer <markster@digium.com>
Thu, 15 Apr 2004 00:02:07 +0000 (00:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2692 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index b3fdec8..4621db4 100755 (executable)
@@ -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)