mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 22:57:45 +00:00
mgmtd: address review comments
Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
parent
8611886d52
commit
51941c1916
@ -2734,10 +2734,8 @@ FILE *vty_open_config(const char *config_file, char *config_default_dir)
|
||||
|
||||
if (strstr(config_default_dir, "vtysh") == NULL) {
|
||||
ret = stat(integrate_default, &conf_stat);
|
||||
if (ret >= 0) {
|
||||
// read_success = true;
|
||||
if (ret >= 0)
|
||||
goto tmp_free_and_out;
|
||||
}
|
||||
}
|
||||
#endif /* VTYSH */
|
||||
confp = fopen(config_default_dir, "r");
|
||||
|
@ -790,11 +790,6 @@ struct msg_conn *mgmt_be_create_adapter(int conn_fd, union sockunion *from)
|
||||
MGMTD_BE_ADAPTER_DBG("Added new MGMTD Backend adapter '%s'",
|
||||
adapter->name);
|
||||
|
||||
#if 0 /* wait until we receive the SUBSCR_REQ registration with name */
|
||||
/* Trigger resync of config with the new adapter */
|
||||
mgmt_be_adapter_sched_init_event(adapter);
|
||||
#endif
|
||||
|
||||
return adapter->conn;
|
||||
}
|
||||
|
||||
@ -820,7 +815,7 @@ int mgmt_be_get_adapter_config(struct mgmt_be_client_adapter *adapter,
|
||||
assert(cfg_chgs);
|
||||
|
||||
/*
|
||||
* TODO: we should be consider making this an assertable condition and
|
||||
* TODO: we should consider making this an assertable condition and
|
||||
* guaranteeing it be true when this function is called. B/c what is
|
||||
* going to happen if there are some changes being sent, and we don't
|
||||
* gather a new snapshot, what new changes that came after the previous
|
||||
|
@ -76,10 +76,10 @@ DECLARE_LIST(mgmt_be_adapters, struct mgmt_be_client_adapter, list_linkage);
|
||||
* MGMT_SUBSCR_NOTIFY_CFG :: the client should be notified of config changes
|
||||
* MGMT_SUBSCR_OPER_OWN :: the client owns the given oeprational state
|
||||
*/
|
||||
#define MGMT_SUBSCR_VALIDATE_CFG 0x1
|
||||
#define MGMT_SUBSCR_NOTIFY_CFG 0x2
|
||||
#define MGMT_SUBSCR_OPER_OWN 0x4
|
||||
#define MGMT_SUBSCR_ALL 0x7
|
||||
#define MGMT_SUBSCR_VALIDATE_CFG 0x1
|
||||
#define MGMT_SUBSCR_NOTIFY_CFG 0x2
|
||||
#define MGMT_SUBSCR_OPER_OWN 0x4
|
||||
#define MGMT_SUBSCR_ALL 0x7
|
||||
|
||||
struct mgmt_be_client_subscr_info {
|
||||
uint xpath_subscr[MGMTD_BE_CLIENT_ID_MAX];
|
||||
|
@ -2477,7 +2477,8 @@ int mgmt_txn_notify_be_adapter_conn(struct mgmt_be_client_adapter *adapter,
|
||||
* has failed.
|
||||
*/
|
||||
FOREACH_TXN_IN_LIST (mgmt_txn_mm, txn) {
|
||||
/* XXX why is this config only? */
|
||||
/* TODO: update with operational state when that is
|
||||
* completed */
|
||||
if (txn->type == MGMTD_TXN_TYPE_CONFIG) {
|
||||
cmtcfg_req = txn->commit_cfg_req
|
||||
? &txn->commit_cfg_req
|
||||
|
Loading…
Reference in New Issue
Block a user