Skip to content

Commit 070be24

Browse files
committed
cmake UPDATE libyang updates
1 parent 024c65c commit 070be24

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINO
7171
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
7272

7373
# Version of libyang library that this project depends on
74-
set(LIBYANG_DEP_VERSION 4.2.0)
75-
set(LIBYANG_DEP_SOVERSION 4.2.0)
76-
set(LIBYANG_DEP_SOVERSION_MAJOR 4)
74+
set(LIBYANG_DEP_VERSION 5.0.0)
75+
set(LIBYANG_DEP_SOVERSION 5.0.0)
76+
set(LIBYANG_DEP_SOVERSION_MAJOR 5)
7777

7878
# global C flags
7979
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fvisibility=hidden -std=c99")

distro/pkg/rpm/libnetconf2.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ BuildRequires: gcc
1111
BuildRequires: libssh-devel
1212
BuildRequires: openssl-devel
1313
BuildRequires: pam-devel
14-
BuildRequires: pkgconfig(libyang) >= 2
14+
BuildRequires: pkgconfig(libyang) >= 5
1515
BuildRequires: libcurl-devel
1616

1717
%package devel

src/session_client.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,10 @@ retrieve_module_data_getschema(const char *name, const char *rev, struct clb_dat
482482
switch (get_schema_data->value_type) {
483483
case LYD_ANYDATA_STRING:
484484
case LYD_ANYDATA_XML:
485-
model_data = strdup(get_schema_data->value.str);
485+
model_data = strdup(get_schema_data->value);
486486
break;
487487
case LYD_ANYDATA_DATATREE:
488-
lyd_print_mem(&model_data, get_schema_data->value.tree, LYD_XML, LYD_PRINT_SIBLINGS);
488+
lyd_print_mem(&model_data, get_schema_data->child, LYD_XML, LYD_PRINT_SIBLINGS);
489489
break;
490490
case LYD_ANYDATA_JSON:
491491
ERRINT;
@@ -765,14 +765,14 @@ nc_ctx_load_module(struct nc_session *session, const char *name, const char *rev
765765
ly_temp_log_options(prev_lo);
766766
if (!(*mod)) {
767767
for (eitem = ly_err_first(session->ctx); eitem; eitem = eitem->next) {
768-
ly_err_print(session->ctx, eitem);
768+
ly_err_print(session->ctx, eitem, NULL, NULL);
769769
}
770770
ret = -1;
771771
} else {
772772
/* print only warnings */
773773
for (eitem = ly_err_first(session->ctx); eitem; eitem = eitem->next) {
774774
if (eitem->level == LY_LLWRN) {
775-
ly_err_print(session->ctx, eitem);
775+
ly_err_print(session->ctx, eitem, NULL, NULL);
776776
}
777777
}
778778
}
@@ -874,13 +874,13 @@ get_oper_data(struct nc_session *session, int has_get_data, const char *filter,
874874
if (data->value_type != LYD_ANYDATA_DATATREE) {
875875
WRN(session, "Unexpected data in reply to a %s RPC.", rpc_name);
876876
goto cleanup;
877-
} else if (!data->value.tree) {
877+
} else if (!data->child) {
878878
WRN(session, "No data in reply to a %s RPC.", rpc_name);
879879
goto cleanup;
880880
}
881881

882-
*oper_data = data->value.tree;
883-
data->value.tree = NULL;
882+
*oper_data = data->child;
883+
lyd_unlink_siblings(data->child);
884884

885885
cleanup:
886886
nc_rpc_free(rpc);

0 commit comments

Comments
 (0)