Note that for THE3GPP_IPV6_DNS_SERVERS we probably *do* need to handle
[obnox/wireshark/wip.git] / packet-nlm.c
index 7a28cd1482de8a11384865de40e32a30fa47eb8f..a7fa6f822065da2054bed4f3cb5a4173c011ec25 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-nlm.c
  * Routines for nlm dissection
  *
- * $Id: packet-nlm.c,v 1.33 2002/12/03 02:07:07 guy Exp $
+ * $Id: packet-nlm.c,v 1.36 2004/02/25 09:31:06 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -296,7 +296,6 @@ nlm_register_unmatched_msg(packet_info *pinfo, tvbuff_t *tvb, int offset)
 {
        nlm_msg_res_unmatched_data *umd;
        nlm_msg_res_unmatched_data *old_umd;
-       char *cookie;
 
        /* allocate and build the unmatched structure for this request */
        umd=g_malloc(sizeof(nlm_msg_res_unmatched_data));
@@ -304,9 +303,7 @@ nlm_register_unmatched_msg(packet_info *pinfo, tvbuff_t *tvb, int offset)
        umd->ns.secs=pinfo->fd->abs_secs;
        umd->ns.nsecs=pinfo->fd->abs_usecs*1000;
        umd->cookie_len=tvb_get_ntohl(tvb, offset);
-       cookie=g_malloc(umd->cookie_len);
-       tvb_memcpy(tvb, (guint8 *)cookie, offset+4, umd->cookie_len);
-       umd->cookie=cookie;
+       umd->cookie=tvb_memdup(tvb, offset+4, umd->cookie_len);
 
        /* remove any old duplicates */
        old_umd=g_hash_table_lookup(nlm_msg_res_unmatched, (gconstpointer)umd);
@@ -403,7 +400,7 @@ dissect_lock(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int version, i
 
        offset = dissect_rpc_string(tvb,lock_tree,
                        hf_nlm_lock_caller_name, offset, NULL);
-       offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree,"fh");
+       offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree, "fh", NULL);
 
        offset = dissect_rpc_data(tvb, lock_tree, hf_nlm_lock_owner, offset);
 
@@ -650,7 +647,7 @@ dissect_nlm_share(tvbuff_t *tvb, int offset, packet_info *pinfo,
        offset = dissect_rpc_string(tvb,lock_tree,
                        hf_nlm_lock_caller_name, offset, NULL);
 
-       offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree, "fh");
+       offset = dissect_nfs_fh3(tvb, offset, pinfo, lock_tree, "fh", NULL);
 
        offset = dissect_rpc_data(tvb, lock_tree, hf_nlm_lock_owner, offset);
 
@@ -1220,7 +1217,7 @@ proto_register_nlm(void)
        proto_register_subtree_array(ett, array_length(ett));
 
        nlm_module = prefs_register_protocol(proto_nlm, NULL);
-       prefs_register_bool_preference(nlm_module, "nlm_msg_res_matching",
+       prefs_register_bool_preference(nlm_module, "msg_res_matching",
                "Match MSG/RES packets for async NLM",
                "Whether the dissector will track and match MSG and RES calls for asynchronous NLM",
                &nlm_match_msgres);