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

Function get_req

lightningd/subd.c:174–189  ·  view source on GitHub ↗

Caller must free. */

Source from the content-addressed store, hash-verified

172
173/* Caller must free. */
174static struct subd_req *get_req(struct subd *sd, int reply_type)
175{
176 struct subd_req *sr;
177
178 list_for_each(&sd->reqs, sr, list) {
179 if (sr->type + SUBD_REPLY_OFFSET == reply_type)
180 return sr;
181 /* If it's a fail, and that's a valid type. */
182 if (sr->type + SUBD_REPLYFAIL_OFFSET == reply_type
183 && strends(sd->msgname(reply_type), "_REPLYFAIL")) {
184 sr->num_reply_fds = 0;
185 return sr;
186 }
187 }
188 return NULL;
189}
190
191static void close_taken_fds(va_list *ap)
192{

Callers 1

sd_msg_readFunction · 0.85

Calls 1

strendsFunction · 0.85

Tested by

no test coverage detected