aboutsummaryrefslogtreecommitdiffstats
path: root/capinfos.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-17 16:02:50 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-18 00:03:26 +0000
commit51522b33723dec4dd0481dcabc261010be39937c (patch)
tree4c772ba5dd3a61a470784464e39573ca27c5028c /capinfos.c
parent8ce0f122011f26ab4e81172e9899ed27a5508abd (diff)
Handle "I can't map this for that file format" better.
For cases where record (meta)data is something that can't be written out in a particular file format, return WTAP_ERR_UNWRITABLE_REC_DATA along with an err_info string. Report (and free) that err_info string in cases where WTAP_ERR_UNWRITABLE_REC_DATA is returned. Clean up some other error reporting cases, and flag with an XXX some cases where we aren't reporting errors at all, while we're at it. Change-Id: I91d02093af0d42c24ec4634c2c773b30f3d39ab3 Reviewed-on: https://code.wireshark.org/review/5823 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'capinfos.c')
-rw-r--r--capinfos.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/capinfos.c b/capinfos.c
index 01b1122c09..7c98f33b6d 100644
--- a/capinfos.c
+++ b/capinfos.c
@@ -908,6 +908,7 @@ process_cap_file(wtap *wth, const char *filename)
case WTAP_ERR_UNWRITABLE_ENCAP:
case WTAP_ERR_BAD_FILE:
case WTAP_ERR_DECOMPRESS:
+ case WTAP_ERR_UNWRITABLE_REC_DATA:
fprintf(stderr, "(%s)\n", err_info);
g_free(err_info);
/* fallthrough */
@@ -1488,6 +1489,7 @@ main(int argc, char *argv[])
case WTAP_ERR_UNWRITABLE_ENCAP:
case WTAP_ERR_BAD_FILE:
case WTAP_ERR_DECOMPRESS:
+ case WTAP_ERR_UNWRITABLE_REC_DATA:
fprintf(stderr, "(%s)\n", err_info);
g_free(err_info);
break;