Max Kellermann
|
051eede1ed
|
db/upnp/Discovery: use monotonic clock instead of time()
|
2014-01-18 16:26:11 +01:00 |
|
Max Kellermann
|
0696cac50b
|
db/upnp/Discovery: eliminate full copy in getServer()
|
2014-01-18 16:18:51 +01:00 |
|
Max Kellermann
|
0c2485e86c
|
db/upnp: use getServer() in Visit()
Reduce bloat.
|
2014-01-18 16:13:33 +01:00 |
|
Max Kellermann
|
7d696a7063
|
db/upnp/Discovery: eliminate Error attribute
Move code to method Start() and add Error& parameters to several
methods.
|
2014-01-18 16:08:30 +01:00 |
|
Max Kellermann
|
53573e950f
|
db/upnp: remove unnecessary m_superdir nullptr checks
|
2014-01-18 16:02:21 +01:00 |
|
Max Kellermann
|
1e99983263
|
db/upnp: pass ContentDirectoryService references
|
2014-01-18 15:58:02 +01:00 |
|
Max Kellermann
|
5409e43fb5
|
db/upnp: cache m_path.back()
|
2014-01-18 15:44:41 +01:00 |
|
Max Kellermann
|
f33f891c54
|
db/upnp: add UpnpMakeAction() helper function
|
2014-01-18 15:27:54 +01:00 |
|
Max Kellermann
|
6e55552292
|
db/upnp/ixmlwrap: getFirstElementValue() returns const char *
Eliminate the std::string bloat.
|
2014-01-18 15:01:19 +01:00 |
|
Max Kellermann
|
e569f82dd3
|
db/upnp: merge duplicate nullptr check
|
2014-01-18 14:44:06 +01:00 |
|
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
|
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
|
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
|
676d8bb624
|
db/upnp/Object: add attribute "tag"
Replaces "m_title" and "m_props". More bloat removed.
|
2014-01-14 22:33:18 +01:00 |
|
Max Kellermann
|
4bcaf5d306
|
db/upnp: move upnp_tags to Tags.cxx
|
2014-01-14 22:33:18 +01:00 |
|
Max Kellermann
|
46debfb8b5
|
db/upnp/Object: disallow copying, always move
Reduce bloat.
|
2014-01-14 14:11:07 +01:00 |
|
Max Kellermann
|
9a4b572d34
|
db/upnp: getTagValue() returns string pointer
Reduce bloat.
|
2014-01-14 13:42:08 +01:00 |
|
Max Kellermann
|
ddc75cc46b
|
db/upnp/Directory: merge m_containers and m_items
There is no use in duplicating these containers. It only means that
we have to search both, duplicating the code.
|
2014-01-14 13:37:21 +01:00 |
|
Max Kellermann
|
dafd0bc49a
|
db/upnp: pass const reference to getTagValue()
|
2014-01-14 13:37:05 +01:00 |
|
Max Kellermann
|
2cb912e4f4
|
db/upnp: Namei() returns error when no object was found
Don't fail silently.
|
2014-01-14 12:34:49 +01:00 |
|
Max Kellermann
|
91a513e87d
|
db/upnp/Directory: eliminate one std::string copy with std::move()
|
2014-01-14 12:27:21 +01:00 |
|
Max Kellermann
|
efdb41f2a6
|
db/upnp/Object: add attribute "name"
Call titleToPathElt() only once for each object.
|
2014-01-14 12:22:37 +01:00 |
|
Max Kellermann
|
26b850c15c
|
db/upnp: use std::replace() in titleToPath()
|
2014-01-14 12:15:21 +01:00 |
|
Max Kellermann
|
9941735ae7
|
db/upnp: pass std::string to titleToPathElt()
|
2014-01-14 12:03:36 +01:00 |
|
Max Kellermann
|
29e5dc4413
|
db/upnp: don't sanitize the title tag
We need this only for path names.
|
2014-01-14 12:00:58 +01:00 |
|
Max Kellermann
|
3a660c5527
|
db/upnp/WorkQueue: remove unused attributes "high", "low"
|
2014-01-14 11:49:42 +01:00 |
|
Max Kellermann
|
738991494a
|
db/upnp/WorkQueue: initialize "ok" to false, eliminate redundant checks
|
2014-01-14 11:48:19 +01:00 |
|