mgmtd: fix sending the same value to multiple clients

The value should not be cleared after sending it to the first client,
otherwise other clients receive an empty string.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2024-01-24 23:03:24 +02:00 committed by Christian Hopps
parent 1bf395232d
commit 42b815f488

View File

@ -925,7 +925,6 @@ static int mgmt_txn_create_config_batches(struct mgmt_txn_req *txn_req,
MGMTD__YANG_DATA_VALUE__VALUE_ENCODED_STR_VAL; MGMTD__YANG_DATA_VALUE__VALUE_ENCODED_STR_VAL;
batch->value[batch->num_cfg_data].encoded_str_val = batch->value[batch->num_cfg_data].encoded_str_val =
value; value;
value = NULL;
MGMTD_TXN_DBG(" -- %s, batch item:%d", adapter->name, MGMTD_TXN_DBG(" -- %s, batch item:%d", adapter->name,
(int)batch->num_cfg_data); (int)batch->num_cfg_data);