Welcome! Log In Create A New Profile

Advanced

[nginx] Style: changed checks of ngx_ssl_create_connection() to != NGX_OK.

Maxim Dounin
May 29, 2017 09:46AM
details: http://hg.nginx.org/nginx/rev/03444167a3bb
branches:
changeset: 7009:03444167a3bb
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon May 29 16:34:35 2017 +0300
description:
Style: changed checks of ngx_ssl_create_connection() to != NGX_OK.

In http these checks were changed in a6d6d762c554, though mail module
was missed at that time. Since then, the stream module was introduced
based on mail, using "== NGX_ERROR" check.

diffstat:

src/mail/ngx_mail_handler.c | 2 +-
src/stream/ngx_stream_ssl_module.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c
--- a/src/mail/ngx_mail_handler.c
+++ b/src/mail/ngx_mail_handler.c
@@ -222,7 +222,7 @@ ngx_mail_ssl_init_connection(ngx_ssl_t *
ngx_mail_session_t *s;
ngx_mail_core_srv_conf_t *cscf;

- if (ngx_ssl_create_connection(ssl, c, 0) == NGX_ERROR) {
+ if (ngx_ssl_create_connection(ssl, c, 0) != NGX_OK) {
ngx_mail_close_connection(c);
return;
}
diff --git a/src/stream/ngx_stream_ssl_module.c b/src/stream/ngx_stream_ssl_module.c
--- a/src/stream/ngx_stream_ssl_module.c
+++ b/src/stream/ngx_stream_ssl_module.c
@@ -365,7 +365,7 @@ ngx_stream_ssl_init_connection(ngx_ssl_t
return NGX_ERROR;
}

- if (ngx_ssl_create_connection(ssl, c, 0) == NGX_ERROR) {
+ if (ngx_ssl_create_connection(ssl, c, 0) != NGX_OK) {
return NGX_ERROR;
}

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

[nginx] Style: changed checks of ngx_ssl_create_connection() to != NGX_OK.

Maxim Dounin 614 May 29, 2017 09:46AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 186
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