additional checking related to issue 17186
authorAlexandr Anikin <may@telecom-service.ru>
Sun, 25 Apr 2010 18:51:37 +0000 (18:51 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Sun, 25 Apr 2010 18:51:37 +0000 (18:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258855 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/chan_ooh323.c

index 7d4a46f..fdb2dfc 100644 (file)
@@ -1882,10 +1882,10 @@ int onNewCallCreated(ooCallData *call)
                }
                ast_mutex_lock(&p->lock);
 
-               if (p->callerid_name) {
+               if (!ast_strlen_zero(p->callerid_name)) {
                        ooCallSetCallerId(call, p->callerid_name);
                }
-               if (p->callerid_num) {
+               if (!ast_strlen_zero(p->callerid_num)) {
                        i = 0;
                        while (*(p->callerid_num + i) != '\0') {
                                if(!isdigit(*(p->callerid_num+i))) { break; }
@@ -1894,7 +1894,7 @@ int onNewCallCreated(ooCallData *call)
                        if(*(p->callerid_num+i) == '\0')
                                ooCallSetCallingPartyNumber(call, p->callerid_num);
                        else {
-                               if(!p->callerid_name)
+                               if(ast_strlen_zero(p->callerid_name))
                                        ooCallSetCallerId(call, p->callerid_num);
                        }
                }