Commit f825205a by Rémi Denis-Courmont

- Fix sleep implementation

- Fix most warnings
parent 71c6abd4
......@@ -2,7 +2,7 @@
* file.cpp: File management
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: file.cpp,v 1.8 2003/12/12 11:32:39 adq Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -100,7 +100,7 @@ C_File::C_File(const C_String& strPath) : m_strPath(strPath)
// See the fread manual for an explanation of the strMode parameter.
// Throws a FileException if the file could not be opened.
//------------------------------------------------------------------------------
void C_File::Open(const C_String& strMode, int iPermissions)
void C_File::Open(const C_String& strMode, int)
{
m_hFd = fopen(m_strPath.GetString(), strMode.GetString());
......
......@@ -119,7 +119,7 @@ C_CfgFileParser::C_CfgFileParser(C_ParserHandler* pCallBack) :
//
//------------------------------------------------------------------------------
C_Vector<C_String> C_CfgFileParser::Parse(const C_String& strFileName,
bool bCompletePath,
bool,
const C_String& strRoot)
{
C_Vector<C_String> vInclude;
......
......@@ -2,7 +2,7 @@
* reflect.cpp: Reflective information support
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: reflect.cpp,v 1.2 2003/10/27 10:58:10 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -78,7 +78,7 @@ C_ClassField::C_ClassField()
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
C_ClassMethod::C_ClassMethod(byte bReturnType, byte aArgTypes[])
C_ClassMethod::C_ClassMethod(byte, byte[])
{
// To write
}
......
......@@ -2,7 +2,7 @@
* serialization.cpp: Serialization support
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: serialization.cpp,v 1.2 2003/10/27 10:58:10 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -115,7 +115,7 @@ const byte* C_Serializer::GetNextBytes()
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_Serializer::SetNextBytes(const byte* pBytes)
void C_Serializer::SetNextBytes(const byte*)
{
m_iCurrentField++;
......
......@@ -2,7 +2,7 @@
* settings.cpp: Application settings management
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: settings.cpp,v 1.18 2003/10/27 10:58:10 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -218,7 +218,7 @@ C_Settings::C_Settings() : m_cSettings(2311)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_Settings::Load(const C_String& strDefaultCfgFile, bool bReadCmdLine)
void C_Settings::Load(const C_String& strDefaultCfgFile, bool)
{
C_Vector<C_String> vInclude;
C_SettingsHandler cHandler(this);
......
......@@ -2,7 +2,7 @@
* socket.cpp: socket management
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: socket.cpp,v 1.24 2004/02/16 17:07:48 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -858,8 +858,8 @@ int C_Socket::WriteTo(C_UnixAddr& cPeerAddr,
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
int C_Socket::SendTo(C_Inet4Addr& cPeerAddr,
const C_SocketBuff& cBuffers, unsigned int iSlotCount)
int C_Socket::SendTo(C_Inet4Addr&,
const C_SocketBuff&, unsigned int)
{
// Further writing
ASSERT(false);
......
......@@ -2,7 +2,7 @@
* socket.h: Socket class definition
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: socket.h,v 1.13 2004/02/16 17:07:48 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -158,7 +158,7 @@ class C_UnixAddr
{
public:
void Build(const C_String& strPath);
void Build(C_String& strPath, C_String& strPort, int foo)
void Build(C_String& strPath, C_String&, int)
{ Build(strPath); }; // ignore port
const struct sockaddr_un* GetUnixAddr() const
{
......
......@@ -153,7 +153,7 @@ C_String::C_String(const C_String& strSrc)
// Memory is allocated but not initialised: this is why this constructor is
// protected and reserved to internal use
//------------------------------------------------------------------------------
C_String::C_String(unsigned int iSize, bool bDummy)
C_String::C_String(unsigned int iSize, bool)
{
m_iLength = iSize;
m_pszBuff = new char[iSize+1];
......
......@@ -2,7 +2,7 @@
* system.cpp: System base functions
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: system.cpp,v 1.5 2003/10/27 10:58:10 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -34,6 +34,7 @@
#include <errno.h>
#include <string.h>
#endif
#include <time.h>
#ifdef HAVE_SLEEP
#include <unistd.h>
#endif
......@@ -59,6 +60,7 @@
//------------------------------------------------------------------------------
int GetErrorCode(int iSubSystem/* = SYSTEM_DEFAULT*/)
{
(void)iSubSystem;
#ifdef _WIN32
switch(iSubSystem)
{
......@@ -125,7 +127,11 @@ C_String GetErrorMsg(int iSubSystem/* = SYSTEM_DEFAULT*/)
//------------------------------------------------------------------------------
void Pause(unsigned int iSeconds)
{
#ifdef HAVE_SLEEP
#if defined HAVE_NANOSLEEP
struct timespec ts = { iSeconds, 0 };
nanosleep(&ts, NULL);
#elif defined HAVE_SLEEP
sleep(iSeconds);
#elif defined WIN32
......
......@@ -361,7 +361,7 @@ template <class T> void C_Vector<T>::QuickSort(int iLeft, int iRight)
template <class T> void C_Vector<T>::Swap(unsigned int i, unsigned int j)
{
if ((i >= 0) && (i < Size()) && (j >= 0) && (j < Size()))
if ((i < Size()) && (j < Size()))
{
T* Ttmp = m_apElems[i];
m_apElems[i] = m_apElems[j];
......
......@@ -2,7 +2,7 @@
* filereader.h: file reader
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: filereader.h,v 1.9 2003/08/20 21:26:56 adq Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -43,7 +43,7 @@ public:
virtual void Close();
virtual s64 Read(byte* pBuff, s64 iSize);
virtual int GetFrame(byte ** pBuff ,int iSize) { return 0;};
virtual int GetFrame(byte **,int) { return 0;};
virtual int GetAudioFD() { return 0;};
virtual s64 Seek(s64 iOffset, s64 bStartPos);
......
......@@ -2,7 +2,7 @@
* ps2ts.cpp: threaded PS to TS converter
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: ps2ts.cpp,v 1.17 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -155,8 +155,7 @@ void C_Ps2TsMpegConverter::InitWork()
//------------------------------------------------------------------------------
// Get Next Ts Packet from the Reader
//------------------------------------------------------------------------------
s64 C_Ps2TsMpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket>* pPackets,
int skip)
s64 C_Ps2TsMpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket>* pPackets, int)
{
s64 iRc = 0;
bool bDiscontinuity = false;
......@@ -213,8 +212,7 @@ s64 C_Ps2TsMpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket>* pPackets,
//------------------------------------------------------------------------------
// Get Previous Ts Packet from the Reader
//------------------------------------------------------------------------------
s64 C_Ps2TsMpegConverter::GetPrevTsPackets(C_Fifo<C_TsPacket>* pPacket,
int skip)
s64 C_Ps2TsMpegConverter::GetPrevTsPackets(C_Fifo<C_TsPacket>*, int)
{
return MPEG_BEGINOFSTREAM;
}
......
......@@ -2,7 +2,7 @@
* pvrreader.cpp: Reading from an Hauppauge PVR board
*-------------------------------------------------------------------------------
* (c)1999-2003 VideoLAN
* $Id: pvrreader.cpp,v 1.5 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Tristan Leteurtre <tooney@videolan.org>
*
......@@ -392,7 +392,7 @@ s64 C_PvrMpegReader::Read(byte* pBuff, s64 iSize)
}
int C_PvrMpegReader::GetFrame(byte ** ppBuff , int iSize)
int C_PvrMpegReader::GetFrame(byte **, int)
{
return 0;
}
......@@ -405,7 +405,7 @@ int C_PvrMpegReader::GetFrame(byte ** ppBuff , int iSize)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
s64 C_PvrMpegReader::Seek(s64 iOffset, s64 bStartPos)
s64 C_PvrMpegReader::Seek(s64, s64)
{
return 0;
}
......
......@@ -2,7 +2,7 @@
* tcpinput.cpp: Input for spawning a tcp reader
*-------------------------------------------------------------------------------
* (c)2003 Anevia
* $Id: tcpinput.cpp,v 1.3 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
*
......@@ -400,8 +400,7 @@ void C_TcpInput::OnStopStreaming(C_Broadcast* pBroadcast)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_TcpInput::OnUpdateProgram(C_String strProgram,
C_String strFileName, C_String strType)
void C_TcpInput::OnUpdateProgram(C_String, C_String, C_String)
{
throw E_Exception(GEN_ERR, "Updating program not implemented");
}
......@@ -409,7 +408,7 @@ void C_TcpInput::OnUpdateProgram(C_String strProgram,
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_TcpInput::OnDeleteProgram(C_String strProgram)
void C_TcpInput::OnDeleteProgram(C_String)
{
throw E_Exception(GEN_ERR, "Deleting program not implemented");
}
......@@ -2,7 +2,7 @@
* TCP reader.cpp: TCP reader
*-------------------------------------------------------------------------------
* (c)2003 Anevia
* $Id: tcpreader.cpp,v 1.3 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
*
......@@ -144,7 +144,7 @@ void C_TcpMpegReader::ResetEndOfStream()
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
s64 C_TcpMpegReader::Seek(s64 iOffset, s64 bStartPos)
s64 C_TcpMpegReader::Seek(s64, s64)
{
ASSERT(false);
return 0;
......
......@@ -2,7 +2,7 @@
* TCPreader.h: TCP reader
*-------------------------------------------------------------------------------
* (c)2003 Anevia
* $Id: tcpreader.h,v 1.2 2003/08/29 10:20:53 nitrox Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
*
......@@ -43,7 +43,7 @@ public:
virtual void Close();
virtual s64 Read(byte* pBuff, s64 iSize);
virtual int GetFrame(byte ** pBuff ,int iSize) { return 0;};
virtual int GetFrame(byte **,int) { return 0;};
virtual int GetAudioFD() { return 0;};
virtual s64 Seek(s64 iOffset, s64 bStartPos);
......
......@@ -2,7 +2,7 @@
* telnetinterface.cpp:
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: telnetinterface.cpp,v 1.6 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -164,6 +164,7 @@ C_Buffer<byte> C_TelnetInterfaceOptions::Request(byte bAction, byte bOption)
C_Buffer<byte> C_TelnetInterfaceOptions::Answer(const C_Buffer<byte>& cRequest)
{
ASSERT(cRequest.GetSize() == 3);
(void)cRequest;
C_Buffer<byte> cAnswer(3);
cAnswer.SetSize(0);
......
......@@ -2,7 +2,7 @@
* videoinput.cpp: Video4linux streams
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: videoinput.cpp,v 1.22 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr>
......@@ -392,14 +392,14 @@ void C_VideoInput::OnSuspendStreaming(C_Broadcast* pBroadcast)
//------------------------------------------------------------------------------
// Forward the reception of the given program
//------------------------------------------------------------------------------
void C_VideoInput::OnForwardStreaming(C_Broadcast* pBroadcast, int speed)
void C_VideoInput::OnForwardStreaming(C_Broadcast*, int)
{
}
//------------------------------------------------------------------------------
// Rewind the reception of the given program
//------------------------------------------------------------------------------
void C_VideoInput::OnRewindStreaming(C_Broadcast* pBroadcast, int speed)
void C_VideoInput::OnRewindStreaming(C_Broadcast*, int)
{
}
......@@ -434,11 +434,10 @@ void C_VideoInput::OnStopStreaming(C_Broadcast* pBroadcast)
//------------------------------------------------------------------------------
// Update configuration dynamically
//------------------------------------------------------------------------------
void C_VideoInput::OnUpdateProgram(C_String strProgram,
C_String strFileName, C_String strType)
void C_VideoInput::OnUpdateProgram(C_String, C_String, C_String)
{
}
void C_VideoInput::OnDeleteProgram(C_String strProgram)
void C_VideoInput::OnDeleteProgram(C_String)
{
}
......@@ -2,7 +2,7 @@
* converter.cpp: Mpeg converters
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: converter.cpp,v 1.8 2003/10/27 10:58:11 sam Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -114,7 +114,7 @@ void C_MpegConverter::CleanWork()
//------------------------------------------------------------------------------
// Get Next Ts Packet from the Reader
//------------------------------------------------------------------------------
s64 C_MpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket> * pPackets, int skip)
s64 C_MpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket> *, int)
{
return MPEG_ENDOFSTREAM;
}
......@@ -122,7 +122,7 @@ s64 C_MpegConverter::GetNextTsPackets(C_Fifo<C_TsPacket> * pPackets, int skip)
//------------------------------------------------------------------------------
// Get Previous Ts Packet from the Reader
//------------------------------------------------------------------------------
s64 C_MpegConverter::GetPrevTsPackets(C_Fifo<C_TsPacket> * pPackets, int skip)
s64 C_MpegConverter::GetPrevTsPackets(C_Fifo<C_TsPacket> *, int)
{
return MPEG_BEGINOFSTREAM;
}
......@@ -177,7 +177,7 @@ C_DvbPsiPat::C_DvbPsiPat(dvbpsi_pat_t* pPat)
//------------------------------------------------------------------------------
// Copy constructor
//------------------------------------------------------------------------------
C_DvbPsiPat::C_DvbPsiPat(const C_DvbPsiPat& cPat)
C_DvbPsiPat::C_DvbPsiPat(const C_DvbPsiPat& cPat) : C_DvbPsiTable ()
{
m_iPid = 0;
dvbpsi_InitPAT(&m_sPat,
......@@ -471,7 +471,7 @@ C_DvbPsiPmt::C_DvbPsiPmt(dvbpsi_pmt_t* pPmt)
//------------------------------------------------------------------------------
// Copy constructor
//------------------------------------------------------------------------------
C_DvbPsiPmt::C_DvbPsiPmt(const C_DvbPsiPmt& cPmt)
C_DvbPsiPmt::C_DvbPsiPmt(const C_DvbPsiPmt& cPmt) : C_DvbPsiTable()
{
m_iPid = cPmt.m_iPid;
......
......@@ -2,7 +2,7 @@
* dvbpsi.h: common tools to use the libdvbpsi
*-------------------------------------------------------------------------------
* (c)1999-2002 VideoLAN
* $Id: dvbpsi.h,v 1.5 2003/11/16 17:58:34 nitrox Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -139,7 +139,7 @@ public:
void Detach();
virtual bool HandlePacket(C_TsPacket* pPacket);
virtual bool HandlePrefillPacket(C_TsPacket* pPacket) { return false; }
virtual bool HandlePrefillPacket(C_TsPacket*) { return false; }
virtual void Shutdown() {}
virtual void PrefillStart() {}
virtual void PrefillComplete() {}
......@@ -233,7 +233,7 @@ public:
void Detach();
virtual bool HandlePacket(C_TsPacket* pPacket);
virtual bool HandlePrefillPacket(C_TsPacket* pPacket) { return false; }
virtual bool HandlePrefillPacket(C_TsPacket*) { return false; }
virtual void Shutdown() {}
virtual void PrefillStart() {}
virtual void PrefillComplete() {}
......
......@@ -2,7 +2,7 @@
* tsdemux.h: TS demultiplexer
*-------------------------------------------------------------------------------
* (c)1999-2002 VideoLAN
* $Id: tsdemux.h,v 1.3 2003/08/14 17:20:36 adq Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -65,15 +65,15 @@ public:
void UnLock();
virtual bool HandlePacket(C_TsPacket* pPacket);
virtual bool HandlePrefillPacket(C_TsPacket* pPacket) { return false; }
virtual bool HandlePrefillPacket(C_TsPacket*) { return false; }
virtual void Shutdown() {}
virtual void PrefillStart() {}
virtual void PrefillComplete() {}
protected:
// Selection hooks
virtual void OnSelectPid(u16 iPid, u8 iType) {};
virtual void OnUnselectPid(u16 iPid) {};
virtual void OnSelectPid(u16, u8) {};
virtual void OnUnselectPid(u16) {};
// Where to get TS packets
C_NetList *m_pTsProvider;
......
......@@ -2,7 +2,7 @@
* tsmux.h: TS multiplexer
*-------------------------------------------------------------------------------
* (c)1999-2002 VideoLAN
* $Id: tsmux.h,v 1.5 2003/11/16 17:58:34 nitrox Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -87,7 +87,7 @@ public:
void DetachProgram(u16 iPmtPid);
virtual bool HandlePacket(C_TsPacket* pPacket);
virtual bool HandlePrefillPacket(C_TsPacket* pPacket) { return false; }
virtual bool HandlePrefillPacket(C_TsPacket*) { return false; }
virtual void Shutdown() {}
virtual void PrefillStart() {}
virtual void PrefillComplete() {}
......
......@@ -2,7 +2,7 @@
* directory.cpp: programs definition and registration
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: directory.cpp,v 1.3 2003/10/27 10:58:12 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -83,6 +83,7 @@ void C_PgrmInfo::AddProvider(C_Input* pInput)
bool C_PgrmInfo::DeleteProvider(C_Input* pInput)
{
(void)pInput;
ASSERT(pInput);
ASSERT(!m_cProviders.Find(*pInput) < 0);
......@@ -167,6 +168,7 @@ int C_PgrmDirectory::Add(const C_Program& cProgram, C_Input* pInput)
int C_PgrmDirectory::Remove(const C_Program& cProgram, C_Input* pInput)
{
(void)pInput;
ASSERT(pInput);
int iRc = GEN_ERR;
......@@ -184,7 +186,7 @@ int C_PgrmDirectory::Remove(const C_Program& cProgram, C_Input* pInput)
}
void C_PgrmDirectory::Empty(C_Input* pInput)
void C_PgrmDirectory::Empty(C_Input*)
{
}
......
......@@ -2,7 +2,7 @@
* input.cpp: Input streams
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: input.cpp,v 1.15 2003/10/27 10:58:12 sam Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
*
......@@ -108,7 +108,7 @@ void C_Input::SetEventHandler(C_EventHandler* pEventHandler)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
C_Input::C_Input(const C_Input& cInput)
C_Input::C_Input(const C_Input&)
{
// Input must not be copied
ASSERT(false);
......
......@@ -2,7 +2,7 @@
* adminintf.cpp:
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: interface.cpp,v 1.5 2003/10/27 10:58:12 sam Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -194,7 +194,7 @@ void C_Interface::SetConfig(C_String sModuleName)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void C_Interface::PropagateEvent(const C_Event& cEvent)
void C_Interface::PropagateEvent(const C_Event&)
{
}
......
......@@ -2,7 +2,7 @@
* manager.cpp: Vls manager
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: manager.cpp,v 1.49 2003/12/12 11:33:24 adq Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -603,7 +603,7 @@ void C_Manager::PrivHandleEvent(const C_Event& cEvent)
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
C_Answer C_Manager::Ls(C_Request& cRequest)
C_Answer C_Manager::Ls(C_Request&)
{
C_Answer cAnswer("Manager");
......
......@@ -2,7 +2,7 @@
* manager_backwardcomp.cpp: Vls manager backward compatibilty functions
*-------------------------------------------------------------------------------
* (c)1999-2003 VideoLAN
* $Id: manager_backwardcomp.cpp,v 1.3 2003/08/20 15:05:40 nitrox Exp $
* $Id$
*
* Authors: Benoit Steiner <benny@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -214,7 +214,7 @@
#endif
#ifdef EXTRA_CODE
C_Answer C_Manager::Browse(C_Request& cRequest)
C_Answer C_Manager::Browse(C_Request&)
{
C_Answer cAnswer("Manager");
cAnswer.SetStatus(ANS_NO_ERR);
......
......@@ -2,7 +2,7 @@
* manager_broadcast.cpp: Brodacast mtehods for Vls manager
*-------------------------------------------------------------------------------
* (c)1999-2003 VideoLAN
* $Id: manager_broadcast.cpp,v 1.6 2003/08/19 21:31:42 nitrox Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
* Benoit Steiner <benny@via.ecp.fr>
......@@ -84,7 +84,7 @@ C_Broadcast* C_Manager::CreateBroadcast(C_String& strName,
C_Answer C_Manager::Broadcast_Ls(C_Request& cRequest)
C_Answer C_Manager::Broadcast_Ls(C_Request&)
{
C_Answer cAnswer("Manager");
......
......@@ -2,7 +2,7 @@
* manager_channel.cpp: Channel methods for Vls manager
*-------------------------------------------------------------------------------
* (c)1999-2003 VideoLAN
* $Id: manager_channel.cpp,v 1.7 2003/11/03 19:22:54 tooney Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
* Benoit Steiner <benny@via.ecp.fr>
......@@ -25,7 +25,7 @@
*-------------------------------------------------------------------------------
*
*******************************************************************************/
C_Answer C_Manager::Channel_Ls(C_Request& cRequest)
C_Answer C_Manager::Channel_Ls(C_Request&)
{
C_Answer cAnswer("Manager");
cAnswer.AddMessage("channels");
......
......@@ -2,7 +2,7 @@
* manager_broadcast.cpp: Brodacast mtehods for Vls manager
*-------------------------------------------------------------------------------
* (c)1999-2003 VideoLAN
* $Id: manager_program.cpp,v 1.2 2003/08/13 15:59:31 nitrox Exp $
* $Id$
*
* Authors: Damien Lucas <damien.lucas@anevia.com>
* Benoit Steiner <benny@via.ecp.fr>
......@@ -27,7 +27,7 @@
*******************************************************************************/
C_Answer C_Manager::Program_Ls(C_Request& pRequest)
C_Answer C_Manager::Program_Ls(C_Request&)
{
C_Answer cAnswer("Manager");
cAnswer.AddMessage("programs");
......
......@@ -2,7 +2,7 @@
* request.cpp: User requests encapsulation
*-------------------------------------------------------------------------------
* (c)1999-2001 VideoLAN
* $Id: request.cpp,v 1.5 2003/10/27 10:58:12 sam Exp $
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
......@@ -551,51 +551,39 @@ C_Answer* C_Message::ExtractAnswer(C_StringTokenizer &cTokenizer)
pAnswer->SetStatus(strStatus.ToInt());
C_String strMessageCount = cTokenizer.NextToken();
unsigned int iMessageCount = strMessageCount.ToInt();
if (iMessageCount >= 0)
for (unsigned int i = 0; i < iMessageCount; i++)
{
for (unsigned int i = 0; i < iMessageCount; i++)
if (cTokenizer.HasMoreToken())
{
if (cTokenizer.HasMoreToken())
{
C_String strMsg = cTokenizer.NextToken();
pAnswer->AddMessage(strMsg);
}
else
{
// Bad answer
delete pAnswer;
pAnswer = NULL;
break;
}
C_String strMsg = cTokenizer.NextToken();
pAnswer->AddMessage(strMsg);
}
else
{
// Bad answer
delete pAnswer;
pAnswer = NULL;
break;
}
}
if (pAnswer)
{
C_String strAnswerCount = cTokenizer.NextToken();
unsigned int iAnswerCount = strAnswerCount.ToInt();
if (iAnswerCount >= 0)
for (unsigned int j = 0; j < iAnswerCount; j++)
{
for (unsigned int j = 0; j < iAnswerCount; j++)
C_Answer *pSubAnswer = ExtractAnswer(cTokenizer);
if (pSubAnswer)
{
C_Answer *pSubAnswer = ExtractAnswer(cTokenizer);
if (pSubAnswer)
{
pAnswer->Add(*pSubAnswer);
}
else
{
// Bad answer
delete pAnswer;
pAnswer = NULL;
break;
}
pAnswer->Add(*pSubAnswer);
}
else
{
// Bad answer
delete pAnswer;
pAnswer = NULL;
break;
}
}
else
{
// Bad answer
delete pAnswer;
pAnswer = NULL;
}
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment