Map the old one-port "generic ASN.1" TCP/UDP/SCTP port-number

preferences to the new multi-port ones, so that, instead of complaining
when the old preferences were seen, we make the port be the one port in
the new preference.

Make the "message_win" "generic ASN.1" preference an obsolete
preference, so we silently ignore it rather than complaining about it.

svn path=/trunk/; revision=11623
This commit is contained in:
Guy Harris 2004-08-08 01:20:26 +00:00
parent ce9da96fe5
commit 42b915674b
2 changed files with 14 additions and 2 deletions

View File

@ -5025,12 +5025,14 @@ proto_register_asn1(void) {
"ASN.1 debug mode",
"Extra output useful for debuging",
&asn1_debug);
/*
#if 0
prefs_register_bool_preference(asn1_module, "message_win",
"Show ASN.1 tree",
"show full message description",
&asn1_message_win);
*/
#else
prefs_register_obsolete_preference(asn1_module, "message_win");
#endif
prefs_register_bool_preference(asn1_module, "verbose_log",
"Write very verbose log",
"log to file $TMP/" ASN1LOGFILE,

10
prefs.c
View File

@ -1929,6 +1929,16 @@ set_pref(gchar *pref_name, gchar *value)
pref = find_preference(new_module, "port_number_udh_means_wsp");
else if (strcmp(dotp, "try_dissect_1st_fragment") == 0)
pref = find_preference(new_module, "try_dissect_1st_fragment");
} else if (strcmp(module->name, "asn1") == 0) {
/* Handle old generic ASN.1 preferences (it's not really a
rename, as the new preferences support multiple ports,
but we might as well copy them over). */
if (strcmp(dotp, "tcp_port") == 0)
pref = find_preference(module, "tcp_ports");
else if (strcmp(dotp, "udp_port") == 0)
pref = find_preference(module, "udp_ports");
else if (strcmp(dotp, "sctp_port") == 0)
pref = find_preference(module, "sctp_ports");
}
}
if (pref == NULL)