mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Updated version numbers to v0.4.11b.
Bugfixes for 'sleep' issues under windows. Extra debugging for transfer module. Fixed channel directory creation. (extra 'break' statement) Fixed very slow transfers on Windows platform (uninitialised variable) Ready for win/linux/osx release now. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@830 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4610d1ddac
commit
83720439f0
@ -433,7 +433,16 @@ bool ftExtraList::loadList(std::list<RsItem *> load)
|
|||||||
delete (*it);
|
delete (*it);
|
||||||
|
|
||||||
/* short sleep */
|
/* short sleep */
|
||||||
|
#ifndef WINDOWS_SYS
|
||||||
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
usleep(1000); /* 1000 per second */
|
usleep(1000); /* 1000 per second */
|
||||||
|
|
||||||
|
#else
|
||||||
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
Sleep(1);
|
||||||
|
#endif
|
||||||
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#include "util/utest.h"
|
#include "util/utest.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "util/rswin.h"
|
||||||
|
|
||||||
INITTEST();
|
INITTEST();
|
||||||
|
|
||||||
static int test_timeout(ftFileCreator *creator);
|
static int test_timeout(ftFileCreator *creator);
|
||||||
@ -93,8 +95,15 @@ int test_fill(ftFileCreator *creator)
|
|||||||
|
|
||||||
creator->addFileData(offset, chunk, data);
|
creator->addFileData(offset, chunk, data);
|
||||||
free(data);
|
free(data);
|
||||||
|
#ifndef WINDOWS_SYS
|
||||||
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
usleep(250000); /* 1/4 of sec */
|
usleep(250000); /* 1/4 of sec */
|
||||||
|
#else
|
||||||
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
Sleep(250); /* 1/4 of sec */
|
||||||
|
#endif
|
||||||
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
|
||||||
chunk = 1000; /* reset chunk size */
|
chunk = 1000; /* reset chunk size */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "util/utest.h"
|
#include "util/utest.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "util/rswin.h"
|
||||||
|
|
||||||
INITTEST()
|
INITTEST()
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -602,18 +602,47 @@ bool ftTransferModule::locked_tickPeerTransfer(peerInfo &info)
|
|||||||
|
|
||||||
/* request at more than current rate */
|
/* request at more than current rate */
|
||||||
uint32_t next_req = info.actualRate * (1.0 + info.mRateIncrease);
|
uint32_t next_req = info.actualRate * (1.0 + info.mRateIncrease);
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
|
||||||
|
std::cerr << "locked_tickPeerTransfer() actual rate: " << actualRate;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (next_req > info.desiredRate * 1.1)
|
if (next_req > info.desiredRate * 1.1)
|
||||||
|
{
|
||||||
next_req = info.desiredRate * 1.1;
|
next_req = info.desiredRate * 1.1;
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
std::cerr << "locked_tickPeerTransfer() Reached MaxRate: next_req: " << next_req;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (next_req > FT_TM_MAX_PEER_RATE)
|
if (next_req > FT_TM_MAX_PEER_RATE)
|
||||||
|
{
|
||||||
next_req = FT_TM_MAX_PEER_RATE;
|
next_req = FT_TM_MAX_PEER_RATE;
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
std::cerr << "locked_tickPeerTransfer() Reached AbsMaxRate: next_req: " << next_req;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (next_req < FT_TM_MINIMUM_CHUNK)
|
if (next_req < FT_TM_MINIMUM_CHUNK)
|
||||||
|
{
|
||||||
next_req = FT_TM_MINIMUM_CHUNK;
|
next_req = FT_TM_MINIMUM_CHUNK;
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
std::cerr << "locked_tickPeerTransfer() small chunk: next_req: " << next_req;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
info.lastTS = ts;
|
info.lastTS = ts;
|
||||||
|
|
||||||
|
#ifdef FT_DEBUG
|
||||||
|
std::cerr << "locked_tickPeerTransfer() desired next_req: " << next_req;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* do request */
|
/* do request */
|
||||||
uint64_t req_offset = 0;
|
uint64_t req_offset = 0;
|
||||||
|
@ -56,7 +56,9 @@ class peerInfo
|
|||||||
public:
|
public:
|
||||||
peerInfo(std::string peerId_in):peerId(peerId_in),state(PQIPEER_NOT_ONLINE),desiredRate(0),actualRate(0),
|
peerInfo(std::string peerId_in):peerId(peerId_in),state(PQIPEER_NOT_ONLINE),desiredRate(0),actualRate(0),
|
||||||
offset(0),chunkSize(0),receivedSize(0),lastTS(0),
|
offset(0),chunkSize(0),receivedSize(0),lastTS(0),
|
||||||
recvTS(0), lastTransfers(0), nResets(0)
|
recvTS(0), lastTransfers(0), nResets(0),
|
||||||
|
rtt(0), rttActive(false), rttStart(0), rttOffset(0),
|
||||||
|
mRateIncrease(1)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -415,26 +415,34 @@ void p3Channels::locked_notifyGroupChanged(GroupInfo &grp, uint32_t flags)
|
|||||||
std::string msgId;
|
std::string msgId;
|
||||||
std::string nullId;
|
std::string nullId;
|
||||||
|
|
||||||
std::cerr << "p3Channels::locked_eventUpdateGroup() ";
|
std::cerr << "p3Channels::locked_notifyGroupChanged() ";
|
||||||
std::cerr << grpId;
|
std::cerr << grpId;
|
||||||
std::cerr << " flags:" << grp.flags;
|
std::cerr << " flags:" << flags;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
switch(flags)
|
switch(flags)
|
||||||
{
|
{
|
||||||
case GRP_NEW_UPDATE:
|
case GRP_NEW_UPDATE:
|
||||||
|
std::cerr << "p3Channels::locked_notifyGroupChanged() NEW UPDATE";
|
||||||
|
std::cerr << std::endl;
|
||||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_CHAN_NEW, grpId, msgId, nullId);
|
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_CHAN_NEW, grpId, msgId, nullId);
|
||||||
break;
|
break;
|
||||||
case GRP_UPDATE:
|
case GRP_UPDATE:
|
||||||
|
std::cerr << "p3Channels::locked_notifyGroupChanged() UPDATE";
|
||||||
|
std::cerr << std::endl;
|
||||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_CHAN_UPDATE, grpId, msgId, nullId);
|
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_CHAN_UPDATE, grpId, msgId, nullId);
|
||||||
break;
|
break;
|
||||||
case GRP_LOAD_KEY:
|
case GRP_LOAD_KEY:
|
||||||
|
std::cerr << "p3Channels::locked_notifyGroupChanged() LOAD_KEY";
|
||||||
|
std::cerr << std::endl;
|
||||||
break;
|
break;
|
||||||
case GRP_NEW_MSG:
|
case GRP_NEW_MSG:
|
||||||
|
std::cerr << "p3Channels::locked_notifyGroupChanged() NEW MSG";
|
||||||
|
std::cerr << std::endl;
|
||||||
break;
|
break;
|
||||||
case GRP_SUBSCRIBED:
|
case GRP_SUBSCRIBED:
|
||||||
break;
|
std::cerr << "p3Channels::locked_notifyGroupChanged() SUBSCRIBED";
|
||||||
|
std::cerr << std::endl;
|
||||||
{
|
{
|
||||||
std::string channeldir = mChannelsDir + "/" + grpId;
|
std::string channeldir = mChannelsDir + "/" + grpId;
|
||||||
|
|
||||||
@ -456,10 +464,17 @@ void p3Channels::locked_notifyGroupChanged(GroupInfo &grp, uint32_t flags)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case GRP_UNSUBSCRIBED:
|
case GRP_UNSUBSCRIBED:
|
||||||
|
std::cerr << "p3Channels::locked_notifyGroupChanged() UNSUBSCRIBED";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
|
||||||
/* won't stop downloads... */
|
/* won't stop downloads... */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
std::cerr << "p3Channels::locked_notifyGroupChanged() Unknown DEFAULT";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return p3GroupDistrib::locked_notifyGroupChanged(grp, flags);
|
return p3GroupDistrib::locked_notifyGroupChanged(grp, flags);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
; Define your application name
|
; Define your application name
|
||||||
!define APPNAME "RetroShare"
|
!define APPNAME "RetroShare"
|
||||||
!define VERSION "0.4.11a"
|
!define VERSION "0.4.11b"
|
||||||
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
|
||||||
|
|
||||||
; Main Install settings
|
; Main Install settings
|
||||||
@ -163,7 +163,7 @@ Section $(sec_data) sec_data
|
|||||||
; We're not ready for external skins...
|
; We're not ready for external skins...
|
||||||
; Set Section qss need to remove svn path
|
; Set Section qss need to remove svn path
|
||||||
SetOutPath "$INSTDIR\qss\"
|
SetOutPath "$INSTDIR\qss\"
|
||||||
File /r qss\*.*
|
File /r release\qss\*.*
|
||||||
|
|
||||||
; Set Section emoticons need to remove svn path
|
; Set Section emoticons need to remove svn path
|
||||||
; SetOutPath "$INSTDIR\emoticons\"
|
; SetOutPath "$INSTDIR\emoticons\"
|
||||||
@ -175,11 +175,11 @@ Section $(sec_data) sec_data
|
|||||||
|
|
||||||
; Add emoticons
|
; Add emoticons
|
||||||
SetOutPath "$INSTDIR\emoticons\kopete\"
|
SetOutPath "$INSTDIR\emoticons\kopete\"
|
||||||
File /r emoticons\kopete\*.*
|
File /r release\emoticons\kopete\*.*
|
||||||
|
|
||||||
; Add Chat Style
|
; Add Chat Style
|
||||||
SetOutPath "$INSTDIR\style\"
|
SetOutPath "$INSTDIR\style\"
|
||||||
File /r style\*.*
|
File /r release\style\*.*
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
//#define USE_SVN_VERSIONS 1
|
//#define USE_SVN_VERSIONS 1
|
||||||
|
|
||||||
#define VERSION "0.4.11a"
|
#define VERSION "0.4.11b"
|
||||||
|
|
||||||
#if USE_SVN_VERSIONS
|
#if USE_SVN_VERSIONS
|
||||||
#include "svn_revision.h"
|
#include "svn_revision.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user