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-icq.c | |
parent | d92a1cd8e1f58a1ec46793f9052aa893a279e523 (diff) | |
download | wireshark-6a21dc7e44e06bf3064d74a8e9624b9e01b04bbd.tar.gz wireshark-6a21dc7e44e06bf3064d74a8e9624b9e01b04bbd.tar.bz2 wireshark-6a21dc7e44e06bf3064d74a8e9624b9e01b04bbd.zip |
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-icq.c')
-rw-r--r-- | packet-icq.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packet-icq.c b/packet-icq.c index dbab104ef3..b99ea1c847 100644 --- a/packet-icq.c +++ b/packet-icq.c @@ -1,7 +1,7 @@ /* packet-icq.c * Routines for ICQ packet disassembly * - * $Id: packet-icq.c,v 1.38 2002/01/21 07:36:35 guy Exp $ + * $Id: packet-icq.c,v 1.39 2002/02/18 01:08:36 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1731,8 +1731,7 @@ dissect_icqv5Client(tvbuff_t *tvb, decrypt_v5(decr_pd, rounded_size, key); /* Allocate a new tvbuff, referring to the decrypted data. */ - decr_tvb = tvb_new_real_data(decr_pd, pktsize, tvb_reported_length(tvb), - "Decrypted"); + decr_tvb = tvb_new_real_data(decr_pd, pktsize, tvb_reported_length(tvb)); /* Arrange that the allocated packet data copy be freed when the tvbuff is freed. */ @@ -1744,7 +1743,7 @@ dissect_icqv5Client(tvbuff_t *tvb, tvb_set_child_real_data_tvbuff(tvb, decr_tvb); /* Add the decrypted data to the data source list. */ - pinfo->fd->data_src = g_slist_append(pinfo->fd->data_src, decr_tvb); + add_new_data_source(pinfo->fd, decr_tvb, "Decrypted"); cmd = tvb_get_letohs(decr_tvb, ICQ5_CL_CMD); |