diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-24 22:59:07 +0200 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-28 23:28:40 +0200 |
| commit | 05948a4d98f587a0ce2cb7f22421ef9216235636 (patch) | |
| tree | 3fac2f92a8df69ce9d986740536b47f2160c3b13 /lib/mgmt_be_client.c | |
| parent | dc6ff4c0de04e79dd23cf5de27185292224c93e6 (diff) | |
lib: use shared candidate between vty and mgmtd client
When the daemon is partially mgmtd-converted, it receives configuration
from vty and mgmtmd simultaneosly. This configuration must be
synchronized.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/mgmt_be_client.c')
| -rw-r--r-- | lib/mgmt_be_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mgmt_be_client.c b/lib/mgmt_be_client.c index 458623844a..463aefdf25 100644 --- a/lib/mgmt_be_client.c +++ b/lib/mgmt_be_client.c @@ -19,6 +19,7 @@ #include "northbound.h" #include "stream.h" #include "sockopt.h" +#include "northbound_cli.h" #include "lib/mgmt_be_client_clippy.c" @@ -1068,7 +1069,7 @@ struct mgmt_be_client *mgmt_be_client_create(const char *client_name, client->name = XSTRDUP(MTYPE_MGMTD_BE_CLIENT_NAME, client_name); client->running_config = running_config; - client->candidate_config = nb_config_new(NULL); + client->candidate_config = vty_shared_candidate_config; if (cbs) client->cbs = *cbs; mgmt_be_txns_init(&client->txn_head); @@ -1107,7 +1108,6 @@ void mgmt_be_client_destroy(struct mgmt_be_client *client) msg_client_cleanup(&client->client); mgmt_be_cleanup_all_txns(client); mgmt_be_txns_fini(&client->txn_head); - nb_config_free(client->candidate_config); XFREE(MTYPE_MGMTD_BE_CLIENT_NAME, client->name); XFREE(MTYPE_MGMTD_BE_CLIENT, client); |
