Commit Graph

33 Commits

Author SHA1 Message Date
Max Kellermann 678524ad21 lib/upnp/WorkQueue: fix race condition
With "ok==false", newly created threads may quit instantly.
2017-01-23 19:25:30 +01:00
Max Kellermann 32a64481f2 lib/upnp: fix bad std::chrono cast
libupnp provides seconds, not whatever time unit is used by
std::chrono::steady_clock.
2017-01-23 19:16:14 +01:00
Max Kellermann ec8cba369c lib/upnp/WorkQueue: disallow copying 2017-01-23 18:35:58 +01:00
Max Kellermann f4c248f406 lib/upnp/WorkQueue: make constructor explicit 2017-01-23 18:35:47 +01:00
Max Kellermann f3b2a58646 lib/upnp/WorkQueue: use C++11 initializers 2017-01-23 18:35:22 +01:00
Max Kellermann 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann 2e182e84c3 thread/Mutex: remove ScopeLock, use std::lock_guard directly 2017-01-03 07:11:57 +01:00
Max Kellermann cd607cb280 lib/upnp/Discovery: use std::chrono::steady_clock 2016-12-28 22:06:06 +01:00
Max Kellermann 4e60ab7f53 lib/upnp/Discovery: use C++11 initializers 2016-12-28 22:05:31 +01:00
Max Kellermann 1aee89f5ea *: include cleanup (using iwyu) 2016-03-01 22:08:13 +01:00
Max Kellermann 1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann 6c5bc9b4a3 lib/expat: use C++ exceptions instead of class Error 2016-02-07 12:58:20 +01:00
Max Kellermann 3ee5093b03 lib/upnp: use C++ exceptions instead of class Error 2016-02-07 12:53:21 +01:00
Max Kellermann 6e2ad6860f lib/upnp/ClientInit: use class ScopeLock 2016-02-07 12:53:21 +01:00
Max Kellermann f097952b42 lib/upnp: use std::unique_ptr 2016-02-06 23:57:29 +01:00
Max Kellermann 224d511616 upnp/Discovery: use std::unique_ptr in WorkQueue 2016-02-06 22:26:14 +01:00
Max Kellermann 050c6cc4b0 upnp/Discovery: use AtScopeExit() for exception-safety 2016-02-06 22:06:43 +01:00
Max Kellermann b31d171ae8 *: doxygen fixups 2015-03-17 11:21:43 +01:00
Max Kellermann 833ec3d3cd lib/upnp/Discovery: remove locking from ExpireDevices() 2015-02-03 23:48:11 +01:00
Max Kellermann 3d446d3266 lib/upnp/Discovery: apply naming convention 2015-02-02 21:12:19 +00:00
Max Kellermann 712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann 6f23e91e33 lib/upnp/ContentDirectoryService: swap uri_apply_base() parameters
When uri_apply_base() was moved from db/upnp/Util.cpp to
util/UriUtil.cpp, the parameter order was changed, however without
swapping the parameters in the ContentDirectoryService constructor.
2014-11-07 18:43:00 +01:00
Max Kellermann 054323c2bc lib/upnp/Discovery: add missing stdlib.h include 2014-11-02 11:04:13 +01:00
Max Kellermann 464767c5fd db/upnp/Util: move caturl() to util/UriUtil.cxx 2014-10-10 22:43:40 +02:00
Max Kellermann b373c53ce4 *: add missing Compiler.h includes
Necessary for "final" on gcc 4.6.
2014-08-30 00:46:52 +02:00
Max Kellermann 0b3fbdba87 neighbor/upnp: UPnP media server discovery 2014-01-26 15:51:33 +01:00
Max Kellermann d7e78059b0 upnp: initialize the client handle only once
Eliminate class LibUPnP and move the code to ClientInit.cxx.  Its
initialization function can be called multiple times, but
UpnpRegisterClient() is called at most once.
2014-01-26 15:43:23 +01:00
Max Kellermann 01f7abfc63 upnp: move library initialization to Init.cxx
Allow calling UpnpGlobalInit() multiple times.
2014-01-26 15:23:26 +01:00
Max Kellermann e57e89b9d5 upnp/discovery: use a plain UpnpClient_Handle instead of class LibUPnP 2014-01-26 15:22:33 +01:00
Max Kellermann bcc1f93370 upnp: add class UpnpCallback
Each Upnp*Async() call passes a new cookie pointer, and the cookie
passed to UpnpRegisterClient() appears to be ignored.  Using this
interface is a more elegant approach than having one single "handler"
function.
2014-01-26 15:04:56 +01:00
Max Kellermann 66c013682f upnp: remove obsolete global variable "theLib" 2014-01-26 13:54:48 +01:00
Max Kellermann 9f3ba737d6 upnp/Discovery: add listener interface 2014-01-26 13:41:40 +01:00
Max Kellermann f86f5ad224 db/upnp: move generic code to lib/upnp/ 2014-01-26 13:41:40 +01:00