forked from jshiffer/go-xmpp
Merge pull request #3 from intellectronica/master
Update to make XML unmarshaling work.
This commit is contained in:
commit
19a383f5b4
12
xmpp.go
12
xmpp.go
@ -203,7 +203,7 @@ func (c *Client) init(user, passwd string) os.Error {
|
|||||||
if err = c.p.Unmarshal(&iq, nil); err != nil {
|
if err = c.p.Unmarshal(&iq, nil); err != nil {
|
||||||
return os.ErrorString("unmarshal <iq>: " + err.String())
|
return os.ErrorString("unmarshal <iq>: " + err.String())
|
||||||
}
|
}
|
||||||
if iq.Bind == nil {
|
if &iq.Bind == nil {
|
||||||
return os.ErrorString("<iq> result missing <bind>")
|
return os.ErrorString("<iq> result missing <bind>")
|
||||||
}
|
}
|
||||||
c.jid = iq.Bind.Jid // our local id
|
c.jid = iq.Bind.Jid // our local id
|
||||||
@ -246,9 +246,9 @@ func (c *Client) Send(chat Chat) {
|
|||||||
|
|
||||||
type streamFeatures struct {
|
type streamFeatures struct {
|
||||||
XMLName xml.Name "http://etherx.jabber.org/streams features"
|
XMLName xml.Name "http://etherx.jabber.org/streams features"
|
||||||
StartTLS *tlsStartTLS
|
StartTLS tlsStartTLS
|
||||||
Mechanisms *saslMechanisms
|
Mechanisms saslMechanisms
|
||||||
Bind *bindBind
|
Bind bindBind
|
||||||
Session bool
|
Session bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,8 +351,8 @@ type clientIQ struct { // info/query
|
|||||||
Id string "attr"
|
Id string "attr"
|
||||||
To string "attr"
|
To string "attr"
|
||||||
Type string "attr" // error, get, result, set
|
Type string "attr" // error, get, result, set
|
||||||
Error *clientError
|
Error clientError
|
||||||
Bind *bindBind
|
Bind bindBind
|
||||||
}
|
}
|
||||||
|
|
||||||
type clientError struct {
|
type clientError struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user