Max Kellermann
1a4940bbda
db/upnp: free IXML_Document *request manually
2014-01-18 14:38:52 +01:00
Max Kellermann
22dd3c8048
db/upnp/Device: move code to method Parse()
...
Forward the Error to the caller.
2014-01-18 14:29:31 +01:00
Max Kellermann
04b7648e00
db/upnp/Device: use ContentDirectoryDescriptor's move operator
...
Reduce bloat.
2014-01-18 14:26:24 +01:00
Max Kellermann
be0759d465
db/upnp/Discovery: don't copy XML to std::string
...
Pass "const char *" to Expat.
2014-01-18 14:24:38 +01:00
Max Kellermann
339d939873
db/upnp/Discovery: fix memory leak
2014-01-18 14:03:18 +01:00
Max Kellermann
c1950e40e6
db/upnp: remove unused typedef DevServIt
2014-01-18 13:42:54 +01:00
Max Kellermann
ad76bad8fd
db/upnp: use move operator to assign XML CDATA
...
Reduce runtime bloat.
2014-01-18 13:39:31 +01:00
Max Kellermann
55737e4ff6
db/upnp/Util: trimstring() constructs string from buffer
...
Reduce overhead by omitting the part of the buffer that consists only
of whitespace.
2014-01-18 13:36:50 +01:00
Max Kellermann
f3b4ddee6c
db/upnp/Discovery: free the response body
...
Memory leak.
2014-01-18 13:08:48 +01:00
Max Kellermann
758b504cf3
db/upnp/Discovery: don't copy the response body
...
Bloat.
2014-01-18 13:07:42 +01:00
Max Kellermann
416f7c2600
db/upnp: don't hold mutex while downloading device description
...
Must not perform blocking I/O while holding a mutex.
2014-01-18 13:04:01 +01:00
Max Kellermann
b9f02f22c4
db/upnp: don't use WorkQueue for _ADVERTISEMENT_BYEBYE
...
Remove the ContentDirectoryDescriptor right away. Reduces bloat.
2014-01-18 12:56:35 +01:00
Max Kellermann
b635610409
db/upnp: include cleanup
2014-01-18 12:51:25 +01:00
Max Kellermann
d4d4d6217f
db/upnp: don't use LazyDatabase
...
Now that MPD forks early, this workaround is obsolete.
2014-01-18 12:48:28 +01:00
Max Kellermann
be47320a05
Daemon: fork as early as possible
...
Keep the parent process around until MPD has finished initializing.
This is important for libraries that are allergic to fork(), such as
libupnp.
2014-01-18 12:42:30 +01:00
Max Kellermann
9f3ce7551a
PidFile: open in write-only mode
2014-01-18 12:42:12 +01:00
Max Kellermann
5f3b79e21d
Daemon: move code to class PidFile
2014-01-18 12:10:20 +01:00
Max Kellermann
56c12bd1ea
Daemon: don't use daemon(), always require fork()
...
Prepare for more advanced daemonization code, which will not work with
daemon(). Let's just require fork(). Everybody who supports daemon()
also supports fork().
2014-01-18 11:46:28 +01:00
Max Kellermann
3a6da7c594
Main: make variables more local
2014-01-18 11:34:13 +01:00
Max Kellermann
9909a80d6a
Main: eliminate variable "success"
2014-01-18 11:20:20 +01:00
Max Kellermann
a52cae1dba
pcm/Volume: make DSD a no-op
...
Kludge to work around DSD playback failure because the
ReplayGainFilterPlugin is always in the filter chain.
2014-01-17 23:57:30 +01:00
Max Kellermann
61b01f82ef
Mapper: add function map_song_detach()
...
Make the DetachedSong(Song) conversion constructor private. Everybody
should use map_song_detach() which will take over more
responsibilities soon.
2014-01-17 23:51:14 +01:00
Max Kellermann
75b847132a
QueueSave: use DatabaseDetachSong()
2014-01-17 23:49:53 +01:00
Max Kellermann
32ec672311
DatabaseSong: new library merging duplicate code
2014-01-17 22:58:27 +01:00
Max Kellermann
e2812f722d
db/upnp/Discovery: move callbacks and data structures into class
...
Eliminate global variables.
2014-01-17 10:13:04 +01:00
Max Kellermann
aa64a5328e
db/upnp: split cluCallback()
2014-01-17 09:46:51 +01:00
Max Kellermann
59510f509a
db/upnp: add local reference variables
...
Prepare to refactor some code.
2014-01-17 00:17:20 +01:00
Max Kellermann
a35c7bc81a
db/upnp: move the LibUPnP instance to class UpnpDatabase
...
Delete the object when closing the database.
2014-01-16 09:30:24 +01:00
Max Kellermann
02769929b3
db/upnp: remove useless static Mutex
2014-01-16 09:29:11 +01:00
Max Kellermann
1a09003a6e
db/upnp: move the UPnPDeviceDirectory instance to class UpnpDatabase
...
Delete the object when closing the database.
2014-01-16 09:08:04 +01:00
Max Kellermann
a827714823
db/upnp: don't initialize attributes to nullptr
...
Not necessary, these are not used.
2014-01-16 09:07:52 +01:00
Max Kellermann
8f9e76ca42
db/upnp: remove redundant m_root nullptr checks
2014-01-16 08:51:39 +01:00
Max Kellermann
478ace984a
db/upnp/WorkQueue: use emplace() and std::move()
2014-01-16 08:46:41 +01:00
Max Kellermann
028fd268b8
db/upnp/WorkQueue: simplify start()
2014-01-16 08:43:57 +01:00
Max Kellermann
876a095166
Directory: initialize "mtime" and "have_stat"
2014-01-15 18:53:53 +01:00
Max Kellermann
14c3ff58a4
db/upnp/WorkQueue: fix pthread_t[] allocation size
...
Was using the wrong variable.
2014-01-15 18:51:10 +01:00
Max Kellermann
2819b302c3
db/upnp/Object: remove obsolete attribute "m_title"
2014-01-15 18:36:01 +01:00
Max Kellermann
9fb82f9687
DetachedSong: add method Update()
...
Don't create an intermediate Song instance when all we want is a
DetachedSong.
2014-01-15 12:05:44 +01:00
Max Kellermann
df80deb070
DetachedSong: remove misplaced std::move()
2014-01-15 11:52:17 +01:00
Max Kellermann
5fb72d7c8f
Merge branch 'v0.18.x'
2014-01-15 11:47:49 +01:00
Max Kellermann
313d1d5d83
decoder/ffmpeg: support libav v10_alpha1
2014-01-15 11:33:18 +01:00
Max Kellermann
b7d6133593
decoder/ffmpeg: include cleanup
2014-01-15 11:31:51 +01:00
Max Kellermann
5b6bb114ad
decoder/ffmpeg: check for av_samples_get_buffer_size() errors
...
Fixes potential nullptr dereference.
2014-01-15 11:25:58 +01:00
Max Kellermann
56f082c9d4
util/PeakBuffer: fix nullptr dereference when peak_size==0
2014-01-15 11:24:29 +01:00
Max Kellermann
a1b798e555
SongFilter, TagConfig: cast TAG_NUM_OF_ITEM_TYPES to integer
...
Fixes clang warning.
2014-01-15 11:23:41 +01:00
Max Kellermann
c91e08fbfd
OutputAPI: fix typo in include guard
2014-01-15 11:22:59 +01:00
Max Kellermann
f882434547
configure.ac: prepare for 0.18.8
2014-01-15 11:22:06 +01:00
Max Kellermann
f1ca17f6a1
decoder/ffmpeg: check for av_samples_get_buffer_size() errors
...
Fixes potential nullptr dereference.
2014-01-14 23:16:07 +01:00
Max Kellermann
fe7cda57e4
util/PeakBuffer: fix nullptr dereference when peak_size==0
2014-01-14 23:07:04 +01:00
Max Kellermann
a3f9abcbd1
SongFilter, TagConfig: cast TAG_NUM_OF_ITEM_TYPES to integer
...
Fixes clang warning.
2014-01-14 22:40:07 +01:00