CVS: main/libmpdemux stream.c,1.60,1.61
Update of /cvsroot/mplayer/main/libmpdemux In directory mail:/var/tmp.root/cvs-serv4591a Modified Files: stream.c Log Message: Oops, I just noticed albeu's revision 1.58 - so I backed out the "s->fd == NULL" test once again. I'll need to come up with some other way of fixing this so that it works properly on Solaris... Index: stream.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpdemux/stream.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- stream.c 7 Apr 2003 20:41:24 -0000 1.60 +++ stream.c 7 Apr 2003 20:44:06 -0000 1.61 @@ -169,7 +169,7 @@ int stream_fill_buffer(stream_t *s){ int len; - if (s->fd == NULL || s->eof) { s->buf_pos = s->buf_len = 0; return 0; } + if (/*s->fd == NULL ||*/ s->eof) { s->buf_pos = s->buf_len = 0; return 0; } switch(s->type){ #ifdef LIBSMBCLIENT case STREAMTYPE_SMB:
On Mon, Apr 07, 2003 at 10:44:10PM +0200, Ross Finlayson CVS wrote:
Oops, I just noticed albeu's revision 1.58 - so I backed out the "s->fd == NULL" test once again. I'll need to come up with some other way of fixing this so that it works properly on Solaris...
Why don't you just add a test for !s->fd in stream_seek_long() ?
On Mon, Apr 07, 2003 at 10:51:10PM +0200, Andreas Hess wrote:
On Mon, Apr 07, 2003 at 10:44:10PM +0200, Ross Finlayson CVS wrote:
Oops, I just noticed albeu's revision 1.58 - so I backed out the "s->fd == NULL" test once again. I'll need to come up with some other way of fixing this so that it works properly on Solaris...
Why don't you just add a test for !s->fd in stream_seek_long() ?
Because it's wrong!!! -1 (or any negative number) is the way you signal invalid/no fd. 0 is a perfectly valid file descriptor! Whatever code is setting s->fd to 0 for "no fd" should be fixed. Rich
On Mon, Apr 07, 2003 at 09:02:29PM -0400, D Richard Felker III wrote:
On Mon, Apr 07, 2003 at 10:51:10PM +0200, Andreas Hess wrote:
On Mon, Apr 07, 2003 at 10:44:10PM +0200, Ross Finlayson CVS wrote:
Oops, I just noticed albeu's revision 1.58 - so I backed out the "s->fd == NULL" test once again. I'll need to come up with some other way of fixing this so that it works properly on Solaris...
Why don't you just add a test for !s->fd in stream_seek_long() ?
Because it's wrong!!! -1 (or any negative number) is the way you signal invalid/no fd. 0 is a perfectly valid file descriptor! Whatever code is setting s->fd to 0 for "no fd" should be fixed.
But as I understood Ross, on Solaris it isn't a valid file descriptor. So testing for !s->fd (and a #ifdef) should be enough.
On Tue, Apr 08, 2003 at 07:09:39AM +0200, Andreas Hess wrote:
On Mon, Apr 07, 2003 at 09:02:29PM -0400, D Richard Felker III wrote:
On Mon, Apr 07, 2003 at 10:51:10PM +0200, Andreas Hess wrote:
On Mon, Apr 07, 2003 at 10:44:10PM +0200, Ross Finlayson CVS wrote:
Oops, I just noticed albeu's revision 1.58 - so I backed out the "s->fd == NULL" test once again. I'll need to come up with some other way of fixing this so that it works properly on Solaris...
Why don't you just add a test for !s->fd in stream_seek_long() ?
Because it's wrong!!! -1 (or any negative number) is the way you signal invalid/no fd. 0 is a perfectly valid file descriptor! Whatever code is setting s->fd to 0 for "no fd" should be fixed.
But as I understood Ross, on Solaris it isn't a valid file descriptor. So testing for !s->fd (and a #ifdef) should be enough.
No, this is total nonsense. On any system, fd 0 is stdin!!!!! The problem seems to be that on solaris, something is incorrectly setting fd to 0 as an "error code" instead of -1... Rich
participants (3)
-
Andreas Hess -
D Richard Felker III -
Ross Finlayson CVS