Software / code / verse
Comparison
client.lua @ 344:ea668c47e1bd
verse.client: Fix stream error error
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 14 Jun 2013 23:25:54 +0200 |
| parent | 336:658c62c9ecc4 |
| child | 364:69fc23b44819 |
comparison
equal
deleted
inserted
replaced
| 343:0d8fb22404c3 | 344:ea668c47e1bd |
|---|---|
| 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 |