xmpp/xmpp.go
changeset 157 eadf15a06ff5
parent 153 bbd4166df95d
child 158 2d948fcbb5d7
equal deleted inserted replaced
156:520ccb3e05d4 157:eadf15a06ff5
   219 	// Wait until resource binding is complete.
   219 	// Wait until resource binding is complete.
   220 	if err := cl.statmgr.awaitStatus(StatusBound); err != nil {
   220 	if err := cl.statmgr.awaitStatus(StatusBound); err != nil {
   221 		return nil, err
   221 		return nil, err
   222 	}
   222 	}
   223 
   223 
       
   224 	// Forget about the password, for paranoia's sake.
       
   225 	cl.password = ""
       
   226 
   224 	// Initialize the session.
   227 	// Initialize the session.
   225 	id := NextId()
   228 	id := NextId()
   226 	iq := &Iq{Header: Header{To: cl.Jid.Domain, Id: id, Type: "set",
   229 	iq := &Iq{Header: Header{To: cl.Jid.Domain, Id: id, Type: "set",
   227 		Nested: []interface{}{Generic{XMLName: xml.Name{Space: NsSession, Local: "session"}}}}}
   230 		Nested: []interface{}{Generic{XMLName: xml.Name{Space: NsSession, Local: "session"}}}}}
   228 	ch := make(chan error)
   231 	ch := make(chan error)