return status;
}
-static int format_match(GHashTable *metadata)
+static int format_match(GHashTable *metadata, unsigned int *confidence)
{
GString *buf, *tmpbuf;
gboolean status;
g_free(name);
g_free(contents);
- return status ? SR_OK : SR_ERR;
+ if (!status)
+ return SR_ERR;
+ *confidence = 1;
+
+ return SR_OK;
}
/* Send all accumulated bytes from inc->buffer. */
inc->prev_timestamp = inc->skip;
} else if (timestamp == inc->prev_timestamp) {
/* Ignore repeated timestamps (e.g. sigrok outputs these) */
+ } else if (timestamp < inc->prev_timestamp) {
+ sr_err("Invalid timestamp: %" PRIu64 " (smaller than previous timestamp).", timestamp);
+ inc->skip_until_end = TRUE;
+ break;
} else {
if (inc->compress != 0 && timestamp - inc->prev_timestamp > inc->compress) {
/* Compress long idle periods */