Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
4d13a2fe
Commit
4d13a2fe
authored
Jan 29, 2009
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few more improvements to the hostspec-parsing code.
parent
58cf3547
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
options.c
options.c
+8
-7
No files found.
options.c
View file @
4d13a2fe
...
...
@@ -2626,17 +2626,18 @@ void server_options(char **args, int *argc_p)
* (required for parsing) [ and ] chars elided from the returned string. */
static
char
*
parse_hostspec
(
char
*
str
,
char
**
path_start_ptr
,
int
*
port_ptr
)
{
char
*
s
=
str
;
char
*
host_start
=
str
;
char
*
s
,
*
host_start
=
str
;
int
hostlen
=
0
,
userlen
=
0
;
char
*
ret
;
for
(
;
;
s
++
)
{
for
(
s
=
str
;
;
s
++
)
{
if
(
!*
s
)
{
/* It is only OK if we run out of string with rsync:// */
if
(
port_ptr
)
break
;
return
NULL
;
if
(
!
port_ptr
)
return
NULL
;
if
(
!
hostlen
)
hostlen
=
s
-
host_start
;
break
;
}
if
(
*
s
==
':'
||
*
s
==
'/'
)
{
if
(
!
hostlen
)
...
...
@@ -2647,7 +2648,7 @@ static char *parse_hostspec(char *str, char **path_start_ptr, int *port_ptr)
}
else
if
(
port_ptr
)
{
*
port_ptr
=
atoi
(
s
);
while
(
isDigit
(
s
))
s
++
;
if
(
*
s
++
!=
'/'
)
if
(
*
s
&&
*
s
++
!=
'/'
)
return
NULL
;
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment