mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 15:45:04 -04:00
fixed errors reported by review of PR1735
This commit is contained in:
parent
31968f82f2
commit
fcbecbaa16
4 changed files with 29 additions and 25 deletions
|
@ -481,7 +481,7 @@ void p3LinkMgrIMPL::tickMonitors()
|
|||
{
|
||||
auto e = std::make_shared<RsConnectionEvent>() ;
|
||||
|
||||
e->mType = RsConnectionEvent::PEER_CONNECTED;
|
||||
e->mConnectionType = RsConnectionEvent::PEER_CONNECTED;
|
||||
e->mSslId = peer.id;
|
||||
|
||||
rsEvents->postEvent(e);
|
||||
|
@ -494,11 +494,9 @@ void p3LinkMgrIMPL::tickMonitors()
|
|||
}
|
||||
if (peer.actions & RS_PEER_DISCONNECTED)
|
||||
{
|
||||
p3Notify *notify = RsServer::notify();
|
||||
|
||||
auto e = std::make_shared<RsConnectionEvent>() ;
|
||||
|
||||
e->mType = RsConnectionEvent::PEER_DISCONNECTED;
|
||||
e->mConnectionType = RsConnectionEvent::PEER_DISCONNECTED;
|
||||
e->mSslId = peer.id;
|
||||
|
||||
rsEvents->postEvent(e);
|
||||
|
|
|
@ -221,7 +221,7 @@ struct RsConnectionEvent : RsEvent
|
|||
{
|
||||
RsConnectionEvent()
|
||||
: RsEvent(RsEventType::PEER_CONNECTION),
|
||||
mType(UNKNOWN) {}
|
||||
mConnectionType(UNKNOWN) {}
|
||||
|
||||
enum ConnectionType: uint8_t {
|
||||
UNKNOWN = 0x00,
|
||||
|
@ -230,14 +230,14 @@ struct RsConnectionEvent : RsEvent
|
|||
PEER_REFUSED_CONNECTION = 0x03,
|
||||
};
|
||||
|
||||
ConnectionType mType;
|
||||
ConnectionType mConnectionType;
|
||||
RsPeerId mSslId;
|
||||
|
||||
///* @see RsEvent @see RsSerializable
|
||||
void serial_process( RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx) override
|
||||
{
|
||||
RsEvent::serial_process(j, ctx);
|
||||
RS_SERIAL_PROCESS(mType);
|
||||
RS_SERIAL_PROCESS(mConnectionType);
|
||||
RS_SERIAL_PROCESS(mSslId);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue