]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
fabrics: Pass discovery ctrl to __discover()
authorDaniel Wagner <dwagner@suse.de>
Thu, 26 Jan 2023 13:43:16 +0000 (14:43 +0100)
committerDaniel Wagner <dwagner@suse.de>
Thu, 26 Jan 2023 13:43:16 +0000 (14:43 +0100)
We should pass the discovery controller down to __discover and not the iterator.

Fixes: 952aa044b331 ("fabrics: Honor JSON config file in connect-all command")
Signed-off-by: Daniel Wagner <dwagner@suse.de>
fabrics.c

index f5f098b8da15ba65f1e20fecd6d54962c4c1a8ce..a07f065fed0ce75d937f67beab37a18bf08888de 100644 (file)
--- a/fabrics.c
+++ b/fabrics.c
@@ -755,7 +755,7 @@ static int discover_from_json_config_file(nvme_root_t r, nvme_host_t h,
                        if (!force) {
                                cn = lookup_discovery_ctrl(r, &trcfg);
                                if (cn) {
-                                       __discover(c, &cfg, raw, connect,
+                                       __discover(cn, &cfg, raw, connect,
                                                   true, flags);
                                        continue;
                                }