]> sigrok.org Git - libsigrok.git/commitdiff
Don't mention non-logic probes in session file metadata.
authorBert Vermeulen <redacted>
Tue, 21 Jan 2014 17:16:52 +0000 (18:16 +0100)
committerBert Vermeulen <redacted>
Tue, 21 Jan 2014 17:16:52 +0000 (18:16 +0100)
They don't get saved anyway, and are very confusing to clients.

session_file.c

index 6a28a17bc5143374fbda4ac58f24f0757f784752..545abcfdbd4fcc198bf933aeb2bf113baee54471 100644 (file)
@@ -253,11 +253,14 @@ SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi,
        cnt = 0;
        for (l = sdi->probes; l; l = l->next) {
                probe = l->data;
-               if (probe->enabled) {
-                       if (probe->name)
-                               /* Just borrowing the ptr. */
-                               probe_names[cnt++] = probe->name;
-               }
+               if (probe->type != SR_PROBE_LOGIC)
+                       continue;
+               if (probe->enabled != TRUE)
+                       continue;
+               if (!probe->name)
+                       continue;
+               /* Just borrowing the ptr. */
+               probe_names[cnt++] = probe->name;
        }
 
        if ((ret = sr_session_save_init(filename, samplerate, probe_names)) != SR_OK)