| 550 | } |
| 551 | |
| 552 | struct channel *peer_any_active_channel(struct peer *peer, bool *others) |
| 553 | { |
| 554 | struct channel *channel, *ret = NULL; |
| 555 | |
| 556 | list_for_each(&peer->channels, channel, list) { |
| 557 | if (!channel_active(channel)) |
| 558 | continue; |
| 559 | /* Already found one? */ |
| 560 | if (ret) { |
| 561 | if (others) |
| 562 | *others = true; |
| 563 | } else { |
| 564 | if (others) |
| 565 | *others = false; |
| 566 | ret = channel; |
| 567 | } |
| 568 | } |
| 569 | return ret; |
| 570 | } |
| 571 | |
| 572 | struct channel *peer_any_unsaved_channel(struct peer *peer, bool *others) |
| 573 | { |
no test coverage detected