commando, chanbackup: use custommsg hooks.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1126,10 +1126,14 @@ static const struct plugin_notification notifs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static u64 custommsg_types[] = { WIRE_PEER_STORAGE, WIRE_PEER_STORAGE_RETRIEVAL };
|
||||
|
||||
static const struct plugin_hook hooks[] = {
|
||||
{
|
||||
"custommsg",
|
||||
handle_your_peer_storage,
|
||||
.name = "custommsg",
|
||||
.handle = handle_your_peer_storage,
|
||||
.intfilters = custommsg_types,
|
||||
.num_intfilters = ARRAY_SIZE(custommsg_types),
|
||||
},
|
||||
{
|
||||
"peer_connected",
|
||||
|
||||
@@ -603,10 +603,19 @@ static struct command_result *handle_custommsg(struct command *cmd,
|
||||
return command_hook_success(cmd);
|
||||
}
|
||||
|
||||
static u64 custommsg_types[] = {
|
||||
COMMANDO_MSG_CMD_CONTINUES,
|
||||
COMMANDO_MSG_CMD_TERM,
|
||||
COMMANDO_MSG_REPLY_CONTINUES,
|
||||
COMMANDO_MSG_REPLY_TERM,
|
||||
};
|
||||
|
||||
static const struct plugin_hook hooks[] = {
|
||||
{
|
||||
"custommsg",
|
||||
handle_custommsg
|
||||
.name = "custommsg",
|
||||
.handle = handle_custommsg,
|
||||
.intfilters = custommsg_types,
|
||||
.num_intfilters = ARRAY_SIZE(custommsg_types),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user