updated GUI for new distant chat

This commit is contained in:
csoler 2015-11-26 20:40:06 -05:00
parent 26f4523f5f
commit a2e0f4196b
17 changed files with 215 additions and 1214 deletions

View file

@ -53,11 +53,6 @@ static const uint32_t RS_GXS_TUNNEL_DH_STATUS_UNINITIALIZED = 0x0000 ;
static const uint32_t RS_GXS_TUNNEL_DH_STATUS_HALF_KEY_DONE = 0x0001 ;
static const uint32_t RS_GXS_TUNNEL_DH_STATUS_KEY_AVAILABLE = 0x0002 ;
static const uint32_t RS_GXS_TUNNEL_STATUS_UNKNOWN = 0x00 ;
static const uint32_t RS_GXS_TUNNEL_STATUS_CAN_TALK = 0x01 ;
static const uint32_t RS_GXS_TUNNEL_STATUS_TUNNEL_DN = 0x02 ;
static const uint32_t RS_GXS_TUNNEL_STATUS_REMOTELY_CLOSED = 0x03 ;
static const uint32_t RS_GXS_TUNNEL_DELAY_BETWEEN_RESEND = 10 ; // re-send every 10 secs.
static const uint32_t GXS_TUNNEL_ENCRYPTION_HMAC_SIZE = SHA_DIGEST_LENGTH ;
@ -1126,8 +1121,7 @@ void p3GxsTunnelService::startClientGxsTunnelConnection(const RsGxsId& to_gxs_id
RsFileHash hash = randomHashFromDestinationGxsId(to_gxs_id) ;
RsGxsTunnelId tnl_id = makeGxsTunnelId(from_gxs_id,to_gxs_id) ;
tunnel_id = tnl_id ;
tunnel_id = makeGxsTunnelId(from_gxs_id,to_gxs_id) ;
{
RsStackMutex stack(mGxsTunnelMtx); /********** STACK LOCKED MTX ******/

View file

@ -227,8 +227,6 @@ private:
bool handleEncryptedData(const uint8_t *data_bytes,uint32_t data_size,const TurtleFileHash& hash,const RsPeerId& virtual_peer_id) ;
static TurtleFileHash hashFromVirtualPeerId(const DistantChatPeerId& peerId) ; // converts IDs so that we can talk to RsPeerId from outside
// local data
p3turtle *mTurtle ;

View file

@ -232,6 +232,10 @@ std::ostream& RsChatAvatarItem::print(std::ostream &out, uint16_t indent)
return out;
}
RsGxsTunnelDHPublicKeyItem::~RsGxsTunnelDHPublicKeyItem()
{
BN_free(public_key) ;
}
RsItem *RsChatSerialiser::deserialise(void *data, uint32_t *pktsize)
{
uint32_t rstype = getRsItemId(data);

View file

@ -130,10 +130,10 @@ class RsGxsTunnelDataAckItem: public RsGxsTunnelItem
class RsGxsTunnelDHPublicKeyItem: public RsGxsTunnelItem
{
public:
RsGxsTunnelDHPublicKeyItem() :RsGxsTunnelItem(RS_PKT_SUBTYPE_DISTANT_CHAT_DH_PUBLIC_KEY) {}
RsGxsTunnelDHPublicKeyItem() :RsGxsTunnelItem(RS_PKT_SUBTYPE_GXS_TUNNEL_DH_PUBLIC_KEY) {}
RsGxsTunnelDHPublicKeyItem(void *data,uint32_t size) ; // deserialization
virtual ~RsGxsTunnelDHPublicKeyItem() { BN_free(public_key) ; }
virtual ~RsGxsTunnelDHPublicKeyItem() ;
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?