driver/record.cpp: always call RestoreNeutrino(), if record start failed

This commit is contained in:
[CST] Focus
2012-09-13 20:07:18 +04:00
parent db17a4ee6f
commit 106c59a792

View File

@@ -891,23 +891,25 @@ bool CRecordManager::Record(const CTimerd::RecordingInfo * const eventinfo, cons
mutex.unlock(); mutex.unlock();
if (error_msg == RECORD_OK) { if (error_msg == RECORD_OK)
return true; return true;
}
else if(!timeshift) { printf("[recordmanager] %s: error code: %d\n", __FUNCTION__, error_msg);
/* RestoreNeutrino must be called always if record start failed */
RunStopScript(); RunStopScript();
RestoreNeutrino(); RestoreNeutrino();
printf("[recordmanager] %s: error code: %d\n", __FUNCTION__, error_msg); /* FIXME show timeshift start error or not ? */
//if(!timeshift)
{
//FIXME: Use better error message //FIXME: Use better error message
DisplayErrorMessage(g_Locale->getText( DisplayErrorMessage(g_Locale->getText(
error_msg == RECORD_BUSY ? LOCALE_STREAMING_BUSY : error_msg == RECORD_BUSY ? LOCALE_STREAMING_BUSY :
error_msg == RECORD_INVALID_DIRECTORY ? LOCALE_STREAMING_DIR_NOT_WRITABLE : error_msg == RECORD_INVALID_DIRECTORY ? LOCALE_STREAMING_DIR_NOT_WRITABLE :
LOCALE_STREAMING_WRITE_ERROR )); // UTF-8 LOCALE_STREAMING_WRITE_ERROR )); // UTF-8
return false;
} }
return true; return false;
} }
bool CRecordManager::StartAutoRecord() bool CRecordManager::StartAutoRecord()