aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-02-21 12:58:42 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-02-21 12:58:42 +0000
commitba50469654ce37b73384934d41be30a13fcf737f (patch)
treec3f94a98be45636b988117a4cee167972a66972e /file.c
parent9a7cac1dfff35064d3140e6b3281d9d442e451c2 (diff)
rework of capture.c: better seperation of sync and capture pipe by using
explicit names and seperated functionality of do_capture(), but no functional change! svn path=/trunk/; revision=10168
Diffstat (limited to 'file.c')
-rw-r--r--file.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/file.c b/file.c
index a99b4f7d75..22b91e3459 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.363 2004/02/21 02:15:05 guy Exp $
+ * $Id: file.c,v 1.364 2004/02/21 12:58:41 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -70,7 +70,6 @@
#include "file.h"
#include "menu.h"
#include "util.h"
-#include "report_err.h"
#include "alert_box.h"
#include "simple_dialog.h"
#include "progress_dlg.h"
@@ -669,14 +668,6 @@ cf_finish_tail(capture_file *cf, int *err)
XXX - pop up a dialog box? */
return (READ_ERROR);
} else {
- if(cf->count == 0) {
- simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK,
- "%sNo packets captured!%s\n\n"
- "As no data was captured, closing the %scapture file!",
- simple_dialog_primary_start(), simple_dialog_primary_end(),
- (cf->is_tempfile) ? "temporary " : "");
- cf_close(cf);
- }
return (READ_SUCCESS);
}
}
@@ -3027,7 +3018,10 @@ copy_binary_file(char *from_filename, char *to_filename)
}
}
if (nread < 0) {
- report_read_failure(from_filename, errno);
+ err = errno;
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
+ "An error occurred while reading from the file \"%s\": %s.",
+ from_filename, strerror(err));
close(from_fd);
close(to_fd);
goto done;