GTK: fix infinite loop at startup

Add the tap timer after validating all preferences, otherwise a zero
timeout will result in an infinite loop, visible by a splash screen that
never goes away.

Change-Id: I180a123ac2cc7774356e17f1f1d4dcaf38f252b4
Reviewed-on: https://code.wireshark.org/review/13156
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Peter Wu 2016-01-09 19:52:19 +01:00 committed by Anders Broman
parent 174dc98892
commit 33f8f48bc0
1 changed files with 3 additions and 3 deletions

View File

@ -2606,9 +2606,6 @@ main(int argc, char *argv[])
* https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9e277ae6154fd04bf6a0a34ec5655a73e5a736a3
*/
/* this is to keep tap extensions updating once every 3 seconds */
tap_update_timer_id = g_timeout_add(prefs_p->tap_update_interval, tap_update_cb, NULL);
splash_update(RA_CONFIGURATION, NULL, (gpointer)splash_win);
proto_help_init();
cap_file_init(&cfile);
@ -3190,6 +3187,9 @@ main(int argc, char *argv[])
g_timeout_add(info_update_freq, resolv_update_cb, NULL);
/* this is to keep tap extensions updating once every 3 seconds */
tap_update_timer_id = g_timeout_add(prefs_p->tap_update_interval, tap_update_cb, NULL);
/* If we were given the name of a capture file, read it in now;
we defer it until now, so that, if we can't open it, and pop
up an alert box, the alert box is more likely to come up on