Commit Graph

144 Commits

Author SHA1 Message Date
Max Kellermann
5cce56199b conf: export config_param_free() 2011-09-09 23:59:46 +02:00
Max Kellermann
3cc12817f6 conf: _get_next_param() returns a const pointer
No writers.
2011-09-09 23:59:46 +02:00
Max Kellermann
9f5c938ff3 conf: add config_dup_block_path() 2011-09-09 23:01:22 +02:00
Max Kellermann
b42a8d2364 utils: parsePath() returns GError on failure
Better error messages.
2011-09-09 22:55:57 +02:00
Max Kellermann
8e5f9c8160 conf: turn config_get_path() into config_dup_path()
config_get_path() was somewhat flawed, because it pretended to be a
function, when it really had a side effect.  The second flaw was that
it did not return the parser error, instead it aborted the whole
process, which is bad style.  The new function returns a duplicated
(modified) string that must be freed by the caller, and returns a
GError on failure.
2011-09-09 22:55:57 +02:00
Max Kellermann
35af940166 conf: get_block_param() returns a const pointer
No caller needs to write.
2011-09-09 21:36:41 +02:00
Max Kellermann
bc0fec0afe conf: move duplicate check to _read_name_value()
config_add_block_param() cannot fail, which makes it easier to use.
2011-09-09 21:36:41 +02:00
Max Kellermann
e3eca82cc3 conf: move code to config_read_name_value()
Reduce indent.
2011-09-09 21:36:35 +02:00
Max Kellermann
eb2f413cf0 Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
2011-07-19 00:24:20 +02:00
Jonathan Neuschäfer
c49c69d6ea conf: add missing fclose in error path
This patch seems a bit ugly, maybe it would be a bit cleaner with gotos.
2011-07-18 22:03:40 +02:00
Simon Kagstrom
eec77b3ae7 despotify: Add support utilities
Used to connect and authenticate to despotify. Provides a singleton
session and a desptoify-track-to-tags function.
2011-03-29 17:01:16 +02:00
Max Kellermann
2fb40fe728 playlist_state: add option "restore_paused"
When set, MPD will not auto-start playback on startup; it will be in
"paused" state.
2011-02-23 09:10:23 +01:00
Max Kellermann
c6cbcc2c25 copyright year 2011 2011-01-29 10:13:54 +01:00
Max Kellermann
5462f34ed0 string_util: add function strchug_fast()
Replace g_strchug() calls with a cheaper implementation.
2010-12-23 16:23:20 +01:00
Max Kellermann
0958ed5844 utils: move string_array_contains() to string_util.c 2010-12-23 16:23:04 +01:00
Thomas Jansen
28bcb8bdf5 eliminate g_error() usage
Replaced all occurrences of g_error() with MPD_ERROR() located in a new header
file 'mpd_error.h'. This macro uses g_critical() to print the error message
and then exits gracefully in contrast to g_error() which would internally call
abort() to produce a core dump.

The macro name is distinctive and allows to find all places with dubious error
handling. The long-term goal is to get rid of MPD_ERROR() altogether. To
facilitate the eventual removal of this macro it was added in a new header
file rather than to an existing header file.

This fixes #2995 and #3007.
2010-09-25 15:00:43 +02:00
Daniel Seuthe
e8310211e2 filter/replay_gain: added option "replaygain_limit" 2010-05-30 17:06:08 +02:00
Max Kellermann
393bcd961a inotify: added setting "auto_update_depth"
Limits the depth of the watched directories.  This is useful to keep
resource usage down and speed up MPD startup.
2010-04-13 21:31:57 +02:00
Max Kellermann
4d1eedbaa2 conf: added function config_get_unsigned() 2010-04-13 21:19:07 +02:00
Avuton Olrich
9d3865cb95 Update copyright notices. 2009-12-31 20:58:43 -08:00
Max Kellermann
5b82ffc291 include config.h in all sources
After we've been hit by Large File Support problems several times in
the past week (which only occur on 32 bit platforms, which I don't
have), this is yet another attempt to fix the issue.
2009-11-12 09:17:03 +01:00
Max Kellermann
b722d3d7f3 configure.ac: require GLib 2.12
Drop the required GLib version from 2.16 to 2.12, because many current
systems still don't have GLib 2.16.  This requires several new
compatibility functions in glib_compat.h.
2009-11-10 21:14:22 +01:00
Max Kellermann
f9218423b9 utils: renamed stringFoundInStringArray()
No CamelCase.  Use bool instead of int.  Make both arguments
mandatory.
2009-11-06 19:50:47 +01:00
Viliam Mateicka
f67426871b mpd.conf: new bool config value for enabling/disabling inotify update 2009-10-26 19:14:40 +01:00
Max Kellermann
cb331ae436 playlist_list: pass configuration to playlist plugins
This patch completes the configuration support.
2009-10-13 16:19:21 +02:00
Max Kellermann
06d5d4b03e conf: handle fatal errors with GError
Don't call g_error(), which will abort the process and dump core.

