wtap_rec_init(&rec);
if (frame_tvb->buf == NULL) {
- if G_UNLIKELY(!buffer_cache) buffer_cache = g_ptr_array_sized_new(1024);
+ if (G_UNLIKELY(!buffer_cache)) buffer_cache = g_ptr_array_sized_new(1024);
if (buffer_cache->len > 0) {
frame_tvb->buf = (struct Buffer *) g_ptr_array_remove_index(buffer_cache, buffer_cache->len - 1);
* tvb_new_real_data() now there's no one
*/
- tvb->real_data = buf;
- tvb->length = fd->cap_len;
- tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len;
- tvb->initialized = TRUE;
+ tvb->real_data = buf;
+ tvb->length = fd->cap_len;
+ tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len;
+ tvb->contained_length = tvb->reported_length;
+ tvb->initialized = TRUE;
/*
* This is the top-level real tvbuff for this data source,
cloned_tvb = tvb_new(&tvb_frame_ops);
/* data will be read when needed */
- cloned_tvb->real_data = NULL;
- cloned_tvb->length = abs_length;
- cloned_tvb->reported_length = abs_length; /* XXX? */
- cloned_tvb->initialized = TRUE;
+ cloned_tvb->real_data = NULL;
+ cloned_tvb->length = abs_length;
+ cloned_tvb->reported_length = abs_length; /* XXX? */
+ cloned_tvb->contained_length = cloned_tvb->reported_length;
+ cloned_tvb->initialized = TRUE;
/*
* This is the top-level real tvbuff for this data source,
* tvb_new_real_data() now there's no one
*/
- tvb->real_data = buf;
- tvb->length = fd->cap_len;
- tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len;
- tvb->initialized = TRUE;
+ tvb->real_data = buf;
+ tvb->length = fd->cap_len;
+ tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len;
+ tvb->contained_length = tvb->reported_length;
+ tvb->initialized = TRUE;
/*
* This is the top-level real tvbuff for this data source,