public function wait_for_bind_response($event, $args)
{
switch ($event) {
case "stanza_cb":
$stanza = $args[0];
// TODO: chk on id
if ($stanza->name == 'iq' && $stanza->attrs['type'] == 'result' && ($jid = $stanza->exists('bind', XMPP::NS_BIND)->exists('jid'))) {
$this->full_jid = new XMPPJid($jid->text);
$this->send_session_pkt();
return "wait_for_session_response";
} else {
// FIXME:
}
break;
default:
JAXLLogger::debug("uncatched {$event}");
return $this->handle_other($event, $args);
//return array("wait_for_bind_response", 0);
break;
}
}