Skip to content

Commit

Permalink
Remove USE_CONFIG_FLAG_CACHE, been enabled long time
Browse files Browse the repository at this point in the history
  • Loading branch information
olofhagsand committed Jan 12, 2024
1 parent b258fc6 commit 344f5ec
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions include/clixon_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions lib/clixon/clixon_yang.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions lib/src/clixon_yang.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 344f5ec

Please sign in to comment.