| 69 | } |
| 70 | |
| 71 | bool handle_peer_error(struct per_peer_state *pps, |
| 72 | const struct channel_id *channel_id, |
| 73 | const u8 *msg TAKES) |
| 74 | { |
| 75 | char *err; |
| 76 | bool warning; |
| 77 | if (is_peer_error(tmpctx, msg, channel_id, &err, &warning)) { |
| 78 | /* Ignore unknown channel errors. */ |
| 79 | if (!err) { |
| 80 | if (taken(msg)) |
| 81 | tal_free(msg); |
| 82 | return true; |
| 83 | } |
| 84 | |
| 85 | /* We hang up when a warning is received. */ |
| 86 | peer_failed_received_errmsg(pps, err, channel_id, warning); |
| 87 | } |
| 88 | |
| 89 | return false; |
| 90 | } |
no test coverage detected