MCPcopy Create free account
hub / github.com/ElementsProject/lightning / record_message

Function record_message

common/test/run-jsonrpc_io.c:181–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179};
180
181static void record_message(const char *buf, const jsmntok_t *toks, struct handler_ctx *hc)
182{
183 size_t obj_len = (size_t)(toks[0].end - toks[0].start);
184 if (obj_len > sizeof(hc->last_buf)) obj_len = sizeof(hc->last_buf);
185 memcpy(hc->last_buf, buf + toks[0].start, obj_len);
186 hc->last_len = obj_len;
187 hc->called++;
188}
189
190/* ---------- pump that drives read -> parse -> (maybe) read again ---------- */
191

Callers 1

pump_nextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected