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
24c42813
Commit
24c42813
authored
May 03, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Nov 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXdispatch.c: call upstream CloseDownClient()
remove ~80 duplicate lines
parent
c02ab70e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
87 deletions
+6
-87
dispatch.c
nx-X11/programs/Xserver/dix/dispatch.c
+5
-3
NXdispatch.c
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+1
-84
No files found.
nx-X11/programs/Xserver/dix/dispatch.c
View file @
24c42813
...
...
@@ -3480,11 +3480,14 @@ InitProcVectors(void)
* then killed again, the client is really destroyed.
*********************/
#ifndef NXAGENT_SERVER
char
dispatchExceptionAtReset
=
DE_RESET
;
void
CloseDownClient
(
register
ClientPtr
client
)
#ifdef NXAGENT_SERVER
xorg_CloseDownClient
(
ClientPtr
client
)
#else
CloseDownClient
(
ClientPtr
client
)
#endif
{
Bool
really_close_down
=
client
->
clientGone
||
client
->
closeDownMode
==
DestroyAll
;
...
...
@@ -3569,7 +3572,6 @@ CloseDownClient(register ClientPtr client)
currentMaxClients
--
;
}
}
#endif
/* NXAGENT_SERVER */
static
void
KillAllClients
()
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
View file @
24c42813
...
...
@@ -128,8 +128,6 @@ Equipment Corporation.
const
int
nxagentMaxFontNames
=
10000
;
char
dispatchExceptionAtReset
=
DE_RESET
;
/*
* This allows the agent to exit if no
* client is connected within a timeout.
...
...
@@ -1089,9 +1087,6 @@ int ProcForceScreenSaver(register ClientPtr client)
void
CloseDownClient
(
register
ClientPtr
client
)
{
Bool
really_close_down
=
client
->
clientGone
||
client
->
closeDownMode
==
DestroyAll
;
/*
* There must be a better way to hook a
* call-back function to be called any
...
...
@@ -1114,85 +1109,7 @@ CloseDownClient(register ClientPtr client)
nxagentCheckIfShadowAgent
(
client
);
if
(
!
client
->
clientGone
)
{
/* ungrab server if grabbing client dies */
if
(
grabState
!=
GrabNone
&&
grabClient
==
client
)
{
UngrabServer
(
client
);
}
BITCLEAR
(
grabWaiters
,
client
->
index
);
DeleteClientFromAnySelections
(
client
);
ReleaseActiveGrabs
(
client
);
DeleteClientFontStuff
(
client
);
if
(
!
really_close_down
)
{
/* This frees resources that should never be retained
* no matter what the close down mode is. Actually we
* could do this unconditionally, but it's probably
* better not to traverse all the client's resources
* twice (once here, once a few lines down in
* FreeClientResources) in the common case of
* really_close_down == TRUE.
*/
FreeClientNeverRetainResources
(
client
);
client
->
clientState
=
ClientStateRetained
;
if
(
ClientStateCallback
)
{
NewClientInfoRec
clientinfo
;
clientinfo
.
client
=
client
;
clientinfo
.
prefix
=
(
xConnSetupPrefix
*
)
NULL
;
clientinfo
.
setup
=
(
xConnSetup
*
)
NULL
;
CallCallbacks
((
&
ClientStateCallback
),
(
void
*
)
&
clientinfo
);
}
}
client
->
clientGone
=
TRUE
;
/* so events aren't sent to client */
if
(
ClientIsAsleep
(
client
))
ClientSignal
(
client
);
ProcessWorkQueueZombies
();
CloseDownConnection
(
client
);
/* If the client made it to the Running stage, nClients has
* been incremented on its behalf, so we need to decrement it
* now. If it hasn't gotten to Running, nClients has *not*
* been incremented, so *don't* decrement it.
*/
if
(
client
->
clientState
!=
ClientStateInitial
&&
client
->
clientState
!=
ClientStateAuthenticating
)
{
--
nClients
;
}
}
if
(
really_close_down
)
{
if
(
client
->
clientState
==
ClientStateRunning
&&
nClients
==
0
)
dispatchException
|=
dispatchExceptionAtReset
;
client
->
clientState
=
ClientStateGone
;
if
(
ClientStateCallback
)
{
NewClientInfoRec
clientinfo
;
clientinfo
.
client
=
client
;
clientinfo
.
prefix
=
(
xConnSetupPrefix
*
)
NULL
;
clientinfo
.
setup
=
(
xConnSetup
*
)
NULL
;
CallCallbacks
((
&
ClientStateCallback
),
(
void
*
)
&
clientinfo
);
}
FreeClientResources
(
client
);
/* Disable client ID tracking. This must be done after
* ClientStateCallback. */
ReleaseClientIds
(
client
);
if
(
client
->
index
<
nextFreeClientID
)
nextFreeClientID
=
client
->
index
;
clients
[
client
->
index
]
=
NullClient
;
SmartLastClient
=
NullClient
;
free
(
client
);
while
(
!
clients
[
currentMaxClients
-
1
])
currentMaxClients
--
;
}
xorg_CloseDownClient
(
client
);
}
int
...
...
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