dissector_add_uint:
Legalize formerly improper use of the API when calling it with pattern value of 0 svn path=/trunk/; revision=44978
This commit is contained in:
parent
183cbe9af1
commit
ce7c79c0a3
|
@ -735,6 +735,11 @@ dissector_add_uint_sanity_check(const char *name, guint32 pattern, dissector_han
|
|||
void
|
||||
dissector_add_uint(const char *name, const guint32 pattern, dissector_handle_t handle)
|
||||
{
|
||||
/*
|
||||
* Legalize formerly improper use of the API when calling it with
|
||||
* a pattern value of 0
|
||||
*/
|
||||
if (pattern) {
|
||||
dissector_table_t sub_dissectors;
|
||||
dtbl_entry_t *dtbl_entry;
|
||||
|
||||
|
@ -786,6 +791,8 @@ dissector_add_uint(const char *name, const guint32 pattern, dissector_handle_t h
|
|||
g_hash_table_insert( sub_dissectors->hash_table,
|
||||
GUINT_TO_POINTER( pattern), (gpointer)dtbl_entry);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Now add it to the list of handles that could be used with this
|
||||
* table, because it *is* being used with this table.
|
||||
|
|
Loading…
Reference in New Issue