diff --git a/owlps-listener/owlps-listener.h b/owlps-listener/owlps-listener.h index ebc245e..96c2c72 100644 --- a/owlps-listener/owlps-listener.h +++ b/owlps-listener/owlps-listener.h @@ -480,7 +480,7 @@ void print_version(void) ; * false if we are reading from a pcap file. */ #define LIVE_CAPTURING \ - (! GET_PCAP_FILE()) + (GET_RTAP_IFACE()[0] != '\0') #endif // _OWLPS_LISTENER_H_ diff --git a/owlps-listener/owlps-listenerd.c b/owlps-listener/owlps-listenerd.c index 35148f8..ee69e92 100644 --- a/owlps-listener/owlps-listenerd.c +++ b/owlps-listener/owlps-listenerd.c @@ -660,7 +660,7 @@ int check_configuration() } // Packet source // - if (GET_PCAP_FILE()) + if (GET_PCAP_FILE() && GET_PCAP_FILE()[0] != '\0') { if (GET_RTAP_IFACE()[0] != '\0') { @@ -931,7 +931,7 @@ int capture() if (capture_handler == NULL) // Capture starting failed { - fprintf(stderr, "Cannot create capture handler on '%s'%s\n", + fprintf(stderr, "Cannot create capture handler on '%s': %s\n", source, errbuf) ; // Note: errbuf starts with ": " return OWL_ERR_IFACE_PCAP_OPEN ; }