mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-03 11:58:36 +00:00
FS-4675 --resolve
This commit is contained in:
parent
ff3c0139fc
commit
10657f3f5c
@ -1563,6 +1563,7 @@ SWITCH_STANDARD_API(regex_function)
|
||||
proceed = switch_regex_perform(argv[0], argv[1], &re, ovector, sizeof(ovector) / sizeof(ovector[0]));
|
||||
|
||||
if (argc > 2) {
|
||||
if (proceed) {
|
||||
len = (strlen(argv[0]) + strlen(argv[2]) + 10) * proceed;
|
||||
substituted = malloc(len);
|
||||
switch_assert(substituted);
|
||||
@ -1572,6 +1573,9 @@ SWITCH_STANDARD_API(regex_function)
|
||||
|
||||
stream->write_function(stream, "%s", substituted);
|
||||
free(substituted);
|
||||
} else {
|
||||
stream->write_function(stream, "%s", argv[0]);
|
||||
}
|
||||
} else {
|
||||
stream->write_function(stream, proceed ? "true" : "false");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user