|
|
@ -8748,11 +8748,12 @@ static char *get_calleridname(const char *input, char *output, size_t outputsize
|
|
|
|
if (!end || end == input) /* we require a part in brackets */
|
|
|
|
if (!end || end == input) /* we require a part in brackets */
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
|
|
/* move away from "<" */
|
|
|
|
end--; /* move just before "<" */
|
|
|
|
end--;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* we found "name" */
|
|
|
|
if (tmp && tmp <= end) {
|
|
|
|
if (tmp && tmp < end) {
|
|
|
|
/* The quote (tmp) precedes the bracket (end+1).
|
|
|
|
|
|
|
|
* Find the matching quote and return the content.
|
|
|
|
|
|
|
|
*/
|
|
|
|
end = strchr(tmp+1, '"');
|
|
|
|
end = strchr(tmp+1, '"');
|
|
|
|
if (!end)
|
|
|
|
if (!end)
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
@ -8762,7 +8763,7 @@ static char *get_calleridname(const char *input, char *output, size_t outputsize
|
|
|
|
bytes = maxbytes;
|
|
|
|
bytes = maxbytes;
|
|
|
|
ast_copy_string(output, tmp + 1, bytes);
|
|
|
|
ast_copy_string(output, tmp + 1, bytes);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
/* we didn't find "name" */
|
|
|
|
/* No quoted string, or it is inside brackets. */
|
|
|
|
/* clear the empty characters in the begining*/
|
|
|
|
/* clear the empty characters in the begining*/
|
|
|
|
input = ast_skip_blanks(input);
|
|
|
|
input = ast_skip_blanks(input);
|
|
|
|
/* clear the empty characters in the end */
|
|
|
|
/* clear the empty characters in the end */
|
|
|
|