From 2334ddc39a0c0f847239c8b331ec1c9a2a12754b Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Tue, 20 Aug 2013 20:36:14 +0000 Subject: Tlen: Try to fix login issues (fixes 447) git-svn-id: http://svn.miranda-ng.org/main/trunk@5764 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/tlen_iqid.cpp | 8 ++++---- protocols/Tlen/src/tlen_presence.cpp | 4 ++-- protocols/Tlen/src/tlen_svc.cpp | 24 ++++++++++++------------ protocols/Tlen/src/tlen_thread.cpp | 16 ++++++++-------- protocols/Tlen/src/tlen_userinfo.cpp | 2 +- protocols/Tlen/tlen_10.vcxproj | 4 ---- protocols/Tlen/tlen_10.vcxproj.filters | 12 ------------ 7 files changed, 27 insertions(+), 43 deletions(-) diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 3951902ea3..a9637df40c 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -44,9 +44,9 @@ void TlenIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) db_free(&dbv); // iqId = TlenSerialNext(); // TlenIqAdd(iqId, IQ_PROC_NONE, TlenIqResultGetRoster); -// TlenSend(info, "", iqId); +// TlenSend(info, "", iqId); - TlenSend(proto, ""); + TlenSend(proto, ""); TlenSend(proto, ""); } // What to do if password error? etc... @@ -140,7 +140,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) if (!strcmp(type, "result")) { str = TlenXmlGetAttrValue(queryNode, "xmlns"); - if (str != NULL && !strcmp(str, "tlen:iq:roster")) { + if (str != NULL && !strcmp(str, "jabber:iq:roster")) { DBVARIANT dbv; XmlNode *itemNode, *groupNode; TLEN_SUBSCRIPTION sub; @@ -235,7 +235,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) } -// Tlen actually use tlen:iq:search for other users vCard or tlen:iq:register for own vCard +// Tlen actually use jabber:iq:search for other users vCard or jabber:iq:register for own vCard void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) { XmlNode *queryNode, *itemNode, *n; diff --git a/protocols/Tlen/src/tlen_presence.cpp b/protocols/Tlen/src/tlen_presence.cpp index b83e29f146..52a8ca12c7 100644 --- a/protocols/Tlen/src/tlen_presence.cpp +++ b/protocols/Tlen/src/tlen_presence.cpp @@ -91,12 +91,12 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) if (!item->infoRequested) { int iqId = TlenSerialNext(proto); item->infoRequested = TRUE; - TlenSend( proto, "", iqId, from); + TlenSend( proto, "", iqId, from); } if (proto->tlenOptions.enableVersion && !item->versionRequested) { item->versionRequested = TRUE; if (proto->m_iStatus != ID_STATUS_INVISIBLE) { - TlenSend( proto, "", from ); + TlenSend( proto, "", from ); } } } diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 6b9de79f63..692c09b9ec 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -63,9 +63,9 @@ int TlenRunSearch(TlenProtocol *proto) { iqId = proto->searchID; TlenIqAdd(proto, iqId, IQ_PROC_GETSEARCH, TlenIqResultSearch); if (proto->searchIndex == 0) { - TlenSend(proto, "%s", iqId, proto->searchQuery); + TlenSend(proto, "%s", iqId, proto->searchQuery); } else { - TlenSend(proto, "%s%d", iqId, proto->searchQuery, proto->searchIndex * TLEN_MAX_SEARCH_RESULTS_PER_PAGE); + TlenSend(proto, "%s%d", iqId, proto->searchQuery, proto->searchIndex * TLEN_MAX_SEARCH_RESULTS_PER_PAGE); } proto->searchIndex ++; } @@ -340,7 +340,7 @@ int TlenProtocol::AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason) char *jid = lastName + strlen(lastName) + 1; TlenSend(this, "", jid); - TlenSend(this, "", jid); + TlenSend(this, "", jid); mir_free(dbei.pBlob); return 0; } @@ -483,14 +483,14 @@ int TlenProtocol::GetInfo(HANDLE hContact, int infoType) if (hContact == NULL) { iqId = TlenSerialNext(this); TlenIqAdd(this, iqId, IQ_PROC_NONE, TlenIqResultVcard); - TlenSend(this, "", iqId); + TlenSend(this, "", iqId); } else { if (db_get(hContact, m_szModuleName, "jid", &dbv)) return 1; if ((nick=TlenNickFromJID(dbv.pszVal)) != NULL) { if ((pNick=TlenTextEncode(nick)) != NULL) { iqId = TlenSerialNext(this); TlenIqAdd(this, iqId, IQ_PROC_NONE, TlenIqResultVcard); - TlenSend(this, "%s", iqId, pNick); + TlenSend(this, "%s", iqId, pNick); mir_free(pNick); } mir_free(nick); @@ -921,14 +921,14 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) // Note: we need to compare with item->group to prevent infinite loop if (cws->value.type == DBVT_DELETED && item->group != NULL) { TlenLog(this, "Group set to nothing"); - TlenSend(this, "", nick, item->jid); + TlenSend(this, "", nick, item->jid); } else if (cws->value.pszVal != NULL) { char *newGroup = settingToChar(cws); if (item->group == NULL || strcmp(newGroup, item->group)) { TlenLog(this, "Group set to %s", newGroup); if ((group=TlenGroupEncode(newGroup)) != NULL) { - TlenSend(this, "%s", nick, item->jid, group); + TlenSend(this, "%s", nick, item->jid, group); mir_free(group); } } @@ -965,10 +965,10 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) if ((nick=TlenTextEncode(newNick)) != NULL) { TlenLog(this, "Nick set to %s", newNick); if (item->group != NULL && (group=TlenGroupEncode(item->group)) != NULL) { - TlenSend(this, "%s", nick, jid, group); + TlenSend(this, "%s", nick, jid, group); mir_free(group); } else { - TlenSend(this, "", nick, jid); + TlenSend(this, "", nick, jid); } mir_free(nick); } @@ -998,14 +998,14 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) TlenLog(this, "jid=%s nick=%s", jid, nick); if (!db_get(hContact, "CList", "Group", &dbv)) { if ((pGroup=TlenGroupEncode(dbv.pszVal)) != NULL) { - TlenSend(this, "%s", nick, jid, pGroup); + TlenSend(this, "%s", nick, jid, pGroup); TlenSend(this, "", jid); mir_free(pGroup); } db_free(&dbv); } else { - TlenSend(this, "", nick, jid); + TlenSend(this, "", nick, jid); TlenSend(this, "", jid); } mir_free(nick); @@ -1041,7 +1041,7 @@ int TlenProtocol::TlenContactDeleted(WPARAM wParam, LPARAM lParam) // Remove from roster, server also handles the presence unsubscription process. if (TlenListExist(this, LIST_ROSTER, jid)) - TlenSend(this, "", jid); + TlenSend(this, "", jid); db_free(&dbv); } diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index d9e7c188f1..4c6fa4ecec 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -407,7 +407,7 @@ static void TlenSendAuth(TlenProtocol *proto) { if ((p=TlenTextEncode(proto->threadData->username)) != NULL) { iqId = TlenSerialNext(proto->threadData->proto); TlenIqAdd(proto, iqId, IQ_PROC_NONE, TlenIqResultAuth); - TlenSend(proto, "%s%sttlen.pl", iqId, p /*info->username*/, str); + TlenSend(proto, "%s%sttlen.pl", iqId, p /*info->username*/, str); mir_free(p); } mir_free(str); @@ -556,10 +556,10 @@ static void TlenProcessIqGetVersion(TlenProtocol *proto, XmlNode* node) strcat(mversion, TLEN_VERSION_STRING); strcat(mversion, ")"); mver = TlenTextEncode( mversion ); - TlenSend( proto, "%s%s%s", from, mver?mver:"", version?version:"", os?os:"" ); + TlenSend( proto, "%s%s%s", from, mver?mver:"", version?version:"", os?os:"" ); if (!item->versionRequested) { item->versionRequested = TRUE; - TlenSend(proto, "", from); + TlenSend(proto, "", from); } if ( mver ) mir_free( mver ); @@ -764,7 +764,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) // RECVED: roster push // ACTION: similar to iqIdGetRoster above - if (!strcmp(xmlns, "tlen:iq:roster")) { + if (!strcmp(xmlns, "jabber:iq:roster")) { XmlNode *itemNode, *groupNode; TLEN_LIST_ITEM *item; char *name; @@ -840,16 +840,16 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) else if ( !strcmp( type, "get" ) && queryNode != NULL && xmlns != NULL ) { // RECVED: software version query // ACTION: return my software version - if ( !strcmp( xmlns, "tlen:iq:version" )) TlenProcessIqGetVersion(info->proto, node); + if ( !strcmp( xmlns, "jabber:iq:version" )) TlenProcessIqGetVersion(info->proto, node); } // RECVED: proto, node); - } else if ( !strcmp( xmlns, "tlen:iq:version" )) { + } else if ( !strcmp( xmlns, "jabber:iq:version" )) { TlenIqResultVersion(info->proto, node); - } else if ( !strcmp( xmlns, "tlen:iq:info" )) { + } else if ( !strcmp( xmlns, "jabber:iq:info" )) { TlenIqResultInfo(info->proto, node); } } else { diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index 4400447fec..825bbfe3c4 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -303,7 +303,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara if (LOWORD(wParam) == IDC_SAVE && HIWORD(wParam) == BN_CLICKED) { char *str = NULL; int strSize; - TlenStringAppend(&str, &strSize, "", TlenSerialNext(data->proto)); + TlenStringAppend(&str, &strSize, "", TlenSerialNext(data->proto)); FetchField(hwndDlg, IDC_FIRSTNAME, "first", &str, &strSize); FetchField(hwndDlg, IDC_LASTNAME, "last", &str, &strSize); FetchField(hwndDlg, IDC_NICKNAME, "nick", &str, &strSize); diff --git a/protocols/Tlen/tlen_10.vcxproj b/protocols/Tlen/tlen_10.vcxproj index fa38451b98..420d454142 100644 --- a/protocols/Tlen/tlen_10.vcxproj +++ b/protocols/Tlen/tlen_10.vcxproj @@ -315,17 +315,13 @@ - - - - diff --git a/protocols/Tlen/tlen_10.vcxproj.filters b/protocols/Tlen/tlen_10.vcxproj.filters index 1f0de881e5..44765e22b6 100644 --- a/protocols/Tlen/tlen_10.vcxproj.filters +++ b/protocols/Tlen/tlen_10.vcxproj.filters @@ -152,12 +152,6 @@ - - Resource Files - - - Resource Files - Resource Files @@ -176,15 +170,9 @@ Resource Files - - Resource Files - Resource Files - - Resource Files - Resource Files -- cgit v1.2.3