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
4db119c0
Commit
4db119c0
authored
Sep 03, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IOThread: use FatalError() on g_thread_create() error
New GLib versions don't fail.
parent
bbd71155
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
15 additions
and
49 deletions
+15
-49
IOThread.cxx
src/IOThread.cxx
+5
-5
IOThread.hxx
src/IOThread.hxx
+2
-4
Main.cxx
src/Main.cxx
+1
-5
dump_playlist.cxx
test/dump_playlist.cxx
+1
-5
dump_text_file.cxx
test/dump_text_file.cxx
+1
-5
read_tags.cxx
test/read_tags.cxx
+1
-5
run_decoder.cxx
test/run_decoder.cxx
+1
-5
run_input.cxx
test/run_input.cxx
+1
-5
run_output.cxx
test/run_output.cxx
+1
-5
visit_archive.cxx
test/visit_archive.cxx
+1
-5
No files found.
src/IOThread.cxx
View file @
4db119c0
...
...
@@ -23,6 +23,8 @@
#include "thread/Cond.hxx"
#include "event/Loop.hxx"
#include <glib.h>
#include <assert.h>
static
struct
{
...
...
@@ -63,8 +65,8 @@ io_thread_init(void)
io
.
loop
=
new
EventLoop
();
}
bool
io_thread_start
(
gcc_unused
GError
**
error_r
)
void
io_thread_start
()
{
assert
(
io
.
loop
!=
NULL
);
assert
(
io
.
thread
==
NULL
);
...
...
@@ -76,10 +78,8 @@ io_thread_start(gcc_unused GError **error_r)
#else
io
.
thread
=
g_thread_create
(
io_thread_func
,
NULL
,
true
,
error_r
);
if
(
io
.
thread
==
NULL
)
return
false
;
FatalError
()
;
#endif
return
true
;
}
void
...
...
src/IOThread.hxx
View file @
4db119c0
...
...
@@ -22,15 +22,13 @@
#include "gcc.h"
#include <glib.h>
class
EventLoop
;
void
io_thread_init
(
void
);
bool
io_thread_start
(
GError
**
error_r
);
void
io_thread_start
();
/**
* Run the I/O event loop synchronously in the current thread. This
...
...
src/Main.cxx
View file @
4db119c0
...
...
@@ -480,11 +480,7 @@ int mpd_main(int argc, char *argv[])
SignalHandlersInit
(
*
main_loop
);
if
(
!
io_thread_start
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
EXIT_FAILURE
;
}
io_thread_start
();
ZeroconfInit
(
*
main_loop
);
...
...
test/dump_playlist.cxx
View file @
4db119c0
...
...
@@ -169,11 +169,7 @@ int main(int argc, char **argv)
}
io_thread_init
();
if
(
!
io_thread_start
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
EXIT_FAILURE
;
}
io_thread_start
();
if
(
!
input_stream_global_init
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
...
...
test/dump_text_file.cxx
View file @
4db119c0
...
...
@@ -116,11 +116,7 @@ int main(int argc, char **argv)
config_global_init
();
io_thread_init
();
if
(
!
io_thread_start
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
EXIT_FAILURE
;
}
io_thread_start
();
#ifdef ENABLE_ARCHIVE
archive_plugin_init_all
();
...
...
test/read_tags.cxx
View file @
4db119c0
...
...
@@ -162,11 +162,7 @@ int main(int argc, char **argv)
#endif
io_thread_init
();
if
(
!
io_thread_start
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
EXIT_FAILURE
;
}
io_thread_start
();
if
(
!
input_stream_global_init
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
...
...
test/run_decoder.cxx
View file @
4db119c0
...
...
@@ -163,11 +163,7 @@ int main(int argc, char **argv)
g_log_set_default_handler
(
my_log_func
,
NULL
);
io_thread_init
();
if
(
!
io_thread_start
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
EXIT_FAILURE
;
}
io_thread_start
();
if
(
!
input_stream_global_init
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
...
...
test/run_input.cxx
View file @
4db119c0
...
...
@@ -134,11 +134,7 @@ int main(int argc, char **argv)
config_global_init
();
io_thread_init
();
if
(
!
io_thread_start
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
EXIT_FAILURE
;
}
io_thread_start
();
#ifdef ENABLE_ARCHIVE
archive_plugin_init_all
();
...
...
test/run_output.cxx
View file @
4db119c0
...
...
@@ -210,11 +210,7 @@ int main(int argc, char **argv)
main_loop
=
new
EventLoop
(
EventLoop
::
Default
());
io_thread_init
();
if
(
!
io_thread_start
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
EXIT_FAILURE
;
}
io_thread_start
();
/* initialize the audio output */
...
...
test/visit_archive.cxx
View file @
4db119c0
...
...
@@ -77,11 +77,7 @@ main(int argc, char **argv)
config_global_init
();
io_thread_init
();
if
(
!
io_thread_start
(
&
error
))
{
g_warning
(
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
EXIT_FAILURE
;
}
io_thread_start
();
archive_plugin_init_all
();
...
...
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