void eNavigation::serviceEvent(iPlayableService* service, int event)
{
- if (service != m_runningService)
+ if (m_runningService && service != m_runningService)
{
- eDebug("nav: event for other service");
+ eDebug("nav: event %d for other service", event);
return;
}
m_event(event);
/* check if there is a running service... */
if (!m_runningService)
return 1;
- /* send stop event */
+
+ ePtr<iPlayableService> tmp = m_runningService;
+ m_runningService=0;
+ tmp->stop();
+
+ /* send stop event */
m_event(iPlayableService::evEnd);
- m_runningService->stop();
/* kill service. */
- m_runningService = 0;
m_service_event_conn = 0;
return 0;
}
if (it != m_recordings.end())
{
m_recordings.erase(it);
+ /* send stop event */
+ m_record_event(service, iRecordableService::evEnd);
return 0;
}
+
eDebug("try to stop non running recording!!"); // this should not happen
return -1;
}