This patch does not affect all the config_get_X() functions.  These
need some more refactoring.
2009-09-24 21:40:07 +02:00
Max Kellermann
f3739a73af conf: splitted function config_param_free() 2009-09-24 21:40:05 +02:00
Max Kellermann
4231ec51c3 conf: removed the deprecated "error_file" option
This option was deprecated by the 0.15 release.  This patch makes this
option invalid.
2009-08-24 17:12:15 +02:00
Max Kellermann
16ff44ad30 conf: use the tokenizer library 2009-07-19 15:11:37 +02:00
Michal Nazarewicz
d718a8b59d daemon: added "group" configuration option
The "group" configuration option is similar to "user" as it
sets user set what group MPD shall run as.  With "user"
option, MPD changed GID to the GID of the user, however,
more control could be desired.

Moreover, the patch changes the way of checking whether no
setuid(2)/setgid(2) is required -- previously user names
were compered, now UID and GIDs are compered (ie. the one we
already have (getuid(2)/getgid(2)) with the one we want to
change to).
2009-07-19 08:17:55 +02:00
Max Kellermann
8bd7b5b607 conf: use bp->value, not param->value
A recent change to the boolean parser introduced a bug: instead of
using the block_param's value with get_bool(), we passed param->value
(which is always NULL in this case).
2009-07-06 07:37:32 +02:00
Max Kellermann
644fc48776 conf: registered option "filter"
Add this option to the user's manual.
2009-07-05 06:54:45 +02:00
Max Kellermann
637c6a1850 conf: log unused/unknown block parameters 2009-06-25 08:42:25 +02:00
Max Kellermann
0cbc4012e8 conf: added "used" flag to struct block_param 2009-06-25 08:41:23 +02:00
Max Kellermann
8074b82653 conf: detect duplicate parameters in config_add_block_param()
Moved the check from config_get_block_param().  Detect the duplicate
parameter when it's added, not when it's queried.
2009-06-25 08:41:09 +02:00
Max Kellermann
5d583c9b2d conf: make get_bool() return a bool
Instead of returning an artificial three-state integer, return a
"success" value and put the boolean value into a "bool" pointer.
That's a little bit more overhead, but an API which looks more
natural.
2009-06-25 08:40:02 +02:00
Max Kellermann
093e900d44 conf: moved code from get_bool() to string_array_contains() 2009-06-25 08:39:53 +02:00
Max Kellermann
8965b66ce4 conf: register configuration options statically
Initialize the config_entries array at compile time.  This is not only
faster, but also smaller.
2009-06-25 08:39:44 +02:00
Max Kellermann
146add67c2 conf: removed config_add_param()
This function is unused.
2009-06-25 08:39:01 +02:00
Max Kellermann
34e9a0a960 conf: replace "mask" bit field with two "bool" variables
Due to padding, this takes the same amount of memory.
2009-06-25 08:38:51 +02:00
Max Kellermann
b1e95b1fa8 volume: removed support for legacy mixer configuration
The top-level "mixer_device" and "mixer_control" options have been
deprecated by MPD 0.15, and it's safe to remove them in MPD 0.16.
2009-06-25 08:37:51 +02:00
Daniel Seuthe
4ffd9bce5a Preamp for missing replay-gain 2009-06-25 08:36:35 +02:00
Max Kellermann
70d7c79546 conf: make config_param.num_block_params unsigned 2009-06-03 06:55:09 +02:00
Max Kellermann
ddc2694419 conf: eliminated CamelCase
Renamed all remaining CamelCase functions.
2009-06-03 06:55:04 +02:00
Max Kellermann
b2924405ae conf: use g_ascii_strcasecmp() instead of strcasecmp()
strcasecmp() is locale dependent, making it a bad choice for internal
string comparisons.
2009-04-28 09:32:09 +02:00
Avuton Olrich
6405db931b conf: config_param_free() not necessary for export. 2009-03-30 19:21:41 +02:00
Avuton Olrich
0aee49bdf8 all: Update copyright header.
This updates the copyright header to all be the same, which is
pretty much an update of where to mail request for a copy of the GPL
and the years of the MPD project. This also puts all committers under
'The Music Player Project' umbrella. These entries should go
individually in the AUTHORS file, for consistancy.
2009-03-13 11:51:55 -07:00
Max Kellermann
cfb350f4f0 input: pass config_param to input_plugin.init()
Allow input plugins to configure with an "input" block in mpd.conf.
Also allow the user to disable a plugin completely.
2009-03-02 23:08:17 +01:00
Max Kellermann
eac2da635d added G_LOG_DOMAIN macros to several libraries
Define the GLib logging domain in the following libraries: conf,
daemon, event_pipe, log.
2009-02-19 09:24:59 +01:00
Max Kellermann
11e680d640 conf: log the effective configuration file name
For better debugging aid when something goes wrong, log the name of
the effective configuration file.
2009-02-19 08:35:22 +01:00