mirror of https://bitbucket.org/ausocean/av.git
Removed Reset and PropReset which are not required.
This commit is contained in:
parent
1fe1849393
commit
f7de9526c8
|
@ -391,16 +391,6 @@ func PropDecode(prop *Property, data []byte, decodeName bool) (int, error) {
|
|||
return sz - len(data), nil
|
||||
}
|
||||
|
||||
func PropReset(prop *Property) {
|
||||
if prop.dtype == TypeObject || prop.dtype == typeEcmaArray ||
|
||||
prop.dtype == typeStrictArray {
|
||||
Reset(&prop.obj)
|
||||
} else {
|
||||
prop.str = ""
|
||||
}
|
||||
prop.dtype = typeInvalid
|
||||
}
|
||||
|
||||
// Encode serializes an Object into its AMF representation.
|
||||
func Encode(obj *Object, dst []byte) ([]byte, error) {
|
||||
if len(dst) < 5 {
|
||||
|
@ -505,10 +495,3 @@ func GetProp(obj *Object, name string, idx int32) *Property {
|
|||
}
|
||||
return &Property{}
|
||||
}
|
||||
|
||||
func Reset(obj *Object) {
|
||||
for i := range obj.Props {
|
||||
PropReset(&obj.Props[i])
|
||||
}
|
||||
*obj = Object{}
|
||||
}
|
||||
|
|
|
@ -702,7 +702,7 @@ func handleInvoke(s *Session, body []byte) error {
|
|||
}
|
||||
if methodInvoked == "" {
|
||||
s.log(WarnLevel, pkg+"received result without matching request", "id", txn)
|
||||
goto leave
|
||||
return nil
|
||||
}
|
||||
s.log(DebugLevel, pkg+"received result for "+methodInvoked)
|
||||
|
||||
|
@ -806,8 +806,6 @@ func handleInvoke(s *Session, body []byte) error {
|
|||
default:
|
||||
s.log(FatalLevel, pkg+"unknown method "+meth)
|
||||
}
|
||||
leave:
|
||||
amf.Reset(&obj)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue