Skip to content

Commit

Permalink
Merge pull request #17885 from LabNConsulting/chopps/fix-gen-cb-regre…
Browse files Browse the repository at this point in the history
…ssion

tools: fix regression in gen_northbound_callback tool
  • Loading branch information
ton31337 authored Jan 20, 2025
2 parents 084ebc9 + 2e0387c commit 42b10da
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions tools/gen_northbound_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,10 @@ static int generate_prototypes(const struct lysc_node *snode, void *arg)
generate_callback_name(snode, cb->operation, cb_name,
sizeof(cb_name));

if (cb->operation == NB_CB_GET_ELEM) {
if (f_new_cbs)
generate_prototype(&nb_oper_get, cb_name);
else
generate_prototype(cb, cb_name);
}
if (cb->operation == NB_CB_GET_ELEM && f_new_cbs)
generate_prototype(&nb_oper_get, cb_name);
else
generate_prototype(cb, cb_name);

if (cb->need_config_write && need_config_write) {
generate_config_write_cb_name(snode, cb_name,
Expand Down Expand Up @@ -344,12 +342,10 @@ static int generate_callbacks(const struct lysc_node *snode, void *arg)
generate_callback_name(snode, cb->operation, cb_name,
sizeof(cb_name));

if (cb->operation == NB_CB_GET_ELEM) {
if (f_new_cbs)
generate_callback(&nb_oper_get, cb_name);
else
generate_callback(cb, cb_name);
}
if (cb->operation == NB_CB_GET_ELEM && f_new_cbs)
generate_callback(&nb_oper_get, cb_name);
else
generate_callback(cb, cb_name);

if (cb->need_config_write && need_config_write) {
generate_config_write_cb_name(snode, cb_name,
Expand Down

0 comments on commit 42b10da

Please sign in to comment.