summaryrefslogtreecommitdiff
path: root/wiretap/wtap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-05-29 20:02:55 -0400
committerAnders Broman <a.broman58@gmail.com>2016-05-30 04:18:41 +0000
commit47b58364dd28c08e875a46f881da044ec6b369a2 (patch)
treed57ac4a2e773f26b2f2add8a3af2429d7099b130 /wiretap/wtap.c
parentda55e2c4dd0e3a1f6deb01c8b2fbf1f1a6e16277 (diff)
downloadwireshark-47b58364dd28c08e875a46f881da044ec6b369a2.tar.gz
Copy all options when creating SHB block for new file.
Change-Id: I666d4f546d9fdc026ccd7fac7750e80df7f9b697 Reviewed-on: https://code.wireshark.org/review/15611 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r--wiretap/wtap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index bdc74adcbf..a65e5afa94 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -182,7 +182,6 @@ wtap_optionblock_t
wtap_file_get_shb_for_new_file(wtap *wth)
{
wtap_optionblock_t shb_hdr;
- char* opt_comment;
if (wth == NULL)
return NULL;
@@ -190,9 +189,7 @@ wtap_file_get_shb_for_new_file(wtap *wth)
shb_hdr = wtap_optionblock_create(WTAP_OPTION_BLOCK_NG_SECTION);
/* options */
- wtap_optionblock_get_option_string(wth->shb_hdr, OPT_COMMENT, &opt_comment);
- wtap_optionblock_set_option_string(shb_hdr, OPT_COMMENT, opt_comment, (gsize)(opt_comment ? strlen(opt_comment) : 0));
-
+ wtap_optionblock_copy_options(shb_hdr, wth->shb_hdr);
return shb_hdr;
}