]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a bug where an RPID header could be generated with a blank username in the URI.
authorJoshua Colp <jcolp@digium.com>
Tue, 3 Nov 2009 15:36:16 +0000 (15:36 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 3 Nov 2009 15:36:16 +0000 (15:36 +0000)
(closes issue #15909)
Reported by: kobaz

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227166 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f804da87b365cc9c7766a6638213fade6466fb0e..fdd3dc7c4793f4ec4ca1309874776f47a843ba8a 100644 (file)
@@ -7272,7 +7272,7 @@ static void build_rpid(struct sip_pvt *p)
        if (!ast_strlen_zero(p->rpid) || !ast_strlen_zero(p->rpid_from))  
                return;
 
-       if (p->owner && p->owner->cid.cid_num)
+       if (p->owner && !ast_strlen_zero(p->owner->cid.cid_num))
                clid = p->owner->cid.cid_num;
        if (p->owner && p->owner->cid.cid_name)
                clin = p->owner->cid.cid_name;