summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_secur.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-10 13:49:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-10 13:49:11 +0000
commit73efaa00c6044d77a6c098bec38057b231ef8243 (patch)
tree07237735ddf83c6cb011188b6c4b067bdcd6b5e3 /protocols/JabberG/src/jabber_secur.cpp
parent183f4dfbadce9c687c66e5377274a464f6c9a72f (diff)
Jabber:
- these long static buffers replaced with CMString; - some crazy memory allocations in chats also replaced with CMString; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@7577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_secur.cpp')
-rw-r--r--protocols/JabberG/src/jabber_secur.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp
index c38b515965..7abcd96ef7 100644
--- a/protocols/JabberG/src/jabber_secur.cpp
+++ b/protocols/JabberG/src/jabber_secur.cpp
@@ -35,11 +35,11 @@ TNtlmAuth::TNtlmAuth(ThreadData* info, const char* mechanism, const TCHAR *hostn
szHostName = hostname;
const TCHAR *szProvider;
- if ( !strcmp(mechanism, "GSS-SPNEGO"))
+ if (!strcmp(mechanism, "GSS-SPNEGO"))
szProvider = _T("Negotiate");
- else if ( !strcmp(mechanism, "GSSAPI"))
+ else if (!strcmp(mechanism, "GSSAPI"))
szProvider = _T("GSSAPI");
- else if ( !strcmp(mechanism, "NTLM"))
+ else if (!strcmp(mechanism, "NTLM"))
szProvider = _T("NTLM");
else {
bIsValid = false;
@@ -48,7 +48,7 @@ TNtlmAuth::TNtlmAuth(ThreadData* info, const char* mechanism, const TCHAR *hostn
TCHAR szSpn[ 1024 ] = _T("");
if (strcmp(mechanism, "NTLM")) {
- if ( !getSpn(szSpn, SIZEOF(szSpn)) && !strcmp(mechanism, "GSSAPI")) {
+ if (!getSpn(szSpn, SIZEOF(szSpn)) && !strcmp(mechanism, "GSSAPI")) {
bIsValid = false;
return;
} }
@@ -68,7 +68,7 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen)
TCHAR szFullUserName[128] = _T("");
ULONG szFullUserNameLen = SIZEOF(szFullUserName);
- if ( !GetUserNameEx(NameDnsDomain, szFullUserName, &szFullUserNameLen)) {
+ if (!GetUserNameEx(NameDnsDomain, szFullUserName, &szFullUserNameLen)) {
szFullUserName[ 0 ] = 0;
szFullUserNameLen = SIZEOF(szFullUserName);
GetUserNameEx(NameSamCompatible, szFullUserName, &szFullUserNameLen);
@@ -105,7 +105,7 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen)
char* TNtlmAuth::getInitialRequest()
{
- if ( !hProvider)
+ if (!hProvider)
return NULL;
// This generates login method advertisement packet
@@ -120,7 +120,7 @@ char* TNtlmAuth::getInitialRequest()
char* TNtlmAuth::getChallenge(const TCHAR *challenge)
{
- if ( !hProvider)
+ if (!hProvider)
return NULL;
char *text = (!lstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge), *result;
@@ -254,7 +254,7 @@ char* TScramAuth::getChallenge(const TCHAR *challenge)
ptrA chl((char*)mir_base64_decode( _T2A(challenge), &chlLen));
char *r = strstr(chl, "r=");
- if ( !r)
+ if (!r)
return NULL;
char *e = strchr(r, ','); if (e) *e = 0;