diff --git a/src/main.c b/src/main.c index 64d47972..85f07005 100644 --- a/src/main.c +++ b/src/main.c @@ -943,7 +943,12 @@ server_data_subscribe(void) /* operational data */ SR_OPER_SUBSCR(mod_name, "/ietf-subscribed-notifications:streams", srsn_oper_data_streams_cb); - SR_OPER_SUBSCR(mod_name, "/ietf-subscribed-notifications:subscriptions", np2srv_oper_sub_ntf_subscriptions_cb); + rc = sr_oper_get_subscribe(np2srv.sr_sess, mod_name, "/ietf-subscribed-notifications:subscriptions", + np2srv_oper_sub_ntf_subscriptions_cb, NULL, SR_SUBSCR_OPER_MERGE, &np2srv.sr_data_sub); + if (rc != SR_ERR_OK) { + ERR("Subscribing for providing \"%s\" state data failed (%s).", mod_name, sr_strerror(rc)); + goto error; + } /* * ietf-netconf-server, ietf-keystore and ietf-trustore handled by ln2