diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2007-03-06 00:36:25 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2007-03-06 00:36:25 +0000 |
commit | 2865e52843f84d3ca4bd60286a1948464dc4fc83 (patch) | |
tree | 45c6da2228435251204ae53bd67d024465e61bb3 /epan | |
parent | 8d8452b419de5fcab20af4a5eeebb0dfb8898af5 (diff) |
Export Object code/documentation updates:
- Note in the user's guide that export object is not available
in GTK1 builds of Wireshark.
- Make scanning through the slists more efficient
- Use new tap.c function called have_tap_listener() to only save
object payload data when the export object listener is actively
listening for it.
- Save objects in the HTTP dissector with g_malloc() instead of
se_malloc() and free it when we're done with it - when the
export object window is closed (Fixes bug #1412)
- Various minor improvements
svn path=/trunk/; revision=20980
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-http.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index c32023ad40..d9217b6260 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -1072,6 +1072,17 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo, * only if it was content-encoded and/or transfer-encoded. */ + /* Save values for the Export Object GUI feature if we have + * an active listener to process it (which happens when + * the export object window is open). These will be freed + * when the export object window is destroyed. */ + if(have_tap_listener(http_tap)) { + stat_info->content_type = g_strdup(headers.content_type); + stat_info->payload_len = next_tvb->length; + stat_info->payload_data = g_memdup(next_tvb->real_data, + next_tvb->length); + } + /* * Do subdissector checks. * @@ -1079,12 +1090,6 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo, * be called if something was on some particular port. */ - /* Save values for the Export Object GUI feature */ - stat_info->content_type = se_strdup(headers.content_type); - stat_info->payload_len = next_tvb->length; - stat_info->payload_data = se_memdup(next_tvb->real_data, - next_tvb->length); - handle = dissector_get_port_handle(port_subdissector_table, pinfo->match_port); if (handle == NULL && headers.content_type != NULL) { |