aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-05-12 03:29:26 +0000
committerGuy Harris <guy@alum.mit.edu>2005-05-12 03:29:26 +0000
commitbcc201cd88de15baadc83ac351d81a6b04838fb4 (patch)
treefe83f3e334332c3c5d1d236e81ba32d929167c3e
parent38c139dce3316f9b4f155a4c7bd2195217e27746 (diff)
If we have libpcap, include <pcap.h>, because "capture.h" requires it.
If we *don't* have libpcap, don't include "capture.h", and don't test whether a capture is in progress. Clean up a message. svn path=/trunk/; revision=14356
-rw-r--r--gtk/drag_and_drop.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/drag_and_drop.c b/gtk/drag_and_drop.c
index 3fa42e6047..91941c9c6d 100644
--- a/gtk/drag_and_drop.c
+++ b/gtk/drag_and_drop.c
@@ -30,6 +30,9 @@
#include <io.h> /* open/close on win32 */
#endif
+#ifdef HAVE_LIBPCAP
+#include <pcap.h>
+#endif
#include <gtk/gtk.h>
@@ -43,7 +46,9 @@
#include "file.h"
#include "simple_dialog.h"
#include "main.h"
+#ifdef HAVE_LIBPCAP
#include "capture.h"
+#endif
#include <epan/prefs.h>
#include <string.h>
@@ -316,14 +321,16 @@ GtkSelectionData *selection_data, guint info, guint t _U_, gpointer data _U_)
* so we have to take care of NOT loading a new file while a different process
* (e.g. capture/load/...) is still in progress. */
+#ifdef HAVE_LIBPCAP
/* if a capture is running, do nothing but warn the user */
if((capture_opts->state != CAPTURE_STOPPED)) {
dialog = simple_dialog(ESD_TYPE_CONFIRMATION,
ESD_BTN_OK,
PRIMARY_TEXT_START "Drag and Drop currently not possible!" PRIMARY_TEXT_END "\n\n"
- "Dropping a file isn't possible while capture is in progress.");
+ "Dropping a file isn't possible while a capture is in progress.");
return;
}
+#endif
/* if another file read is still in progress, do nothing but warn the user */
if((cfile.state == FILE_READ_IN_PROGRESS)) {