fixed errors reported by review of PR1735

This commit is contained in:
csoler 2019-12-03 21:28:44 +01:00
parent 31968f82f2
commit fcbecbaa16
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
4 changed files with 29 additions and 25 deletions

View file

@ -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);

View file

@ -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);
}
};