From: Bert Vermeulen Date: Fri, 30 Oct 2015 15:38:54 +0000 (+0100) Subject: input/csv: Remove obsolete mimetype format match. X-Git-Tag: libsigrok-0.4.0~137 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c958ab59d60992504046d73c7bf41db4fd7747fd;p=libsigrok.git input/csv: Remove obsolete mimetype format match. Mimetypes never worked, and in any case this caused a segfault due to a missing SR_INPUT_META_REQUIRED flag. This fixes bug #681. --- diff --git a/src/input/csv.c b/src/input/csv.c index 063145a0..cc451bac 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -133,17 +133,6 @@ struct context { size_t line_number; }; -static int format_match(GHashTable *metadata) -{ - char *buf; - - buf = g_hash_table_lookup(metadata, GINT_TO_POINTER(SR_INPUT_META_MIMETYPE)); - if (!strcmp(buf, "text/csv")) - return SR_OK; - - return SR_ERR; -} - static void strip_comment(char *buf, const GString *prefix) { char *ptr; @@ -817,9 +806,7 @@ SR_PRIV struct sr_input_module input_csv = { .name = "CSV", .desc = "Comma-separated values", .exts = (const char*[]){"csv", NULL}, - .metadata = { SR_INPUT_META_MIMETYPE }, .options = get_options, - .format_match = format_match, .init = init, .receive = receive, .end = end,