Merge of patch submitted By Keith Brindley - brindlk
SF Bug Tracker [ 1762758 ] Seek not working for large files. git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@214 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
parent
67b51187b9
commit
7967a0cd45
16
ChangeLog
16
ChangeLog
@ -2,6 +2,22 @@
|
|||||||
Version 1.6.0
|
Version 1.6.0
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
|
2007-08-06 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
|
* Merge of patch submitted By Keith Brindley - brindlk
|
||||||
|
SF Bug Tracker [ 1762758 ] Seek not working for large files
|
||||||
|
Problem:
|
||||||
|
Requests from the uPnP client to seek to a position beyond 2GB in a large
|
||||||
|
file are handled as a request to see from the 2GB point.
|
||||||
|
|
||||||
|
Impact:
|
||||||
|
Varies depending on client. The Xbox 360 kills the connection when it
|
||||||
|
realises.
|
||||||
|
|
||||||
|
Solution:
|
||||||
|
GetNextRange function (webserver.c) is updated to handle large file sizes.
|
||||||
|
Fix should also recognise when built on a 32bit platform rather than 64 and
|
||||||
|
handle accordingly.
|
||||||
|
|
||||||
2007-08-05 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
2007-08-05 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
* Merge of Mac OS X patch from Stéphane Corthésy (davelopper),
|
* Merge of Mac OS X patch from Stéphane Corthésy (davelopper),
|
||||||
SF Bug Tracker [ 1686420 ] Modifications for MacOSX.
|
SF Bug Tracker [ 1686420 ] Modifications for MacOSX.
|
||||||
|
1
THANKS
1
THANKS
@ -20,6 +20,7 @@ exempt of errors.
|
|||||||
- Jiri Zouhar
|
- Jiri Zouhar
|
||||||
- John Dennis
|
- John Dennis
|
||||||
- Jonathan (no_dice)
|
- Jonathan (no_dice)
|
||||||
|
- Keith Brindley
|
||||||
- Leuk_He
|
- Leuk_He
|
||||||
- Loigu
|
- Loigu
|
||||||
- Luke Kim
|
- Luke Kim
|
||||||
|
@ -953,7 +953,7 @@ GetDescDocumentAndURL( IN Upnp_DescType descriptionType,
|
|||||||
char *temp_str = NULL;
|
char *temp_str = NULL;
|
||||||
FILE *fp = NULL;
|
FILE *fp = NULL;
|
||||||
off_t fileLen;
|
off_t fileLen;
|
||||||
unsigned num_read;
|
size_t num_read;
|
||||||
time_t last_modified;
|
time_t last_modified;
|
||||||
struct stat file_info;
|
struct stat file_info;
|
||||||
struct sockaddr_in serverAddr;
|
struct sockaddr_in serverAddr;
|
||||||
|
@ -880,22 +880,24 @@ GetNextRange( char **SrcRangeStr,
|
|||||||
off_t *FirstByte,
|
off_t *FirstByte,
|
||||||
off_t *LastByte )
|
off_t *LastByte )
|
||||||
{
|
{
|
||||||
char *Ptr,
|
char *Ptr;
|
||||||
*Tok;
|
char *Tok;
|
||||||
int i,
|
int i;
|
||||||
F = -1,
|
int64_t F = -1;
|
||||||
L = -1;
|
int64_t L = -1;
|
||||||
int Is_Suffix_byte_Range = 1;
|
int Is_Suffix_byte_Range = 1;
|
||||||
|
|
||||||
if( *SrcRangeStr == NULL )
|
if( *SrcRangeStr == NULL ) {
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
Tok = StrTok( SrcRangeStr, "," );
|
Tok = StrTok( SrcRangeStr, "," );
|
||||||
|
|
||||||
if( ( Ptr = strstr( Tok, "-" ) ) == NULL )
|
if( ( Ptr = strstr( Tok, "-" ) ) == NULL ) {
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
*Ptr = ' ';
|
*Ptr = ' ';
|
||||||
sscanf( Tok, "%d%d", &F, &L );
|
sscanf( Tok, "%"SCNd64"%"SCNd64, &F, &L );
|
||||||
|
|
||||||
if( F == -1 || L == -1 ) {
|
if( F == -1 || L == -1 ) {
|
||||||
*Ptr = '-';
|
*Ptr = '-';
|
||||||
@ -910,16 +912,15 @@ GetNextRange( char **SrcRangeStr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( Is_Suffix_byte_Range ) {
|
if( Is_Suffix_byte_Range ) {
|
||||||
*FirstByte = L;
|
*FirstByte = (off_t)L;
|
||||||
*LastByte = F;
|
*LastByte = (off_t)F;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*FirstByte = (off_t)F;
|
||||||
|
*LastByte = (off_t)L;
|
||||||
|
|
||||||
*FirstByte = F;
|
|
||||||
*LastByte = L;
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user