Re: [OpenSIPStack] Problem with RTP_UDP:: Open
Brought to you by:
joegenbaclor
From: Joegen E. B. <joe...@gm...> - 2008-01-18 03:57:17
|
Without seeing your entire application it would be impossible to tell. Are there other threads that might modify transport.maritaca.session_udp while you are calling session_udp->Open(). If so you might want to use some form of locking to make sure that only one thread has a access to the critical section. Claudio Miceli wrote: > Hi, > > I was working in a softphone and I started to use the method RTP_UDP::Open, > but something went wrong. > > > > int MediaBasica::OpenSinkRTPChannel(/*int channelID*/ OpalTransport_maritaca > & transport,std::string IP4address ) > { > WORD firstPort = requestRTPPort(transport); // this method gets a > possible port to be used. > WORD nextPort = firstPort; > > PIPSocket::Address endereco_local; > PString not_buda = IP4address; > > > transport.localAddress = not_buda ; // transport is a variable used > inside the class MediaBasica > endereco_local = not_buda; > > > > while (!transport.maritaca.session_udp->Open( > transport.localAddress /**socklocal*/, > firstPort, > firstPort,'R',NULL,NULL)) { > > > At this moment my program stop working. > > Everything has valid values. > > > I used the PTRACE log to see exactly where it had stopped, and I found this > in RTP.cxx > > > > BOOL RTP_UDP::Open(PIPSocket::Address _localAddress, > WORD portBase, WORD portMax, > BYTE tos, > PSTUNClient * stun, > RTP_QOS * rtpQos) > { > // save local address > PTRACE(1,"1"); // I put this ptrace > localAddress = _localAddress; > PTRACE(1,"2");// I put this ptrace > localDataPort = (WORD)(portBase&0xfffe); > PTRACE(1,"3");// I put this ptrace > localControlPort = (WORD)(localDataPort + 1); > > My output is 1, everything is ok until this line. > > What did I do wrong ? > > > Thanks in advance > > Claudio Miceli de Farias > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > opensipstack-devel mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensipstack-devel > > > |