* lua_ap_scoreboard_process; r:scoreboard_process(a) - returns scoreboard info */
| 1233 | * lua_ap_scoreboard_process; r:scoreboard_process(a) - returns scoreboard info |
| 1234 | */ |
| 1235 | static int lua_ap_scoreboard_process(lua_State *L) |
| 1236 | { |
| 1237 | int i; |
| 1238 | process_score *ps_record; |
| 1239 | |
| 1240 | luaL_checktype(L, 1, LUA_TUSERDATA); |
| 1241 | luaL_checktype(L, 2, LUA_TNUMBER); |
| 1242 | i = lua_tointeger(L, 2); |
| 1243 | ps_record = ap_get_scoreboard_process(i); |
| 1244 | if (ps_record) { |
| 1245 | lua_newtable(L); |
| 1246 | |
| 1247 | lua_pushstring(L, "connections"); |
| 1248 | lua_pushnumber(L, ps_record->connections); |
| 1249 | lua_settable(L, -3); |
| 1250 | |
| 1251 | lua_pushstring(L, "keepalive"); |
| 1252 | lua_pushnumber(L, ps_record->keep_alive); |
| 1253 | lua_settable(L, -3); |
| 1254 | |
| 1255 | lua_pushstring(L, "lingering_close"); |
| 1256 | lua_pushnumber(L, ps_record->lingering_close); |
| 1257 | lua_settable(L, -3); |
| 1258 | |
| 1259 | lua_pushstring(L, "pid"); |
| 1260 | lua_pushnumber(L, ps_record->pid); |
| 1261 | lua_settable(L, -3); |
| 1262 | |
| 1263 | lua_pushstring(L, "suspended"); |
| 1264 | lua_pushnumber(L, ps_record->suspended); |
| 1265 | lua_settable(L, -3); |
| 1266 | |
| 1267 | lua_pushstring(L, "wait_io"); |
| 1268 | lua_pushnumber(L, ps_record->wait_io); |
| 1269 | lua_settable(L, -3); |
| 1270 | |
| 1271 | lua_pushstring(L, "write_completion"); |
| 1272 | lua_pushnumber(L, ps_record->write_completion); |
| 1273 | lua_settable(L, -3); |
| 1274 | |
| 1275 | lua_pushstring(L, "not_accepting"); |
| 1276 | lua_pushnumber(L, ps_record->not_accepting); |
| 1277 | lua_settable(L, -3); |
| 1278 | |
| 1279 | lua_pushstring(L, "quiescing"); |
| 1280 | lua_pushnumber(L, ps_record->quiescing); |
| 1281 | lua_settable(L, -3); |
| 1282 | |
| 1283 | return 1; |
| 1284 | } |
| 1285 | return 0; |
| 1286 | } |
| 1287 | |
| 1288 | /* |
| 1289 | * lua_ap_scoreboard_worker; r:scoreboard_worker(proc, thread) - Returns thread |
nothing calls this directly
no test coverage detected