Hi, If you want. I think that it is a good idea, but it is better in two different patch. One patch for the change of existing code and one for the new functionnality.
Thierry On Tue, 3 Jun 2014 23:07:13 -0600 Sasha Pachev <[email protected]> wrote: > Therry: > > I noticed that both regex_t and my_regex were used throughout the > code, and was not sure what the policy was. So I take it new code > should be using my_regex. Should we also change the old code to > my_regex? > > On Tue, Jun 3, 2014 at 4:12 PM, Thierry FOURNIER > <[email protected]> wrote: > > Hello, > > > > I don't read all the content of your patch, but a little thing get my > > mind: you're using a "regex_t". Haproxy can be compiled with standard > > regex, pcre regex or pcre regex with JIT. You must use the "struct > > my_regex" defined in "include/common/regex.h" to use compliant system. > > > > regcomp is replaced by regex_comp > > regexec is replaced by regex_exec > > regfree is replaced by regex_free > > > > Thierry > > > > > > On Fri, 30 May 2014 22:56:47 -0600 > > Sasha Pachev <[email protected]> wrote: > > > >> Per our discussion with Willy earlier, attached is the patch for the > >> feature. I noticed that while we had free_http_req_rules() there was > >> no free_http_res_rules() even though the memory for each response rule > >> entry was being allocated with calloc() just like with the request > >> rule and should have been getting free during deinit() but was not. No > >> big deal really, only affect memory leak detection test runs, but I > >> felt bad about allocating memory for a regex and not freeing it, so I > >> added free_http_res_rules(). > >> > >> -- > >> Sasha Pachev > >> > >> Fast Running Blog. > >> http://fastrunningblog.com > >> Run. Blog. Improve. Repeat. > > > > -- > Sasha Pachev > > Fast Running Blog. > http://fastrunningblog.com > Run. Blog. Improve. Repeat.

