Skip to content

Commit 6ce9c56

Browse files
committed
session client UPDATE warning on unexpected get-schema reply
Refs #357
1 parent e91ba42 commit 6ce9c56

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/session_client.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,12 @@ retrieve_schema_data_getschema(const char *name, const char *rev, struct clb_dat
413413
if (msg == NC_MSG_WOULDBLOCK) {
414414
ERR(clb_data->session, "Timeout for receiving reply to a <get-schema> expired.");
415415
goto cleanup;
416-
} else if ((msg == NC_MSG_ERROR) || !op) {
416+
} else if (msg == NC_MSG_ERROR) {
417417
ERR(clb_data->session, "Failed to receive a reply to <get-schema>.");
418418
goto cleanup;
419+
} else if (!op) {
420+
WRN(clb_data->session, "Received an unexpected reply to <get-schema>.");
421+
goto cleanup;
419422
}
420423

421424
if (!lyd_child(op) || (lyd_child(op)->schema->nodetype != LYS_ANYXML)) {

0 commit comments

Comments
 (0)