Commit a23fa64c authored by Paul Luse's avatar Paul Luse Committed by Daniel Verkamp
Browse files

blobcli: fix error path for non-CLI mode



This same code with the same test doesn't fail with the rest of
17.10 but was a real problem in script mode on error would call
spdk_app_stop() twice. In the unload_bs() path if there's no
bs loaded script mode will exit through another code path so
don't want to call spdk_app_stop() here.

Change-Id: I0175350c7e1a54b4b304b8b184d08076e6e2e0f0
Signed-off-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/387808


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent bb28be8a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -250,8 +250,9 @@ unload_bs(struct cli_context_t *cli_context, char *msg, int bserrno)
			cli_context->channel = NULL;
		}
		spdk_bs_unload(cli_context->bs, unload_complete, cli_context);
	} else {
	} else if (cli_context->cli_mode != CLI_MODE_SCRIPT) {
		spdk_app_stop(bserrno);

	}
}