Bug 940215 - Build netwerk/cache2, ftp, and rtsp in unified mode. r=mcmanus

This commit is contained in:
Chris Peterson 2013-11-17 23:29:11 -08:00
parent 2a44bbeb57
commit ee12a391d3
5 changed files with 13 additions and 9 deletions

View File

@ -20,7 +20,7 @@ EXPORTS += [
'CacheStorageService.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'AppCacheStorage.cpp',
'CacheEntriesEnumerator.cpp',
'CacheEntry.cpp',

View File

@ -19,7 +19,7 @@ EXPORTS.mozilla.net += [
'FTPChannelParent.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'FTPChannelChild.cpp',
'FTPChannelParent.cpp',
'nsFTPChannel.cpp',

View File

@ -1556,12 +1556,12 @@ nsFtpState::R_pasv() {
// nsIRequest methods:
static inline
uint32_t NowInSeconds()
uint32_t GetFtpTime()
{
return uint32_t(PR_Now() / PR_USEC_PER_SEC);
}
uint32_t nsFtpState::mSessionStartTime = NowInSeconds();
uint32_t nsFtpState::mSessionStartTime = GetFtpTime();
/* Is this cache entry valid to use for reading?
* Since we make up an expiration time for ftp, use the following rules:
@ -1620,7 +1620,7 @@ nsFtpState::CanReadCacheEntry()
if (NS_FAILED(rv))
return false;
return (NowInSeconds() <= time);
return (GetFtpTime() <= time);
}
nsresult

View File

@ -34,7 +34,7 @@ nsFtpControlConnection::OnInputStreamReady(nsIAsyncInputStream *stream)
// Consume data whether we have a listener or not.
uint64_t avail64;
uint32_t avail;
uint32_t avail = 0;
nsresult rv = stream->Available(&avail64);
if (NS_SUCCEEDED(rv)) {
avail = (uint32_t)std::min(avail64, (uint64_t)sizeof(data));

View File

@ -15,11 +15,17 @@ EXPORTS.mozilla.net += [
'RtspHandler.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'controller/RtspController.cpp',
'controller/RtspControllerChild.cpp',
'controller/RtspControllerParent.cpp',
'controller/RtspMetaData.cpp',
'RtspChannel.cpp',
'RtspHandler.cpp',
]
# Android sources
SOURCES += [
'rtsp/AAMRAssembler.cpp',
'rtsp/AAVCAssembler.cpp',
'rtsp/AH263Assembler.cpp',
@ -34,8 +40,6 @@ SOURCES += [
'rtsp/ARTSPConnection.cpp',
'rtsp/ASessionDescription.cpp',
'rtsp/RTSPSource.cpp',
'RtspChannel.cpp',
'RtspHandler.cpp',
]
FAIL_ON_WARNINGS = True