Fixed 32-bit compile issues
This commit is contained in:
parent
9671e385ce
commit
7565704fdc
32 changed files with 87 additions and 103 deletions
|
@ -226,7 +226,7 @@ std::set<std::string> Controller::getActiveStreams(const std::string & prefix){
|
|||
}
|
||||
|
||||
/// Updates the given active connection with new stats data.
|
||||
void Controller::statSession::update(unsigned long index, IPC::statExchange & data){
|
||||
void Controller::statSession::update(uint64_t index, IPC::statExchange & data){
|
||||
long long prevDown = getDown();
|
||||
long long prevUp = getUp();
|
||||
curConns[index].update(data);
|
||||
|
@ -314,7 +314,7 @@ void Controller::statSession::wipeOld(uint64_t cutOff){
|
|||
}
|
||||
}
|
||||
if (curConns.size()){
|
||||
for (std::map<unsigned long, statStorage>::iterator it = curConns.begin(); it != curConns.end(); ++it){
|
||||
for (std::map<uint64_t, statStorage>::iterator it = curConns.begin(); it != curConns.end(); ++it){
|
||||
while (it->second.log.size() > 1 && it->second.log.begin()->first < cutOff){
|
||||
it->second.log.erase(it->second.log.begin());
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ void Controller::statSession::ping(const Controller::sessIndex & index, uint64_t
|
|||
}
|
||||
|
||||
/// Archives the given connection.
|
||||
void Controller::statSession::finish(unsigned long index){
|
||||
void Controller::statSession::finish(uint64_t index){
|
||||
oldConns.push_back(curConns[index]);
|
||||
curConns.erase(index);
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ Controller::statSession::statSession(){
|
|||
}
|
||||
|
||||
/// Moves the given connection to the given session
|
||||
void Controller::statSession::switchOverTo(statSession & newSess, unsigned long index){
|
||||
void Controller::statSession::switchOverTo(statSession & newSess, uint64_t index){
|
||||
//add to the given session first
|
||||
newSess.curConns[index] = curConns[index];
|
||||
//if this connection has data, update firstSec/lastSec if needed
|
||||
|
@ -406,7 +406,7 @@ void Controller::statSession::switchOverTo(statSession & newSess, unsigned long
|
|||
}
|
||||
}
|
||||
if (curConns.size()){
|
||||
for (std::map<unsigned long, statStorage>::iterator it = curConns.begin(); it != curConns.end(); ++it){
|
||||
for (std::map<uint64_t, statStorage>::iterator it = curConns.begin(); it != curConns.end(); ++it){
|
||||
if (it->second.log.size()){
|
||||
if (firstSec > it->second.log.begin()->first){
|
||||
firstSec = it->second.log.begin()->first;
|
||||
|
@ -480,7 +480,7 @@ bool Controller::statSession::isViewer(){
|
|||
}
|
||||
}
|
||||
if (curConns.size()){
|
||||
for (std::map<unsigned long, statStorage>::iterator it = curConns.begin(); it != curConns.end(); ++it){
|
||||
for (std::map<uint64_t, statStorage>::iterator it = curConns.begin(); it != curConns.end(); ++it){
|
||||
if (it->second.log.size()){
|
||||
upTotal += it->second.log.rbegin()->second.up + it->second.log.rbegin()->second.down;
|
||||
if (upTotal > COUNTABLE_BYTES){return true;}
|
||||
|
@ -891,7 +891,7 @@ void Controller::fillClients(JSON::Value & req, JSON::Value & rep){
|
|||
void Controller::fillActive(JSON::Value & req, JSON::Value & rep, bool onlyNow){
|
||||
//collect the data first
|
||||
std::set<std::string> streams;
|
||||
std::map<std::string, unsigned long> clients;
|
||||
std::map<std::string, uint64_t> clients;
|
||||
unsigned int tOut = Util::epoch() - STATS_DELAY;
|
||||
unsigned int tIn = Util::epoch() - STATS_INPUT_DELAY;
|
||||
//check all sessions
|
||||
|
@ -934,7 +934,7 @@ void Controller::fillActive(JSON::Value & req, JSON::Value & rep, bool onlyNow){
|
|||
IPC::semaphore metaLocker(liveSemName, O_CREAT | O_RDWR, (S_IRWXU|S_IRWXG|S_IRWXO), 1);
|
||||
metaLocker.wait();
|
||||
DTSC::Scan strm = DTSC::Packet(streamIndex.mapped, streamIndex.len, true).getScan();
|
||||
long long lms = 0;
|
||||
uint64_t lms = 0;
|
||||
DTSC::Scan trcks = strm.getMember("tracks");
|
||||
unsigned int trcks_ctr = trcks.getSize();
|
||||
for (unsigned int i = 0; i < trcks_ctr; ++i){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue