diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2006-12-12 20:59:24 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2006-12-12 20:59:24 +0000 |
| commit | e773324c3013cd9c0336db2f346f760d6c3a95cb (patch) | |
| tree | df2f5e4ff22abda424870184103f0e8e74588d6e /src/http/modules/perl/nginx.xs | |
| parent | 332efbc4122d5028b6e61b15c155d477a29c8622 (diff) | |
| download | nginx-e773324c3013cd9c0336db2f346f760d6c3a95cb.tar.gz nginx-e773324c3013cd9c0336db2f346f760d6c3a95cb.tar.bz2 | |
$r->sleep()
Diffstat (limited to 'src/http/modules/perl/nginx.xs')
| -rw-r--r-- | src/http/modules/perl/nginx.xs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index a32c85e73..734f7bac8 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -846,6 +846,27 @@ variable(r, name, value = NULL) void +sleep(r, sleep, next) + CODE: + + dXSTARG; + ngx_http_request_t *r; + ngx_http_perl_ctx_t *ctx; + + ngx_http_perl_set_request(r); + + ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module); + + ctx->sleep = SvIV(ST(1)); + ctx->next = SvRV(ST(2)); + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "perl sleep: %d", ctx->sleep); + + XSRETURN_EMPTY; + + +void log_error(r, err, msg) CODE: |
