Commit bbab76f
committed
Fix parsing for notification after leaf
This commit fixes parsing of notification messages for the case where the
notification follows a leaf. Prior to this change, if the notification
followed a leaf, the notification would be missed. In the `LYS_LEAF` case,
`elem` would be advanced to `elem->next` (the notification), but the `for`
loop condition to detect the notification would not be re-evaluated due to the
`goto next_node` jump. By the time the loop condition was re-evaluated, `elem`
would have been advanced to the notification's child.
We've written integration tests that demonstrate the problem. This commit,
together with a forthcoming commit to sysrepo, will allow those failing test
cases to pass. (See [CI results], lines 7282-7284, or [test source code].)
These test cases cover several different variations of notifications tied to
data nodes.
[CI results]: https://travis-ci.org/ADTRAN/netopeer2-integration-tests/builds/414144146#L7282
[test source code]: https://github.com/ADTRAN/netopeer2-integration-tests/blob/master/tests/test_notif.py#L2291 parent 8f1d355 commit bbab76f
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
828 | 829 | | |
829 | 830 | | |
830 | 831 | | |
| 832 | + | |
831 | 833 | | |
832 | 834 | | |
833 | 835 | | |
| |||
838 | 840 | | |
839 | 841 | | |
840 | 842 | | |
841 | | - | |
| 843 | + | |
842 | 844 | | |
843 | 845 | | |
844 | 846 | | |
| |||
852 | 854 | | |
853 | 855 | | |
854 | 856 | | |
855 | | - | |
856 | 857 | | |
857 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
858 | 862 | | |
859 | 863 | | |
860 | 864 | | |
861 | 865 | | |
862 | 866 | | |
863 | 867 | | |
864 | | - | |
| 868 | + | |
865 | 869 | | |
866 | 870 | | |
867 | 871 | | |
| |||
0 commit comments