Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
If no resource provided, JID ends up with trailing slash what causes …
Browse files Browse the repository at this point in the history
…SASL authentication failure.
  • Loading branch information
Marko-M committed May 19, 2012
1 parent 716367f commit 0ffac80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/XmppPrebind.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ public function __construct($jabberHost, $boshUri, $resource, $useSsl = false, $
* @param string $password Password
*/
public function connect($username, $password) {
$this->jid = $username . '@' . $this->jabberHost . '/' . $this->resource;
$this->jid = $username . '@' . $this->jabberHost;
if($this->resource != null)
$this->jid .= '/' . $this->resource;
$this->password = $password;

$response = $this->sendInitialConnection();
Expand Down

0 comments on commit 0ffac80

Please sign in to comment.