* BOSH and Stream Handling Fixes

git-svn-id: svn://netflint.net/xmpphp@57 ef36c318-a008-4979-b6e8-6b496270793b
This commit is contained in:
fritzy
2008-09-21 21:30:00 +00:00
parent f1b4f5b175
commit 02a3f3dc5d
3 changed files with 18 additions and 13 deletions

View File

@@ -240,7 +240,7 @@ class XMPPHP_XMPP extends XMPPHP_XMLStream {
protected function features_handler($xml) {
if($xml->hasSub('starttls') and $this->use_encryption) {
$this->send("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'><required /></starttls>");
} elseif($xml->hasSub('bind')) {
} elseif($xml->hasSub('bind') and $this->authed) {
$id = $this->getId();
$this->addIdHandler($id, 'resource_bind_handler');
$this->send("<iq xmlns=\"jabber:client\" type=\"set\" id=\"$id\"><bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\"><resource>{$this->resource}</resource></bind></iq>");