mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
subd: clear transient billboard on start and shutdown.
Use NULL on the callback to mean "clear the slot", and call it. We have do this in two places: the old daemon might die, or the new daemon might start first. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
26b004e5af
commit
cca0a5412e
@@ -326,11 +326,13 @@ void channel_set_billboard(struct channel *channel, bool perm, const char *str)
|
||||
p = &channel->billboard.permanent[channel->state];
|
||||
else
|
||||
p = &channel->billboard.transient;
|
||||
tal_free(*p);
|
||||
*p = tal_free(*p);
|
||||
|
||||
*p = tal_fmt(channel, "%s:%s", channel_state_name(channel), str);
|
||||
if (taken(str))
|
||||
tal_free(str);
|
||||
if (str) {
|
||||
*p = tal_fmt(channel, "%s:%s", channel_state_name(channel), str);
|
||||
if (taken(str))
|
||||
tal_free(str);
|
||||
}
|
||||
}
|
||||
|
||||
void channel_fail_transient(struct channel *channel, const char *fmt, ...)
|
||||
|
||||
Reference in New Issue
Block a user