Fix for 64 bit machines.
git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@152 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
@@ -39,7 +39,8 @@
|
||||
#include <fcntl.h>
|
||||
#ifndef UPNP_USE_BCBPP
|
||||
#ifndef UPNP_USE_MSVCPP
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#endif
|
||||
#include "util.h"
|
||||
@@ -54,7 +55,7 @@
|
||||
#include "ssdplib.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include "ithread.h"
|
||||
@@ -990,7 +991,7 @@ CreateHTTPRangeResponseHeader( char *ByteRangeSpecifier,
|
||||
Instr->RangeOffset = FirstByte;
|
||||
Instr->ReadSendSize = LastByte - FirstByte + 1;
|
||||
sprintf( Instr->RangeHeader,
|
||||
"CONTENT-RANGE: bytes %lld-%lld/%lld\r\n",
|
||||
"CONTENT-RANGE: bytes %"PRId64"-%"PRId64"/%"PRId64"\r\n",
|
||||
(int64_t)FirstByte,
|
||||
(int64_t)LastByte,
|
||||
(int64_t)FileLength ); //Data between two range.
|
||||
@@ -999,7 +1000,7 @@ CreateHTTPRangeResponseHeader( char *ByteRangeSpecifier,
|
||||
Instr->RangeOffset = FirstByte;
|
||||
Instr->ReadSendSize = FileLength - FirstByte;
|
||||
sprintf( Instr->RangeHeader,
|
||||
"CONTENT-RANGE: bytes %lld-%lld/%lld\r\n",
|
||||
"CONTENT-RANGE: bytes %"PRId64"-%"PRId64"/%"PRId64"\r\n",
|
||||
(int64_t)FirstByte,
|
||||
(int64_t)(FileLength - 1),
|
||||
(int64_t)FileLength );
|
||||
@@ -1008,14 +1009,14 @@ CreateHTTPRangeResponseHeader( char *ByteRangeSpecifier,
|
||||
Instr->RangeOffset = 0;
|
||||
Instr->ReadSendSize = FileLength;
|
||||
sprintf( Instr->RangeHeader,
|
||||
"CONTENT-RANGE: bytes 0-%lld/%lld\r\n",
|
||||
"CONTENT-RANGE: bytes 0-%"PRId64"/%"PRId64"\r\n",
|
||||
(int64_t)(FileLength - 1),
|
||||
(int64_t)FileLength );
|
||||
} else {
|
||||
Instr->RangeOffset = FileLength - LastByte;
|
||||
Instr->ReadSendSize = LastByte;
|
||||
sprintf( Instr->RangeHeader,
|
||||
"CONTENT-RANGE: bytes %lld-%lld/%lld\r\n",
|
||||
"CONTENT-RANGE: bytes %"PRId64"-%"PRId64"/%"PRId64"\r\n",
|
||||
(int64_t)(FileLength - LastByte + 1),
|
||||
(int64_t)FileLength,
|
||||
(int64_t)FileLength );
|
||||
|
||||
Reference in New Issue
Block a user