Inline...

On 1/9/12 3:00 PM, [email protected] wrote:
> Author: heil
> Date: 2012-01-09 23:00:25 +0100 (Mon, 09 Jan 2012)
> New Revision: 29702
> 
> Added:
>    packages/net/haproxy/patches/
>    packages/net/haproxy/patches/001-haproxy-1.4.x-sendproxy.patch
> Modified:
>    packages/net/haproxy/Makefile
>    packages/net/haproxy/files/haproxy.cfg
> Log:
> package: haproxy
>  - bump to version 1.4.19
>  - ensure haproxy is not listen on port 80 by default
>  - add sendproxy patch written by Cyril Bonte
> 
> 
> 
> Modified: packages/net/haproxy/files/haproxy.cfg
> ===================================================================
> --- packages/net/haproxy/files/haproxy.cfg    2012-01-09 05:42:04 UTC (rev 
> 29701)
> +++ packages/net/haproxy/files/haproxy.cfg    2012-01-09 22:00:25 UTC (rev 
> 29702)
> @@ -42,7 +43,7 @@
>  listen my_http_proxy
>  
>       # Bind to port 80 and 443 on all interfaces (0.0.0.0)
> -     bind :80,:443
> +     bind :81,:444
>  
>       # We're proxying HTTP here...
>       mode http
> @@ -69,7 +70,7 @@
>       disabled
>  
>       # Bind to port 25 and 587 on localhost
> -     bind 127.0.0.1:25,127.0.0.1:587
> +     bind 127.0.0.1:26,127.0.0.1:588
>  
>       # This is a TCP proxy
>       mode tcp
> 

Should the comments agree with the commands?


> +Index: haproxy-1.4.19/include/common/standard.h
> +===================================================================
> +--- haproxy-1.4.19.orig/include/common/standard.h
> ++++ haproxy-1.4.19/include/common/standard.h
> +@@ -269,6 +269,28 @@ static inline unsigned int __strl2uic(co
> +     return i;
> + }
> + 
> ++/* This function reads an unsigned integer from the string pointed to by <s>
> ++ * and returns it. The <s> pointer is adjusted to point to the first unread
> ++ * char. The function automatically stops at <end>.
> ++ */
> ++static inline unsigned int __read_uint(const char **s, const char *end)
> ++{
> ++    const char *ptr = *s;
> ++    unsigned int i = 0;
> ++    unsigned int j, k;
> ++
> ++    while (ptr < end) {

Is there a reason not to use a 'for' loop here?  I.e.

for (ptr = s; ptr < end; ptr++)

instead?


> ++            j = *ptr - '0';
> ++            k = i * 10;
> ++            if (j > 9)
> ++                    break;
> ++            i = k + j;
> ++            ptr++;
> ++    }
> ++    *s = ptr;
> ++    return i;
> ++}
> ++
> + extern unsigned int str2ui(const char *s);
> + extern unsigned int str2uic(const char *s);
> + extern unsigned int strl2ui(const char *s, int len);
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to