diff options
author | Michael Mann <mmann78@netscape.net> | 2016-05-30 23:42:41 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-06-01 14:33:23 +0000 |
commit | 6fa77a6acb7955c804ec73a571177163ad022623 (patch) | |
tree | 29ca6bfacc3ad843a6a81615bd593c4cab872d0b /wiretap/erf.c | |
parent | bd932bb2e11f90c3f95b135ccaeaab7d57623963 (diff) |
Add data structures necessary to support multiple Section Header blocks.
This doesn't try to use any data from multiple Section Header blocks, it
just converts single Section Header block usage into a GArray, so the
potential is there to then use/support multiple Section Header blocks
within a file format (like pcapng)
Change-Id: I6ad1f7b8daf4b1ad7ba0eb1ecf2e170421505486
Reviewed-on: https://code.wireshark.org/review/15636
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wiretap/erf.c')
-rw-r--r-- | wiretap/erf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wiretap/erf.c b/wiretap/erf.c index 5ca207ae47..b31562b0f5 100644 --- a/wiretap/erf.c +++ b/wiretap/erf.c @@ -1259,11 +1259,12 @@ static int populate_capture_host_info(erf_t *erf_priv, wtap *wth, union wtap_pse gchar* modelcpu = NULL; guint32 tagtotallength; - if (!wth || !state || !wth->shb_hdr) + if (!wth || !state || !wth->shb_hdrs || (wth->shb_hdrs->len == 0)) return -1; /* XXX: wth->shb_hdr is already created by different layer, using directly for now. */ - shb_hdr = wth->shb_hdr; + /* XXX: Only one section header is supported at this time */ + shb_hdr = g_array_index(wth->shb_hdrs, wtap_optionblock_t, 0); while ((tagtotallength = erf_meta_read_tag(&tag, state->tag_ptr, state->remaining_len)) && !ERF_META_IS_SECTION(tag.type)) { switch (state->sectiontype) { |