[Sofaswitch-svn] [commit] r418 - sofaswitch/trunk/voip
Author: derek Date: Thu Jun 12 23:10:18 2008 New Revision: 418 Modified: sofaswitch/trunk/voip/Makefile sofaswitch/trunk/voip/comms.cxx sofaswitch/trunk/voip/jocall.cxx sofaswitch/trunk/voip/main.cxx sofaswitch/trunk/voip/mymanager.cxx sofaswitch/trunk/voip/supervisor.cxx sofaswitch/trunk/voip/supervisor.h sofaswitch/trunk/voip/udpconnection.cxx sofaswitch/trunk/voip/udpep.cxx sofaswitch/trunk/voip/udpsound.cxx Log: Tidy up the handling of memory leak checking, add some callbacks to find when the supervisor has started. Modified: sofaswitch/trunk/voip/Makefile ============================================================================== --- sofaswitch/trunk/voip/Makefile (original) +++ sofaswitch/trunk/voip/Makefile Thu Jun 12 23:10:18 2008 @@ -51,7 +51,6 @@ ################################################## - ifndef OPALDIR ifneq (,$(wildcard $(HOME)/opal)) OPALDIR=$(HOME)/opal Modified: sofaswitch/trunk/voip/comms.cxx ============================================================================== --- sofaswitch/trunk/voip/comms.cxx (original) +++ sofaswitch/trunk/voip/comms.cxx Thu Jun 12 23:10:18 2008 @@ -39,7 +39,6 @@ #define new PNEW - //////////////////////////////////////////////////////////////////////////////// Comms::Comms(LaunchNewId & _lid, MyManager & _manager) Modified: sofaswitch/trunk/voip/jocall.cxx ============================================================================== --- sofaswitch/trunk/voip/jocall.cxx (original) +++ sofaswitch/trunk/voip/jocall.cxx Thu Jun 12 23:10:18 2008 @@ -49,7 +49,6 @@ #define new PNEW - ///////////////////////////////////////////////////////////////////////////// #ifdef _MSC_VER Modified: sofaswitch/trunk/voip/main.cxx ============================================================================== --- sofaswitch/trunk/voip/main.cxx (original) +++ sofaswitch/trunk/voip/main.cxx Thu Jun 12 23:10:18 2008 @@ -65,7 +65,6 @@ #define new PNEW - PCREATE_PROCESS(VoipProcess); @@ -80,7 +79,6 @@ void VoipProcess::Main() { - void mtrace(void); cout << GetName() << " Version " << GetVersion(true) << " by " << GetManufacturer() Modified: sofaswitch/trunk/voip/mymanager.cxx ============================================================================== --- sofaswitch/trunk/voip/mymanager.cxx (original) +++ sofaswitch/trunk/voip/mymanager.cxx Thu Jun 12 23:10:18 2008 @@ -78,6 +78,7 @@ #include "udpconnection.h" #define new PNEW + /////////////////////////////////////////////////////////////// MyManager::MyManager(LaunchNewId & _lid, @@ -536,8 +537,13 @@ } PSortedStringList currentNames; - for (PSafePtr<OpalCall>call = activeCalls; call != NULL; ++call) - currentNames.AppendString((PSafePtrCast<OpalCall, MyOpalCall>(call))->GetOurId()); + for (PSafePtr<OpalCall>call = activeCalls; call != NULL; ++call) { + MyOpalCall *c = PSafePtrCast<OpalCall, MyOpalCall>(call); + if (c != NULL) + currentNames.AppendString(c->GetOurId()); + else + currentNames.AppendString("No name - weird"); + } if (currentNames.GetSize() > 0) { status << "Current active calls " << endl; Modified: sofaswitch/trunk/voip/supervisor.cxx ============================================================================== --- sofaswitch/trunk/voip/supervisor.cxx (original) +++ sofaswitch/trunk/voip/supervisor.cxx Thu Jun 12 23:10:18 2008 @@ -43,7 +43,6 @@ #define new PNEW - //////////////////////////////////////////////////////////////////////////////// @@ -66,6 +65,19 @@ { PTRACE(3, "Supervisor thread has ended"); } + +void Supervisor::OnRunning() +{ + PTRACE(3, "Create a supervisor all done"); + PTRACE(3, "Supervisor initialisation done"); + PTRACE(3, "Supervisor wait for commands now"); + +#ifdef PMEMORY_CHECK + PMemoryHeap::GetState(memoryState); + cerr << "currently on allocation number " + << memoryState.allocationNumber << endl; +#endif +} void Supervisor::ProcessAnswer(PStringArray &cmds, PString & sender) { Modified: sofaswitch/trunk/voip/supervisor.h ============================================================================== --- sofaswitch/trunk/voip/supervisor.h (original) +++ sofaswitch/trunk/voip/supervisor.h Thu Jun 12 23:10:18 2008 @@ -58,6 +58,10 @@ /**Destructor */ ~Supervisor(); + /**This class wants to know that things are happening, so it can do + things like memory leak checkpoints */ + virtual void OnRunning(); + protected: /**The supervisor has completed. This method is called when this supervisor instance terminates. Since there is only one @@ -104,7 +108,8 @@ /**We have a comms error, so just close everything right now. Send no message to the remote node - just end end end. */ virtual void SilentlyEndAll(); - + + ////////////////////////////////////////////// private: /**The interface to the external script which runs python, to provide XMPP comms for us */ Modified: sofaswitch/trunk/voip/udpconnection.cxx ============================================================================== --- sofaswitch/trunk/voip/udpconnection.cxx (original) +++ sofaswitch/trunk/voip/udpconnection.cxx Thu Jun 12 23:10:18 2008 @@ -61,7 +61,6 @@ #include "udpsound.h" #include "counts.h" - #define new PNEW ///////////////////////////////////////////////////////////////////////////// Modified: sofaswitch/trunk/voip/udpep.cxx ============================================================================== --- sofaswitch/trunk/voip/udpep.cxx (original) +++ sofaswitch/trunk/voip/udpep.cxx Thu Jun 12 23:10:18 2008 @@ -52,6 +52,7 @@ #include "udpep.h" #include "udpsound.h" + #define new PNEW ///////////////////////////////////////////////////////////////////////////// Modified: sofaswitch/trunk/voip/udpsound.cxx ============================================================================== --- sofaswitch/trunk/voip/udpsound.cxx (original) +++ sofaswitch/trunk/voip/udpsound.cxx Thu Jun 12 23:10:18 2008 @@ -44,7 +44,6 @@ #define new PNEW - PString GetSSLabel(bool isSource) { if (isSource)
participants (1)
-
SofaSWITCH SVN