nginx udplog module 1.0.0

Steve steeeeeveee at gmx.net
Mon Jan 11 20:57:37 MSK 2010


-------- Original-Nachricht --------
> Datum: Mon, 11 Jan 2010 20:27:24 +0300
> Von: "Sergey A. Osokin" <osa at FreeBSD.ORG.ru>
> An: nginx at nginx.org
> Betreff: Re: nginx udplog module 1.0.0

> On Mon, Jan 11, 2010 at 05:53:06PM +0100, Steve wrote:
> > 
> > -------- Original-Nachricht --------
> > > Datum: Tue, 05 Jan 2010 21:40:00 +0100
> > > Von: Valery Kholodkov <valery+nginxen at grid.net.ru>
> > > An: nginx at sysoev.ru
> > > Betreff: nginx udplog module 1.0.0
> > 
> > > 
> > > Greetings!
> > > 
> > > This new module implements logging via BSD Syslog protocol.
> > > 
> > > Hope you'll enjoy it!
> > > 
> > > http://www.grid.net.ru/nginx/udplog.en.html
> > > 
> > It's failing with 0.8.32:
> > -----------------------------
> >
> /var/tmp/portage/www-servers/nginx-0.8.32-r1/work/udplog-module/ngx_http_udplog_module.c: In function 'ngx_udplog_init_endpoint':
> >
> /var/tmp/portage/www-servers/nginx-0.8.32-r1/work/udplog-module/ngx_http_udplog_module.c:284: error: incompatible types when assigning to type
> 'ngx_log_t' from type 'struct ngx_log_t *'
> >
> /var/tmp/portage/www-servers/nginx-0.8.32-r1/work/udplog-module/ngx_http_udplog_module.c: In function 'ngx_http_udplogger_send':
> >
> /var/tmp/portage/www-servers/nginx-0.8.32-r1/work/udplog-module/ngx_http_udplog_module.c:338: error: invalid type argument of '->' (have
> 'ngx_log_t')
> >
> /var/tmp/portage/www-servers/nginx-0.8.32-r1/work/udplog-module/ngx_http_udplog_module.c:338: error: incompatible type for argument 2 of
> 'ngx_log_error_core'
> > src/core/ngx_log.h:78: note: expected 'struct ngx_log_t *' but argument
> is of type 'ngx_log_t'
> > make[1]: *** [objs/addon/udplog-module/ngx_http_udplog_module.o] Error 1
> > make[1]: *** Waiting for unfinished jobs....
> > -----------------------------
> 
> Patch.
> 
> --- ngx_http_udplog_module.c.orig	2010-01-11 19:16:46.000000000 +0300
> +++ ngx_http_udplog_module.c	2010-01-11 19:20:17.000000000 +0300
> @@ -280,7 +280,7 @@
>      uc->sockaddr = endpoint->peer_addr.sockaddr;
>      uc->socklen = endpoint->peer_addr.socklen;
>      uc->server = endpoint->peer_addr.name;
> -#if defined nginx_version && nginx_version >= 7054
> +#if defined nginx_version && ( nginx_version >= 7054 && nginx_version <
> 8032 )
>      uc->log = &cf->cycle->new_log;
>  #else
>      uc->log = cf->cycle->new_log;
> @@ -335,7 +335,11 @@
>      }
>  
>      if ((size_t) n != (size_t) len) {
> +#if defined nginx_version && nginx_version >= 8032
> +        ngx_log_error(NGX_LOG_CRIT, &uc->log, 0, "send() incomplete");
> +#else
>          ngx_log_error(NGX_LOG_CRIT, uc->log, 0, "send() incomplete");
> +#endif
>          return NGX_ERROR;
>      }
> 
This fixes the isse. Can you include that into a new revision of udplog?

> -- 
> Sergey A. Osokin,
> osa at FreeBSD.ORG
> osa at FreeBSD.ORG.ru
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx

-- 
Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
http://portal.gmx.net/de/go/dsl02



More information about the nginx mailing list