comparison src/http/modules/perl/nginx.xs @ 911:73c66ed9a9cd

$r->sleep()
author Igor Sysoev <igor@sysoev.ru>
date Tue, 12 Dec 2006 20:59:24 +0000
parents 918e19c51a65
children 7fa926a7926d
comparison
equal deleted inserted replaced
910:918e19c51a65 911:73c66ed9a9cd
844 844
845 ST(0) = TARG; 845 ST(0) = TARG;
846 846
847 847
848 void 848 void
849 sleep(r, sleep, next)
850 CODE:
851
852 dXSTARG;
853 ngx_http_request_t *r;
854 ngx_http_perl_ctx_t *ctx;
855
856 ngx_http_perl_set_request(r);
857
858 ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module);
859
860 ctx->sleep = SvIV(ST(1));
861 ctx->next = SvRV(ST(2));
862
863 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
864 "perl sleep: %d", ctx->sleep);
865
866 XSRETURN_EMPTY;
867
868
869 void
849 log_error(r, err, msg) 870 log_error(r, err, msg)
850 CODE: 871 CODE:
851 872
852 ngx_http_request_t *r; 873 ngx_http_request_t *r;
853 SV *err, *msg; 874 SV *err, *msg;