mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-16 18:39:46 -04:00
- Split majority of p3posted into p3postbase.cc - so that it can be reused by other services.
- Fixed iterator overflow into rsgxsupdateitems.cc - Fixed Mutex deadlock in pqiperson.cc - Removed old code. - Fixed lots of compile warnings - mainly wrong variable ordering in constructors. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@7044 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
46518ebf51
commit
ae5942733e
24 changed files with 921 additions and 5122 deletions
|
@ -151,7 +151,7 @@ int pqiperson::tick()
|
|||
out += " No Heartbeat & No Packets -> assume dead. calling pqissl::reset()";
|
||||
pqioutput(PQL_WARNING, pqipersonzone, out);
|
||||
|
||||
this->reset();
|
||||
this->reset_locked();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -384,6 +384,11 @@ int pqiperson::reset()
|
|||
{
|
||||
RsStackMutex stack(mPersonMtx); /**** LOCK MUTEX ****/
|
||||
|
||||
return reset_locked();
|
||||
}
|
||||
|
||||
int pqiperson::reset_locked()
|
||||
{
|
||||
pqioutput(PQL_WARNING, pqipersonzone, "pqiperson::reset() resetting all pqiconnect for Id: " + PeerId());
|
||||
|
||||
std::map<uint32_t, pqiconnect *>::iterator it;
|
||||
|
|
|
@ -179,6 +179,8 @@ int handleNotifyEvent_locked(NetInterface *ni, int event, const struct socka
|
|||
|
||||
RsMutex mPersonMtx; /**** LOCKS below ****/
|
||||
|
||||
int reset_locked();
|
||||
|
||||
void setRateCap_locked(float val_in, float val_out);
|
||||
|
||||
std::map<uint32_t, pqiconnect *> kids;
|
||||
|
|
|
@ -93,16 +93,15 @@ static const int PQISSL_SSL_CONNECT_TIMEOUT = 30;
|
|||
|
||||
pqissl::pqissl(pqissllistener *l, PQInterface *parent, p3LinkMgr *lm)
|
||||
:NetBinInterface(parent, parent->PeerId()),
|
||||
mLinkMgr(lm), pqil(l),
|
||||
mSslMtx("pqissl"),
|
||||
waiting(WAITING_NOT), active(false), certvalid(false),
|
||||
active(false), certvalid(false), waiting(WAITING_NOT),
|
||||
sslmode(PQISSL_ACTIVE), ssl_connection(NULL), sockfd(-1),
|
||||
pqil(l), // no init for remote_addr.
|
||||
readpkt(NULL), pktlen(0),
|
||||
readpkt(NULL), pktlen(0), total_len(0),
|
||||
attempt_ts(0),
|
||||
sameLAN(false), n_read_zero(0), mReadZeroTS(0),
|
||||
mConnectDelay(0), mConnectTS(0),
|
||||
mConnectTimeout(0), mTimeoutTS(0), mLinkMgr(lm)
|
||||
|
||||
mConnectTimeout(0), mTimeoutTS(0)
|
||||
{
|
||||
RsStackMutex stack(mSslMtx); /**** LOCKED MUTEX ****/
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#define DEFAULT_STREAMER_IDLE_SLEEP 1000000 // 1 sec
|
||||
|
||||
pqithreadstreamer::pqithreadstreamer(PQInterface *parent, RsSerialiser *rss, std::string id, BinInterface *bio_in, int bio_flags_in)
|
||||
:pqistreamer(rss, id, bio_in, bio_flags_in), mThreadMutex("pqithreadstreamer"), mParent(parent), mTimeout(0)
|
||||
:pqistreamer(rss, id, bio_in, bio_flags_in), mParent(parent), mThreadMutex("pqithreadstreamer"), mTimeout(0)
|
||||
{
|
||||
mTimeout = DEFAULT_STREAMER_TIMEOUT;
|
||||
mSleepPeriod = DEFAULT_STREAMER_SLEEP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue