aboutsummaryrefslogtreecommitdiff
path: root/src/mail/ngx_mail_auth_http_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-11-02 13:51:10 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-11-02 13:51:10 +0000
commit0f25ed3d779e3d31aff3c9484c77ccb8353fcdf4 (patch)
treecbaf1f579df0a818452b4fcc9e6b8e250833b224 /src/mail/ngx_mail_auth_http_module.c
parent47c88464ebc3ddd7c2c31f5026fa7b9389f42cfa (diff)
downloadnginx-0f25ed3d779e3d31aff3c9484c77ccb8353fcdf4.tar.gz
nginx-0f25ed3d779e3d31aff3c9484c77ccb8353fcdf4.zip
replace inet_addr() with ngx_inet_addr()
Diffstat (limited to 'src/mail/ngx_mail_auth_http_module.c')
-rw-r--r--src/mail/ngx_mail_auth_http_module.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c
index acd06656f..a27b11602 100644
--- a/src/mail/ngx_mail_auth_http_module.c
+++ b/src/mail/ngx_mail_auth_http_module.c
@@ -795,8 +795,7 @@ ngx_mail_auth_http_process_headers(ngx_mail_session_t *s,
sin->sin_port = htons((in_port_t) port);
- ctx->addr.data[ctx->addr.len] = '\0';
- sin->sin_addr.s_addr = inet_addr((char *) ctx->addr.data);
+ sin->sin_addr.s_addr = ngx_inet_addr(ctx->addr.data, ctx->addr.len);
if (sin->sin_addr.s_addr == INADDR_NONE) {
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
"auth http server %V sent invalid server "