rainscut / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

Error in BasicPortAllocator || TurnPort #441

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. the latest update (06.06.2012)
2. vcall in call example
3. add turn port in InitMedia in callclient.cc

cricket::RelayServerConfig config(cricket::RELAY_TURN);
talk_base::SocketAddress turn_addr_udp("xmpp1.xxxx.net", 3478);
  config.ports.push_back(cricket::ProtocolAddress(turn_addr_udp, cricket::PROTO_UDP));
  config.credentials = cricket::RelayCredentials("xxxx", "xxxx");
  port_allocator_->AddRelay(config); 

What is the expected output? What do you see instead?
void BasicPortAllocatorSession::AddAllocatedPort()
{
...
  if (content_name().compare(CN_VIDEO) == 0 &&
      component_ == cricket::ICE_CANDIDATE_COMPONENT_RTP) {
    // For video RTP alone, we set send-buffer sizes. This used to be set in the
    // engines/channels.
    int sendBufSize = (flags() & PORTALLOCATOR_USE_LARGE_SOCKET_SEND_BUFFERS)
                      ? kLargeSocketSendBufferSize
                      : kNormalSocketSendBufferSize;
    port->SetOption(talk_base::Socket::OPT_SNDBUF, sendBufSize);
  }
...

int TurnPort::SetOption(talk_base::Socket::Option opt, int value) {
>>>  return socket_->SetOption(opt, value);
}

but socket_ is uninitilised (0) and all crashed

What version of the product are you using? On what operating system?
VS2010, Win7 x64

Please provide any additional information below.

Original issue reported on code.google.com by slava2vv...@gmail.com on 6 Jun 2013 at 8:42