VPP PAPI: Error in unserializer for non-array compound types.
A bug in the decoder of messages when there was a non-array compound type.
The typical result was an error message from the struct library:
"error:unpack_from requires a buffer of at least 4 bytes"
Change-Id: Ie30fec6fc39b9f4177b54fa4adc4fc69674f0e12
Signed-off-by: Ole Troan <ot@cisco.com>
diff --git a/src/vpp-api/python/vpp_papi.py b/src/vpp-api/python/vpp_papi.py
index 7b66c0f..67ac22a 100644
--- a/src/vpp-api/python/vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi.py
@@ -360,6 +360,7 @@
size += v[1].size
else:
if callable(v):
+ size = 0
(s, l) = v(self, False, buf, off, None)
res.append(l)
size += s