Welcome! Log In Create A New Profile

Advanced

Re: nginx udplog module 1.0.0

Sergey A. Osokin
January 11, 2010 12:30PM
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@grid.net.ru>
> > An: nginx@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;
}


--
Sergey A. Osokin,
osa@FreeBSD.ORG
osa@FreeBSD.ORG.ru

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx udplog module 1.0.0

Valery Kholodkov January 05, 2010 03:48PM

Re: nginx udplog module 1.0.0

Steve January 11, 2010 11:56AM

Re: nginx udplog module 1.0.0

Sergey A. Osokin January 11, 2010 12:30PM

Re: nginx udplog module 1.0.0

Steve January 11, 2010 01:02PM

Re: nginx udplog module 1.0.0

Sergey A. Osokin January 11, 2010 02:16PM

Re: nginx udplog module 1.0.0

Steve January 11, 2010 02:32PM

Re: nginx udplog module 1.0.0

Valery Kholodkov January 11, 2010 01:18PM

Re: nginx udplog module 1.0.0

Steve January 11, 2010 02:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 148
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready