aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btamp.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2011-02-12 19:59:41 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2011-02-12 19:59:41 +0000
commitba187f2ee7a07d2026c238b1fa19ecf3812a74f3 (patch)
tree8f369db2ef33d817abf53f91afd6e9ce962db7b1 /epan/dissectors/packet-btamp.c
parentd9db171407de2e20d901c07dda28594ce6fec009 (diff)
The lack of _WITH_PHDR in WTAP_ENCAP_BLUETOOTH_H4 means there's no
pseudo-header, and hence there's no direction indication. Don't set pinfo->p2p_dir for it. Use WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, not WTAP_ENCAP_BLUETOOTH_H4, for capture files where we have the direction. Don't assume pinfo->p2p_dir is either P2P_DIR_SENT or P2P_DIR_RECV when setting the info column in various Bluetooth dissectors; it might be unknown. In the HCI H4 dissector, put the direction into the info column regardless of whether we have a type match or not; the dissectors for HCI packet types appear to assume it's been set (as they put a blank at the beginning of the stuff they append to the direction). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35933 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-btamp.c')
-rw-r--r--epan/dissectors/packet-btamp.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/epan/dissectors/packet-btamp.c b/epan/dissectors/packet-btamp.c
index 89ea33e261..f997632c6c 100644
--- a/epan/dissectors/packet-btamp.c
+++ b/epan/dissectors/packet-btamp.c
@@ -389,7 +389,25 @@ static void dissect_btamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 cmd_length;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AMP");
- col_set_str(pinfo->cinfo, COL_INFO, pinfo->p2p_dir == P2P_DIR_SENT ? "Sent " : "Rcvd ");
+ switch (pinfo->p2p_dir) {
+
+ case P2P_DIR_SENT:
+ col_add_str(pinfo->cinfo, COL_INFO, "Sent ");
+ break;
+
+ case P2P_DIR_RECV:
+ col_add_str(pinfo->cinfo, COL_INFO, "Rcvd ");
+ break;
+
+ case P2P_DIR_UNKNOWN:
+ col_clear(pinfo->cinfo, COL_INFO);
+ break;
+
+ default:
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown direction %d ",
+ pinfo->p2p_dir);
+ break;
+ }
if(tree){
ti=proto_tree_add_item(tree, proto_btamp, tvb, offset, -1, FALSE);