mrlitany / libjingle

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

Division by zero bug #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I start debugging of pcp example application and trying to transfer
file from local computer to local computer with 2 instances of programm I
get integer division by zero error.

Problem is in httpportallocator.cc file:

void HttpPortAllocatorSession::GetPortConfigurations() {

  if (attempts_ == kNumRetries) {
    LOG(WARNING) << "HttpPortAllocator: maximum number of requests reached";
    return;
  }

  // Choose the next host to try.
  std::string host = relay_hosts_[attempts_ % relay_hosts_.size()];

    ^^^^^

Last line gives this error. Can you tell me what is wrong?What version of
the product are you using? On what operating system?

VS 2008, winxp home, libjingle-0.4.0

Original issue reported on code.google.com by Alexande...@gmail.com on 17 Mar 2009 at 1:27

GoogleCodeExporter commented 9 years ago
relay_hosts.size() is returning zero. You need to handle this error condition.

Original comment by MullerCe...@gmail.com on 19 Mar 2009 at 11:47

GoogleCodeExporter commented 9 years ago
You should set stun server and media server for your xmpp server.

Original comment by hllyy...@gmail.com on 4 Aug 2011 at 1:54

GoogleCodeExporter commented 9 years ago
Issue 13 has been merged into this issue.

Original comment by juberti@google.com on 9 Sep 2011 at 7:28