rpc: fix removing a listener with an empty trsvcid
If trsvcid is not set in the nvmf_subsystem_remove_listener call, rpc client treats it as 'None' and sends "null" to the application, which causes decode failure in SPDK. Trsvcid is described as optional and should be treated this way. For such a listener removal call with an empty trsvcid, "" should be sent as trsvcid instead of "null" in the json request. Signed-off-by: Blachut, Bartosz <bartosz.blachut@intel.com> Change-Id: Ic26907c22a2600c9618354ce8ff63e93e00aec09 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9659 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
ed8be4ad05
commit
dc82055029
@ -291,8 +291,10 @@ def nvmf_subsystem_remove_listener(
|
||||
True or False
|
||||
"""
|
||||
listen_address = {'trtype': trtype,
|
||||
'traddr': traddr,
|
||||
'trsvcid': trsvcid}
|
||||
'traddr': traddr}
|
||||
|
||||
if trsvcid:
|
||||
listen_address['trsvcid'] = trsvcid
|
||||
|
||||
if adrfam:
|
||||
listen_address['adrfam'] = adrfam
|
||||
|
Loading…
Reference in New Issue
Block a user