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
92ac0d27
Commit
92ac0d27
authored
Jan 18, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WaitFor.c Implement the intended NX_WAKEUP functionality
NX_WAKEUP had been non-effective and its effect had been tied to NX_TRANS_WAKEUP.
parent
d282724c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
Imakefile
nx-X11/programs/Xserver/hw/nxagent/Imakefile
+2
-2
Imakefile
nx-X11/programs/Xserver/os/Imakefile
+1
-1
WaitFor.c
nx-X11/programs/Xserver/os/WaitFor.c
+11
-9
No files found.
nx-X11/programs/Xserver/hw/nxagent/Imakefile
View file @
92ac0d27
...
...
@@ -202,8 +202,8 @@ INCLUDES = \
# NXAGENT_ONSTART communicate about startup phase to the original nxclient by NoMachine via selections
# NXAGENT_WAKEUP=<milliseconds> Specifies a timeout that makes WaitForSomething() return earlier than normal which
# enables nxagent to close the splash window at the right time and/or improve connection
# handling for the xdmcp option.
This value has no effect because the code uses
#
NX_TRANS_WAKEUP in os/WaitFor.c instead.
# handling for the xdmcp option.
#
This only has an effect if NX_TRANS_WAKEUP is also set for os/WaitFor.c
# NXAGENT_ARTSD enable special handling of MCOPGLOBALS property used by artsd.
# NXAGENT_RENDER_CLEANUP cleanup padding bits/bytes of glyphs to possibly increase compression rate
#
...
...
nx-X11/programs/Xserver/os/Imakefile
View file @
92ac0d27
...
...
@@ -42,7 +42,7 @@ NX_DEFINES = -DNX_TRANS_SOCKET \
-DNX_TRANS_FOPEN \
-DNX_TRANS_SLEEP \
-DNX_TRANS_EXIT \
-DNX_TRANS_WAKEUP
=1000
\
-DNX_TRANS_WAKEUP
\
-DNXAGENT_SERVER \
$(NULL)
...
...
nx-X11/programs/Xserver/os/WaitFor.c
View file @
92ac0d27
...
...
@@ -237,13 +237,15 @@ WaitForSomething(int *pClientsReady)
/*
* If caller has marked the first element of pClientsReady[],
* bail out of select after a short (NX_TRANS_WAKEUP)
* timeout. We need this to let the NX agent remove the splash
* screen when the timeout is expired. A better option would
* be to use the existing screen-saver timeout but it can be
* modified by clients, so we would need a special
* handling. This hack is trivial and keeps WaitForSomething()
* backward compatible with the existing servers.
* bail out of select after the timeout given in the second
* element. We need this to let the NX agent remove the splash
* screen when the timeout is expired even if there's no
* client. Otherwise WaitForSomething would block. A better
* option would be to use the existing screen-saver timeout
* but it can be modified by clients, so we would need a
* special handling. This hack is trivial and keeps
* WaitForSomething() backward compatible with the existing
* servers.
*/
if
(
pClientsReady
[
0
]
==
-
1
)
...
...
@@ -257,7 +259,7 @@ WaitForSomething(int *pClientsReady)
timeoutInMillis
=
GetTimeInMillis
();
if
(
timeoutInMillis
-
startTimeInMillis
>=
NX_TRANS_WAKEUP
)
if
(
timeoutInMillis
-
startTimeInMillis
>=
pClientsReady
[
1
]
)
{
#ifdef NX_TRANS_DEBUG
fprintf
(
stderr
,
"WaitForSomething: Returning 0 because of wakeup timeout.
\n
"
);
...
...
@@ -265,7 +267,7 @@ WaitForSomething(int *pClientsReady)
return
0
;
}
timeoutInMillis
=
NX_TRANS_WAKEUP
-
(
timeoutInMillis
-
startTimeInMillis
);
timeoutInMillis
=
pClientsReady
[
1
]
-
(
timeoutInMillis
-
startTimeInMillis
);
#ifdef NX_TRANS_DEBUG
fprintf
(
stderr
,
"WaitForSomething: Milliseconds to next wakeup are %ld.
\n
"
,
...
...
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