Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
dimbor
nx-libs
Commits
ee3afe30
Commit
ee3afe30
authored
Jan 02, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Args.c: fix: do not modify options string
This resulted in a garbled option string on reconnect where everything after the first '=' was lost!
parent
8fa4d842
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
Args.c
nx-X11/programs/Xserver/hw/nxagent/Args.c
+9
-2
No files found.
nx-X11/programs/Xserver/hw/nxagent/Args.c
View file @
ee3afe30
...
...
@@ -1489,10 +1489,16 @@ static void nxagentParseOptionString(char *string)
char
*
option
=
NULL
;
/*
* we must not modify string, but strtok will insert \0. So let's
* work with a copy
*/
char
*
dup
=
strdup
(
string
);
/*
* Remove the port specification.
*/
char
*
delimiter
=
rindex
(
string
,
':'
);
char
*
delimiter
=
rindex
(
dup
,
':'
);
if
(
delimiter
)
{
...
...
@@ -1503,7 +1509,7 @@ static void nxagentParseOptionString(char *string)
fprintf
(
stderr
,
"Warning: Option file doesn't contain a port specification.
\n
"
);
}
while
((
option
=
strtok
(
option
?
NULL
:
string
,
","
)))
while
((
option
=
strtok
(
option
?
NULL
:
dup
,
","
)))
{
delimiter
=
rindex
(
option
,
'='
);
...
...
@@ -1519,6 +1525,7 @@ static void nxagentParseOptionString(char *string)
nxagentParseSingleOption
(
option
,
value
);
}
SAFE_free
(
dup
);
}
void
nxagentProcessOptions
(
char
*
string
)
...
...
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