X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fsession_driver.c;h=684a7e539122418695be981fcc4fa21a9692172e;hb=8256ed15c605db4f472f928dc67e9734947e0ab9;hp=285fa624d326cd47818ad348811f676aa272e7c3;hpb=6fb5570b15a5566b9b3dc8814c728ed9edf4d828;p=libsigrok.git diff --git a/src/session_driver.c b/src/session_driver.c index 285fa624..684a7e53 100644 --- a/src/session_driver.c +++ b/src/session_driver.c @@ -124,7 +124,17 @@ static gboolean stream_session_data(struct sr_dev_inst *sdi) } else { /* We got all the chunks, finish up. */ g_free(vdev->capturefile); - vdev->capturefile = NULL; + + /* If the file has logic channels, the initial value for + * capturefile is set by stream_session_data() - however only + * once. In order to not mess this mechanism up, we simulate + * this here if needed. For purely analog files, capturefile + * is not set. + */ + if (vdev->num_logic_channels) + vdev->capturefile = g_strdup("logic-1"); + else + vdev->capturefile = NULL; return FALSE; } }