summaryrefslogtreecommitdiffstats
path: root/lib/mgmt_fe_client.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-05-06 06:15:49 +0200
committerChristian Hopps <chopps@labn.net>2023-05-28 11:13:22 +0200
commitedafa64c3027755ca0e08e0e5a6ffbb6c91416f7 (patch)
tree5b99e30c6c05290312d759e9b786406138d6ddef /lib/mgmt_fe_client.c
parentstaticd: remove connect notify function, not needed (diff)
downloadfrr-edafa64c3027755ca0e08e0e5a6ffbb6c91416f7.tar.xz
frr-edafa64c3027755ca0e08e0e5a6ffbb6c91416f7.zip
lib: enable short circuit for FE client/adapter connection
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, 3 insertions, 2 deletions
diff --git a/lib/mgmt_fe_client.c b/lib/mgmt_fe_client.c
index 9f87c3878..a7f86201d 100644
--- a/lib/mgmt_fe_client.c
+++ b/lib/mgmt_fe_client.c
@@ -645,7 +645,7 @@ uintptr_t mgmt_fe_client_lib_init(struct mgmt_fe_client_params *params,
MGMTD_FE_SERVER_PATH, mgmt_fe_client_notify_connect,
mgmt_fe_client_notify_disconnect,
mgmt_fe_client_process_msg, MGMTD_FE_MAX_NUM_MSG_PROC,
- MGMTD_FE_MAX_NUM_MSG_WRITE, MGMTD_FE_MSG_MAX_LEN, false,
+ MGMTD_FE_MAX_NUM_MSG_WRITE, MGMTD_FE_MSG_MAX_LEN, true,
"FE-client", MGMTD_DBG_FE_CLIENT_CHECK());
MGMTD_FE_CLIENT_DBG("Initialized client '%s'", params->name);
@@ -683,11 +683,12 @@ enum mgmt_result mgmt_fe_create_client_session(uintptr_t lib_hndl,
session->client_ctx = client_ctx;
session->session_id = 0;
+ mgmt_sessions_add_tail(&client_ctx->client_sessions, session);
+
if (mgmt_fe_send_session_req(client_ctx, session, true) != 0) {
XFREE(MTYPE_MGMTD_FE_SESSION, session);
return MGMTD_INTERNAL_ERROR;
}
- mgmt_sessions_add_tail(&client_ctx->client_sessions, session);
return MGMTD_SUCCESS;
}