mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
[PATCH] zapit: make setStandby(false) block
this avoids many nasty race conditions when leaving standby
From: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: Sat, 25 Feb 2012 22:34:58 +0100
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2131 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: ac3707eccb
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2012-02-27 (Mon, 27 Feb 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -921,10 +921,8 @@ void CZapitClient::setStandby(const bool enable)
|
||||
CZapitMessages::commandBoolean msg;
|
||||
msg.truefalse = enable;
|
||||
send(CZapitMessages::CMD_SET_STANDBY, (char*)&msg, sizeof(msg));
|
||||
if(enable) {
|
||||
CZapitMessages::responseCmd response;
|
||||
CBasicClient::receive_data((char* )&response, sizeof(response));
|
||||
}
|
||||
CZapitMessages::responseCmd response;
|
||||
CBasicClient::receive_data((char* )&response, sizeof(response));
|
||||
close_connection();
|
||||
}
|
||||
|
||||
|
@@ -1520,10 +1520,10 @@ printf("[zapit] TP_id %d freq %d rate %d fec %d pol %d\n", TP.TP_id, TP.feparams
|
||||
if (msgBoolean.truefalse) {
|
||||
// if(currentMode & RECORD_MODE) videoDecoder->freeze();
|
||||
enterStandby();
|
||||
response.cmd = CZapitMessages::CMD_READY;
|
||||
CBasicServer::send_data(connfd, &response, sizeof(response));
|
||||
} else
|
||||
leaveStandby();
|
||||
response.cmd = CZapitMessages::CMD_READY;
|
||||
CBasicServer::send_data(connfd, &response, sizeof(response));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user