mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
suppress some basicclient valgrind warnings
To enable these paranoia memsets for testing, compile with
-DPEDANTIC_VALGRIND_SETUP. Probably more of not completely
initialized structs are present in other parts of the code.
This is probably not useful for productive builds.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 8e46250c7c
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-10-31 (Wed, 31 Oct 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -28,6 +28,11 @@
|
|||||||
#include <sectionsdclient/sectionsdclient.h>
|
#include <sectionsdclient/sectionsdclient.h>
|
||||||
#include <sectionsdclient/sectionsdMsg.h>
|
#include <sectionsdclient/sectionsdMsg.h>
|
||||||
|
|
||||||
|
#ifdef PEDANTIC_VALGRIND_SETUP
|
||||||
|
#define VALGRIND_PARANOIA(x) memset(&x, 0, sizeof(x))
|
||||||
|
#else
|
||||||
|
#define VALGRIND_PARANOIA(x) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned char CSectionsdClient::getVersion () const
|
unsigned char CSectionsdClient::getVersion () const
|
||||||
{
|
{
|
||||||
@@ -59,6 +64,7 @@ int CSectionsdClient::readResponse(char* data,unsigned int size)
|
|||||||
bool CSectionsdClient::send(const unsigned char command, const char* data, const unsigned int size)
|
bool CSectionsdClient::send(const unsigned char command, const char* data, const unsigned int size)
|
||||||
{
|
{
|
||||||
sectionsd::msgRequestHeader msgHead;
|
sectionsd::msgRequestHeader msgHead;
|
||||||
|
VALGRIND_PARANOIA(msgHead);
|
||||||
|
|
||||||
msgHead.version = getVersion();
|
msgHead.version = getVersion();
|
||||||
msgHead.command = command;
|
msgHead.command = command;
|
||||||
@@ -78,6 +84,7 @@ bool CSectionsdClient::send(const unsigned char command, const char* data, const
|
|||||||
void CSectionsdClient::registerEvent(const unsigned int eventID, const unsigned int clientID, const char * const udsName)
|
void CSectionsdClient::registerEvent(const unsigned int eventID, const unsigned int clientID, const char * const udsName)
|
||||||
{
|
{
|
||||||
CEventServer::commandRegisterEvent msg2;
|
CEventServer::commandRegisterEvent msg2;
|
||||||
|
VALGRIND_PARANOIA(msg2);
|
||||||
|
|
||||||
msg2.eventID = eventID;
|
msg2.eventID = eventID;
|
||||||
msg2.clientID = clientID;
|
msg2.clientID = clientID;
|
||||||
@@ -92,6 +99,7 @@ void CSectionsdClient::registerEvent(const unsigned int eventID, const unsigned
|
|||||||
void CSectionsdClient::unRegisterEvent(const unsigned int eventID, const unsigned int clientID)
|
void CSectionsdClient::unRegisterEvent(const unsigned int eventID, const unsigned int clientID)
|
||||||
{
|
{
|
||||||
CEventServer::commandUnRegisterEvent msg2;
|
CEventServer::commandUnRegisterEvent msg2;
|
||||||
|
VALGRIND_PARANOIA(msg2);
|
||||||
|
|
||||||
msg2.eventID = eventID;
|
msg2.eventID = eventID;
|
||||||
msg2.clientID = clientID;
|
msg2.clientID = clientID;
|
||||||
@@ -150,6 +158,7 @@ bool CSectionsdClient::getIsScanningActive()
|
|||||||
void CSectionsdClient::setServiceChanged(const t_channel_id channel_id, const bool requestEvent)
|
void CSectionsdClient::setServiceChanged(const t_channel_id channel_id, const bool requestEvent)
|
||||||
{
|
{
|
||||||
sectionsd::commandSetServiceChanged msg;
|
sectionsd::commandSetServiceChanged msg;
|
||||||
|
VALGRIND_PARANOIA(msg);
|
||||||
|
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
msg.requestEvent = requestEvent;
|
msg.requestEvent = requestEvent;
|
||||||
|
@@ -28,6 +28,11 @@
|
|||||||
#include <timerdclient/timerdmsg.h>
|
#include <timerdclient/timerdmsg.h>
|
||||||
#include <timerdclient/timerdclient.h>
|
#include <timerdclient/timerdclient.h>
|
||||||
|
|
||||||
|
#ifdef PEDANTIC_VALGRIND_SETUP
|
||||||
|
#define VALGRIND_PARANOIA(x) memset(&x, 0, sizeof(x))
|
||||||
|
#else
|
||||||
|
#define VALGRIND_PARANOIA(x) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned char CTimerdClient::getVersion () const
|
unsigned char CTimerdClient::getVersion () const
|
||||||
{
|
{
|
||||||
@@ -44,6 +49,7 @@ const char * CTimerdClient::getSocketName() const
|
|||||||
void CTimerdClient::registerEvent(unsigned int eventID, unsigned int clientID, const char * const udsName)
|
void CTimerdClient::registerEvent(unsigned int eventID, unsigned int clientID, const char * const udsName)
|
||||||
{
|
{
|
||||||
CEventServer::commandRegisterEvent msg2;
|
CEventServer::commandRegisterEvent msg2;
|
||||||
|
VALGRIND_PARANOIA(msg2);
|
||||||
|
|
||||||
msg2.eventID = eventID;
|
msg2.eventID = eventID;
|
||||||
msg2.clientID = clientID;
|
msg2.clientID = clientID;
|
||||||
@@ -59,6 +65,7 @@ void CTimerdClient::registerEvent(unsigned int eventID, unsigned int clientID, c
|
|||||||
void CTimerdClient::unRegisterEvent(unsigned int eventID, unsigned int clientID)
|
void CTimerdClient::unRegisterEvent(unsigned int eventID, unsigned int clientID)
|
||||||
{
|
{
|
||||||
CEventServer::commandUnRegisterEvent msg2;
|
CEventServer::commandUnRegisterEvent msg2;
|
||||||
|
VALGRIND_PARANOIA(msg2);
|
||||||
|
|
||||||
msg2.eventID = eventID;
|
msg2.eventID = eventID;
|
||||||
msg2.clientID = clientID;
|
msg2.clientID = clientID;
|
||||||
@@ -166,6 +173,7 @@ bool CTimerdClient::modifyTimerEvent(int eventid, time_t announcetime, time_t al
|
|||||||
// set new time values for event eventid
|
// set new time values for event eventid
|
||||||
|
|
||||||
CTimerdMsg::commandModifyTimer msgModifyTimer;
|
CTimerdMsg::commandModifyTimer msgModifyTimer;
|
||||||
|
VALGRIND_PARANOIA(msgModifyTimer);
|
||||||
msgModifyTimer.eventID = eventid;
|
msgModifyTimer.eventID = eventid;
|
||||||
msgModifyTimer.announceTime = announcetime;
|
msgModifyTimer.announceTime = announcetime;
|
||||||
msgModifyTimer.alarmTime = alarmtime;
|
msgModifyTimer.alarmTime = alarmtime;
|
||||||
@@ -204,6 +212,7 @@ bool CTimerdClient::rescheduleTimerEvent(int eventid, time_t diff)
|
|||||||
bool CTimerdClient::rescheduleTimerEvent(int eventid, time_t announcediff, time_t alarmdiff, time_t stopdiff)
|
bool CTimerdClient::rescheduleTimerEvent(int eventid, time_t announcediff, time_t alarmdiff, time_t stopdiff)
|
||||||
{
|
{
|
||||||
CTimerdMsg::commandModifyTimer msgModifyTimer;
|
CTimerdMsg::commandModifyTimer msgModifyTimer;
|
||||||
|
VALGRIND_PARANOIA(msgModifyTimer);
|
||||||
msgModifyTimer.eventID = eventid;
|
msgModifyTimer.eventID = eventid;
|
||||||
msgModifyTimer.announceTime = announcediff;
|
msgModifyTimer.announceTime = announcediff;
|
||||||
msgModifyTimer.alarmTime = alarmdiff;
|
msgModifyTimer.alarmTime = alarmdiff;
|
||||||
@@ -257,6 +266,9 @@ int CTimerdClient::addTimerEvent( CTimerd::CTimerEventTypes evType, void* data,
|
|||||||
CTimerd::TransferEventInfo tei;
|
CTimerd::TransferEventInfo tei;
|
||||||
CTimerd::TransferRecordingInfo tri;
|
CTimerd::TransferRecordingInfo tri;
|
||||||
CTimerdMsg::commandAddTimer msgAddTimer;
|
CTimerdMsg::commandAddTimer msgAddTimer;
|
||||||
|
VALGRIND_PARANOIA(tei);
|
||||||
|
VALGRIND_PARANOIA(tri);
|
||||||
|
VALGRIND_PARANOIA(msgAddTimer);
|
||||||
msgAddTimer.alarmTime = alarmtime;
|
msgAddTimer.alarmTime = alarmtime;
|
||||||
msgAddTimer.announceTime = announcetime;
|
msgAddTimer.announceTime = announcetime;
|
||||||
msgAddTimer.stopTime = stoptime;
|
msgAddTimer.stopTime = stoptime;
|
||||||
@@ -325,6 +337,7 @@ int CTimerdClient::addTimerEvent( CTimerd::CTimerEventTypes evType, void* data,
|
|||||||
void CTimerdClient::removeTimerEvent( int evId)
|
void CTimerdClient::removeTimerEvent( int evId)
|
||||||
{
|
{
|
||||||
CTimerdMsg::commandRemoveTimer msgRemoveTimer;
|
CTimerdMsg::commandRemoveTimer msgRemoveTimer;
|
||||||
|
VALGRIND_PARANOIA(msgRemoveTimer);
|
||||||
|
|
||||||
msgRemoveTimer.eventID = evId;
|
msgRemoveTimer.eventID = evId;
|
||||||
|
|
||||||
@@ -394,6 +407,7 @@ bool CTimerdClient::shutdown()
|
|||||||
void CTimerdClient::modifyTimerAPid(int eventid, unsigned char apids)
|
void CTimerdClient::modifyTimerAPid(int eventid, unsigned char apids)
|
||||||
{
|
{
|
||||||
CTimerdMsg::commandSetAPid data;
|
CTimerdMsg::commandSetAPid data;
|
||||||
|
VALGRIND_PARANOIA(data);
|
||||||
data.eventID=eventid;
|
data.eventID=eventid;
|
||||||
data.apids = apids;
|
data.apids = apids;
|
||||||
send(CTimerdMsg::CMD_SETAPID, (char*) &data, sizeof(data));
|
send(CTimerdMsg::CMD_SETAPID, (char*) &data, sizeof(data));
|
||||||
@@ -404,6 +418,7 @@ void CTimerdClient::modifyTimerAPid(int eventid, unsigned char apids)
|
|||||||
void CTimerdClient::setRecordingSafety(int pre, int post)
|
void CTimerdClient::setRecordingSafety(int pre, int post)
|
||||||
{
|
{
|
||||||
CTimerdMsg::commandRecordingSafety data;
|
CTimerdMsg::commandRecordingSafety data;
|
||||||
|
VALGRIND_PARANOIA(data);
|
||||||
data.pre = pre;
|
data.pre = pre;
|
||||||
data.post = post;
|
data.post = post;
|
||||||
send(CTimerdMsg::CMD_SETRECSAFETY, (char*) &data, sizeof(data));
|
send(CTimerdMsg::CMD_SETRECSAFETY, (char*) &data, sizeof(data));
|
||||||
@@ -473,6 +488,7 @@ void CTimerdClient::setWeekdaysToStr(CTimerd::CTimerEventRepeat rep, char* str)
|
|||||||
void CTimerdClient::stopTimerEvent( int evId)
|
void CTimerdClient::stopTimerEvent( int evId)
|
||||||
{
|
{
|
||||||
CTimerdMsg::commandRemoveTimer msgRemoveTimer;
|
CTimerdMsg::commandRemoveTimer msgRemoveTimer;
|
||||||
|
VALGRIND_PARANOIA(msgRemoveTimer);
|
||||||
|
|
||||||
msgRemoveTimer.eventID = evId;
|
msgRemoveTimer.eventID = evId;
|
||||||
|
|
||||||
|
@@ -36,6 +36,12 @@
|
|||||||
#include <zapit/client/msgtypes.h>
|
#include <zapit/client/msgtypes.h>
|
||||||
#include <zapit/client/zapittools.h>
|
#include <zapit/client/zapittools.h>
|
||||||
|
|
||||||
|
#ifdef PEDANTIC_VALGRIND_SETUP
|
||||||
|
#define VALGRIND_PARANOIA memset(&msg, 0, sizeof(msg))
|
||||||
|
#else
|
||||||
|
#define VALGRIND_PARANOIA {}
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned char CZapitClient::getVersion() const
|
unsigned char CZapitClient::getVersion() const
|
||||||
{
|
{
|
||||||
return CZapitMessages::ACTVERSION;
|
return CZapitMessages::ACTVERSION;
|
||||||
@@ -63,6 +69,7 @@ void CZapitClient::shutdown()
|
|||||||
void CZapitClient::zapTo(const unsigned int bouquet, const unsigned int channel)
|
void CZapitClient::zapTo(const unsigned int bouquet, const unsigned int channel)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandZapto msg;
|
CZapitMessages::commandZapto msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
msg.channel = channel - 1;
|
msg.channel = channel - 1;
|
||||||
@@ -76,6 +83,7 @@ void CZapitClient::zapTo(const unsigned int bouquet, const unsigned int channel)
|
|||||||
void CZapitClient::zapTo(const unsigned int channel)
|
void CZapitClient::zapTo(const unsigned int channel)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandZaptoChannelNr msg;
|
CZapitMessages::commandZaptoChannelNr msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.channel = channel - 1;
|
msg.channel = channel - 1;
|
||||||
|
|
||||||
@@ -137,6 +145,7 @@ int32_t CZapitClient::getCurrentSatellitePosition(void)
|
|||||||
void CZapitClient::setAudioChannel(const unsigned int channel)
|
void CZapitClient::setAudioChannel(const unsigned int channel)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandSetAudioChannel msg;
|
CZapitMessages::commandSetAudioChannel msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.channel = channel;
|
msg.channel = channel;
|
||||||
|
|
||||||
@@ -149,6 +158,7 @@ void CZapitClient::setAudioChannel(const unsigned int channel)
|
|||||||
unsigned int CZapitClient::zapTo_serviceID(const t_channel_id channel_id)
|
unsigned int CZapitClient::zapTo_serviceID(const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandZaptoServiceID msg;
|
CZapitMessages::commandZaptoServiceID msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
msg.record = false;
|
msg.record = false;
|
||||||
@@ -166,6 +176,7 @@ unsigned int CZapitClient::zapTo_serviceID(const t_channel_id channel_id)
|
|||||||
unsigned int CZapitClient::zapTo_record(const t_channel_id channel_id)
|
unsigned int CZapitClient::zapTo_record(const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandZaptoServiceID msg;
|
CZapitMessages::commandZaptoServiceID msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
msg.record = true;
|
msg.record = true;
|
||||||
@@ -183,6 +194,7 @@ unsigned int CZapitClient::zapTo_record(const t_channel_id channel_id)
|
|||||||
unsigned int CZapitClient::zapTo_subServiceID(const t_channel_id channel_id)
|
unsigned int CZapitClient::zapTo_subServiceID(const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandZaptoServiceID msg;
|
CZapitMessages::commandZaptoServiceID msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
|
|
||||||
@@ -200,6 +212,7 @@ unsigned int CZapitClient::zapTo_subServiceID(const t_channel_id channel_id)
|
|||||||
void CZapitClient::zapTo_serviceID_NOWAIT(const t_channel_id channel_id)
|
void CZapitClient::zapTo_serviceID_NOWAIT(const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandZaptoServiceID msg;
|
CZapitMessages::commandZaptoServiceID msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
|
|
||||||
@@ -212,6 +225,7 @@ void CZapitClient::zapTo_serviceID_NOWAIT(const t_channel_id channel_id)
|
|||||||
void CZapitClient::zapTo_subServiceID_NOWAIT(const t_channel_id channel_id)
|
void CZapitClient::zapTo_subServiceID_NOWAIT(const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandZaptoServiceID msg;
|
CZapitMessages::commandZaptoServiceID msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
|
|
||||||
@@ -224,6 +238,7 @@ void CZapitClient::zapTo_subServiceID_NOWAIT(const t_channel_id channel_id)
|
|||||||
void CZapitClient::setMode(const channelsMode mode)
|
void CZapitClient::setMode(const channelsMode mode)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandSetMode msg;
|
CZapitMessages::commandSetMode msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.mode = mode;
|
msg.mode = mode;
|
||||||
|
|
||||||
@@ -283,6 +298,7 @@ void CZapitClient::getPIDS(responseGetPIDs& pids)
|
|||||||
void CZapitClient::zaptoNvodSubService(const int num)
|
void CZapitClient::zaptoNvodSubService(const int num)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandInt msg;
|
CZapitMessages::commandInt msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.val = num;
|
msg.val = num;
|
||||||
|
|
||||||
@@ -298,6 +314,7 @@ void CZapitClient::getBouquets(BouquetList& bouquets, const bool emptyBouquetsTo
|
|||||||
char buffer[30 + 1];
|
char buffer[30 + 1];
|
||||||
|
|
||||||
CZapitMessages::commandGetBouquets msg;
|
CZapitMessages::commandGetBouquets msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.emptyBouquetsToo = emptyBouquetsToo;
|
msg.emptyBouquetsToo = emptyBouquetsToo;
|
||||||
msg.mode = mode;
|
msg.mode = mode;
|
||||||
@@ -384,6 +401,7 @@ bool CZapitClient::getBouquetChannels(const unsigned int bouquet, BouquetChannel
|
|||||||
{
|
{
|
||||||
bool return_value;
|
bool return_value;
|
||||||
CZapitMessages::commandGetBouquetChannels msg;
|
CZapitMessages::commandGetBouquetChannels msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
msg.mode = mode;
|
msg.mode = mode;
|
||||||
@@ -414,6 +432,7 @@ bool CZapitClient::getChannels( BouquetChannelList& channels, channelsMode mode,
|
|||||||
{
|
{
|
||||||
bool return_value;
|
bool return_value;
|
||||||
CZapitMessages::commandGetChannels msg;
|
CZapitMessages::commandGetChannels msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.mode = mode;
|
msg.mode = mode;
|
||||||
msg.order = order;
|
msg.order = order;
|
||||||
@@ -488,6 +507,7 @@ void CZapitClient::reloadCurrentServices()
|
|||||||
void CZapitClient::muteAudio(const bool mute)
|
void CZapitClient::muteAudio(const bool mute)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBoolean msg;
|
CZapitMessages::commandBoolean msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.truefalse = mute;
|
msg.truefalse = mute;
|
||||||
|
|
||||||
@@ -499,6 +519,7 @@ void CZapitClient::muteAudio(const bool mute)
|
|||||||
bool CZapitClient::getMuteStatus()
|
bool CZapitClient::getMuteStatus()
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBoolean msg;
|
CZapitMessages::commandBoolean msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
send(CZapitMessages::CMD_GET_MUTE_STATUS, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_GET_MUTE_STATUS, (char*)&msg, sizeof(msg));
|
||||||
CBasicClient::receive_data((char*)&msg, sizeof(msg));
|
CBasicClient::receive_data((char*)&msg, sizeof(msg));
|
||||||
@@ -509,6 +530,7 @@ bool CZapitClient::getMuteStatus()
|
|||||||
void CZapitClient::setVolume(const unsigned int left, const unsigned int right)
|
void CZapitClient::setVolume(const unsigned int left, const unsigned int right)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandVolume msg;
|
CZapitMessages::commandVolume msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.left = left;
|
msg.left = left;
|
||||||
msg.right = right;
|
msg.right = right;
|
||||||
@@ -521,6 +543,7 @@ void CZapitClient::setVolume(const unsigned int left, const unsigned int right)
|
|||||||
void CZapitClient::getVolume(unsigned int *left, unsigned int *right)
|
void CZapitClient::getVolume(unsigned int *left, unsigned int *right)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandVolume msg;
|
CZapitMessages::commandVolume msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
send(CZapitMessages::CMD_GET_VOLUME, 0, 0);
|
send(CZapitMessages::CMD_GET_VOLUME, 0, 0);
|
||||||
|
|
||||||
@@ -561,6 +584,7 @@ bool CZapitClient::get_current_TP(TP_params* TP)
|
|||||||
void CZapitClient::sendMotorCommand(uint8_t cmdtype, uint8_t address, uint8_t cmd, uint8_t num_parameters, uint8_t param1, uint8_t param2)
|
void CZapitClient::sendMotorCommand(uint8_t cmdtype, uint8_t address, uint8_t cmd, uint8_t num_parameters, uint8_t param1, uint8_t param2)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandMotor msg;
|
CZapitMessages::commandMotor msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.cmdtype = cmdtype;
|
msg.cmdtype = cmdtype;
|
||||||
msg.address = address;
|
msg.address = address;
|
||||||
@@ -766,6 +790,7 @@ void CZapitClient::addBouquet(const char * const name)
|
|||||||
void CZapitClient::moveBouquet(const unsigned int bouquet, const unsigned int newPos)
|
void CZapitClient::moveBouquet(const unsigned int bouquet, const unsigned int newPos)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandMoveBouquet msg;
|
CZapitMessages::commandMoveBouquet msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
msg.newPos = newPos;
|
msg.newPos = newPos;
|
||||||
@@ -779,6 +804,7 @@ void CZapitClient::moveBouquet(const unsigned int bouquet, const unsigned int ne
|
|||||||
void CZapitClient::deleteBouquet(const unsigned int bouquet)
|
void CZapitClient::deleteBouquet(const unsigned int bouquet)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandDeleteBouquet msg;
|
CZapitMessages::commandDeleteBouquet msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
|
|
||||||
@@ -792,6 +818,7 @@ void CZapitClient::deleteBouquet(const unsigned int bouquet)
|
|||||||
void CZapitClient::renameBouquet(const unsigned int bouquet, const char * const newName)
|
void CZapitClient::renameBouquet(const unsigned int bouquet, const char * const newName)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandRenameBouquet msg;
|
CZapitMessages::commandRenameBouquet msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
|
|
||||||
@@ -861,6 +888,7 @@ void CZapitClient::moveChannel( unsigned int bouquet, unsigned int oldPos, unsig
|
|||||||
void CZapitClient::addChannelToBouquet(const unsigned int bouquet, const t_channel_id channel_id)
|
void CZapitClient::addChannelToBouquet(const unsigned int bouquet, const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandAddChannelToBouquet msg;
|
CZapitMessages::commandAddChannelToBouquet msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
@@ -875,6 +903,7 @@ void CZapitClient::addChannelToBouquet(const unsigned int bouquet, const t_chann
|
|||||||
void CZapitClient::removeChannelFromBouquet(const unsigned int bouquet, const t_channel_id channel_id)
|
void CZapitClient::removeChannelFromBouquet(const unsigned int bouquet, const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandRemoveChannelFromBouquet msg;
|
CZapitMessages::commandRemoveChannelFromBouquet msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
msg.channel_id = channel_id;
|
msg.channel_id = channel_id;
|
||||||
@@ -889,6 +918,7 @@ void CZapitClient::removeChannelFromBouquet(const unsigned int bouquet, const t_
|
|||||||
void CZapitClient::setBouquetLock(const unsigned int bouquet, const bool lock)
|
void CZapitClient::setBouquetLock(const unsigned int bouquet, const bool lock)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBouquetState msg;
|
CZapitMessages::commandBouquetState msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
msg.state = lock;
|
msg.state = lock;
|
||||||
@@ -903,6 +933,7 @@ void CZapitClient::setBouquetLock(const unsigned int bouquet, const bool lock)
|
|||||||
void CZapitClient::setBouquetHidden(const unsigned int bouquet, const bool hidden)
|
void CZapitClient::setBouquetHidden(const unsigned int bouquet, const bool hidden)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBouquetState msg;
|
CZapitMessages::commandBouquetState msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.bouquet = bouquet;
|
msg.bouquet = bouquet;
|
||||||
msg.state = hidden;
|
msg.state = hidden;
|
||||||
@@ -925,6 +956,7 @@ void CZapitClient::renumChannellist()
|
|||||||
void CZapitClient::saveBouquets(const bool saveall)
|
void CZapitClient::saveBouquets(const bool saveall)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBoolean msg;
|
CZapitMessages::commandBoolean msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.truefalse = saveall;
|
msg.truefalse = saveall;
|
||||||
|
|
||||||
send(CZapitMessages::CMD_BQ_SAVE_BOUQUETS, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_BQ_SAVE_BOUQUETS, (char*)&msg, sizeof(msg));
|
||||||
@@ -938,6 +970,7 @@ void CZapitClient::saveBouquets(const bool saveall)
|
|||||||
void CZapitClient::setStandby(const bool enable)
|
void CZapitClient::setStandby(const bool enable)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBoolean msg;
|
CZapitMessages::commandBoolean msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.truefalse = enable;
|
msg.truefalse = enable;
|
||||||
send(CZapitMessages::CMD_SET_STANDBY, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SET_STANDBY, (char*)&msg, sizeof(msg));
|
||||||
CZapitMessages::responseCmd response;
|
CZapitMessages::responseCmd response;
|
||||||
@@ -948,6 +981,7 @@ void CZapitClient::setStandby(const bool enable)
|
|||||||
void CZapitClient::setVideoSystem(int video_system)
|
void CZapitClient::setVideoSystem(int video_system)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandInt msg;
|
CZapitMessages::commandInt msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.val = video_system;
|
msg.val = video_system;
|
||||||
send(CZapitMessages::CMD_SET_VIDEO_SYSTEM, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SET_VIDEO_SYSTEM, (char*)&msg, sizeof(msg));
|
||||||
close_connection();
|
close_connection();
|
||||||
@@ -956,6 +990,7 @@ void CZapitClient::setVideoSystem(int video_system)
|
|||||||
void CZapitClient::startPlayBack(const bool sendpmt)
|
void CZapitClient::startPlayBack(const bool sendpmt)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBoolean msg;
|
CZapitMessages::commandBoolean msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.truefalse = sendpmt;
|
msg.truefalse = sendpmt;
|
||||||
send(CZapitMessages::CMD_SB_START_PLAYBACK, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SB_START_PLAYBACK, (char*)&msg, sizeof(msg));
|
||||||
close_connection();
|
close_connection();
|
||||||
@@ -964,6 +999,7 @@ void CZapitClient::startPlayBack(const bool sendpmt)
|
|||||||
void CZapitClient::stopPlayBack(const bool sendpmt)
|
void CZapitClient::stopPlayBack(const bool sendpmt)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBoolean msg;
|
CZapitMessages::commandBoolean msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.truefalse = sendpmt;
|
msg.truefalse = sendpmt;
|
||||||
send(CZapitMessages::CMD_SB_STOP_PLAYBACK, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SB_STOP_PLAYBACK, (char*)&msg, sizeof(msg));
|
||||||
CZapitMessages::responseCmd response;
|
CZapitMessages::responseCmd response;
|
||||||
@@ -974,6 +1010,7 @@ void CZapitClient::stopPlayBack(const bool sendpmt)
|
|||||||
void CZapitClient::lockPlayBack(const bool sendpmt)
|
void CZapitClient::lockPlayBack(const bool sendpmt)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBoolean msg;
|
CZapitMessages::commandBoolean msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.truefalse = sendpmt;
|
msg.truefalse = sendpmt;
|
||||||
send(CZapitMessages::CMD_SB_LOCK_PLAYBACK, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SB_LOCK_PLAYBACK, (char*)&msg, sizeof(msg));
|
||||||
CZapitMessages::responseCmd response;
|
CZapitMessages::responseCmd response;
|
||||||
@@ -983,6 +1020,7 @@ void CZapitClient::lockPlayBack(const bool sendpmt)
|
|||||||
void CZapitClient::unlockPlayBack(const bool sendpmt)
|
void CZapitClient::unlockPlayBack(const bool sendpmt)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandBoolean msg;
|
CZapitMessages::commandBoolean msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.truefalse = sendpmt;
|
msg.truefalse = sendpmt;
|
||||||
send(CZapitMessages::CMD_SB_UNLOCK_PLAYBACK, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SB_UNLOCK_PLAYBACK, (char*)&msg, sizeof(msg));
|
||||||
CZapitMessages::responseCmd response;
|
CZapitMessages::responseCmd response;
|
||||||
@@ -1012,6 +1050,7 @@ void CZapitClient::setDisplayFormat(const video_display_format_t format)
|
|||||||
void CZapitClient::setAudioMode(const int mode)
|
void CZapitClient::setAudioMode(const int mode)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandInt msg;
|
CZapitMessages::commandInt msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.val = mode;
|
msg.val = mode;
|
||||||
send(CZapitMessages::CMD_SET_AUDIO_MODE, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SET_AUDIO_MODE, (char*)&msg, sizeof(msg));
|
||||||
close_connection();
|
close_connection();
|
||||||
@@ -1030,6 +1069,7 @@ void CZapitClient::getAudioMode(int * mode)
|
|||||||
void CZapitClient::setRecordMode(const bool activate)
|
void CZapitClient::setRecordMode(const bool activate)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandSetRecordMode msg;
|
CZapitMessages::commandSetRecordMode msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.activate = activate;
|
msg.activate = activate;
|
||||||
send(CZapitMessages::CMD_SET_RECORD_MODE, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SET_RECORD_MODE, (char*)&msg, sizeof(msg));
|
||||||
close_connection();
|
close_connection();
|
||||||
@@ -1067,6 +1107,7 @@ void CZapitClient::getAspectRatio(int *ratio)
|
|||||||
void CZapitClient::setAspectRatio(int ratio)
|
void CZapitClient::setAspectRatio(int ratio)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandInt msg;
|
CZapitMessages::commandInt msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.val = ratio;
|
msg.val = ratio;
|
||||||
send(CZapitMessages::CMD_SET_ASPECTRATIO, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SET_ASPECTRATIO, (char*)&msg, sizeof(msg));
|
||||||
close_connection();
|
close_connection();
|
||||||
@@ -1075,6 +1116,7 @@ void CZapitClient::setAspectRatio(int ratio)
|
|||||||
void CZapitClient::getMode43(int *m43)
|
void CZapitClient::getMode43(int *m43)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandInt msg;
|
CZapitMessages::commandInt msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
send(CZapitMessages::CMD_GET_MODE43, 0, 0);
|
send(CZapitMessages::CMD_GET_MODE43, 0, 0);
|
||||||
CBasicClient::receive_data((char* )&msg, sizeof(msg));
|
CBasicClient::receive_data((char* )&msg, sizeof(msg));
|
||||||
* m43 = msg.val;
|
* m43 = msg.val;
|
||||||
@@ -1084,6 +1126,7 @@ void CZapitClient::getMode43(int *m43)
|
|||||||
void CZapitClient::setMode43(int m43)
|
void CZapitClient::setMode43(int m43)
|
||||||
{
|
{
|
||||||
CZapitMessages::commandInt msg;
|
CZapitMessages::commandInt msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
msg.val = m43;
|
msg.val = m43;
|
||||||
send(CZapitMessages::CMD_SET_MODE43, (char*)&msg, sizeof(msg));
|
send(CZapitMessages::CMD_SET_MODE43, (char*)&msg, sizeof(msg));
|
||||||
close_connection();
|
close_connection();
|
||||||
@@ -1092,6 +1135,7 @@ void CZapitClient::setMode43(int m43)
|
|||||||
void CZapitClient::registerEvent(const unsigned int eventID, const unsigned int clientID, const char * const udsName)
|
void CZapitClient::registerEvent(const unsigned int eventID, const unsigned int clientID, const char * const udsName)
|
||||||
{
|
{
|
||||||
CEventServer::commandRegisterEvent msg;
|
CEventServer::commandRegisterEvent msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.eventID = eventID;
|
msg.eventID = eventID;
|
||||||
msg.clientID = clientID;
|
msg.clientID = clientID;
|
||||||
@@ -1106,6 +1150,7 @@ void CZapitClient::registerEvent(const unsigned int eventID, const unsigned int
|
|||||||
void CZapitClient::unRegisterEvent(const unsigned int eventID, const unsigned int clientID)
|
void CZapitClient::unRegisterEvent(const unsigned int eventID, const unsigned int clientID)
|
||||||
{
|
{
|
||||||
CEventServer::commandUnRegisterEvent msg;
|
CEventServer::commandUnRegisterEvent msg;
|
||||||
|
VALGRIND_PARANOIA;
|
||||||
|
|
||||||
msg.eventID = eventID;
|
msg.eventID = eventID;
|
||||||
msg.clientID = clientID;
|
msg.clientID = clientID;
|
||||||
|
@@ -73,6 +73,12 @@
|
|||||||
#include <libdvbsub/dvbsub.h>
|
#include <libdvbsub/dvbsub.h>
|
||||||
#include <libtuxtxt/teletext.h>
|
#include <libtuxtxt/teletext.h>
|
||||||
|
|
||||||
|
#ifdef PEDANTIC_VALGRIND_SETUP
|
||||||
|
#define VALGRIND_PARANOIA(x) memset(&x, 0, sizeof(x))
|
||||||
|
#else
|
||||||
|
#define VALGRIND_PARANOIA(x) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* globals */
|
/* globals */
|
||||||
int sig_delay = 2; // seconds between signal check
|
int sig_delay = 2; // seconds between signal check
|
||||||
|
|
||||||
@@ -852,6 +858,7 @@ bool CZapit::StartFastScan(int scan_mode, int opid)
|
|||||||
void CZapit::SendCmdReady(int connfd)
|
void CZapit::SendCmdReady(int connfd)
|
||||||
{
|
{
|
||||||
CZapitMessages::responseCmd response;
|
CZapitMessages::responseCmd response;
|
||||||
|
VALGRIND_PARANOIA(response);
|
||||||
response.cmd = CZapitMessages::CMD_READY;
|
response.cmd = CZapitMessages::CMD_READY;
|
||||||
CBasicServer::send_data(connfd, &response, sizeof(response));
|
CBasicServer::send_data(connfd, &response, sizeof(response));
|
||||||
}
|
}
|
||||||
@@ -892,6 +899,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
case CZapitMessages::CMD_ZAPTO_SUBSERVICEID: {
|
case CZapitMessages::CMD_ZAPTO_SUBSERVICEID: {
|
||||||
CZapitMessages::commandZaptoServiceID msgZaptoServiceID;
|
CZapitMessages::commandZaptoServiceID msgZaptoServiceID;
|
||||||
CZapitMessages::responseZapComplete msgResponseZapComplete;
|
CZapitMessages::responseZapComplete msgResponseZapComplete;
|
||||||
|
VALGRIND_PARANOIA(msgResponseZapComplete);
|
||||||
CBasicServer::receive_data(connfd, &msgZaptoServiceID, sizeof(msgZaptoServiceID));
|
CBasicServer::receive_data(connfd, &msgZaptoServiceID, sizeof(msgZaptoServiceID));
|
||||||
if(msgZaptoServiceID.record) {
|
if(msgZaptoServiceID.record) {
|
||||||
msgResponseZapComplete.zapStatus = ZapForRecord(msgZaptoServiceID.channel_id);
|
msgResponseZapComplete.zapStatus = ZapForRecord(msgZaptoServiceID.channel_id);
|
||||||
@@ -946,6 +954,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
|
|
||||||
case CZapitMessages::CMD_GET_MODE: {
|
case CZapitMessages::CMD_GET_MODE: {
|
||||||
CZapitMessages::responseGetMode msgGetMode;
|
CZapitMessages::responseGetMode msgGetMode;
|
||||||
|
VALGRIND_PARANOIA(msgGetMode);
|
||||||
msgGetMode.mode = (CZapitClient::channelsMode) getMode();
|
msgGetMode.mode = (CZapitClient::channelsMode) getMode();
|
||||||
CBasicServer::send_data(connfd, &msgGetMode, sizeof(msgGetMode));
|
CBasicServer::send_data(connfd, &msgGetMode, sizeof(msgGetMode));
|
||||||
break;
|
break;
|
||||||
@@ -953,6 +962,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
|
|
||||||
case CZapitMessages::CMD_GET_CURRENT_SERVICEID: {
|
case CZapitMessages::CMD_GET_CURRENT_SERVICEID: {
|
||||||
CZapitMessages::responseGetCurrentServiceID msgCurrentSID;
|
CZapitMessages::responseGetCurrentServiceID msgCurrentSID;
|
||||||
|
VALGRIND_PARANOIA(msgCurrentSID);
|
||||||
msgCurrentSID.channel_id = (current_channel != 0) ? current_channel->getChannelID() : 0;
|
msgCurrentSID.channel_id = (current_channel != 0) ? current_channel->getChannelID() : 0;
|
||||||
CBasicServer::send_data(connfd, &msgCurrentSID, sizeof(msgCurrentSID));
|
CBasicServer::send_data(connfd, &msgCurrentSID, sizeof(msgCurrentSID));
|
||||||
break;
|
break;
|
||||||
@@ -960,6 +970,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
|
|
||||||
case CZapitMessages::CMD_GET_CURRENT_SERVICEINFO: {
|
case CZapitMessages::CMD_GET_CURRENT_SERVICEINFO: {
|
||||||
CZapitClient::CCurrentServiceInfo msgCurrentServiceInfo;
|
CZapitClient::CCurrentServiceInfo msgCurrentServiceInfo;
|
||||||
|
VALGRIND_PARANOIA(msgCurrentServiceInfo);
|
||||||
memset(&msgCurrentServiceInfo, 0, sizeof(CZapitClient::CCurrentServiceInfo));
|
memset(&msgCurrentServiceInfo, 0, sizeof(CZapitClient::CCurrentServiceInfo));
|
||||||
if(current_channel) {
|
if(current_channel) {
|
||||||
msgCurrentServiceInfo.onid = current_channel->getOriginalNetworkId();
|
msgCurrentServiceInfo.onid = current_channel->getOriginalNetworkId();
|
||||||
@@ -990,6 +1001,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
|
|
||||||
case CZapitMessages::CMD_GET_DELIVERY_SYSTEM: {
|
case CZapitMessages::CMD_GET_DELIVERY_SYSTEM: {
|
||||||
CZapitMessages::responseDeliverySystem response;
|
CZapitMessages::responseDeliverySystem response;
|
||||||
|
VALGRIND_PARANOIA(response);
|
||||||
switch (live_fe->getInfo()->type) {
|
switch (live_fe->getInfo()->type) {
|
||||||
case FE_QAM:
|
case FE_QAM:
|
||||||
response.system = DVB_C;
|
response.system = DVB_C;
|
||||||
@@ -1040,6 +1052,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
case CZapitMessages::CMD_GET_CHANNEL_NAME: {
|
case CZapitMessages::CMD_GET_CHANNEL_NAME: {
|
||||||
t_channel_id requested_channel_id;
|
t_channel_id requested_channel_id;
|
||||||
CZapitMessages::responseGetChannelName response;
|
CZapitMessages::responseGetChannelName response;
|
||||||
|
VALGRIND_PARANOIA(response);
|
||||||
CBasicServer::receive_data(connfd, &requested_channel_id, sizeof(requested_channel_id));
|
CBasicServer::receive_data(connfd, &requested_channel_id, sizeof(requested_channel_id));
|
||||||
response.name[0] = 0;
|
response.name[0] = 0;
|
||||||
CZapitChannel * channel = (requested_channel_id == 0) ? current_channel :
|
CZapitChannel * channel = (requested_channel_id == 0) ? current_channel :
|
||||||
@@ -1169,6 +1182,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
|
|
||||||
case CZapitMessages::CMD_SCANREADY: {
|
case CZapitMessages::CMD_SCANREADY: {
|
||||||
CZapitMessages::responseIsScanReady msgResponseIsScanReady;
|
CZapitMessages::responseIsScanReady msgResponseIsScanReady;
|
||||||
|
VALGRIND_PARANOIA(msgResponseIsScanReady);
|
||||||
#if 0 //FIXME used only when scanning done using pzapit client, is it really needed ?
|
#if 0 //FIXME used only when scanning done using pzapit client, is it really needed ?
|
||||||
msgResponseIsScanReady.satellite = curr_sat;
|
msgResponseIsScanReady.satellite = curr_sat;
|
||||||
msgResponseIsScanReady.transponder = found_transponders;
|
msgResponseIsScanReady.transponder = found_transponders;
|
||||||
@@ -1183,6 +1197,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
case CZapitMessages::CMD_SCANGETSATLIST: {
|
case CZapitMessages::CMD_SCANGETSATLIST: {
|
||||||
uint32_t satlength;
|
uint32_t satlength;
|
||||||
CZapitClient::responseGetSatelliteList sat;
|
CZapitClient::responseGetSatelliteList sat;
|
||||||
|
VALGRIND_PARANOIA(sat);
|
||||||
satlength = sizeof(sat);
|
satlength = sizeof(sat);
|
||||||
|
|
||||||
satellite_map_t satmap = CServiceManager::getInstance()->SatelliteList();
|
satellite_map_t satmap = CServiceManager::getInstance()->SatelliteList();
|
||||||
@@ -1268,6 +1283,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
|
|
||||||
case CZapitMessages::CMD_GET_RECORD_MODE: {
|
case CZapitMessages::CMD_GET_RECORD_MODE: {
|
||||||
CZapitMessages::responseGetRecordModeState msgGetRecordModeState;
|
CZapitMessages::responseGetRecordModeState msgGetRecordModeState;
|
||||||
|
VALGRIND_PARANOIA(msgGetRecordModeState);
|
||||||
msgGetRecordModeState.activated = (currentMode & RECORD_MODE);
|
msgGetRecordModeState.activated = (currentMode & RECORD_MODE);
|
||||||
CBasicServer::send_data(connfd, &msgGetRecordModeState, sizeof(msgGetRecordModeState));
|
CBasicServer::send_data(connfd, &msgGetRecordModeState, sizeof(msgGetRecordModeState));
|
||||||
break;
|
break;
|
||||||
@@ -1276,6 +1292,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
case CZapitMessages::CMD_SB_GET_PLAYBACK_ACTIVE: {
|
case CZapitMessages::CMD_SB_GET_PLAYBACK_ACTIVE: {
|
||||||
/* FIXME check if needed */
|
/* FIXME check if needed */
|
||||||
CZapitMessages::responseGetPlaybackState msgGetPlaybackState;
|
CZapitMessages::responseGetPlaybackState msgGetPlaybackState;
|
||||||
|
VALGRIND_PARANOIA(msgGetPlaybackState);
|
||||||
msgGetPlaybackState.activated = playing;
|
msgGetPlaybackState.activated = playing;
|
||||||
msgGetPlaybackState.activated = videoDecoder->getPlayState();
|
msgGetPlaybackState.activated = videoDecoder->getPlayState();
|
||||||
CBasicServer::send_data(connfd, &msgGetPlaybackState, sizeof(msgGetPlaybackState));
|
CBasicServer::send_data(connfd, &msgGetPlaybackState, sizeof(msgGetPlaybackState));
|
||||||
@@ -1310,6 +1327,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
|
|
||||||
case CZapitMessages::CMD_BQ_EXISTS_BOUQUET: {
|
case CZapitMessages::CMD_BQ_EXISTS_BOUQUET: {
|
||||||
CZapitMessages::responseGeneralInteger responseInteger;
|
CZapitMessages::responseGeneralInteger responseInteger;
|
||||||
|
VALGRIND_PARANOIA(responseInteger);
|
||||||
|
|
||||||
char * name = CBasicServer::receive_string(connfd);
|
char * name = CBasicServer::receive_string(connfd);
|
||||||
responseInteger.number = g_bouquetManager->existsBouquet(name);
|
responseInteger.number = g_bouquetManager->existsBouquet(name);
|
||||||
@@ -1508,6 +1526,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
|
|
||||||
case CZapitMessages::CMD_GET_ASPECTRATIO: {
|
case CZapitMessages::CMD_GET_ASPECTRATIO: {
|
||||||
CZapitMessages::commandInt msg;
|
CZapitMessages::commandInt msg;
|
||||||
|
VALGRIND_PARANOIA(msg);
|
||||||
aspectratio=videoDecoder->getAspectRatio();
|
aspectratio=videoDecoder->getAspectRatio();
|
||||||
msg.val = aspectratio;
|
msg.val = aspectratio;
|
||||||
CBasicServer::send_data(connfd, &msg, sizeof(msg));
|
CBasicServer::send_data(connfd, &msg, sizeof(msg));
|
||||||
@@ -1536,6 +1555,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
case CZapitMessages::CMD_GETPIDS: {
|
case CZapitMessages::CMD_GETPIDS: {
|
||||||
if (current_channel) {
|
if (current_channel) {
|
||||||
CZapitClient::responseGetOtherPIDs responseGetOtherPIDs;
|
CZapitClient::responseGetOtherPIDs responseGetOtherPIDs;
|
||||||
|
VALGRIND_PARANOIA(responseGetOtherPIDs);
|
||||||
responseGetOtherPIDs.vpid = current_channel->getVideoPid();
|
responseGetOtherPIDs.vpid = current_channel->getVideoPid();
|
||||||
responseGetOtherPIDs.ecmpid = 0; // TODO: remove
|
responseGetOtherPIDs.ecmpid = 0; // TODO: remove
|
||||||
responseGetOtherPIDs.vtxtpid = current_channel->getTeletextPid();
|
responseGetOtherPIDs.vtxtpid = current_channel->getTeletextPid();
|
||||||
@@ -1634,6 +1654,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
}
|
}
|
||||||
case CZapitMessages::CMD_GET_VOLUME: {
|
case CZapitMessages::CMD_GET_VOLUME: {
|
||||||
CZapitMessages::commandVolume msgVolume;
|
CZapitMessages::commandVolume msgVolume;
|
||||||
|
VALGRIND_PARANOIA(msgVolume);
|
||||||
#if 0
|
#if 0
|
||||||
msgVolume.left = volume_left;
|
msgVolume.left = volume_left;
|
||||||
msgVolume.right = volume_right;
|
msgVolume.right = volume_right;
|
||||||
@@ -1644,6 +1665,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd)
|
|||||||
}
|
}
|
||||||
case CZapitMessages::CMD_GET_MUTE_STATUS: {
|
case CZapitMessages::CMD_GET_MUTE_STATUS: {
|
||||||
CZapitMessages::commandBoolean msgBoolean;
|
CZapitMessages::commandBoolean msgBoolean;
|
||||||
|
VALGRIND_PARANOIA(msgBoolean);
|
||||||
msgBoolean.truefalse = audioDecoder->getMuteStatus();
|
msgBoolean.truefalse = audioDecoder->getMuteStatus();
|
||||||
CBasicServer::send_data(connfd, &msgBoolean, sizeof(msgBoolean));
|
CBasicServer::send_data(connfd, &msgBoolean, sizeof(msgBoolean));
|
||||||
break;
|
break;
|
||||||
@@ -1705,6 +1727,7 @@ void CZapit::addChannelToBouquet(const unsigned int bouquet, const t_channel_id
|
|||||||
bool CZapit::send_data_count(int connfd, int data_count)
|
bool CZapit::send_data_count(int connfd, int data_count)
|
||||||
{
|
{
|
||||||
CZapitMessages::responseGeneralInteger responseInteger;
|
CZapitMessages::responseGeneralInteger responseInteger;
|
||||||
|
VALGRIND_PARANOIA(responseInteger);
|
||||||
responseInteger.number = data_count;
|
responseInteger.number = data_count;
|
||||||
if (CBasicServer::send_data(connfd, &responseInteger, sizeof(responseInteger)) == false) {
|
if (CBasicServer::send_data(connfd, &responseInteger, sizeof(responseInteger)) == false) {
|
||||||
ERROR("could not send any return");
|
ERROR("could not send any return");
|
||||||
@@ -1719,6 +1742,7 @@ void CZapit::sendAPIDs(int connfd)
|
|||||||
return;
|
return;
|
||||||
for (uint32_t i = 0; i < current_channel->getAudioChannelCount(); i++) {
|
for (uint32_t i = 0; i < current_channel->getAudioChannelCount(); i++) {
|
||||||
CZapitClient::responseGetAPIDs response;
|
CZapitClient::responseGetAPIDs response;
|
||||||
|
VALGRIND_PARANOIA(response);
|
||||||
response.pid = current_channel->getAudioPid(i);
|
response.pid = current_channel->getAudioPid(i);
|
||||||
strncpy(response.desc, current_channel->getAudioChannel(i)->description.c_str(), DESC_MAX_LEN-1);
|
strncpy(response.desc, current_channel->getAudioChannel(i)->description.c_str(), DESC_MAX_LEN-1);
|
||||||
response.is_ac3 = response.is_aac = 0;
|
response.is_ac3 = response.is_aac = 0;
|
||||||
@@ -1745,6 +1769,7 @@ void CZapit::internalSendChannels(int connfd, ZapitChannelList* channels, const
|
|||||||
for (uint32_t i = 0; i < channels->size();i++) {
|
for (uint32_t i = 0; i < channels->size();i++) {
|
||||||
if(nonames) {
|
if(nonames) {
|
||||||
CZapitClient::responseGetBouquetNChannels response;
|
CZapitClient::responseGetBouquetNChannels response;
|
||||||
|
VALGRIND_PARANOIA(response);
|
||||||
response.nr = first_channel_nr + i;
|
response.nr = first_channel_nr + i;
|
||||||
|
|
||||||
if (CBasicServer::send_data(connfd, &response, sizeof(response)) == false) {
|
if (CBasicServer::send_data(connfd, &response, sizeof(response)) == false) {
|
||||||
@@ -1756,6 +1781,7 @@ void CZapit::internalSendChannels(int connfd, ZapitChannelList* channels, const
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CZapitClient::responseGetBouquetChannels response;
|
CZapitClient::responseGetBouquetChannels response;
|
||||||
|
VALGRIND_PARANOIA(response);
|
||||||
strncpy(response.name, ((*channels)[i]->getName()).c_str(), CHANNEL_NAME_SIZE-1);
|
strncpy(response.name, ((*channels)[i]->getName()).c_str(), CHANNEL_NAME_SIZE-1);
|
||||||
response.name[CHANNEL_NAME_SIZE-1] = 0;
|
response.name[CHANNEL_NAME_SIZE-1] = 0;
|
||||||
//printf("internalSendChannels: name %s\n", response.name);
|
//printf("internalSendChannels: name %s\n", response.name);
|
||||||
@@ -1778,6 +1804,7 @@ void CZapit::internalSendChannels(int connfd, ZapitChannelList* channels, const
|
|||||||
void CZapit::sendBouquets(int connfd, const bool emptyBouquetsToo, CZapitClient::channelsMode mode)
|
void CZapit::sendBouquets(int connfd, const bool emptyBouquetsToo, CZapitClient::channelsMode mode)
|
||||||
{
|
{
|
||||||
CZapitClient::responseGetBouquets msgBouquet;
|
CZapitClient::responseGetBouquets msgBouquet;
|
||||||
|
VALGRIND_PARANOIA(msgBouquet);
|
||||||
int curMode;
|
int curMode;
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
case CZapitClient::MODE_TV:
|
case CZapitClient::MODE_TV:
|
||||||
|
Reference in New Issue
Block a user