diff --git a/dali/base/dasds.cpp b/dali/base/dasds.cpp index 01605fcdd99..2a502ee1bdb 100644 --- a/dali/base/dasds.cpp +++ b/dali/base/dasds.cpp @@ -1881,7 +1881,7 @@ class CExtCache return; MemoryAttr ma; ma.set(sz, data); - CTransactionItem *item = new CTransactionItem(strdup(name), sz, ma.detach(), false); + Owned item = new CTransactionItem(strdup(name), sz, ma.detach(), false); doAdd(item); } void add(CTransactionItem *item) diff --git a/dali/ft/daftprogress.cpp b/dali/ft/daftprogress.cpp index a83a81ec1a1..78305dd2c91 100644 --- a/dali/ft/daftprogress.cpp +++ b/dali/ft/daftprogress.cpp @@ -88,15 +88,22 @@ void DaftProgress::onProgress(unsigned __int64 sizeDone, unsigned __int64 totalS unsigned secsLeft = (unsigned)(timeLeft * cycleToNanoScale /1000000000); char temp[20]; formatTime(temp, secsLeft); - displayProgress((unsigned)(sizeDone*100/totalSize), secsLeft, temp, - sizeDone/scale,totalSize/scale,scaleUnit, - (unsigned)(msGone ? (sizeDone-startSize)/msGone : 0), + + unsigned percentDone = (unsigned)(totalSize ? (sizeDone*100/totalSize) : 100); + + unsigned __int64 kbPerSecond = (sizeDone-startSize) / 1024; + if (msGone) // if took no time, leave as max total kb. + kbPerSecond = (kbPerSecond * 1000) / msGone; + + displayProgress(percentDone, secsLeft, temp, + sizeDone/scale, totalSize/scale, scaleUnit, + (unsigned)kbPerSecond, (unsigned)(recentTimeDelta ? recentSizeDelta / recentTimeDelta : 0), numNodes, numReads, numWrites); if (sizeDone == totalSize) { formatTime(temp, (unsigned)(msGone/1000)); - displaySummary(temp, (unsigned)((totalSize - startSize)/msGone)); + displaySummary(temp, (unsigned)kbPerSecond); } } } diff --git a/system/jlib/jsocket.cpp b/system/jlib/jsocket.cpp index d109766bac6..d7ea754f161 100644 --- a/system/jlib/jsocket.cpp +++ b/system/jlib/jsocket.cpp @@ -496,6 +496,9 @@ static int getAddressInfo(const char *name, unsigned *netaddr, bool okToLogErr); static CriticalSection queryDNSCS; +#ifndef EAI_SYSTEM +# define EAI_SYSTEM -11 +#endif class CAddrInfoThreadArgs : public CInterface { public: