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.
g_cond_wait(&di->handled_all_samples_cond, &di->data_mutex);
g_mutex_unlock(&di->data_mutex);
+ if (di->want_wait_terminate)
+ return SRD_ERR_TERM_REQ;
return SRD_OK;
}
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