cookyshi / libjingle

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

Patch for Anonymous Login in Libjingle 6.0.11 #293

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!
I did anonymous login in libjingle.
I attached file.
Code snippet is as following.

//. This is for Anonymous Login...
if(pctx_->user_jid_.node().empty()) {
  bool allowanonymous = false;
  for (std::vector<std::string>::const_iterator itemPos = mechanisms.begin();
         itemPos != mechanisms.end(); ++itemPos) {
    //. check if server supports anonymous login.
    if(*itemPos == "ANONYMOUS") {
      allowanonymous = true;
      break;
    }
   }
  if(allowanonymous) {
    auth->SetAttr(QName("mechanism"), "ANONYMOUS");
    allowNonGoogleLogin_ = false;
  } else {
    return Failure(XmppEngine::ERROR_AUTH);
  }
}

Thank you...

Original issue reported on code.google.com by adam1988...@gmail.com on 1 Feb 2012 at 2:29

Attachments:

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

Original comment by jun...@google.com on 9 Feb 2012 at 11:54