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

Origin commit data
------------------
Branch: ni/coolstream
Commit: 106c59a792
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-09-13 (Thu, 13 Sep 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-09-13 20:07:18 +04:00
parent f8dbe21178
commit abbe76f929

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) {
RunStopScript();
RestoreNeutrino();
printf("[recordmanager] %s: error code: %d\n", __FUNCTION__, error_msg); printf("[recordmanager] %s: error code: %d\n", __FUNCTION__, error_msg);
/* RestoreNeutrino must be called always if record start failed */
RunStopScript();
RestoreNeutrino();
/* 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()