diff options
author | Wim <wim@42.be> | 2017-01-28 22:45:32 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-01-28 22:45:32 +0100 |
commit | 79e6c9fa6cfca4bfe8913fd891fd9b12bd5bb505 (patch) | |
tree | bbcbbcf10127a0f5d030345b4beabbc9df7713d2 /vendor/github.com/mattn | |
parent | 1426ddec5f2250024c80765017b899e847bf2996 (diff) | |
download | matterbridge-msglm-79e6c9fa6cfca4bfe8913fd891fd9b12bd5bb505.tar.gz matterbridge-msglm-79e6c9fa6cfca4bfe8913fd891fd9b12bd5bb505.tar.bz2 matterbridge-msglm-79e6c9fa6cfca4bfe8913fd891fd9b12bd5bb505.zip |
Update vendor
Diffstat (limited to 'vendor/github.com/mattn')
-rw-r--r-- | vendor/github.com/mattn/go-xmpp/xmpp.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vendor/github.com/mattn/go-xmpp/xmpp.go b/vendor/github.com/mattn/go-xmpp/xmpp.go index e20b57a8..11424f82 100644 --- a/vendor/github.com/mattn/go-xmpp/xmpp.go +++ b/vendor/github.com/mattn/go-xmpp/xmpp.go @@ -404,9 +404,13 @@ func (c *Client) init(o *Options) error { switch v := val.(type) { case *saslSuccess: case *saslFailure: - // v.Any is type of sub-element in failure, - // which gives a description of what failed. - return errors.New("auth failure: " + v.Any.Local) + errorMessage := v.Text + if errorMessage == "" { + // v.Any is type of sub-element in failure, + // which gives a description of what failed if there was no text element + errorMessage = v.Any.Local + } + return errors.New("auth failure: " + errorMessage) default: return errors.New("expected <success> or <failure>, got <" + name.Local + "> in " + name.Space) } @@ -699,6 +703,7 @@ type saslSuccess struct { type saslFailure struct { XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-sasl failure"` Any xml.Name `xml:",any"` + Text string `xml:"text"` } // RFC 3920 C.5 Resource binding name space |