Mercurial > hg > nginx-mail
diff src/mail/ngx_mail_auth_http_module.c @ 410:cd9cb7a3ff9e
Merge with nginx 0.7.8.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 11 Aug 2008 22:07:06 +0400 |
parents | 52b28d322d76 12defd37f578 |
children | d67e93e97b4a |
line wrap: on
line diff
--- a/src/mail/ngx_mail_auth_http_module.c +++ b/src/mail/ngx_mail_auth_http_module.c @@ -529,7 +529,7 @@ ngx_mail_auth_http_process_headers(ngx_m continue; } - p = ngx_pcalloc(s->connection->pool, size); + p = ngx_pnalloc(s->connection->pool, size); if (p == NULL) { ngx_close_connection(ctx->peer.connection); ngx_destroy_pool(ctx->pool); @@ -594,7 +594,7 @@ ngx_mail_auth_http_process_headers(ngx_m { s->login.len = ctx->header_end - ctx->header_start; - s->login.data = ngx_palloc(s->connection->pool, s->login.len); + s->login.data = ngx_pnalloc(s->connection->pool, s->login.len); if (s->login.data == NULL) { ngx_close_connection(ctx->peer.connection); ngx_destroy_pool(ctx->pool); @@ -615,7 +615,8 @@ ngx_mail_auth_http_process_headers(ngx_m { s->passwd.len = ctx->header_end - ctx->header_start; - s->passwd.data = ngx_palloc(s->connection->pool, s->passwd.len); + s->passwd.data = ngx_pnalloc(s->connection->pool, + s->passwd.len); if (s->passwd.data == NULL) { ngx_close_connection(ctx->peer.connection); ngx_destroy_pool(ctx->pool); @@ -652,8 +653,8 @@ ngx_mail_auth_http_process_headers(ngx_m { ctx->errcode.len = ctx->header_end - ctx->header_start; - ctx->errcode.data = ngx_palloc(s->connection->pool, - ctx->errcode.len); + ctx->errcode.data = ngx_pnalloc(s->connection->pool, + ctx->errcode.len); if (ctx->errcode.data == NULL) { ngx_close_connection(ctx->peer.connection); ngx_destroy_pool(ctx->pool); @@ -692,7 +693,7 @@ ngx_mail_auth_http_process_headers(ngx_m ctx->err.len = ctx->errcode.len + ctx->errmsg.len + sizeof(" " CRLF) - 1; - p = ngx_palloc(s->connection->pool, ctx->err.len); + p = ngx_pnalloc(s->connection->pool, ctx->err.len); if (p == NULL) { ngx_close_connection(ctx->peer.connection); ngx_destroy_pool(ctx->pool); @@ -719,7 +720,7 @@ ngx_mail_auth_http_process_headers(ngx_m return; } - ngx_add_timer(s->connection->read, timer * 1000); + ngx_add_timer(s->connection->read, (ngx_msec_t) (timer * 1000)); s->connection->read->handler = ngx_mail_auth_sleep_handler; @@ -736,7 +737,7 @@ ngx_mail_auth_http_process_headers(ngx_m return; } - ngx_add_timer(s->connection->read, timer * 1000); + ngx_add_timer(s->connection->read, (ngx_msec_t) (timer * 1000)); s->connection->read->handler = ngx_mail_auth_sleep_handler; @@ -811,7 +812,7 @@ ngx_mail_auth_http_process_headers(ngx_m peer->name.len = len; - peer->name.data = ngx_palloc(s->connection->pool, len); + peer->name.data = ngx_pnalloc(s->connection->pool, len); if (peer->name.data == NULL) { ngx_destroy_pool(ctx->pool); ngx_mail_session_internal_server_error(s); @@ -1280,7 +1281,7 @@ ngx_mail_auth_http_escape(ngx_pool_t *po escaped->len = text->len + n * 2; - p = ngx_palloc(pool, escaped->len); + p = ngx_pnalloc(pool, escaped->len); if (p == NULL) { return NGX_ERROR; } @@ -1351,7 +1352,7 @@ ngx_mail_auth_http_merge_conf(ngx_conf_t len += header[i].key.len + 2 + header[i].value.len + 2; } - p = ngx_palloc(cf->pool, len); + p = ngx_pnalloc(cf->pool, len); if (p == NULL) { return NGX_CONF_ERROR; } @@ -1393,7 +1394,7 @@ ngx_mail_auth_http(ngx_conf_t *cf, ngx_c u.url.data += 7; } - if (ngx_parse_url(cf, &u) != NGX_OK) { + if (ngx_parse_url(cf->pool, &u) != NGX_OK) { if (u.err) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%s in auth_http \"%V\"", u.err, &u.url);