From d7b4f138a4eb12adc6bcc318cc0c38c1ad19eeb2 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Mon, 29 Jul 2013 00:03:32 +0400 Subject: [PATCH] fixed ngx_sock_ntop call on new nginx --- ngx_rtmp_core_module.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ngx_rtmp_core_module.c b/ngx_rtmp_core_module.c index 9e7f1cd..ae36f5a 100644 --- a/ngx_rtmp_core_module.c +++ b/ngx_rtmp_core_module.c @@ -599,7 +599,11 @@ ngx_rtmp_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ls->bind = 1; } else { - len = ngx_sock_ntop(sa, buf, NGX_SOCKADDR_STRLEN, 1); + len = ngx_sock_ntop(sa, +#if (nginx_version >= 1005003) + ls->socklen, +#endif + buf, NGX_SOCKADDR_STRLEN, 1); ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "ipv6only is not supported "