=commit;h=379d9c7c14e684ab1dcdb6467a6bf189153c2b1d
Regards
Maxime de Roucy
signature.asc
Description: This is a digitally signed message part
This patch remove setlocale from the main function.
Some regex may have different behaviours depending on the
locale. Some LUA scripts may change their behaviour too
(http://lua-users.org/wiki/LuaLocales).
Without this patch (haproxy is using setlocale) :
$ cat locale.cfg
This patch remove setlocale from the main function.
Some regex may have different behaviours depending on the
locale. Some LUA scripts may change their behaviour too
(http://lua-users.org/wiki/LuaLocales).
Without this patch (haproxy is using setlocale) :
$ cat locale.cfg
I can do it tomorow evening (France time).
Le 17 mai 2016 11:18 PM, "Willy Tarreau" a écrit :
> On Tue, May 17, 2016 at 11:12:35PM +0200, Nenad Merdanovic wrote:
> > Hello Willy,
> >
> > On 05/17/2016 09:41 PM, Willy Tarreau wrote:
> > > Nenad, you were the one reporting the sorting
Le mardi 17 mai 2016 à 21:28 +0200, Cyril Bonté a écrit :
> Well, I'd rather think we shouldn't bother with setlocale(), stay
> with the C locale, and document how the files are sorted. The
> behaviour is different than calling "haproxy -- *.cfg", where globing
> is made by the shell itself and
y -C rootdir -f aaa
aaa/a.cfg
aaa/A.cfg
aaa/à.cfg
aaa/À.cfg
aaa/â.cfg
aaa/Â.cfg
$ LC_COLLATE=C ./haproxy -C rootdir -f aaa
aaa/A.cfg
aaa/a.cfg
aaa/À.cfg
aaa/Â.cfg
aaa/à.cfg
aaa/â.cfg
--
Regard
int list_append_word(struct list *li, const char *str, char **err)
Append a copy of string (inside a wordlist) at the end of
the list .
The caller is responsible for freeing the and copy memory
area using free().
On failure : return 0 and filled with an error message.
---
replace LIST_ADDQ with list_append_word
---
src/haproxy.c | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/haproxy.c b/src/haproxy.c
index bfd542c..3166bba 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -561,6 +561,7 @@ void init(int argc, char
If -f argument is a directory add all the files (and only files) it
containes to the config files list.
These files are added in lexical order (respecting LC_COLLATE).
Only files with ".cfg" extension are added.
Only non hidden files (not prefixed with ".") are added.
Symlink are followed.
The -f
If -f argument is a directory add all the files (and only files) it
containes to the config files list.
These files are added in lexical order (man alphasort).
Only files with ".cfg" extension are added.
Only non hidden files (not prefixed with ".") are added.
Symlink are followed.
The -f order is
rg = 0;
> > +
> > + while (argc_i > 0) {
> > + if (*argv_i == wl->s)
> > + is_arg = 1;
> > + argv_i++;
> > + argc_i--;
> > + }
> > +
> > +
it shouldn't
be able to fail (the string size == copied size == calloc size).
Here is a new version of the patch. Only for the src/haproxy.c file.
I will send a complete patch when everything will be settled.
I also free head memory from the "wlt = calloc(1, sizeof(*wlt));" line,
in t
I forgot to free the memory allocated at 'filename = calloc' (why valgrind
didn't warn...). Forget this patch. I will send another one tomorow.
Sorry
Le 9 mai 2016 11:28 PM, "Maxime de Roucy" <maxime.dero...@gmail.com> a
écrit :
> If -f argument is a directory add all the fi
e confusing or missing.
Indeed… let's forget about it.
--
Maxime de Roucy
signature.asc
Description: This is a digitally signed message part
n should go on before we go further with the
> code.
OK.
For me we should add a filter on file name ; keeping only ending with
".cfg" and not starting with ".".
I vote for following symlinks, as the implementation currently does.
It means less work for me :-) … Joking asi
If -f argument is a directory add all the files (and only files) it
containes to the config files list.
These files are added in lexical order (man alphasort).
The -f order is still respected:
$ tree rootdir
rootdir
├── root1
├── root2
├── root3
├──
Hello,
Thanks for your remarks !
> I think this is a nice addition, it completes well the ability to
> load an arbitrary file list.
Good to hear that :)
> However I cannot merge it as is, there is a huge buffer overflow
> …
Ok, I see. I will try to patch that this evening.
> I have another
This patch replace
Alert(...); exit(1);
with
Alert(1, ...)
when it's possible.
---
src/haproxy.c | 176 +-
1 file changed, 87 insertions(+), 89 deletions(-)
diff --git a/src/haproxy.c b/src/haproxy.c
index 0c223e5..c1acea6 100644
---
Alert is often followed by exit.
Alert_exit embedded the exit call.
---
include/proto/log.h | 9 +
src/log.c | 31 ++-
2 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/include/proto/log.h b/include/proto/log.h
index e606a3c..7afa2a0
Hello,
The second version of the patch fix the typo already mentioned and
change :
- wlt->s = calloc(MAX_CLI_DIRFILE_NAME, 1);
+ wlt->s = calloc(strlen(filename) + 1, sizeof(*wlt->s));
--
Regards
Maxime de Roucy
signature.asc
Description: This is a digitally signed message part
If -f argument is a directory add all the files (and only files) it
containes to the config files list.
These files are added in lexical order (man alphasort).
The -f order is still respected:
$ tree rootdir
rootdir
├── root1
├── root2
├── root3
├──
superdir2 \
> -f root3 -f superdir1 -f root1
Should I re-send my patch or is it OK ?
--
Regards
Maxime de Roucy
signature.asc
Description: This is a digitally signed message part
If -f argument is a directory add all the files (and only files) it
containes to the config files list.
These files are added in lexical order (man alphasort).
The -f order is still respected:
$ tree rootdir
rootdir
├── root1
├── root2
├── root3
├──
23 matches
Mail list logo