]> sigrok.org Git - sigrok-cli.git/commitdiff
session: optionally send EOF to decoder session
authorGerhard Sittig <redacted>
Sun, 26 Dec 2021 06:52:59 +0000 (07:52 +0100)
committerGerhard Sittig <redacted>
Sun, 26 Dec 2021 12:56:03 +0000 (13:56 +0100)
Communicate EOF to the decoder session (when the library supports it).

session.c

index 0e426cdd1957268102797f37f0c95a5d981de7fb..5f5ca8f01f7030cef93874d04047f0ee9692f75b 100644 (file)
--- a/session.c
+++ b/session.c
@@ -485,6 +485,10 @@ void datafeed_in(const struct sr_dev_inst *sdi,
        if (packet->type == SR_DF_END) {
                g_debug("cli: Received SR_DF_END.");
 
+#if defined HAVE_SRD_SESSION_SEND_EOF && HAVE_SRD_SESSION_SEND_EOF
+               (void)srd_session_send_eof(srd_sess);
+#endif
+
                if (do_props) {
                        props_dump_details(df_arg);
                        props_cleanup(df_arg);