Fix accidental removal of if() in commit 38905
authorOlle Johansson <oej@edvina.net>
Mon, 7 Aug 2006 16:20:23 +0000 (16:20 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 7 Aug 2006 16:20:23 +0000 (16:20 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39171 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 63b177c..cbe8cbb 100644 (file)
@@ -3688,7 +3688,8 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
        tmp->cid.cid_num = ast_strdup(i->cid_num);
        tmp->cid.cid_ani = ast_strdup(i->cid_num);
        tmp->cid.cid_name = ast_strdup(i->cid_name);
-       tmp->cid.cid_rdnis = ast_strdup(i->rdnis);
+       if (!ast_strlen_zero(i->rdnis))
+               tmp->cid.cid_rdnis = ast_strdup(i->rdnis);
        
        if (!ast_strlen_zero(i->exten) && strcmp(i->exten, "s"))
                tmp->cid.cid_dnid = ast_strdup(i->exten);