>> How do I run the Topology graph instead of the CallFlowGraph? > > Basically you should define following preprocessor defines for > sipXmediaAdapterLib: > DISABLE_DEFAULT_PHONE_MEDIA_INTERFACE_FACTORY > ENABLE_TOPOLOGY_FLOWGRAPH_INTERFACE_FACTORY > > If you use Linux, then it can be done by passing --enable-topology-graph > option to configure. Under Windows you have to change project's > configuration. Btw, in VS6, VS2003 and VS2005 Debug builds > Topology is enabled by default now. We should do the same > for Release configurations too to avoid confusion. >
When compiling with VS2008, with the definitions above, the library crashes on initialisation. After much investigation today, it appears to be an issue with how VS2008 initialises static classes. Specifically in spiXmediaAdaptorLib/CpTopologyGraphFactoryImpl.cpp, initalTopologyResources[] is set to a correct default values, however, VS2008 appears to create temporary objects (on the stack) and point to them. By the time initialTopologyResourcse is used they are out of scope and they contain rubbish!. The same is true for the other similarly initialised static classes/struct in this file/mode. In the file MpResourceTopology.h there is a #if defined(_MSC_VER) && ( _MSC_VER <= 1200 ) that prevents this on Visual Studio 6.0. However, it appears that it is also broken for VS2008.. As a test, I modified this file so that there where no statically initialised UtlString objects. This fixed the initialisation issues, well at least the code started up without crashing. For now I have gone back to using the MpCallFlowGraph rather than MpTopology. So for the time being it appears that the Topology code is broken on VS2008. :-( NOTE: I am not expecting anyone to fix this, I just want to make sure that everyone knows about it to save anyone else having to figure it out! Regards Paul _______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
