fixed lua and psgi plugins

This commit is contained in:
roberto@fiorenzo
2011-02-28 15:26:05 +01:00
parent 774548f268
commit afb3e3636e
4 changed files with 7 additions and 15 deletions
-1
View File
@@ -1,4 +1,3 @@
[uwsgi]
inherit = default
plugins = lua
embedded_plugins = ping, nagios, rpc
+1 -1
View File
@@ -1,3 +1,3 @@
[uwsgi]
inherit = default
embedded_plugins = psgi, ping, proxy, nagios, rpc
embedded_plugins = psgi
+4 -11
View File
@@ -153,7 +153,7 @@ static int uwsgi_api_cache_set(lua_State *L) {
expires = lua_tonumber(L, 3);
}
uwsgi_cache_set((char *)key, strlen(key), (char *)value, (uint16_t) vallen, expires);
uwsgi_cache_set((char *)key, strlen(key), (char *)value, (uint16_t) vallen, expires, 0);
}
@@ -176,7 +176,7 @@ static int uwsgi_api_register_signal(lua_State *L) {
lua_pushvalue(L, 3);
lhandler = luaL_ref(L, LUA_REGISTRYINDEX);
uwsgi_register_signal(sig, kind, (void *) lhandler, 6);
uwsgi_register_signal(sig, (char *)who, (void *) lhandler, 6);
}
lua_pushnil(L);
@@ -187,7 +187,7 @@ static int uwsgi_api_register_signal(lua_State *L) {
static int uwsgi_api_cache_get(lua_State *L) {
char *value ;
uint16_t valsize;
uint64_t valsize;
const char *key ;
lca(L, 1);
@@ -601,15 +601,8 @@ int uwsgi_lua_signal_handler(uint8_t sig, void *handler) {
lua_rawgeti(L, LUA_REGISTRYINDEX, (long) handler);
lua_pushnumber(L, sig);
if (!payload_size) {
lua_pushlstring(L, "", 0);
}
else {
lua_pushlstring(L, payload, payload_size);
}
if (lua_pcall(L, 2, 1, 0) != 0) {
if (lua_pcall(L, 1, 1, 0) != 0) {
uwsgi_log("error running function `f': %s",
lua_tostring(L, -1));
+2 -2
View File
@@ -29,7 +29,7 @@ XS(XS_cache_set) {
key = SvPV(ST(0), keylen);
val = SvPV(ST(1), vallen);
uwsgi_cache_set(key, (uint16_t) keylen, val, (uint16_t) vallen, 0);
uwsgi_cache_set(key, (uint16_t) keylen, val, (uint64_t) vallen, 0, 0);
XSRETURN_UNDEF;
}
@@ -39,7 +39,7 @@ XS(XS_cache_get) {
char *key, *val;
STRLEN keylen;
uint16_t vallen;
uint64_t vallen;
psgi_check_args(1);