Skip to content

Commit

Permalink
netconf BUGFIX check return values
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Aug 15, 2024
1 parent 181bcb1 commit b2034e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/netconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,9 @@ np2srv_rpc_subscribe_ntf_cb(sr_session_ctx_t *UNUSED(session), uint32_t UNUSED(s
ly_ctx = sr_acquire_context(np2srv.sr_conn);
sr_release_context(np2srv.sr_conn);

lyd_new_path(NULL, ly_ctx, "/nc-notifications:replayComplete", NULL, 0, &ly_ntf);
if (lyd_new_path(NULL, ly_ctx, "/nc-notifications:replayComplete", NULL, 0, &ly_ntf)) {
return;
}
np_ntf_send(arg->nc_sess, timestamp, &ly_ntf, 1);

/* now send all the buffered notifications */
Expand All @@ -855,7 +857,9 @@ np2srv_rpc_subscribe_ntf_cb(sr_session_ctx_t *UNUSED(session), uint32_t UNUSED(s
ly_ctx = sr_acquire_context(np2srv.sr_conn);
sr_release_context(np2srv.sr_conn);

lyd_new_path(NULL, ly_ctx, "/nc-notifications:notificationComplete", NULL, 0, &ly_ntf);
if (lyd_new_path(NULL, ly_ctx, "/nc-notifications:notificationComplete", NULL, 0, &ly_ntf)) {
return;
}
np_ntf_send(arg->nc_sess, timestamp, &ly_ntf, 1);

/* subscription finished */
Expand Down

0 comments on commit b2034e7

Please sign in to comment.