[Listener] Fix compilation with confuse (-r/-R)

The handling of -r/-R was buggy with libconfuse enabled.
This commit is contained in:
Matteo Cypriani 2013-04-29 10:51:04 -04:00
parent 1971e2def6
commit 2b6a3a73ed
2 changed files with 3 additions and 3 deletions

View File

@ -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_

View File

@ -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 ;
}