details:   http://freenginx.org/hg/nginx/rev/1e66d7bd556e
branches:  
changeset: 9357:1e66d7bd556e
user:      Maxim Dounin <mdou...@mdounin.ru>
date:      Wed May 14 01:15:59 2025 +0300
description:
Mail: style.

There is no reason to use c->write as we already have wev, and it is
used elsewhere in ngx_mail_send().

diffstat:

 src/mail/ngx_mail_handler.c |  6 +++---
 1 files changed, 3 insertions(+), 3 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
@@ -1042,7 +1042,7 @@ ngx_mail_send(ngx_event_t *wev)
     }
 
     if (s->out.len == 0) {
-        if (ngx_handle_write_event(c->write, 0) != NGX_OK) {
+        if (ngx_handle_write_event(wev, 0) != NGX_OK) {
             ngx_mail_close_connection(c);
         }
 
@@ -1086,9 +1086,9 @@ again:
 
     cscf = ngx_mail_get_module_srv_conf(s, ngx_mail_core_module);
 
-    ngx_add_timer(c->write, cscf->timeout);
+    ngx_add_timer(wev, cscf->timeout);
 
-    if (ngx_handle_write_event(c->write, 0) != NGX_OK) {
+    if (ngx_handle_write_event(wev, 0) != NGX_OK) {
         ngx_mail_close_connection(c);
         return;
     }

Reply via email to