be a bit more verbose, if the name given to register_dissector_table() is not unique (e.g. because of a buggy/duplicated plugin)

svn path=/trunk/; revision=23042
This commit is contained in:
Ulf Lamping 2007-10-02 05:07:13 +00:00
parent c3131594a8
commit a8b2f589e9
1 changed files with 3 additions and 1 deletions

View File

@ -1386,7 +1386,9 @@ register_dissector_table(const char *name, const char *ui_name, ftenum_t type,
}
/* Make sure the registration is unique */
g_assert(!g_hash_table_lookup( dissector_tables, name ));
if(g_hash_table_lookup( dissector_tables, name )) {
g_error("The filter name %s (%s) is already registered - do you use a buggy plugin?", name, ui_name);
}
/* Create and register the dissector table for this name; returns */
/* a pointer to the dissector table. */