On Sat, Dec 08, 2001 at 02:45:32PM -0700, Phil Wood wrote:
> --- pcap-linux.c-2001.12.08   Sat Dec  8 20:22:32 2001
> +++ pcap-linux.c      Sat Dec  8 21:05:23 2001
> @@ -626,17 +626,45 @@
>  pcap_stats(pcap_t *handle, struct pcap_stat *stats)
>  {
>  #ifdef HAVE_TPACKET_STATS
> +    if (handle->fd > -1)
> +    {

When would "handle->fd" be -1?  If "pcap_open_live()" fails to open a
socket, it'll return NULL, so the caller won't have a handle; if it
succeeds in opening the socket, it'll set "handle->fd" to that socket.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to