Ethereal-dev: RE: [Ethereal-dev] Bad File Descriptor trying to open ANY file

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Michael Lum" <mlum@xxxxxxxxxxxxx>
Date: Fri, 7 Nov 2003 14:57:21 -0800
Ohhh, "helpful".

FYI, I am building with Zlib.

> -----Original Message-----
> From: Guy Harris [mailto:guy@xxxxxxxxxxxx]
> Sent: Friday, November 07, 2003 2:14 PM
> To: mlum@xxxxxxxxxxxxx
> Cc: Ethereal
> Subject: Re: [Ethereal-dev] Bad File Descriptor trying to open ANY file
> 
> 
> 
> On Nov 7, 2003, at 1:48 PM, Michael Lum wrote:
> 
> > I have built an ethereal.exe.
> >
> > It fails to open any file, with the popup given (attachment).
> >
> > The prebuild binary does not have a problem.
> >
> > Does anybody have any ideas ?
> 
> The code path that produces the error probably goes through "cf_open()".
> 
> That goes through "wtap_open_offline()", which calls "open()" - which 
> should be mapped to "_open()" on Windows, courtesy of GLib - to get a 
> C-library file descriptor.  It then calls "filed_open()" to get a "FILE 
> *"; if you're building with Zlib, that's "gzdopen()", otherwise it's 
> "fdopen()" (which should be mapped to "_fdopen()" on Windows).
> 
> If "wtap_open_offline()" succeeds, it calls "wtap_fd()", which should 
> return the file descriptor, and does an "fstat()" on that (which might 
> get mapped to "_fstat()" on Windows).
> 
> It probably failed in:
> 
> 	1) "_open()";
> 
> 	2) "_fdopen()", if you're not building with ZLib;
> 
> 	3) "_fstat()".
> 
> Those *should* presumably all work in VS.NET, as well as the VC++ 6.0 
> that many of us use, but perhaps Microsoft "improved" things so that 
> they don't actually work.
> 
> If you're building with Zlib, perhaps there's some problem with Zlib - 
> the Zlib binaries were probably built with VC++ 6.0 or earlier, but 
> that should presumably work with VS.NET, but, again, perhaps Microsoft 
> "improved" things.