| 421 | } |
| 422 | |
| 423 | static bool handle_peer_error(struct subd *sd, const u8 *msg, int fds[1]) |
| 424 | { |
| 425 | void *channel = sd->channel; |
| 426 | char *desc; |
| 427 | struct peer_fd *peer_fd; |
| 428 | u8 *err_for_them; |
| 429 | bool warning; |
| 430 | bool disconnect; |
| 431 | |
| 432 | if (!fromwire_status_peer_error(msg, msg, |
| 433 | &disconnect, &desc, &warning, |
| 434 | &err_for_them)) |
| 435 | return false; |
| 436 | |
| 437 | peer_fd = new_peer_fd_arr(msg, fds); |
| 438 | |
| 439 | /* Don't free sd; we may be about to free channel. */ |
| 440 | sd->channel = NULL; |
| 441 | /* While it's cleaning up, this is not a leak! */ |
| 442 | notleak(sd); |
| 443 | sd->errcb(channel, peer_fd, desc, err_for_them, disconnect, warning); |
| 444 | return true; |
| 445 | } |
| 446 | |
| 447 | static bool handle_set_billboard(struct subd *sd, const u8 *msg) |
| 448 | { |
no test coverage detected