Remove USE_CONFIG_FLAG_CACHE, been enabled long time
This commit is contained in:
parent
b258fc625c
commit
344f5ec39d
3 changed files with 0 additions and 16 deletions
|
|
@ -127,12 +127,6 @@
|
|||
*/
|
||||
#undef LIST_PAGINATION_REMAINING
|
||||
|
||||
/*! Use Ancestor config cache
|
||||
*
|
||||
* The cache uses two yang stmt flag bits. One to say it is active, the second its value
|
||||
*/
|
||||
#define USE_CONFIG_FLAG_CACHE
|
||||
|
||||
/*! If backend is restarted, cli and netconf client will retry (once) and reconnect
|
||||
*
|
||||
* Note, if client has locked or had edits in progress, these will be lost
|
||||
|
|
|
|||
|
|
@ -61,10 +61,8 @@
|
|||
#define YANG_FLAG_INDEX 0x08 /* This yang node under list is (extra) index. --> you can access
|
||||
* list elements using this index with binary search */
|
||||
#endif
|
||||
#ifdef USE_CONFIG_FLAG_CACHE
|
||||
#define YANG_FLAG_CONFIG_CACHE 0x10 /* Ancestor config cache is active */
|
||||
#define YANG_FLAG_CONFIG_VALUE 0x20 /* Ancestor config cache value */
|
||||
#endif
|
||||
|
||||
#define YANG_FLAG_DISABLED 0x40 /* Disabled due to if-feature evaluate to false
|
||||
* Transformed to ANYDATA but some code may need to check
|
||||
|
|
|
|||
|
|
@ -3494,29 +3494,21 @@ yang_config_ancestor(yang_stmt *ys)
|
|||
|
||||
yp = ys;
|
||||
do {
|
||||
#ifdef USE_CONFIG_FLAG_CACHE
|
||||
if (yang_flag_get(yp, YANG_FLAG_CONFIG_CACHE))
|
||||
return yang_flag_get(yp, YANG_FLAG_CONFIG_VALUE)?1:0;
|
||||
#endif
|
||||
if (yang_config(yp) == 0){
|
||||
#ifdef USE_CONFIG_FLAG_CACHE
|
||||
yang_flag_set(yp, YANG_FLAG_CONFIG_CACHE);
|
||||
yang_flag_reset(yp, YANG_FLAG_CONFIG_VALUE);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
if (yang_keyword_get(yp) == Y_INPUT || yang_keyword_get(yp) == Y_OUTPUT || yang_keyword_get(yp) == Y_NOTIFICATION){
|
||||
#ifdef USE_CONFIG_FLAG_CACHE
|
||||
yang_flag_set(yp, YANG_FLAG_CONFIG_CACHE);
|
||||
yang_flag_reset(yp, YANG_FLAG_CONFIG_VALUE);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
} while((yp = yang_parent_get(yp)) != NULL);
|
||||
#ifdef USE_CONFIG_FLAG_CACHE
|
||||
yang_flag_set(ys, YANG_FLAG_CONFIG_CACHE);
|
||||
yang_flag_set(ys, YANG_FLAG_CONFIG_VALUE);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue