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

Function bad_req_fmt

hsmd/hsmd.c:149–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 PRINTF_FMT(4,5);
148
149static struct io_plan *bad_req_fmt(struct io_conn *conn,
150 struct client *c,
151 const u8 *msg_in,
152 const char *fmt, ...)
153{
154 va_list ap;
155 char *str;
156
157 va_start(ap, fmt);
158 str = tal_vfmt(tmpctx, fmt, ap);
159 va_end(ap);
160
161 report_bad_req(c, msg_in, str);
162
163 /*~ The way ccan/io works is that you return the "plan" for what to do
164 * next (eg. io_read). io_close() is special: it means to close the
165 * connection. */
166 return io_close(conn);
167}
168
169/* Convenience wrapper for when we simply can't parse. */
170static struct io_plan *bad_req(struct io_conn *conn,

Callers 4

bad_reqFunction · 0.85
init_hsmFunction · 0.85
handle_clientFunction · 0.85

Calls 2

report_bad_reqFunction · 0.85
io_closeFunction · 0.85

Tested by

no test coverage detected