Added processing of second caller id.
[lcr.git] / callerid.c
index b9e59ab..c12e908 100644 (file)
@@ -43,16 +43,19 @@ const char *numberrize_callerinfo(const char *string, int ntype, const char *nat
 
        switch(ntype)
        {
+               case INFO_NTYPE_NOTPRESENT:
+               return("");
+
                case INFO_NTYPE_INTERNATIONAL:
                strcpy(result, international);
-               strncat(result, string, sizeof(result));
+               strncat(result, string, sizeof(result)-strlen(result)-1);
                result[sizeof(result)-1] = '\0';
                return(result);
                break;
 
                case INFO_NTYPE_NATIONAL:
                strcpy(result, national);
-               strncat(result, string, sizeof(result));
+               strncat(result, string, sizeof(result)-strlen(result)-1);
                result[sizeof(result)-1] = '\0';
                return(result);
                break;