forked from osmocom/wireshark
Exported PDU: apply EXP_PDU_TAG_COL_PROT_TEXT whatever the next_prot_type tag
The include file suggests that it will always fill the protocol column if present. Let's make that happen. Change-Id: I265e2f4d1c2dcd7cf2ff121499694cde14a595f3 Reviewed-on: https://code.wireshark.org/review/24220 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
e00162301b
commit
b227943e66
|
@ -347,7 +347,11 @@ dissect_exported_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
|
|||
case EXPORTED_PDU_NEXT_PROTO_STR:
|
||||
proto_handle = find_dissector(proto_name);
|
||||
if (proto_handle) {
|
||||
col_clear(pinfo->cinfo, COL_PROTOCOL);
|
||||
if (col_proto_str) {
|
||||
col_add_str(pinfo->cinfo, COL_PROTOCOL, col_proto_str);
|
||||
} else {
|
||||
col_clear(pinfo->cinfo, COL_PROTOCOL);
|
||||
}
|
||||
call_dissector_with_data(proto_handle, payload_tvb, pinfo, tree, dissector_data);
|
||||
}
|
||||
break;
|
||||
|
@ -355,7 +359,11 @@ dissect_exported_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
|
|||
{
|
||||
heur_dtbl_entry_t *heur_diss = find_heur_dissector_by_unique_short_name(proto_name);
|
||||
if (heur_diss) {
|
||||
col_clear(pinfo->cinfo, COL_PROTOCOL);
|
||||
if (col_proto_str) {
|
||||
col_add_str(pinfo->cinfo, COL_PROTOCOL, col_proto_str);
|
||||
} else {
|
||||
col_clear(pinfo->cinfo, COL_PROTOCOL);
|
||||
}
|
||||
call_heur_dissector_direct(heur_diss, payload_tvb, pinfo, tree, dissector_data);
|
||||
}
|
||||
break;
|
||||
|
@ -364,9 +372,10 @@ dissect_exported_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
|
|||
{
|
||||
dis_tbl = find_dissector_table(dissector_table);
|
||||
if (dis_tbl) {
|
||||
col_clear(pinfo->cinfo, COL_PROTOCOL);
|
||||
if (col_proto_str) {
|
||||
col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "%s",col_proto_str);
|
||||
col_add_str(pinfo->cinfo, COL_PROTOCOL, col_proto_str);
|
||||
} else {
|
||||
col_clear(pinfo->cinfo, COL_PROTOCOL);
|
||||
}
|
||||
dissector_try_uint_new(dis_tbl, dissector_table_val, payload_tvb, pinfo, tree, FALSE, dissector_data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue