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:
parent
b04a532fa3
commit
c958ab59d6
|
@ -133,17 +133,6 @@ struct context {
|
||||||
size_t line_number;
|
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)
|
static void strip_comment(char *buf, const GString *prefix)
|
||||||
{
|
{
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
@ -817,9 +806,7 @@ SR_PRIV struct sr_input_module input_csv = {
|
||||||
.name = "CSV",
|
.name = "CSV",
|
||||||
.desc = "Comma-separated values",
|
.desc = "Comma-separated values",
|
||||||
.exts = (const char*[]){"csv", NULL},
|
.exts = (const char*[]){"csv", NULL},
|
||||||
.metadata = { SR_INPUT_META_MIMETYPE },
|
|
||||||
.options = get_options,
|
.options = get_options,
|
||||||
.format_match = format_match,
|
|
||||||
.init = init,
|
.init = init,
|
||||||
.receive = receive,
|
.receive = receive,
|
||||||
.end = end,
|
.end = end,
|
||||||
|
|
Loading…
Reference in New Issue