Commit 3d6f9eb0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 23312944
...@@ -350,48 +350,6 @@ func pktDecodeM(pkb *pktBuf) (msg, error) { ...@@ -350,48 +350,6 @@ func pktDecodeM(pkb *pktBuf) (msg, error) {
} }
return m, nil return m, nil
/*
m.msgid, b, err = msgp.
//err := msgpack.DecodeStructAsArray(pkb.Payload(), &m)
var tpkt tuple
err := msgpack.Decode(pkb.Payload(), &tpkt)
if err != nil {
return m, err
}
if len(tpkt) != 4 {
return m, derrf("len(msg-tuple)=%d; expected 4", len(tpkt))
}
var ok bool
m.msgid, ok = tpkt[0].(int64) // XXX can be int8, uint8, int16, ...
if !ok {
return m, derrf("msgid: got %T; expected int", tpkt[0])
}
flags, ok := tpkt[1].(int64)
if !ok {
bflags, ok := tpkt[1].(bool)
if !ok {
return m, derrf("flags: got %T; expected int|bool", tpkt[1])
}
if bflags {
flags = 1
} // else: flags is already = 0
}
// XXX check flags are in range?
m.flags = msgFlags(flags)
m.method, ok = tpkt[2].(string)
if !ok {
return m, derrf(".%d: method: got %T; expected str", m.msgid, tpkt[2])
}
m.arg = tpkt[3] // XXX []interface{} -> tuple
return m, nil
*/
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment