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 == "" {
|
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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user