MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / get_remote_input

Function get_remote_input

lua/sp.c:1477–1493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1475static clnt_info info_buf;
1476
1477static int get_remote_input(lua_State *lua, char *buffer, size_t sz)
1478{
1479 SP sp = getsp(lua);
1480 struct sqlclntstate *clnt = sp->debug_clnt;
1481
1482 info_buf.has_buffer = 0;
1483
1484 char *trace = "\ncomdb2_lua> ";
1485 sp->rc = send_sp_trace(clnt, trace, 1);
1486 if (sp->rc) {
1487 return luabb_error(lua, sp, "%s: couldn't send results back", __func__);
1488 }
1489 Pthread_mutex_lock(&lua_debug_mutex);
1490 int rc = read_response(clnt, RESPONSE_SP_CMD, buffer, sz);
1491 Pthread_mutex_unlock(&lua_debug_mutex);
1492 return rc;
1493}
1494
1495static void InstructionCountHook(Lua, lua_Debug *);
1496static int db_debug(lua_State *lua)

Callers 1

db_db_debugFunction · 0.85

Calls 3

send_sp_traceFunction · 0.85
luabb_errorFunction · 0.85
read_responseFunction · 0.85

Tested by

no test coverage detected