diff src/http/ngx_http_core_module.c @ 6559:adf25b8d0431

Introduced the ngx_sockaddr_t type. It's properly aligned and can hold any supported sockaddr.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 23 May 2016 16:37:20 +0300
parents 2f98b5709d79
children c90cf79d0e1d
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -3998,7 +3998,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx
 
     ngx_memzero(&lsopt, sizeof(ngx_http_listen_opt_t));
 
-    ngx_memcpy(&lsopt.u.sockaddr, u.sockaddr, u.socklen);
+    ngx_memcpy(&lsopt.u.sockaddr, &u.sockaddr, u.socklen);
 
     lsopt.socklen = u.socklen;
     lsopt.backlog = NGX_LISTEN_BACKLOG;