Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-04-18 19:21:28 +0400
committerIgor Sysoev <igor@sysoev.ru>2007-04-18 19:21:28 +0400
commitfb958946b5bc5ac781ca1c6b0b87bdc7b6fb14a4 (patch)
tree17de6baa4544d002dc747d31b03f3cade9e261c0 /src
parente5e4c0000d1fa5a387c32bba0fd4fcad53fd3e9f (diff)
style fix: remove tabs
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c50
-rw-r--r--src/mail/ngx_mail_auth_http_module.c20
-rw-r--r--src/mail/ngx_mail_handler.c54
-rw-r--r--src/mail/ngx_mail_proxy_module.c18
4 files changed, 71 insertions, 71 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 273c782f7..97b51a76d 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -767,7 +767,7 @@ ngx_http_upstream_send_request(ngx_http_request_t *r, ngx_http_upstream_t *u)
"http upstream send request");
if (!u->request_sent && ngx_http_upstream_test_connect(c) != NGX_OK) {
- ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
+ ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
return;
}
@@ -914,7 +914,7 @@ ngx_http_upstream_process_header(ngx_event_t *rev)
}
if (!u->request_sent && ngx_http_upstream_test_connect(c) != NGX_OK) {
- ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
+ ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
return;
}
@@ -1259,33 +1259,33 @@ ngx_http_upstream_test_connect(ngx_connection_t *c)
#if (NGX_HAVE_KQUEUE)
if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
- if (c->write->pending_eof) {
- (void) ngx_connection_error(c, c->write->kq_errno,
- "kevent() reported that connect() failed");
- return NGX_ERROR;
- }
+ if (c->write->pending_eof) {
+ (void) ngx_connection_error(c, c->write->kq_errno,
+ "kevent() reported that connect() failed");
+ return NGX_ERROR;
+ }
} else
#endif
{
- err = 0;
- len = sizeof(int);
-
- /*
- * BSDs and Linux return 0 and set a pending error in err
- * Solaris returns -1 and sets errno
- */
-
- if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len)
- == -1)
- {
- err = ngx_errno;
- }
-
- if (err) {
- (void) ngx_connection_error(c, err, "connect() failed");
- return NGX_ERROR;
- }
+ err = 0;
+ len = sizeof(int);
+
+ /*
+ * BSDs and Linux return 0 and set a pending error in err
+ * Solaris returns -1 and sets errno
+ */
+
+ if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len)
+ == -1)
+ {
+ err = ngx_errno;
+ }
+
+ if (err) {
+ (void) ngx_connection_error(c, err, "connect() failed");
+ return NGX_ERROR;
+ }
}
return NGX_OK;
diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c
index febeb55ff..8028c957a 100644
--- a/src/mail/ngx_mail_auth_http_module.c
+++ b/src/mail/ngx_mail_auth_http_module.c
@@ -686,19 +686,19 @@ ngx_mail_auth_http_process_headers(ngx_mail_session_t *s,
ctx->err.len = ctx->errcode.len + ctx->errmsg.len
+ sizeof(" " CRLF) - 1;
- p = ngx_palloc(s->connection->pool, ctx->err.len);
- if (p == NULL) {
- ngx_close_connection(ctx->peer.connection);
- ngx_destroy_pool(ctx->pool);
- ngx_mail_session_internal_server_error(s);
- return;
- }
+ p = ngx_palloc(s->connection->pool, ctx->err.len);
+ if (p == NULL) {
+ ngx_close_connection(ctx->peer.connection);
+ ngx_destroy_pool(ctx->pool);
+ ngx_mail_session_internal_server_error(s);
+ return;
+ }
- ctx->err.data = p;
+ ctx->err.data = p;
- p = ngx_cpymem(p, ctx->errcode.data, ctx->errcode.len);
+ p = ngx_cpymem(p, ctx->errcode.data, ctx->errcode.len);
*p++ = ' ';
- p = ngx_cpymem(p, ctx->errmsg.data, ctx->errmsg.len);
+ p = ngx_cpymem(p, ctx->errmsg.data, ctx->errmsg.len);
*p++ = CR; *p = LF;
}
diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c
index 418d1444e..e41983248 100644
--- a/src/mail/ngx_mail_handler.c
+++ b/src/mail/ngx_mail_handler.c
@@ -297,19 +297,19 @@ ngx_mail_init_session(ngx_connection_t *c)
- s->salt.data;
if (s->protocol == NGX_MAIL_POP3_PROTOCOL) {
- s->out.data = ngx_palloc(c->pool,
+ s->out.data = ngx_palloc(c->pool,
greetings[0].len + 1 + s->salt.len);
- if (s->out.data == NULL) {
- ngx_mail_session_internal_server_error(s);
- return;
- }
+ if (s->out.data == NULL) {
+ ngx_mail_session_internal_server_error(s);
+ return;
+ }
- p = ngx_cpymem(s->out.data,
+ p = ngx_cpymem(s->out.data,
greetings[0].data, greetings[0].len - 2);
- *p++ = ' ';
- p = ngx_cpymem(p, s->salt.data, s->salt.len);
+ *p++ = ' ';
+ p = ngx_cpymem(p, s->salt.data, s->salt.len);
- s->out.len = p - s->out.data;
+ s->out.len = p - s->out.data;
}
}
@@ -1408,31 +1408,31 @@ ngx_smtp_auth_state(ngx_event_t *rev)
case NGX_SMTP_MAIL:
if (s->connection->log->log_level >= NGX_LOG_INFO) {
- l.len = s->buffer->last - s->buffer->start;
- l.data = s->buffer->start;
+ l.len = s->buffer->last - s->buffer->start;
+ l.data = s->buffer->start;
- for (i = 0; i < l.len; i++) {
- ch = l.data[i];
+ for (i = 0; i < l.len; i++) {
+ ch = l.data[i];
- if (ch != CR && ch != LF) {
- continue;
- }
+ if (ch != CR && ch != LF) {
+ continue;
+ }
- l.data[i] = ' ';
- }
+ l.data[i] = ' ';
+ }
- while (i) {
- if (l.data[i - 1] != ' ') {
- break;
- }
+ while (i) {
+ if (l.data[i - 1] != ' ') {
+ break;
+ }
- i--;
- }
+ i--;
+ }
- l.len = i;
+ l.len = i;
- ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
- "client was rejected: \"%V\"", &l);
+ ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
+ "client was rejected: \"%V\"", &l);
}
text = smtp_auth_required;
diff --git a/src/mail/ngx_mail_proxy_module.c b/src/mail/ngx_mail_proxy_module.c
index 03f21eb4c..894c01d04 100644
--- a/src/mail/ngx_mail_proxy_module.c
+++ b/src/mail/ngx_mail_proxy_module.c
@@ -702,20 +702,20 @@ ngx_mail_proxy_read_response(ngx_mail_session_t *s, ngx_uint_t state)
case ngx_smtp_helo:
case ngx_smtp_noxclient:
- if (p[0] == '2' && p[1] == '5' && p[2] == '0') {
- return NGX_OK;
- }
- break;
+ if (p[0] == '2' && p[1] == '5' && p[2] == '0') {
+ return NGX_OK;
+ }
+ break;
case ngx_smtp_start:
case ngx_smtp_xclient:
- if (p[0] == '2' && p[1] == '2' && p[2] == '0') {
- return NGX_OK;
- }
- break;
+ if (p[0] == '2' && p[1] == '2' && p[2] == '0') {
+ return NGX_OK;
+ }
+ break;
}
- break;
+ break;
}
pcf = ngx_mail_get_module_srv_conf(s, ngx_mail_proxy_module);