summaryrefslogtreecommitdiff
path: root/lib/mgmt_fe_client.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-06-11 22:13:48 -0400
committerChristian Hopps <chopps@labn.net>2023-06-12 02:32:29 -0400
commit0fc08fa7381fdba03a0c2e5b745929954172915a (patch)
treecdcc2ab0930e40fdc7b634998c031dd7f62c4460 /lib/mgmt_fe_client.c
parent4307fdd07047dc2f7c9daef7a74af6cddf635c34 (diff)
lib: mgmtd: session create and destroy both short-circuit
For creation this is the first thing done so short-circuit just means inline sync response. However, for destroy there could be commands in-flight, these will be discarded when they match no session, and the state cleaned up immediately when the message short-circuits. Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/mgmt_fe_client.c')
-rw-r--r--lib/mgmt_fe_client.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/mgmt_fe_client.c b/lib/mgmt_fe_client.c
index 35a6d7d909..7af421405b 100644
--- a/lib/mgmt_fe_client.c
+++ b/lib/mgmt_fe_client.c
@@ -124,18 +124,15 @@ static int mgmt_fe_send_session_req(struct mgmt_fe_client *client,
{
Mgmtd__FeMessage fe_msg;
Mgmtd__FeSessionReq sess_req;
- bool scok;
mgmtd__fe_session_req__init(&sess_req);
sess_req.create = create;
if (create) {
sess_req.id_case = MGMTD__FE_SESSION_REQ__ID_CLIENT_CONN_ID;
sess_req.client_conn_id = session->client_id;
- scok = true;
} else {
sess_req.id_case = MGMTD__FE_SESSION_REQ__ID_SESSION_ID;
sess_req.session_id = session->session_id;
- scok = false;
}
mgmtd__fe_message__init(&fe_msg);
@@ -146,7 +143,7 @@ static int mgmt_fe_send_session_req(struct mgmt_fe_client *client,
"Sending SESSION_REQ %s message for client-id %" PRIu64,
create ? "create" : "destroy", session->client_id);
- return mgmt_fe_client_send_msg(client, &fe_msg, scok);
+ return mgmt_fe_client_send_msg(client, &fe_msg, true);
}
int mgmt_fe_send_lockds_req(struct mgmt_fe_client *client, uint64_t session_id,