From 3f3c4614b551855d7cf56e83ec7fb883592050ab Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Mon, 23 Apr 2018 20:42:54 +0200 Subject: instance: return SRD_ERR_TERM_REQ when execution shall terminate The previous implementation internally noticed the "want terminate" request, and skipped decoder execution to faster get to the end of the input stream. But an OK return code was provided in that code path, and more input data was sent by applications (sometimes for many seconds or few minutes). Do return a new SRD_ERR_TERM_REQ error code, such that applications can tell failed execution from requested termination. --- libsigrokdecode.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libsigrokdecode.h') diff --git a/libsigrokdecode.h b/libsigrokdecode.h index ee610c9..a26bce9 100644 --- a/libsigrokdecode.h +++ b/libsigrokdecode.h @@ -71,6 +71,7 @@ enum srd_error_code { SRD_ERR_BUG = -4, /**< Errors hinting at internal bugs */ SRD_ERR_PYTHON = -5, /**< Python C API error */ SRD_ERR_DECODERS_DIR = -6, /**< Protocol decoder path invalid */ + SRD_ERR_TERM_REQ = -7, /**< Termination requested */ /* * Note: When adding entries here, don't forget to also update the -- cgit v1.2.3-70-g09d2