diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-10-27 17:41:23 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-10-28 00:44:26 +0000 |
commit | c7e42be2e5baf0a5f351b126cdac5c3d6d9241a0 (patch) | |
tree | f0e307a13ade2b261f181b9a58865a17aea00a02 /epan/epan.h | |
parent | 2831d391eff4a08f515effe2f1b20d659e1046ee (diff) | |
download | wireshark-c7e42be2e5baf0a5f351b126cdac5c3d6d9241a0.tar.gz |
Catch REPORT_DISSECTOR_BUG() calls in dissector registration routines.
Have epan_init() return a success/failure Boolean indication. Catch
exceptions when calling the dissector registration routines and, if we
get one, report the error and return a failure indication.
If epan_init() fails, quit, but first make sure the reported error is
displayed.
Change-Id: I0300cbb1f66a5644f857a205235124909d684c50
Reviewed-on: https://code.wireshark.org/review/11340
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/epan.h')
-rw-r--r-- | epan/epan.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/epan/epan.h b/epan/epan.h index 6c17964b65..41bf18e437 100644 --- a/epan/epan.h +++ b/epan/epan.h @@ -89,11 +89,17 @@ Ref2 for further edits - delete when done */ WS_DLL_PUBLIC void epan_register_plugin_types(void); -/** init the whole epan module, this is used to be called only once in a program */ +/** + * Init the whole epan module. + * + * Must be called only once in a program. + * + * Returns TRUE on success, FALSE on failure. + */ WS_DLL_PUBLIC -void epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_data), - void (*register_all_handoffs_func)(register_cb cb, gpointer client_data), - register_cb cb, void *client_data); +gboolean epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_data), + void (*register_all_handoffs_func)(register_cb cb, gpointer client_data), + register_cb cb, void *client_data); /** cleanup the whole epan module, this is used to be called only once in a program */ WS_DLL_PUBLIC |