From 8e42d7ef7d64a4d65717ccb97a90d49523ccb4ee Mon Sep 17 00:00:00 2001 From: Szymon Tokarz Date: Sun, 21 Aug 2016 10:41:04 +0000 Subject: Tlen protocol Sometimes now there is no GetRoster response, so try to move connection code to other place. git-svn-id: http://svn.miranda-ng.org/main/trunk@17196 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/tlen_iqid.cpp | 24 ++++++++++++++---------- protocols/Tlen/src/tlen_p2p_new.cpp | 4 ++++ 2 files changed, 18 insertions(+), 10 deletions(-) (limited to 'protocols/Tlen') diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 4089af4a85..4e04784de1 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -151,7 +151,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) TLEN_SUBSCRIPTION sub; TLEN_LIST_ITEM *item; char *jid, *name, *nick; - int i, oldStatus; + int i; for (i = 0; i < queryNode->numChild; i++) { itemNode = queryNode->child[i]; @@ -224,15 +224,6 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) } } - Menu_ModifyItem(proto->hMenuMUC, NULL, INVALID_HANDLE_VALUE, 0); - if (proto->hMenuChats != NULL) - Menu_ModifyItem(proto->hMenuChats, NULL, INVALID_HANDLE_VALUE, 0); - - proto->isOnline = TRUE; - proto->debugLogA("Status changed via THREADSTART"); - oldStatus = proto->m_iStatus; - TlenSendPresence(proto, proto->m_iDesiredStatus); - ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, proto->m_iStatus); } } } @@ -552,6 +543,19 @@ void TlenIqResultTcfg(TlenProtocol *proto, XmlNode *iqNode) if ((node = TlenXmlGetChild(miniMailNode, "avatar-remove")) != NULL) { GetConfigItem(node, proto->threadData->tlenConfig.avatarRemove, TRUE, &proto->threadData->tlenConfig.avatarRemoveMthd); } + + + //continue connecting + Menu_ModifyItem(proto->hMenuMUC, NULL, INVALID_HANDLE_VALUE, 0); + if (proto->hMenuChats != NULL) + Menu_ModifyItem(proto->hMenuChats, NULL, INVALID_HANDLE_VALUE, 0); + + proto->isOnline = TRUE; + proto->debugLogA("Status changed via THREADSTART"); + int oldStatus = proto->m_iStatus; + TlenSendPresence(proto, proto->m_iDesiredStatus); + ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, proto->m_iStatus); + } } diff --git a/protocols/Tlen/src/tlen_p2p_new.cpp b/protocols/Tlen/src/tlen_p2p_new.cpp index 43615e4316..75e24250cb 100644 --- a/protocols/Tlen/src/tlen_p2p_new.cpp +++ b/protocols/Tlen/src/tlen_p2p_new.cpp @@ -298,6 +298,10 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { /* i - id of the file */ /* ks - key size (in bytes) */ /* mi - p2p connection id */ + /* ck - aes key */ + /* iv - aes initial vector */ + /* k - ? */ + /* v - ? */ char *n = TlenXmlGetAttrValue(dcng, "n"); // n - name (file_send) if (!mir_strcmp(n, "file_send")) { if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, id)) != NULL) { -- cgit v1.2.3