Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
befd6690
Commit
befd6690
authored
Jan 29, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instance: rename Shutdown() to Break()
parent
b6013a92
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
Instance.hxx
src/Instance.hxx
+2
-2
Main.cxx
src/Main.cxx
+1
-1
ClientRead.cxx
src/client/ClientRead.cxx
+1
-1
Win32Main.cxx
src/win32/Win32Main.cxx
+2
-2
No files found.
src/Instance.hxx
View file @
befd6690
...
...
@@ -97,9 +97,9 @@ struct Instance final
~
Instance
()
noexcept
;
/**
*
Initiate shutdown. Wrapper for EventLoop::Break()
.
*
Wrapper for EventLoop::Break(). Call to initiate shutdown
.
*/
void
Shutdown
()
{
void
Break
()
{
event_loop
.
Break
();
}
...
...
src/Main.cxx
View file @
befd6690
...
...
@@ -747,7 +747,7 @@ JNIEXPORT void JNICALL
Java_org_musicpd_Bridge_shutdown
(
JNIEnv
*
,
jclass
)
{
if
(
instance
!=
nullptr
)
instance
->
Shutdown
();
instance
->
Break
();
}
#endif
src/client/ClientRead.cxx
View file @
befd6690
...
...
@@ -52,7 +52,7 @@ Client::OnSocketInput(void *data, size_t length) noexcept
break
;
case
CommandResult
:
:
KILL
:
partition
->
instance
.
Shutdown
();
partition
->
instance
.
Break
();
Close
();
return
InputResult
::
CLOSED
;
...
...
src/win32/Win32Main.cxx
View file @
befd6690
...
...
@@ -71,7 +71,7 @@ service_dispatcher(gcc_unused DWORD control, gcc_unused DWORD event_type,
switch
(
control
)
{
case
SERVICE_CONTROL_SHUTDOWN
:
case
SERVICE_CONTROL_STOP
:
instance
->
Shutdown
();
instance
->
Break
();
return
NO_ERROR
;
default:
return
NO_ERROR
;
...
...
@@ -107,7 +107,7 @@ console_handler(DWORD event)
// regardless our thread is still active.
// If this did not happen within 3 seconds
// let's shutdown anyway.
instance
->
Shutdown
();
instance
->
Break
();
// Under debugger it's better to wait indefinitely
// to allow debugging of shutdown code.
Sleep
(
IsDebuggerPresent
()
?
INFINITE
:
3000
);
...
...
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