epan: Add argument to epan_init() to disable plugins
Change-Id: I8dc76e6bf8c4d5a3081cbdc1d47b88e857415d29 Reviewed-on: https://code.wireshark.org/review/29498 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
parent
6ab8d4607a
commit
ff1e16055f
|
@ -545,7 +545,7 @@ libwireshark.so.0 libwireshark0 #MINVER#
|
||||||
epan_get_user_comment@Base 1.99.2
|
epan_get_user_comment@Base 1.99.2
|
||||||
epan_get_version@Base 1.9.1
|
epan_get_version@Base 1.9.1
|
||||||
epan_get_version_number@Base 2.5.0
|
epan_get_version_number@Base 2.5.0
|
||||||
epan_init@Base 1.9.1
|
epan_init@Base 2.9.0
|
||||||
epan_load_settings@Base 2.3.0
|
epan_load_settings@Base 2.3.0
|
||||||
epan_memmem@Base 1.9.1
|
epan_memmem@Base 1.9.1
|
||||||
epan_new@Base 1.12.0~rc1
|
epan_new@Base 1.12.0~rc1
|
||||||
|
|
2
dftest.c
2
dftest.c
|
@ -77,7 +77,7 @@ main(int argc, char **argv)
|
||||||
"-g" flag, as the "-g" flag dumps a list of fields registered
|
"-g" flag, as the "-g" flag dumps a list of fields registered
|
||||||
by the dissectors, and we must do it before we read the preferences,
|
by the dissectors, and we must do it before we read the preferences,
|
||||||
in case any dissectors register preferences. */
|
in case any dissectors register preferences. */
|
||||||
if (!epan_init(NULL, NULL))
|
if (!epan_init(NULL, NULL, FALSE))
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
/* set the c-language locale to the native environment. */
|
/* set the c-language locale to the native environment. */
|
||||||
|
|
|
@ -176,7 +176,7 @@ void epan_register_plugin(const epan_plugin *plug)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
epan_init(register_cb cb, gpointer client_data)
|
epan_init(register_cb cb, gpointer client_data, gboolean load_plugins)
|
||||||
{
|
{
|
||||||
volatile gboolean status = TRUE;
|
volatile gboolean status = TRUE;
|
||||||
|
|
||||||
|
@ -198,9 +198,11 @@ epan_init(register_cb cb, gpointer client_data)
|
||||||
|
|
||||||
except_init();
|
except_init();
|
||||||
|
|
||||||
|
if (load_plugins) {
|
||||||
#ifdef HAVE_PLUGINS
|
#ifdef HAVE_PLUGINS
|
||||||
libwireshark_plugins = plugins_init(WS_PLUGIN_EPAN);
|
libwireshark_plugins = plugins_init(WS_PLUGIN_EPAN);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* initialize libgcrypt (beware, it won't be thread-safe) */
|
/* initialize libgcrypt (beware, it won't be thread-safe) */
|
||||||
gcry_check_version(NULL);
|
gcry_check_version(NULL);
|
||||||
|
|
|
@ -100,7 +100,7 @@ Ref2 for further edits - delete when done
|
||||||
* Returns TRUE on success, FALSE on failure.
|
* Returns TRUE on success, FALSE on failure.
|
||||||
*/
|
*/
|
||||||
WS_DLL_PUBLIC
|
WS_DLL_PUBLIC
|
||||||
gboolean epan_init(register_cb cb, void *client_data);
|
gboolean epan_init(register_cb cb, void *client_data, gboolean load_plugins);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load all settings, from the current profile, that affect epan.
|
* Load all settings, from the current profile, that affect epan.
|
||||||
|
|
|
@ -519,7 +519,7 @@ main(int argc, char *argv[])
|
||||||
"-G" flag, as the "-G" flag dumps information registered by the
|
"-G" flag, as the "-G" flag dumps information registered by the
|
||||||
dissectors, and we must do it before we read the preferences, in
|
dissectors, and we must do it before we read the preferences, in
|
||||||
case any dissectors register preferences. */
|
case any dissectors register preferences. */
|
||||||
if (!epan_init(NULL, NULL)) {
|
if (!epan_init(NULL, NULL, TRUE)) {
|
||||||
ret = INIT_ERROR;
|
ret = INIT_ERROR;
|
||||||
goto clean_exit;
|
goto clean_exit;
|
||||||
}
|
}
|
||||||
|
|
2
sharkd.c
2
sharkd.c
|
@ -167,7 +167,7 @@ main(int argc, char *argv[])
|
||||||
"-G" flag, as the "-G" flag dumps information registered by the
|
"-G" flag, as the "-G" flag dumps information registered by the
|
||||||
dissectors, and we must do it before we read the preferences, in
|
dissectors, and we must do it before we read the preferences, in
|
||||||
case any dissectors register preferences. */
|
case any dissectors register preferences. */
|
||||||
if (!epan_init(NULL, NULL)) {
|
if (!epan_init(NULL, NULL, TRUE)) {
|
||||||
ret = EPAN_INIT_FAIL;
|
ret = EPAN_INIT_FAIL;
|
||||||
goto clean_exit;
|
goto clean_exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -490,7 +490,7 @@ main(int argc, char *argv[])
|
||||||
"-G" flag, as the "-G" flag dumps information registered by the
|
"-G" flag, as the "-G" flag dumps information registered by the
|
||||||
dissectors, and we must do it before we read the preferences, in
|
dissectors, and we must do it before we read the preferences, in
|
||||||
case any dissectors register preferences. */
|
case any dissectors register preferences. */
|
||||||
if (!epan_init(NULL, NULL)) {
|
if (!epan_init(NULL, NULL, TRUE)) {
|
||||||
exit_status = INIT_ERROR;
|
exit_status = INIT_ERROR;
|
||||||
goto clean_exit;
|
goto clean_exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,7 +269,7 @@ fuzz_init(int argc _U_, char **argv)
|
||||||
"-G" flag, as the "-G" flag dumps information registered by the
|
"-G" flag, as the "-G" flag dumps information registered by the
|
||||||
dissectors, and we must do it before we read the preferences, in
|
dissectors, and we must do it before we read the preferences, in
|
||||||
case any dissectors register preferences. */
|
case any dissectors register preferences. */
|
||||||
if (!epan_init(NULL, NULL))
|
if (!epan_init(NULL, NULL, FALSE))
|
||||||
{
|
{
|
||||||
ret = EPAN_INIT_FAIL;
|
ret = EPAN_INIT_FAIL;
|
||||||
goto clean_exit;
|
goto clean_exit;
|
||||||
|
|
2
tshark.c
2
tshark.c
|
@ -923,7 +923,7 @@ main(int argc, char *argv[])
|
||||||
"-G" flag, as the "-G" flag dumps information registered by the
|
"-G" flag, as the "-G" flag dumps information registered by the
|
||||||
dissectors, and we must do it before we read the preferences, in
|
dissectors, and we must do it before we read the preferences, in
|
||||||
case any dissectors register preferences. */
|
case any dissectors register preferences. */
|
||||||
if (!epan_init(NULL, NULL)) {
|
if (!epan_init(NULL, NULL, TRUE)) {
|
||||||
exit_status = INIT_FAILED;
|
exit_status = INIT_FAILED;
|
||||||
goto clean_exit;
|
goto clean_exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -618,7 +618,7 @@ int main(int argc, char *qt_argv[])
|
||||||
"-G" flag, as the "-G" flag dumps information registered by the
|
"-G" flag, as the "-G" flag dumps information registered by the
|
||||||
dissectors, and we must do it before we read the preferences, in
|
dissectors, and we must do it before we read the preferences, in
|
||||||
case any dissectors register preferences. */
|
case any dissectors register preferences. */
|
||||||
if (!epan_init(splash_update, NULL)) {
|
if (!epan_init(splash_update, NULL, TRUE)) {
|
||||||
SimpleDialog::displayQueuedMessages(main_w);
|
SimpleDialog::displayQueuedMessages(main_w);
|
||||||
ret_val = INIT_FAILED;
|
ret_val = INIT_FAILED;
|
||||||
goto clean_exit;
|
goto clean_exit;
|
||||||
|
|
Loading…
Reference in New Issue