}
static int
-dissect_dbus_field_signature(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset, int field_code)
+dissect_dbus_field_signature(tvbuff_t *tvb, packet_info *pinfo, dbus_info_t *dinfo, proto_tree *tree, int offset, int field_code)
{
const int org_offset = offset;
offset = dissect_dbus_sig(tvb, dinfo, tree, offset, 's', &addr_val);
if (offset != -1)
SET_ADDRESS((field_code == DBUS_HEADER_FIELD_DESTINATION) ? &dinfo->pinfo->dst : &dinfo->pinfo->src,
- AT_STRINGZ, (int)strlen(addr_val.str)+1, addr_val.str);
+ AT_STRINGZ, (int)strlen(addr_val.str)+1, wmem_strdup(pinfo->pool, addr_val.str));
return offset;
}
break;
}
static int
-dissect_dbus_hdr_fields(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset)
+dissect_dbus_hdr_fields(tvbuff_t *tvb, packet_info *pinfo, dbus_info_t *dinfo, proto_tree *tree, int offset)
{
int end_offset;
proto_item_append_text(ti, ": %s", val_to_str(field_code, field_code_vals, "Unknown: %d"));
offset += 1;
- offset = dissect_dbus_field_signature(tvb, dinfo, field_tree, offset, field_code);
+ offset = dissect_dbus_field_signature(tvb, pinfo, dinfo, field_tree, offset, field_code);
if (offset == -1)
break;
offset = 0;
offset = dissect_dbus_hdr(tvb, &dinfo, dbus_tree, offset);
- offset = dissect_dbus_hdr_fields(tvb, &dinfo, dbus_tree, offset);
+ offset = dissect_dbus_hdr_fields(tvb, pinfo, &dinfo, dbus_tree, offset);
/* header aligned to 8B */
offset = (offset + 7) & ~7;
#define DBUS_HEADER_LEN 16
static guint
-get_dbus_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
+get_dbus_message_len(packet_info *pinfo _U_, tvbuff_t *tvb,
+ int offset, void *data _U_)
{
guint32 (*get_guint32)(tvbuff_t *, const gint);
dissect_dbus_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
tcp_dissect_pdus(tvb, pinfo, tree, dbus_desegment, DBUS_HEADER_LEN, get_dbus_message_len, dissect_dbus_pdu, data);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
void