mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
peer_fail_permanent: handle take() arg.
We assume this in at least one caller. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
ee9ebbc184
commit
4881129f54
@ -106,6 +106,8 @@ void peer_fail_permanent(struct peer *peer, const u8 *msg)
|
||||
(int)tal_len(msg), (char *)msg);
|
||||
peer->error = towire_error(peer, &all_channels, msg);
|
||||
peer->owner = NULL;
|
||||
if (taken(msg))
|
||||
tal_free(msg);
|
||||
|
||||
if (peer_persists(peer))
|
||||
drop_to_chain(peer);
|
||||
|
@ -150,7 +150,7 @@ void add_peer(struct lightningd *ld, u64 unique_id,
|
||||
/* Peer has failed, but try reconnected. */
|
||||
PRINTF_FMT(2,3) void peer_fail_transient(struct peer *peer, const char *fmt,...);
|
||||
/* Peer has failed, give up on it. */
|
||||
void peer_fail_permanent(struct peer *peer, const u8 *msg);
|
||||
void peer_fail_permanent(struct peer *peer, const u8 *msg TAKES);
|
||||
/* Permanent error, but due to internal problems, not peer. */
|
||||
void peer_internal_error(struct peer *peer, const char *fmt, ...);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user