mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-13 23:04:13 +00:00
add wrapper code to fully encapsulate apr, apr-utils, pcre, and sqlite. fully use switch_ namespace in modules, create our own format and type defines. follow up commit for unix autotools coming soon after this. PLEASE NOTE: you will NEED to do a make megaclean and run configure again after this update (and the following commit) or it will not build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4494 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
2d78da120a
commit
42e78242a3
46 files changed
+4026
-2066
No files matched your search
@@ -315,16 +315,16 @@ static void parse_rr(const struct dns_parse *p, enum_query_t *q, struct dns_rr *
|
||||
}
|
||||
|
||||
if (flags && service && regex && replace) {
|
||||
pcre *re = NULL;
|
||||
switch_regex_t *re = NULL;
|
||||
int proceed = 0, ovector[30];
|
||||
char substituted[1024] = "";
|
||||
char rbuf[1024] = "";
|
||||
char *uri;
|
||||
enum_route_t *route;
|
||||
|
||||
switch_clean_re(re);
|
||||
switch_regex_safe_free(re);
|
||||
|
||||
if ((proceed = switch_perform_regex(q->number, regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if ((proceed = switch_regex_perform(q->number, regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if (strchr(regex, '(')) {
|
||||
switch_perform_substitution(re, proceed, replace, q->number, substituted, sizeof(substituted), ovector);
|
||||
uri = substituted;
|
||||
@@ -333,8 +333,8 @@ static void parse_rr(const struct dns_parse *p, enum_query_t *q, struct dns_rr *
|
||||
}
|
||||
|
||||
if ((route = (enum_route_t *) switch_core_hash_find(globals.routes, service))){
|
||||
switch_clean_re(re);
|
||||
if ((proceed = switch_perform_regex(uri, route->regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
switch_regex_safe_free(re);
|
||||
if ((proceed = switch_regex_perform(uri, route->regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if (strchr(route->regex, '(')) {
|
||||
switch_perform_substitution(re, proceed, route->replace, uri, rbuf, sizeof(rbuf), ovector);
|
||||
uri = rbuf;
|
||||
@@ -347,7 +347,7 @@ static void parse_rr(const struct dns_parse *p, enum_query_t *q, struct dns_rr *
|
||||
add_result(q, order, preference, service, uri);
|
||||
}
|
||||
|
||||
switch_clean_re(re);
|
||||
switch_regex_safe_free(re);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user