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
91ac79ec
You need to sign in or sign up before continuing.
Commit
91ac79ec
authored
May 16, 2015
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25 from nitomartinez/nxtranscleanup_for_reconnect
This patch allows to cleanup the nxcomp resources to allow for a seco…
parents
ab96962b
4fefe352
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
Loop.cpp
nxcomp/Loop.cpp
+27
-0
Misc.h
nxcomp/Misc.h
+1
-0
NX.h
nxcomp/NX.h
+8
-0
No files found.
nxcomp/Loop.cpp
View file @
91ac79ec
...
@@ -1311,6 +1311,11 @@ void NXTransCleanup()
...
@@ -1311,6 +1311,11 @@ void NXTransCleanup()
HandleCleanup
();
HandleCleanup
();
}
}
void
NXTransCleanupForReconnect
()
{
HandleCleanupForReconnect
();
}
//
//
// Check the parameters for subsequent
// Check the parameters for subsequent
// initialization of the NX transport.
// initialization of the NX transport.
...
@@ -4873,6 +4878,28 @@ int StartKeeper()
...
@@ -4873,6 +4878,28 @@ int StartKeeper()
return
1
;
return
1
;
}
}
void
HandleCleanupForReconnect
()
{
#ifdef TEST
*
logofs
<<
"Loop: Going to clean up system resources for Reconnect "
<<
"in process '"
<<
getpid
()
<<
"'.
\n
"
<<
logofs_flush
;
#endif
handleTerminatedInLoop
();
DisableSignals
();
if
(
control
)
CleanupChildren
();
CleanupListeners
();
CleanupSockets
();
CleanupKeeper
();
CleanupStreams
();
CleanupLocal
();
CleanupGlobal
();
RestoreSignals
();
ServerCache
::
lastInitReply
.
set
(
0
,
NULL
);
ServerCache
::
lastKeymap
.
set
(
0
,
NULL
);
ServerCache
::
getKeyboardMappingLastMap
.
set
(
0
,
NULL
);
}
void
HandleCleanup
(
int
code
)
void
HandleCleanup
(
int
code
)
{
{
#ifdef TEST
#ifdef TEST
...
...
nxcomp/Misc.h
View file @
91ac79ec
...
@@ -140,6 +140,7 @@ void HandleShutdown() __attribute__((noreturn));
...
@@ -140,6 +140,7 @@ void HandleShutdown() __attribute__((noreturn));
extern
"C"
extern
"C"
{
{
void
HandleCleanup
(
int
code
=
0
)
__attribute__
((
noreturn
));
void
HandleCleanup
(
int
code
=
0
)
__attribute__
((
noreturn
));
void
HandleCleanupForReconnect
();
}
}
//
//
...
...
nxcomp/NX.h
View file @
91ac79ec
...
@@ -442,6 +442,14 @@ extern int NXTransParseEnvironment(const char *env, int force);
...
@@ -442,6 +442,14 @@ extern int NXTransParseEnvironment(const char *env, int force);
extern
void
NXTransCleanup
(
void
)
__attribute__
((
noreturn
));
extern
void
NXTransCleanup
(
void
)
__attribute__
((
noreturn
));
/*
* Cleans up the global and local state
* (the same way as NXTransCleanup does)
* but does not exit the process
* Needed for IOS platform
*/
extern
void
NXTransCleanupForReconnect
(
void
);
extern
const
char
*
NXVersion
();
extern
const
char
*
NXVersion
();
extern
int
NXMajorVersion
();
extern
int
NXMajorVersion
();
extern
int
NXMinorVersion
();
extern
int
NXMinorVersion
();
...
...
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