mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 12:23:46 -07:00
follow up from comment from mattn
s/found_anonymous/foundAnonymous/g
This commit is contained in:
@@ -297,15 +297,15 @@ func (c *Client) init(o *Options) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if o.User == "" && o.Password == "" {
|
if o.User == "" && o.Password == "" {
|
||||||
found_anonymous := false
|
foundAnonymous := false
|
||||||
for _, m := range f.Mechanisms.Mechanism {
|
for _, m := range f.Mechanisms.Mechanism {
|
||||||
if m == "ANONYMOUS" {
|
if m == "ANONYMOUS" {
|
||||||
fmt.Fprintf(c.conn, "<auth xmlns='%s' mechanism='ANONYMOUS' />\n", nsSASL)
|
fmt.Fprintf(c.conn, "<auth xmlns='%s' mechanism='ANONYMOUS' />\n", nsSASL)
|
||||||
found_anonymous = true
|
foundAnonymous = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !found_anonymous {
|
if !foundAnonymous {
|
||||||
return fmt.Errorf("ANONYMOUS authentication is not an option and username and password were not specified")
|
return fmt.Errorf("ANONYMOUS authentication is not an option and username and password were not specified")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user