]> sigrok.org Git - libsigrok.git/blobdiff - src/session_driver.c
De-init vdev->capturefile when done
[libsigrok.git] / src / session_driver.c
index 99d1c6cf3473e6362b3da6b2cd8b10fda48e23a6..3a4aaa7a00b1919b272b977c08effb202cbbe598 100644 (file)
@@ -31,7 +31,7 @@
 
 /* size of payloads sent across the session bus */
 /** @cond PRIVATE */
-#define CHUNKSIZE (512 * 1024)
+#define CHUNKSIZE (4 * 1024 * 1024)
 /** @endcond */
 
 SR_PRIV struct sr_dev_driver session_driver_info;
@@ -123,6 +123,8 @@ static gboolean stream_session_data(struct sr_dev_inst *sdi)
                                return TRUE;
                        } else {
                                /* We got all the chunks, finish up. */
+                               g_free(vdev->capturefile);
+                               vdev->capturefile = NULL;
                                return FALSE;
                        }
                }
@@ -142,7 +144,8 @@ static gboolean stream_session_data(struct sr_dev_inst *sdi)
                if (vdev->cur_analog_channel != 0) {
                        packet.type = SR_DF_ANALOG;
                        packet.payload = &analog;
-                       sr_analog_init(&analog, &encoding, &meaning, &spec, 0);
+                       /* TODO: Use proper 'digits' value for this device (and its modes). */
+                       sr_analog_init(&analog, &encoding, &meaning, &spec, 2);
                        analog.meaning->channels = g_slist_prepend(NULL,
                                        g_array_index(vdev->analog_channels,
                                                struct sr_channel *, vdev->cur_analog_channel - 1));