mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 16:50:14 +00:00
Fix callerid split (bug #3507)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -706,9 +706,12 @@ int ast_callerid_split(const char *buf, char *name, int namelen, char *num, int
|
|||||||
ast_callerid_parse(tmp, &n, &l);
|
ast_callerid_parse(tmp, &n, &l);
|
||||||
if (n)
|
if (n)
|
||||||
strncpy(name, n, namelen - 1);
|
strncpy(name, n, namelen - 1);
|
||||||
|
else
|
||||||
|
name[0] = '\0';
|
||||||
if (l) {
|
if (l) {
|
||||||
ast_shrink_phone_number(l);
|
ast_shrink_phone_number(l);
|
||||||
strncpy(num, l, numlen - 1);
|
strncpy(num, l, numlen - 1);
|
||||||
}
|
} else
|
||||||
|
num[0] = '\0';
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user