path: root/file.c
diff options
authorGuy Harris <guy@alum.mit.edu>2012-06-17 16:44:09 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-17 16:44:09 +0000
commit2bd813507a5a42c298d09ac8d83ca1eebd8db277 (patch)
treea3082031a16fbc243f696cf378ab53b9030238c1 /file.c
parent4ad0bf65f2ebecf1b501ba7733063d9c0f8e3f1d (diff)
Export a wtap_dump_can_write_encaps() routine from Wiretap; it takes a
file type and a GArray of encapsulation types and returns TRUE if a capture with all those encapsulation types can be written to a file in that file type and FALSE otherwise. Use it where appropriate. svn path=/trunk/; revision=43315
Diffstat (limited to 'file.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index f1ceba02ce..97152e49f5 100644
--- a/file.c
+++ b/file.c
@@ -3843,8 +3843,8 @@ cf_can_save_as(capture_file *cf)
for (ft = 0; ft < WTAP_NUM_FILE_TYPES; ft++) {
/* To save a file with Wiretap, Wiretap has to handle that format,
and its code to handle that format must be able to write a file
- with this file's encapsulation type. */
- if (wtap_dump_can_open(ft) && wtap_dump_can_write_encap(ft, cf->lnk_t)) {
+ with this file's encapsulation types. */
+ if (wtap_dump_can_write_encaps(ft, cf->linktypes)) {
/* OK, we can write it out in this type. */
return TRUE;