]> sigrok.org Git - libsigrok.git/commitdiff
scpi: Populate sdi->connection_id
authorSoeren Apel <redacted>
Thu, 16 Oct 2014 20:41:57 +0000 (22:41 +0200)
committerBert Vermeulen <redacted>
Fri, 17 Oct 2014 01:02:52 +0000 (03:02 +0200)
src/scpi/scpi.c

index 645062152622682d77c095de1d90da496caa3be3..bb7099786d2c21b9bc2c8170bc47cf45fb9dc8d2 100644 (file)
@@ -148,8 +148,10 @@ SR_PRIV GSList *sr_scpi_scan(struct drv_context *drvc, GSList *options,
                for (l = resources; l; l = l->next) {
                        res = g_strsplit(l->data, ":", 2);
                        if (res[0] && (sdi = sr_scpi_scan_resource(drvc, res[0],
-                                      serialcomm ? serialcomm : res[1], probe_device)))
+                                      serialcomm ? serialcomm : res[1], probe_device))) {
                                devices = g_slist_append(devices, sdi);
+                               sdi->connection_id = g_strdup(l->data);
+                       }
                        g_strfreev(res);
                }
                g_slist_free_full(resources, g_free);