Re: xlat.c bug ?

2003-11-17 Thread Alan DeKok
Alain cocconi <[EMAIL PROTECTED]> wrote:
> I had a problem with xlat that didn't care about last char if it was '$' or 
> '%' or '\' so I trace it and found that
> if the last char was one of them the code was not executed... so if I'm not 
> wrong this little patch should solve it

  Yes, it does, thanks.

  I'll add it in later today.

  Alan DeKok.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


xlat.c bug ?

2003-11-14 Thread Alain cocconi
Hi,

I had a problem with xlat that didn't care about last char if it was '$' or 
'%' or '\' so I trace it and found that
if the last char was one of them the code was not executed... so if I'm not 
wrong this little patch should solve it

thank

--- xlat.c.orig Tue Mar 18 16:50:54 2003
+++ xlat.c  Sat Nov 15 14:04:39 2003
@@ -398,7 +398,13 @@
continue;
}
-   if (*++p == '\0') break;
+   if (*++p == '\0') {
+   if ((c == '%') || (c == '$') || (c == '\\')) {
+   *q++ = c;
+   *q++ = *p;
+   }
+   break;
+   }
if (c == '\\') {
switch(*p) {
Alain Cocconi
Net Outremer Caledonie
Phone : +687 24 38 70
Fax : +687 27 12 50
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html