Skip to content

Commit 488b070

Browse files
committed
session client CHANGE additional check for returned <get-schema> data
Check that the returned data contains something to give chance to an alternative way to get schema.
1 parent 56bdeb5 commit 488b070

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/session_client.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,12 @@ retrieve_schema_data_getschema(const char *name, const char *rev, struct clb_dat
430430
}
431431
nc_reply_free(reply);
432432

433+
if (model_data && !model_data[0]) {
434+
/* empty data */
435+
free(model_data);
436+
model_data = NULL;
437+
}
438+
433439
/* try to store the model_data into local schema repository */
434440
if (model_data) {
435441
*format = LYS_IN_YANG;

0 commit comments

Comments
 (0)