diff options
-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 )
|