forked from sigrokproject/sigrok-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input: unbreak automatic format detection when reading from stdin
The combination of reading from stdin and automatic file format match could result in the execution of an input module's .end() callback before its .receive() ever executed. Which then suffers from an sdi which is not yet ready, and no data was sent to the sigrok session. Fix that. Unfortunately the input module's accumulator is hidden behind the libsigrok API. That's why applications cannot defer the forwarding of the first data chunk from the input file. Insert a .receive() call with a zero length instead before more file content is consumed. All existing input modules are prepared to handle this call sequence.
- Loading branch information
Showing
1 changed file
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters