diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-10-17 19:01:39 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-10-17 19:01:39 +0000 |
commit | 1099f914b0eb16acdcbf594ac4105224a6dfb2fd (patch) | |
tree | 54b49a6b4c69b23910c517a299829967508bc869 /protocols/JabberG | |
parent | 6630d4e83ca65b253080ddcf5899f1e12bffbe1c (diff) |
Merged with Miranda IM Jabber:
- Patch to set gtalk android users as on the phone.
- Can't use Jabber GSSAPI authentication on Windows 7.
git-svn-id: http://svn.miranda-ng.org/main/trunk@1971 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_secur.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 21 |
2 files changed, 21 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index c48ded22d6..e91496f774 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -66,8 +66,14 @@ TNtlmAuth::~TNtlmAuth() bool TNtlmAuth::getSpn( TCHAR* szSpn, size_t dwSpnLen )
{
+ HMODULE hDll = GetModuleHandle(_T("secur32.dll"));
+ if (!hDll)
+ hDll = LoadLibrary(_T("secur32.dll"));
+ if (!hDll)
+ return false;
+
GetUserNameExType myGetUserNameEx =
- ( GetUserNameExType )GetProcAddress( GetModuleHandleA( "secur32.dll" ), "GetUserNameExW" );
+ ( GetUserNameExType )GetProcAddress(hDll, "GetUserNameExW" );
if ( !myGetUserNameEx ) return false;
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index d71fd2ab60..c8674bd943 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1663,13 +1663,20 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info ) }
DBCheckIsTransportedContact( from, hContact );
int status = ID_STATUS_ONLINE;
- if (( showNode = xmlGetChild( node , "show" )) != NULL ) {
- if (( show = xmlGetText( showNode )) != NULL ) {
- if ( !_tcscmp( show, _T("away"))) status = ID_STATUS_AWAY;
- else if ( !_tcscmp( show, _T("xa"))) status = ID_STATUS_NA;
- else if ( !_tcscmp( show, _T("dnd"))) status = ID_STATUS_DND;
- else if ( !_tcscmp( show, _T("chat"))) status = ID_STATUS_FREECHAT;
- } }
+ /* GTalk android user set status as on the phone */
+ if (_tcsstr(from, _T("android_talk")))
+ status = ID_STATUS_ONTHEPHONE;
+ else {
+ if (( showNode = xmlGetChild( node , "show" )) != NULL ) {
+ if (( show = xmlGetText( showNode ) ) != NULL ) {
+ if ( !_tcscmp( show, _T("away"))) status = ID_STATUS_AWAY;
+ else if ( !_tcscmp( show, _T("xa"))) status = ID_STATUS_NA;
+ else if ( !_tcscmp( show, _T("dnd"))) status = ID_STATUS_DND;
+ else if ( !_tcscmp( show, _T("chat"))) status = ID_STATUS_FREECHAT;
+ }
+ }
+ }
+
char priority = 0;
if (( priorityNode = xmlGetChild( node , "priority" )) != NULL && xmlGetText( priorityNode ) != NULL )
|