rpc: prefer command-line address over config file

Change the command-line -r option to take precedence over the [Rpc]
section of the configuration file.

Change-Id: I6f043bafaa8b0ede10dd8a483ca77ad34ff7639a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390329
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Daniel Verkamp 2017-12-04 14:34:28 -07:00 committed by Jim Harris
parent c24c1cce4b
commit 6cce3666ea

View File

@ -69,7 +69,7 @@ spdk_rpc_initialize(const char *listen_addr)
{ {
int rc; int rc;
if (rpc_get_listen_addr() != NULL) { if (listen_addr == NULL) {
listen_addr = rpc_get_listen_addr(); listen_addr = rpc_get_listen_addr();
} }