Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/mctpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,10 @@ handle_control_endpoint_discovery(struct ctx *ctx, int sd,
return 0;
}

req = (void *)buf;
resp = (void *)resp;
mctp_ctrl_msg_hdr_init_resp(&resp->ctrl_hdr, *req);

if (link_data->discovered == DISCOVERY_UNSUPPORTED) {
resp->completion_code = MCTP_CTRL_CC_ERROR_INVALID_DATA;
return reply_message(ctx, sd, resp,
Expand All @@ -1244,10 +1248,6 @@ handle_control_endpoint_discovery(struct ctx *ctx, int sd,
return 0;
}

req = (void *)buf;
resp = (void *)resp;
mctp_ctrl_msg_hdr_init_resp(&resp->ctrl_hdr, *req);

// we need to send using physical addressing, no entry in routing table yet
return reply_message_phys(ctx, sd, resp, sizeof(*resp), addr);
}
Expand Down
Loading