From afca51516538f91f2707f88db750f81a3dd1f2a4 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 30 Aug 2012 16:14:55 +0000 Subject: [PATCH] removed debug msgs and compilation warnings. Added missing include git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5488 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- plugins/VOIP/VOIP.pro | 2 +- plugins/VOIP/gui/SpeexProcessor.h | 4 ++-- plugins/VOIP/services/p3vors.cc | 24 ++++++++++++++++++------ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/plugins/VOIP/VOIP.pro b/plugins/VOIP/VOIP.pro index 64011fb33..a159f33c3 100644 --- a/plugins/VOIP/VOIP.pro +++ b/plugins/VOIP/VOIP.pro @@ -13,7 +13,7 @@ lessThan(QT_VER_MAJ, 4) | lessThan(QT_VER_MIN, 7) | win32 { QT += multimedia } -INCLUDEPATH += ../../retroshare-gui/src/temp/ui +INCLUDEPATH += ../../retroshare-gui/src/temp/ui ../../libretroshare/src #################################### Windows ##################################### diff --git a/plugins/VOIP/gui/SpeexProcessor.h b/plugins/VOIP/gui/SpeexProcessor.h index aab427322..13171f60c 100644 --- a/plugins/VOIP/gui/SpeexProcessor.h +++ b/plugins/VOIP/gui/SpeexProcessor.h @@ -61,7 +61,7 @@ namespace QtSpeex { void networkPacketReady(); protected: - virtual qint64 readData(char *data, qint64 maxSize) {return false;} //not used for input processor + virtual qint64 readData(char * /*data*/, qint64 /*maxSize*/) {return false;} //not used for input processor virtual qint64 writeData(const char *data, qint64 maxSize); virtual bool isSequential() const; @@ -97,7 +97,7 @@ namespace QtSpeex { protected: virtual qint64 readData(char *data, qint64 maxSize); - virtual qint64 writeData(const char *data, qint64 maxSize) {return 0;} //not used for output processor + virtual qint64 writeData(const char * /*data*/, qint64 /*maxSize*/) {return 0;} //not used for output processor virtual bool isSequential() const; signals: diff --git a/plugins/VOIP/services/p3vors.cc b/plugins/VOIP/services/p3vors.cc index c4c83a377..4954fd8b2 100644 --- a/plugins/VOIP/services/p3vors.cc +++ b/plugins/VOIP/services/p3vors.cc @@ -166,7 +166,9 @@ p3VoRS::p3VoRS(RsPluginHandler *handler,PluginNotifier *notifier) int p3VoRS::tick() { +#ifdef DEBUG_VORS std::cerr << "ticking p3VoRS" << std::endl; +#endif processIncoming(); sendPackets(); @@ -236,7 +238,9 @@ int p3VoRS::sendVoipRinging(const std::string& peer_id) int p3VoRS::sendVoipData(const std::string& peer_id,const RsVoipDataChunk& chunk) { +#ifdef DEBUG_VORS std::cerr << "Sending " << chunk.size << " bytes of voip data." << std::endl; +#endif RsVoipDataItem *item = new RsVoipDataItem ; @@ -314,19 +318,27 @@ void p3VoRS::handleProtocol(RsVoipProtocolItem *item) switch(item->protocol) { - case RsVoipProtocolItem::VoipProtocol_Ring: std::cerr << "p3VoRS::handleProtocol(): Received protocol ring item." << std::endl; - mNotify->notifyReceivedVoipInvite(item->PeerId()); + case RsVoipProtocolItem::VoipProtocol_Ring: mNotify->notifyReceivedVoipInvite(item->PeerId()); +#ifdef DEBUG_VORS + std::cerr << "p3VoRS::handleProtocol(): Received protocol ring item." << std::endl; +#endif break ; - case RsVoipProtocolItem::VoipProtocol_Ackn: std::cerr << "p3VoRS::handleProtocol(): Received protocol accept call" << std::endl; - mNotify->notifyReceivedVoipAccept(item->PeerId()); + case RsVoipProtocolItem::VoipProtocol_Ackn: mNotify->notifyReceivedVoipAccept(item->PeerId()); +#ifdef DEBUG_VORS + std::cerr << "p3VoRS::handleProtocol(): Received protocol accept call" << std::endl; +#endif break ; - case RsVoipProtocolItem::VoipProtocol_Close: std::cerr << "p3VoRS::handleProtocol(): Received protocol Close call." << std::endl; - mNotify->notifyReceivedVoipHangUp(item->PeerId()); + case RsVoipProtocolItem::VoipProtocol_Close: mNotify->notifyReceivedVoipHangUp(item->PeerId()); +#ifdef DEBUG_VORS + std::cerr << "p3VoRS::handleProtocol(): Received protocol Close call." << std::endl; +#endif break ; default: +#ifdef DEBUG_VORS std::cerr << "p3VoRS::handleProtocol(): Received protocol item # " << item->protocol << ": not handled yet ! Sorry" << std::endl; +#endif break ; }