From 20fefdd3f341d6e7f6b15e4926bf5569aa1943d5 Mon Sep 17 00:00:00 2001 From: chriszero Date: Fri, 13 Feb 2015 16:14:10 +0100 Subject: Removed some raw pointers to avoid a possible memoryleak --- SubscriptionManager.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'SubscriptionManager.cpp') diff --git a/SubscriptionManager.cpp b/SubscriptionManager.cpp index a6f35c5..d312803 100644 --- a/SubscriptionManager.cpp +++ b/SubscriptionManager.cpp @@ -53,8 +53,8 @@ void SubscriptionManager::NotifyServer() std::string server; int port; if(pVid) { - server = pVid->m_pServer->GetIpAdress(); - port = pVid->m_pServer->GetPort(); + server = pVid->m_Server.GetIpAdress(); + port = pVid->m_Server.GetPort(); } else if ( plexgdm::GetInstance().GetPlexservers().size() > 0) { server = plexgdm::GetInstance().GetPlexservers().at(0).GetIpAdress(); port = plexgdm::GetInstance().GetPlexservers().at(0).GetPort(); @@ -169,10 +169,10 @@ std::string SubscriptionManager::GetTimelineXml() msg << " duration=\"" << total << "\""; msg << " seekRange=\"0-" << total << "\""; msg << " controllable=\"true\""; - msg << " machineIdentifier=\"" << (pVid ? pVid->m_pServer->GetUuid() : "") << "\""; + msg << " machineIdentifier=\"" << (pVid ? pVid->m_Server.GetUuid() : "") << "\""; msg << " protocol=\"http\""; - msg << " address=\"" << (pVid ? pVid->m_pServer->GetIpAdress() : "") << "\""; - msg << " port=\"" << (pVid ? pVid->m_pServer->GetPort() : 0) << "\""; + msg << " address=\"" << (pVid ? pVid->m_Server.GetIpAdress() : "") << "\""; + msg << " port=\"" << (pVid ? pVid->m_Server.GetPort() : 0) << "\""; msg << " guid=\"" << Config::GetInstance().GetUUID() << "\""; msg << " containerKey=\"" << (pVid ? pVid->m_sKey : "/library/metadata/900000") << "\""; msg << " key=\"" << (pVid ? pVid->m_sKey : "/library/metadata/900000") << "\""; @@ -239,14 +239,14 @@ void Subscriber::SendUpdate(std::string msg, bool isNav) ActionManager::ActionManager() {} -void ActionManager::AddAction(Video* video) +void ActionManager::AddAction(Video video) { m_myLock.Lock(&m_myMutex); m_Action = video; m_isAction = true; } -Video* ActionManager::GetAction() +Video ActionManager::GetAction() { m_myLock.Lock(&m_myMutex); m_isAction = false; @@ -272,7 +272,7 @@ void cSubscriberStatus::Replaying(const cControl* DvbPlayerControl, const char* pControl = const_cast(DvbPlayerControl); cHlsPlayerControl* hlsControl = dynamic_cast(pControl); if(hlsControl) { - pVideo = hlsControl->m_pVideo; + pVideo = &hlsControl->m_Video; } else { pVideo = NULL; } -- cgit v1.2.3