From: Gerhard Sittig Date: Mon, 23 Apr 2018 18:40:28 +0000 (+0200) Subject: instance: drop an unneeded "want wait() to terminate" reset assignment X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f8d25d1f7256a4515b7fb972e3302be2138c8ee1;p=libsigrokdecode.git instance: drop an unneeded "want wait() to terminate" reset assignment It's uncertain why srd_inst_decode() which internally gets called by the public srd_session_send() routine used to clear the want_wait_terminate flag. This should be cleared upon decoder instance creation and state reset, gets raised upon termination request, but shall not get cleared in other spots, especially not upon the availability of new input data while the stream shall be considered in the "about to terminate, skip all subsequent execution" state. --- diff --git a/instance.c b/instance.c index 6fbdc01..e470bd1 100644 --- a/instance.c +++ b/instance.c @@ -1255,7 +1255,6 @@ SRD_PRIV int srd_inst_decode(struct srd_decoder_inst *di, di->inbuflen = inbuflen; di->got_new_samples = TRUE; di->handled_all_samples = FALSE; - di->want_wait_terminate = FALSE; /* Signal the thread that we have new data. */ g_cond_signal(&di->got_new_samples_cond);