aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Hofrichter <joerg.hofrichter@ni.com>2020-03-05 11:01:08 +0100
committermichael-west <michael.west@ettus.com>2020-05-05 12:48:02 -0700
commitc1a606550943bcc148897af556b572855ffcabfd (patch)
tree8cbbe49211c82bd533e81feac7713e6e0c2f3dee
parentmpm: explicitly set max buffer size for msgpack unpacker (diff)
downloaduhd-c1a606550943bcc148897af556b572855ffcabfd.tar.xz
uhd-c1a606550943bcc148897af556b572855ffcabfd.zip
mpm: rpc_server: set correct default unpacker params for msgpack 0.6.1
msgpack 0.6.1 suggests new default parameters which ensures compatibility with the upcoming msgpack 1.0 release which will have breaking changes. The parameter changes are described in https://github.com/msgpack/msgpack-python/blob/v0.6.1/README.rst The default parameters for msgpack 1.0 will be: - packer: use_bin_type=True - unpacker: raw=False The packer use_bin_type=True option is already set in the client (mpm_shell.py) but the unpacker option raw=False needs to be set in the server (rpc_server.py) This change allows the usage of a patched version of python3-mprpc 0.1.17 which removes passing the encoding option to the Packer and Unpacker Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
-rw-r--r--mpm/python/usrp_mpm/rpc_server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py
index dbc30190a..df57e22c9 100644
--- a/mpm/python/usrp_mpm/rpc_server.py
+++ b/mpm/python/usrp_mpm/rpc_server.py
@@ -96,7 +96,7 @@ class MPMServer(RPCServer):
# first the commands need to be registered
super(MPMServer, self).__init__(
pack_params={'use_bin_type': True},
- unpack_params={'max_buffer_size': 50000000},
+ unpack_params={'max_buffer_size': 50000000, 'raw': False},
)
self._state.system_ready.value = True
self.log.info("RPC server ready!")
@@ -477,7 +477,7 @@ class MPMServer(RPCServer):
# changes in future versions of RPCServer may cause issues.
super(MPMServer, self).__init__(
pack_params={'use_bin_type': True},
- unpack_params={'max_buffer_size': 50000000},
+ unpack_params={'max_buffer_size': 50000000, 'raw': False},
)
def reset_mgr(self):