summaryrefslogtreecommitdiff
path: root/src/lib/upnp
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-11-16 11:37:04 +0100
committerMax Kellermann <max@musicpd.org>2017-11-16 11:37:04 +0100
commit150b16ec2c335d2f4b2006d5da4069d0c59050cb (patch)
treef9f62fe23b4029fdaed8126d127bf24951063582 /src/lib/upnp
parentc98bc4a2433b99baf11cf95a50b282de69346da6 (diff)
lib/upnp/Discovery: make Upnp_Discovery pointers const
Diffstat (limited to 'src/lib/upnp')
-rw-r--r--src/lib/upnp/Discovery.cxx8
-rw-r--r--src/lib/upnp/Discovery.hxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/upnp/Discovery.cxx b/src/lib/upnp/Discovery.cxx
index 121c01c57..955d59ef6 100644
--- a/src/lib/upnp/Discovery.cxx
+++ b/src/lib/upnp/Discovery.cxx
@@ -153,7 +153,7 @@ UPnPDeviceDirectory::Explore(void *ctx)
}
inline int
-UPnPDeviceDirectory::OnAlive(Upnp_Discovery *disco)
+UPnPDeviceDirectory::OnAlive(const Upnp_Discovery *disco)
{
if (isMSDevice(disco->DeviceType) ||
isCDService(disco->ServiceType)) {
@@ -166,7 +166,7 @@ UPnPDeviceDirectory::OnAlive(Upnp_Discovery *disco)
}
inline int
-UPnPDeviceDirectory::OnByeBye(Upnp_Discovery *disco)
+UPnPDeviceDirectory::OnByeBye(const Upnp_Discovery *disco)
{
if (isMSDevice(disco->DeviceType) ||
isCDService(disco->ServiceType)) {
@@ -188,13 +188,13 @@ UPnPDeviceDirectory::Invoke(Upnp_EventType et, void *evp)
case UPNP_DISCOVERY_SEARCH_RESULT:
case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE:
{
- Upnp_Discovery *disco = (Upnp_Discovery *)evp;
+ auto *disco = (const Upnp_Discovery *)evp;
return OnAlive(disco);
}
case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE:
{
- Upnp_Discovery *disco = (Upnp_Discovery *)evp;
+ auto *disco = (const Upnp_Discovery *)evp;
return OnByeBye(disco);
}
diff --git a/src/lib/upnp/Discovery.hxx b/src/lib/upnp/Discovery.hxx
index 131ffb3c6..ec92b2b33 100644
--- a/src/lib/upnp/Discovery.hxx
+++ b/src/lib/upnp/Discovery.hxx
@@ -153,8 +153,8 @@ private:
static void *Explore(void *);
void Explore();
- int OnAlive(Upnp_Discovery *disco);
- int OnByeBye(Upnp_Discovery *disco);
+ int OnAlive(const Upnp_Discovery *disco);
+ int OnByeBye(const Upnp_Discovery *disco);
/* virtual methods from class UpnpCallback */
virtual int Invoke(Upnp_EventType et, void *evp) override;