- if (!success) {
- /* We still dump out the results of taps, etc., as we might have
- read some packets; however, we exit with an error status. */
- exit_status = 2;
- }
+ /* Process the packets in the file */
+ TRY {
+ /* XXX - for now there is only 1 packet */
+ success = process_file(&cfile, 1, 0);
+ }
+ CATCH(OutOfMemoryError) {
+ fprintf(stderr,
+ "Out Of Memory.\n"
+ "\n"
+ "Sorry, but TFShark has to terminate now.\n"
+ "\n"
+ "Some infos / workarounds can be found at:\n"
+ "https://wiki.wireshark.org/KnownBugs/OutOfMemory\n");
+ success = FALSE;
+ }
+ ENDTRY;
+
+ if (!success) {
+ /* We still dump out the results of taps, etc., as we might have
+ read some packets; however, we exit with an error status. */
+ exit_status = 2;