blob: 85f1e7a3129db1321bbae22e4f36a16dcec0169d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* Copyright (C) Yichun Zhang (agentzh)
*/
#ifndef DDEBUG
#define DDEBUG 0
#endif
#include "ddebug.h"
#include "ngx_http_lua_common.h"
int
ngx_http_lua_ffi_get_phase(ngx_http_request_t *r, char **err)
{
ngx_http_lua_ctx_t *ctx;
ctx = ngx_http_get_module_ctx(r, ngx_http_lua_module);
if (ctx == NULL) {
*err = "no request context";
return NGX_ERROR;
}
return ctx->context;
}
/* vi:set ft=c ts=4 sw=4 et fdm=marker: */
|