Commit 5ac032a
committed
[net] Rework open mode parsing in TNetXNGFile
The parsing of the opening mode string option to create the corresponding XRootD
opening mode flag assumes the string option is a single word. Given that the input
open mode string may not contain just one word, e.g. because of the internal
extra option `_WITHOUT_GLOBALREGISTRATION`, rework the parsing logic by
* Tokenizing the input open mode string.
* Returning early in case a token corresponds to one of the accepted words.
* In all other cases, return success (0) or failure (-1) depending on whether
the `assumeRead` parameter is true or false.1 parent da5fba1 commit 5ac032a
1 file changed
Lines changed: 23 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
180 | | - | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
708 | 710 | | |
709 | 711 | | |
710 | 712 | | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
718 | 728 | | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
719 | 732 | | |
720 | 733 | | |
| 734 | + | |
721 | 735 | | |
722 | 736 | | |
723 | | - | |
| 737 | + | |
724 | 738 | | |
725 | 739 | | |
726 | 740 | | |
| |||
0 commit comments