switch (cmd) {
case PROTO_CMD_SETUP:
- if (static_proto_setup(state))
- break;
+ if (!static_proto_setup(state))
+ return -1;
- /* fall through */
+ break;
case PROTO_CMD_TEARDOWN:
break;
}
memcpy(state->config, attr, blob_pad_len(attr));
state->proto.free = static_free;
- state->proto.handler = static_handler;
- state->proto.flags = PROTO_FLAG_IMMEDIATE;
+ state->proto.cb = static_handler;
return &state->proto;
static struct proto_handler static_proto = {
.name = "static",
+ .flags = PROTO_FLAG_IMMEDIATE,
.config_params = &static_attr_list,
.attach = static_attach,
};