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
36db40b2
Commit
36db40b2
authored
Jul 17, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client/Global: use struct ConfigData
parent
426b9672
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
Main.cxx
src/Main.cxx
+1
-1
Client.hxx
src/client/Client.hxx
+2
-1
ClientGlobal.cxx
src/client/ClientGlobal.cxx
+6
-5
No files found.
src/Main.cxx
View file @
36db40b2
...
@@ -576,7 +576,7 @@ try {
...
@@ -576,7 +576,7 @@ try {
partition
.
UpdateEffectiveReplayGainMode
();
partition
.
UpdateEffectiveReplayGainMode
();
}
}
client_manager_init
();
client_manager_init
(
raw_config
);
input_stream_global_init
(
raw_config
,
input_stream_global_init
(
raw_config
,
instance
->
io_thread
.
GetEventLoop
());
instance
->
io_thread
.
GetEventLoop
());
playlist_list_global_init
(
raw_config
);
playlist_list_global_init
(
raw_config
);
...
...
src/client/Client.hxx
View file @
36db40b2
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <stddef.h>
#include <stddef.h>
struct
ConfigData
;
class
SocketAddress
;
class
SocketAddress
;
class
UniqueSocketDescriptor
;
class
UniqueSocketDescriptor
;
class
EventLoop
;
class
EventLoop
;
...
@@ -237,7 +238,7 @@ private:
...
@@ -237,7 +238,7 @@ private:
};
};
void
void
client_manager_init
();
client_manager_init
(
const
ConfigData
&
config
);
void
void
client_new
(
EventLoop
&
loop
,
Partition
&
partition
,
client_new
(
EventLoop
&
loop
,
Partition
&
partition
,
...
...
src/client/ClientGlobal.cxx
View file @
36db40b2
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include "config.h"
#include "config.h"
#include "ClientInternal.hxx"
#include "ClientInternal.hxx"
#include "config/
Global
.hxx"
#include "config/
Data
.hxx"
#define CLIENT_TIMEOUT_DEFAULT (60)
#define CLIENT_TIMEOUT_DEFAULT (60)
#define CLIENT_MAX_COMMAND_LIST_DEFAULT (2048*1024)
#define CLIENT_MAX_COMMAND_LIST_DEFAULT (2048*1024)
...
@@ -29,19 +29,20 @@ std::chrono::steady_clock::duration client_timeout;
...
@@ -29,19 +29,20 @@ std::chrono::steady_clock::duration client_timeout;
size_t
client_max_command_list_size
;
size_t
client_max_command_list_size
;
size_t
client_max_output_buffer_size
;
size_t
client_max_output_buffer_size
;
void
client_manager_init
(
void
)
void
client_manager_init
(
const
ConfigData
&
config
)
{
{
unsigned
client_timeout_s
=
config
_get_p
ositive
(
ConfigOption
::
CONN_TIMEOUT
,
unsigned
client_timeout_s
=
config
.
GetP
ositive
(
ConfigOption
::
CONN_TIMEOUT
,
CLIENT_TIMEOUT_DEFAULT
);
CLIENT_TIMEOUT_DEFAULT
);
client_timeout
=
std
::
chrono
::
seconds
(
client_timeout_s
);
client_timeout
=
std
::
chrono
::
seconds
(
client_timeout_s
);
client_max_command_list_size
=
client_max_command_list_size
=
config
_get_p
ositive
(
ConfigOption
::
MAX_COMMAND_LIST_SIZE
,
config
.
GetP
ositive
(
ConfigOption
::
MAX_COMMAND_LIST_SIZE
,
CLIENT_MAX_COMMAND_LIST_DEFAULT
/
1024
)
CLIENT_MAX_COMMAND_LIST_DEFAULT
/
1024
)
*
1024
;
*
1024
;
client_max_output_buffer_size
=
client_max_output_buffer_size
=
config
_get_p
ositive
(
ConfigOption
::
MAX_OUTPUT_BUFFER_SIZE
,
config
.
GetP
ositive
(
ConfigOption
::
MAX_OUTPUT_BUFFER_SIZE
,
CLIENT_MAX_OUTPUT_BUFFER_SIZE_DEFAULT
/
1024
)
CLIENT_MAX_OUTPUT_BUFFER_SIZE_DEFAULT
/
1024
)
*
1024
;
*
1024
;
}
}
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