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.
This commit is contained in:
Bert Vermeulen 2015-10-30 16:38:54 +01:00 committed by Uwe Hermann
parent b04a532fa3
commit c958ab59d6
1 changed files with 0 additions and 13 deletions

View File

@ -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,