diff options
| author | Tobias Weimer <wishmaster51@googlemail.com> | 2013-08-20 20:36:14 +0000 | 
|---|---|---|
| committer | Tobias Weimer <wishmaster51@googlemail.com> | 2013-08-20 20:36:14 +0000 | 
| commit | 2334ddc39a0c0f847239c8b331ec1c9a2a12754b (patch) | |
| tree | 509d567a4c4f5e84c1e2a359a6c2985a070d8c43 /protocols/Tlen | |
| parent | 607a3e9ede6147e4667a564ed685132906e1a1fa (diff) | |
Tlen: Try to fix login issues (fixes 447)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5764 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen')
| -rw-r--r-- | protocols/Tlen/src/tlen_iqid.cpp | 8 | ||||
| -rw-r--r-- | protocols/Tlen/src/tlen_presence.cpp | 4 | ||||
| -rw-r--r-- | protocols/Tlen/src/tlen_svc.cpp | 24 | ||||
| -rw-r--r-- | protocols/Tlen/src/tlen_thread.cpp | 16 | ||||
| -rw-r--r-- | protocols/Tlen/src/tlen_userinfo.cpp | 2 | ||||
| -rw-r--r-- | protocols/Tlen/tlen_10.vcxproj | 4 | ||||
| -rw-r--r-- | 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, "<iq type='get' id='"TLEN_IQID"%d'><query xmlns='tlen:iq:roster'/></iq>", iqId);
 +//		TlenSend(info, "<iq type='get' id='"TLEN_IQID"%d'><query xmlns='jabber:iq:roster'/></iq>", iqId);
 -		TlenSend(proto, "<iq type='get' id='GetRoster'><query xmlns='tlen:iq:roster'/></iq>");
 +		TlenSend(proto, "<iq type='get' id='GetRoster'><query xmlns='jabber:iq:roster'/></iq>");
  		TlenSend(proto, "<iq to='tcfg' type='get' id='TcfgGetAfterLoggedIn'></iq>");
  	}
  	// 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, "<iq type='get' id='"TLEN_IQID"%d'><query xmlns='tlen:iq:info' to='%s'></query></iq>", iqId, from); +							TlenSend( proto, "<iq type='get' id='"TLEN_IQID"%d'><query xmlns='jabber:iq:info' to='%s'></query></iq>", iqId, from);  						}  						if (proto->tlenOptions.enableVersion && !item->versionRequested) {  							item->versionRequested = TRUE;  							if (proto->m_iStatus != ID_STATUS_INVISIBLE) { -								TlenSend( proto, "<message to='%s' type='iq'><iq type='get'><query xmlns='tlen:iq:version'/></iq></message>", from ); +								TlenSend( proto, "<message to='%s' type='iq'><iq type='get'><query xmlns='jabber:iq:version'/></iq></message>", 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, "<iq type='get' id='"TLEN_IQID"%d' to='tuba'><query xmlns='tlen:iq:search'>%s</query></iq>", iqId, proto->searchQuery);
 +			TlenSend(proto, "<iq type='get' id='"TLEN_IQID"%d' to='tuba'><query xmlns='jabber:iq:search'>%s</query></iq>", iqId, proto->searchQuery);
  		} else {
 -			TlenSend(proto, "<iq type='get' id='"TLEN_IQID"%d' to='tuba'><query xmlns='tlen:iq:search'>%s<f>%d</f></query></iq>", iqId, proto->searchQuery, proto->searchIndex * TLEN_MAX_SEARCH_RESULTS_PER_PAGE);
 +			TlenSend(proto, "<iq type='get' id='"TLEN_IQID"%d' to='tuba'><query xmlns='jabber:iq:search'>%s<f>%d</f></query></iq>", 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, "<presence to='%s' type='unsubscribed'/>", jid);
 -	TlenSend(this, "<iq type='set'><query xmlns='tlen:iq:roster'><item jid='%s' subscription='remove'/></query></iq>", jid);
 +	TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item jid='%s' subscription='remove'/></query></iq>", 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, "<iq type='get' id='"TLEN_IQID"%d' to='tuba'><query xmlns='tlen:iq:register'></query></iq>", iqId);
 +		TlenSend(this, "<iq type='get' id='"TLEN_IQID"%d' to='tuba'><query xmlns='jabber:iq:register'></query></iq>", 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, "<iq type='get' id='"TLEN_IQID"%d' to='tuba'><query xmlns='tlen:iq:search'><i>%s</i></query></iq>", iqId, pNick);
 +				TlenSend(this, "<iq type='get' id='"TLEN_IQID"%d' to='tuba'><query xmlns='jabber:iq:search'><i>%s</i></query></iq>", 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, "<iq type='set'><query xmlns='tlen:iq:roster'><item name='%s' jid='%s'></item></query></iq>", nick, item->jid);
 +							TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'></item></query></iq>", 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, "<iq type='set'><query xmlns='tlen:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, item->jid, group);
 +									TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", 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, "<iq type='set'><query xmlns='tlen:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, jid, group);
 +								TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, jid, group);
  								mir_free(group);
  							} else {
 -								TlenSend(this, "<iq type='set'><query xmlns='tlen:iq:roster'><item name='%s' jid='%s'></item></query></iq>", nick, jid);
 +								TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'></item></query></iq>", 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, "<iq type='set'><query xmlns='tlen:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, jid, pGroup);
 +								TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, jid, pGroup);
  								TlenSend(this, "<presence to='%s' type='subscribe'/>", jid);
  								mir_free(pGroup);
  							}
  							db_free(&dbv);
  						}
  						else {
 -							TlenSend(this, "<iq type='set'><query xmlns='tlen:iq:roster'><item name='%s' jid='%s'/></query></iq>", nick, jid);
 +							TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'/></query></iq>", nick, jid);
  							TlenSend(this, "<presence to='%s' type='subscribe'/>", 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, "<iq type='set'><query xmlns='tlen:iq:roster'><item jid='%s' subscription='remove'/></query></iq>", jid);
 +			TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item jid='%s' subscription='remove'/></query></iq>", 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, "<iq type='set' id='"TLEN_IQID"%d'><query xmlns='tlen:iq:auth'><username>%s</username><digest>%s</digest><resource>t</resource><host>tlen.pl</host></query></iq>", iqId, p /*info->username*/, str);
 +		TlenSend(proto, "<iq type='set' id='"TLEN_IQID"%d'><query xmlns='jabber:iq:auth'><username>%s</username><digest>%s</digest><resource>t</resource><host>tlen.pl</host></query></iq>", 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, "<message to='%s' type='iq'><iq type='result'><query xmlns='tlen:iq:version'><name>%s</name><version>%s</version><os>%s</os></query></iq></message>", from, mver?mver:"", version?version:"", os?os:"" );
 +	TlenSend( proto, "<message to='%s' type='iq'><iq type='result'><query xmlns='jabber:iq:version'><name>%s</name><version>%s</version><os>%s</os></query></iq></message>", from, mver?mver:"", version?version:"", os?os:"" );
  	if (!item->versionRequested) {
  		item->versionRequested = TRUE;
 -		TlenSend(proto, "<message to='%s' type='iq'><iq type='get'><query xmlns='tlen:iq:version'/></iq></message>", from);
 +		TlenSend(proto, "<message to='%s' type='iq'><iq type='get'><query xmlns='jabber:iq:version'/></iq></message>", 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: <iq type='result'><query ...
  	else if ( !strcmp( type, "result") && queryNode != NULL) {
  		if (xmlns != NULL ) {
 -			if ( !strcmp(xmlns, "tlen:iq:roster" )) {
 +			if ( !strcmp(xmlns, "jabber:iq:roster" )) {
  				TlenIqResultRoster(info->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, "<iq type='set' id='"TLEN_IQID"%d' to='tuba'><query xmlns='tlen:iq:register'>", TlenSerialNext(data->proto));
 +			TlenStringAppend(&str, &strSize, "<iq type='set' id='"TLEN_IQID"%d' to='tuba'><query xmlns='jabber:iq:register'>", 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 @@      <ClInclude Include="src\tlen_voice.h" />
    </ItemGroup>
    <ItemGroup>
 -    <None Include="res\auth_grant.ico" />
 -    <None Include="res\auth_request.ico" />
      <None Include="res\groupchats.ico" />
      <None Include="res\image.ico" />
      <None Include="res\mail.ico" />
      <None Include="res\microphone.ico" />
      <None Include="res\speaker.ico" />
      <None Include="res\tlen.ico" />
 -    <None Include="res\tlenbig.ico" />
      <None Include="res\tlenchats.ico" />
 -    <None Include="res\tlensmall.ico" />
      <None Include="res\voicechat.ico" />
    </ItemGroup>
    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
 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 @@      </ClInclude>
    </ItemGroup>
    <ItemGroup>
 -    <None Include="res\auth_grant.ico">
 -      <Filter>Resource Files</Filter>
 -    </None>
 -    <None Include="res\auth_request.ico">
 -      <Filter>Resource Files</Filter>
 -    </None>
      <None Include="res\groupchats.ico">
        <Filter>Resource Files</Filter>
      </None>
 @@ -176,15 +170,9 @@      <None Include="res\tlen.ico">
        <Filter>Resource Files</Filter>
      </None>
 -    <None Include="res\tlenbig.ico">
 -      <Filter>Resource Files</Filter>
 -    </None>
      <None Include="res\tlenchats.ico">
        <Filter>Resource Files</Filter>
      </None>
 -    <None Include="res\tlensmall.ico">
 -      <Filter>Resource Files</Filter>
 -    </None>
      <None Include="res\voicechat.ico">
        <Filter>Resource Files</Filter>
      </None>
 | 
