53 |
53 |
54 function stream_callbacks.error(stream, e, stanza) |
54 function stream_callbacks.error(stream, e, stanza) |
55 if stream:event(e, stanza) == nil then |
55 if stream:event(e, stanza) == nil then |
56 local err = stanza:get_child(nil, "urn:ietf:params:xml:ns:xmpp-streams"); |
56 local err = stanza:get_child(nil, "urn:ietf:params:xml:ns:xmpp-streams"); |
57 local text = stanza:get_child_text("text", "urn:ietf:params:xml:ns:xmpp-streams"); |
57 local text = stanza:get_child_text("text", "urn:ietf:params:xml:ns:xmpp-streams"); |
58 error(err.name..(text and ": "..text)); |
58 error(err.name..(text and ": "..text or "")); |
59 end |
59 end |
60 end |
60 end |
61 |
61 |
62 function stream:reset() |
62 function stream:reset() |
63 if self.stream then |
63 if self.stream then |