diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-02-18 01:08:44 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-02-18 01:08:44 +0000 |
commit | 6a21dc7e44e06bf3064d74a8e9624b9e01b04bbd (patch) | |
tree | 73281bb2d7e50e8527da2945d5627a31bae9e5c6 /packet-wcp.c | |
parent | d92a1cd8e1f58a1ec46793f9052aa893a279e523 (diff) |
Don't give tvbuffs names; instead, give data sources names, where a
"data source" has a name and a top-level tvbuff, and frames can have a
list of data sources associated with them.
Use the tvbuff pointer to determine which data source is the data source
for a given field; this means we don't have to worry about multiple data
sources with the same name - the only thing the name does is label the
notebook tab for the display of the data source, and label the hex dump
of the data source in print/Tethereal output.
Clean up a bunch of things discovered in the process of doing the above.
svn path=/trunk/; revision=4749
Diffstat (limited to 'packet-wcp.c')
-rw-r--r-- | packet-wcp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packet-wcp.c b/packet-wcp.c index 313d090811..7cdff8ce4d 100644 --- a/packet-wcp.c +++ b/packet-wcp.c @@ -2,7 +2,7 @@ * Routines for Wellfleet Compression frame disassembly * Copyright 2001, Jeffrey C. Foster <jfoste@woodward.com> * - * $Id: packet-wcp.c,v 1.20 2002/01/21 07:36:45 guy Exp $ + * $Id: packet-wcp.c,v 1.21 2002/02/18 01:08:37 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -584,17 +584,17 @@ static tvbuff_t *wcp_uncompress( tvbuff_t *src_tvb, int offset, packet_info *pin TRY { - tvb = tvb_new_real_data( pdata_ptr->buffer, pdata_ptr->len, pdata_ptr->len, "uncompressed"); + tvb = tvb_new_real_data( pdata_ptr->buffer, pdata_ptr->len, pdata_ptr->len); } CATCH(BoundsError) { - g_assert_not_reached(); + g_assert_not_reached(); g_free(buf); return NULL; } CATCH(ReportedBoundsError) { - g_free(buf); - return NULL; + g_free(buf); + return NULL; } ENDTRY; @@ -602,7 +602,7 @@ static tvbuff_t *wcp_uncompress( tvbuff_t *src_tvb, int offset, packet_info *pin tvb_set_child_real_data_tvbuff( src_tvb, tvb); /* Add new data to the data source list */ - pinfo->fd->data_src = g_slist_append( pinfo->fd->data_src, tvb); + add_new_data_source( pinfo->fd, tvb, "Uncompressed"); return tvb; } |