TDS: Use hf_tds_prelogin field
authorAlexis La Goutte <alexis.lagoutte@gmail.com>
Tue, 20 Oct 2015 06:42:01 +0000 (08:42 +0200)
committerMichael Mann <mmann78@netscape.net>
Fri, 23 Oct 2015 00:16:49 +0000 (00:16 +0000)
Change-Id: I06a87dbc402b5b96910f73402d44ed30118c9d23
Reviewed-on: https://code.wireshark.org/review/11172
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-tds.c

index 3313c6ba85fbfac198e54be75d86af5ec29244c3..119f6b80630850a3e440b54c4cd3c777ef909d96 100644 (file)
@@ -1467,16 +1467,17 @@ dissect_tds7_prelogin_packet(tvbuff_t *tvb, proto_tree *tree)
     gint offset = 0;
     guint16 tokenoffset, tokenlen;
     proto_tree *prelogin_tree = NULL, *option_tree;
-    proto_item * ti;
+    proto_item *ti, *item;
+
+    item = proto_tree_add_item(tree, hf_tds_prelogin, tvb, 0, -1, ENC_NA);
 
     if(detect_tls(tvb))
     {
-        proto_tree_add_subtree(tree, tvb, offset, -1, ett_tds7_prelogin, NULL, "TDS Pre-Login Packet - TLS exchange");
+        proto_item_append_text(item, " - TLS exchange");
         return;
     }
 
-    prelogin_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_tds7_prelogin, NULL, "TDS Pre-Login Packet");
-
+    prelogin_tree = proto_item_add_subtree(item, ett_tds_message);
     while(tvb_reported_length_remaining(tvb, offset) > 0)
     {
         token = tvb_get_guint8(tvb, offset);
@@ -3784,7 +3785,8 @@ dissect_netlib_buffer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     if(detect_tls(tvb))
     {
-        proto_tree_add_subtree(tree, tvb, offset, -1, ett_tds7_prelogin, NULL, "TDS Pre-Login Packet - TLS exchange");
+        tds_item = proto_tree_add_item(tree, hf_tds_prelogin, tvb, 0, -1, ENC_NA);
+        proto_item_append_text(tds_item, " - TLS exchange");
         return;
     }