aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-01-31 03:22:42 +0000
committerGuy Harris <guy@alum.mit.edu>2004-01-31 03:22:42 +0000
commit1980fa5dbf6e3aa953d8bd09d69e0700b74a56ad (patch)
tree1dda390f197eb0fd4dc3bf2e9b4e5b36a8162189 /gtk/capture_dlg.c
parent61e26a56bada54f651cb5c4110cae4b8f6548863 (diff)
Pass ESD_BTN_OK rather than NULL as a second argument to
"simple_dialog()"; NULL might be #defined to be a pointer expression on some platforms, causing compiler warnings (and, on platforms where a null pointer doesn't have all its bits 0, possibly causing misbehavior, although I don't think there are any such platforms on which Ethereal runs). Don't allow 0 as button mask argument to "simple_dialog()". Squelch a compiler warning. Report fatal problems as errors, not warnings. Report file I/O errors with "file_open_error_message()". Report file write errors (including those reported by "close()", e.g. some errors writing to an NFS server) when saving raw packet data to a file. svn path=/trunk/; revision=9915
Diffstat (limited to 'gtk/capture_dlg.c')
-rw-r--r--gtk/capture_dlg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c
index 241b84ba61..90de6fcf8d 100644
--- a/gtk/capture_dlg.c
+++ b/gtk/capture_dlg.c
@@ -1,7 +1,7 @@
/* capture_dlg.c
* Routines for packet capture windows
*
- * $Id: capture_dlg.c,v 1.99 2004/01/31 02:25:43 ulfl Exp $
+ * $Id: capture_dlg.c,v 1.100 2004/01/31 03:22:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -302,7 +302,7 @@ capture_prep(void)
#ifdef _WIN32
/* Is WPcap loaded? */
if (!has_wpcap) {
- simple_dialog(ESD_TYPE_ERROR, NULL,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Unable to load WinPcap (wpcap.dll); Ethereal will not be able\n"
"to capture packets.\n\n"
"In order to capture packets, WinPcap must be installed; see\n"
@@ -325,7 +325,7 @@ capture_prep(void)
if_list = get_interface_list(&err, err_str);
if (if_list == NULL && err == CANT_GET_INTERFACE_LIST) {
- simple_dialog(ESD_TYPE_WARN, NULL, "Can't get list of interfaces: %s",
+ simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, "Can't get list of interfaces: %s",
err_str);
}
@@ -779,7 +779,7 @@ capture_prep_answered_cb(gpointer dialog _U_, gint btn, gpointer data)
}
void
-capture_prep_cb(GtkWidget *w, gpointer d _U_)
+capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
{
gpointer dialog;
@@ -956,7 +956,7 @@ capture_prep_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) {
if_text = g_strstrip(entry_text);
if_name = get_if_name(if_text);
if (*if_name == '\0') {
- simple_dialog(ESD_TYPE_ERROR, NULL,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"You didn't specify an interface on which to capture packets.");
g_free(entry_text);
return;
@@ -1048,11 +1048,11 @@ capture_prep_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) {
!(capture_opts.sync_mode);
if (capture_opts.ringbuffer_on) {
if (save_file == NULL) {
- simple_dialog(ESD_TYPE_ERROR, NULL,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"You must specify a save file if you want to use the ring buffer.");
return;
} else if (!capture_opts.has_autostop_filesize) {
- simple_dialog(ESD_TYPE_ERROR, NULL,
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"You must specify a file size at which to rotate the capture files\n"
"if you want to use the ring buffer.");
g_free(save_file);