Guarantee that open routines are initialized

Open routines need to be initialized before try to open
capture or add/remove routine.

Change-Id: Ic3b88eef947ebd4a3dd2edf8120bb6bd8aec0765
Reviewed-on: https://code.wireshark.org/review/1874
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Michal Labedzki 2014-05-28 17:47:41 +02:00 committed by Evan Huus
parent 88581a68e7
commit c6d175ef67
2 changed files with 2 additions and 2 deletions

View File

@ -204,8 +204,6 @@ int main(int argc, char *argv[])
exit(1);
}
init_open_routines();
/* Open infile */
/* TODO: if reordercap is ever changed to give the user a choice of which
open_routine reader to use, then the following needs to change. */

View File

@ -683,6 +683,8 @@ wtap* wtap_open_offline(const char *filename, unsigned int type, int *err, char
gboolean use_stdin = FALSE;
gchar *extension;
init_open_routines();
/* open standard input if filename is '-' */
if (strcmp(filename, "-") == 0)
use_stdin = TRUE;