forked from jshiffer/go-xmpp
follow up from comment from mattn
s/found_anonymous/foundAnonymous/g
This commit is contained in:
parent
a1c1069091
commit
6c1f4b23f8
6
xmpp.go
6
xmpp.go
@ -297,15 +297,15 @@ func (c *Client) init(o *Options) error {
|
||||
}
|
||||
|
||||
if o.User == "" && o.Password == "" {
|
||||
found_anonymous := false
|
||||
foundAnonymous := false
|
||||
for _, m := range f.Mechanisms.Mechanism {
|
||||
if m == "ANONYMOUS" {
|
||||
fmt.Fprintf(c.conn, "<auth xmlns='%s' mechanism='ANONYMOUS' />\n", nsSASL)
|
||||
found_anonymous = true
|
||||
foundAnonymous = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found_anonymous {
|
||||
if !foundAnonymous {
|
||||
return fmt.Errorf("ANONYMOUS authentication is not an option and username and password were not specified")
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user