Commit 07e72c4
main BUGFIX fix empty rpc-reply
When an RPC output has a container and the RPC callback returns nothing,
the np2srv_rpc_cb does not add the 'ok' empty leaf. The rpc-reply is
empty.
The client receives an error when it reads the RPC response with
nc_recv_reply, because it expects either 'ok' or 'data'.
Look at the content of the reply and add the 'ok' leaf if no child with
the default flag is found.
Fixes: 3936132 ("server UPDATE call NC RPC directly, not using sysrepo")
Link: https://datatracker.ietf.org/doc/html/rfc7950#section-7.14.4
Link: https://datatracker.ietf.org/doc/html/rfc6241#section-4.41 parent 2549f8f commit 07e72c4
1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | | - | |
406 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
407 | 422 | | |
408 | 423 | | |
409 | 424 | | |
| |||
0 commit comments