| 247 | node_id_map); |
| 248 | |
| 249 | static void del_front_log(struct log_book *log) |
| 250 | { |
| 251 | struct log_hdr hdr; |
| 252 | void *buf1, *buf2; |
| 253 | size_t buf1len, buf2len; |
| 254 | |
| 255 | ringbuf_span(log, log->ringbuf_start, sizeof(hdr), |
| 256 | &buf1, &buf1len, &buf2, &buf2len); |
| 257 | copy_from(&hdr, sizeof(hdr), buf1, buf1len, buf2, buf2len); |
| 258 | assert(ringbuf_used(log) >= sizeof(hdr) + hdr.msglen + hdr.iolen); |
| 259 | log->ringbuf_start += sizeof(hdr) + hdr.msglen + hdr.iolen; |
| 260 | |
| 261 | if (hdr.nc && --hdr.nc->count == 0) |
| 262 | tal_free(hdr.nc); |
| 263 | log_prefix_drop(hdr.prefix); |
| 264 | } |
| 265 | |
| 266 | /* We truncate genuinely giant messages */ |
| 267 | static char *cap_header(const tal_t *ctx, struct log_hdr *hdr, const char *msg) |
no test coverage detected