nc_read_msg_io buf unused + don't create deleted endpoints #560
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I had these 2 issues with libnetconf 4.0.1:
First patch:
src/io.c: Sometimes I get ret = 0 and an empty buf so ly_in_new_memory failed.
I propose to return if ret is 0?
Second patch:
Replacing the netconf server endpoint may fail:
For instance if the endpoint name is ssh1, we try to replace it with an endpoint name called ssh2.
nc_server_config_listen_all_endpoints first tries to create ssh1 whereas it is supposed to be deleted.
It fails and return.
Then it does not try to create ssh2.
For instance I tried to apply these 2 configs:
then:
I get these errors:
[ERR]: LN: Endpoint "ssh1" was not found.
[ERR]: LN: Applying ietf-netconf-server configuration failed.
In the second patch, I tried to skip endpoints with the delete yang operation.
Thank you