Merge of current trunk to branch 1.6.x.

git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/branches/branch-1.6.x@251 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez
2007-11-19 14:15:45 +00:00
parent 2a76749682
commit 0475a46680
31 changed files with 2506 additions and 2260 deletions

View File

@@ -880,22 +880,24 @@ GetNextRange( char **SrcRangeStr,
off_t *FirstByte,
off_t *LastByte )
{
char *Ptr,
*Tok;
int i,
F = -1,
L = -1;
char *Ptr;
char *Tok;
int i;
int64_t F = -1;
int64_t L = -1;
int Is_Suffix_byte_Range = 1;
if( *SrcRangeStr == NULL )
if( *SrcRangeStr == NULL ) {
return -1;
}
Tok = StrTok( SrcRangeStr, "," );
if( ( Ptr = strstr( Tok, "-" ) ) == NULL )
if( ( Ptr = strstr( Tok, "-" ) ) == NULL ) {
return -1;
}
*Ptr = ' ';
sscanf( Tok, "%d%d", &F, &L );
sscanf( Tok, "%"SCNd64"%"SCNd64, &F, &L );
if( F == -1 || L == -1 ) {
*Ptr = '-';
@@ -910,16 +912,15 @@ GetNextRange( char **SrcRangeStr,
}
if( Is_Suffix_byte_Range ) {
*FirstByte = L;
*LastByte = F;
*FirstByte = (off_t)L;
*LastByte = (off_t)F;
return 1;
}
}
*FirstByte = (off_t)F;
*LastByte = (off_t)L;
*FirstByte = F;
*LastByte = L;
return 1;
}
/************************************************************************
@@ -1531,7 +1532,7 @@ http_RecvPostMessage( http_parser_t * parser,
if( Instr && Instr->IsVirtualFile ) {
Fp = virtualDirCallback.open( filename, UPNP_WRITE );
Fp = (virtualDirCallback.open)( filename, UPNP_WRITE );
if( Fp == NULL ) {
return HTTP_INTERNAL_SERVER_ERROR;
}