Sort dump_open_table_base[] in the right order.
authorGuy Harris <guy@alum.mit.edu>
Tue, 11 Aug 2015 19:16:23 +0000 (12:16 -0700)
committerGuy Harris <guy@alum.mit.edu>
Tue, 11 Aug 2015 19:16:48 +0000 (19:16 +0000)
As the comment says, "Entries must be sorted by
WTAP_FILE_TYPE_SUBTYPE_xxx values in ascending order."  If they're not,
the file type to file type string routines don't give the right answer.

Change-Id: I06afe7bb98cb36c54ddc831113bb632598ab2eb0
Reviewed-on: https://code.wireshark.org/review/9975
Reviewed-by: Guy Harris <guy@alum.mit.edu>
wiretap/file_access.c

index 09567ba715c80b31379608fd73b9fd5aee1f40de..a308c11e0c3701f529736df4e3dad64823647e44 100644 (file)
@@ -1553,11 +1553,6 @@ static const struct file_type_subtype_info dump_open_table_base[] = {
          FALSE, FALSE, 0,
          logcat_dump_can_write_encap, logcat_binary_dump_open, NULL },
 
-       /* WTAP_FILE_TYPE_SUBTYPE_JSON */
-       { "JavaScript Object Notation", "json", "json", "NULL",
-         FALSE, FALSE, 0,
-         NULL, NULL, NULL },
-
        /* WTAP_FILE_TYPE_SUBTYPE_LOGCAT_BRIEF */
        { "Android Logcat Brief text format", "logcat-brief", NULL, NULL,
          FALSE, FALSE, 0,
@@ -1603,6 +1598,11 @@ static const struct file_type_subtype_info dump_open_table_base[] = {
          FALSE, FALSE, 0,
          NULL, NULL, NULL },
 
+       /* WTAP_FILE_TYPE_SUBTYPE_JSON */
+       { "JavaScript Object Notation", "json", "json", "NULL",
+         FALSE, FALSE, 0,
+         NULL, NULL, NULL },
+
        /* WTAP_FILE_TYPE_SUBTYPE_NETSCALER_3_5 */
        { "NetScaler Trace (Version 3.5)", "nstrace35", "cap", NULL,
          TRUE, FALSE, 0,