summaryrefslogtreecommitdiffstats
path: root/mgmtd/mgmt_fe_adapter.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-07-14 22:13:54 +0200
committerChristian Hopps <chopps@labn.net>2023-07-15 00:24:30 +0200
commit76835fd55868b485b17c3f9091721335bd466cd8 (patch)
treec4beaf3f0c69ddf8fa72b3b81ac0b025e1ee3f0c /mgmtd/mgmt_fe_adapter.c
parentMerge pull request #13717 from anlancs/fix/pimd-igmp-prot-back-2 (diff)
downloadfrr-76835fd55868b485b17c3f9091721335bd466cd8.tar.xz
frr-76835fd55868b485b17c3f9091721335bd466cd8.zip
lib: mgmtd: only clear pending for the in-progress command
The lock/unlocks are being done short-circuit so they are never pending; however, the handling of the unlock notification was always resuming the command if pending was set. In all cases pending is set for another command. For example implicit commit locks then when notified its done unlocks which was clearing the set-config pending flag and resuming that command incorrectly. Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'mgmtd/mgmt_fe_adapter.c')
-rw-r--r--mgmtd/mgmt_fe_adapter.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c
index a4bb33d61..2b2471c90 100644
--- a/mgmtd/mgmt_fe_adapter.c
+++ b/mgmtd/mgmt_fe_adapter.c
@@ -593,9 +593,8 @@ mgmt_fe_session_handle_lockds_req_msg(struct mgmt_fe_session_ctx *session,
}
if (lockds_req->lock) {
- if (mgmt_fe_session_write_lock_ds(lockds_req->ds_id,
- ds_ctx, session)
- != 0) {
+ if (mgmt_fe_session_write_lock_ds(lockds_req->ds_id, ds_ctx,
+ session)) {
fe_adapter_send_lockds_reply(
session, lockds_req->ds_id, lockds_req->req_id,
lockds_req->lock, false,