diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-08 15:49:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-08 15:49:18 +0000 |
commit | 62ab18a9fda2f19c08ae63a14c7a262ca62f0cce (patch) | |
tree | 821876224af8cb3e3f4b9b29ea3237212cde37e7 /plugins/SecureIM/src/crypt_misc.cpp | |
parent | 19a5e6f0b9c3232933132dbaa9420aecef497336 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@9732 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/crypt_misc.cpp')
-rw-r--r-- | plugins/SecureIM/src/crypt_misc.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/plugins/SecureIM/src/crypt_misc.cpp b/plugins/SecureIM/src/crypt_misc.cpp index 4a6b774adb..4c51d678cf 100644 --- a/plugins/SecureIM/src/crypt_misc.cpp +++ b/plugins/SecureIM/src/crypt_misc.cpp @@ -7,25 +7,25 @@ static void sttWaitForExchange(LPVOID param) if (!ptr)
return;
- for (int i=0; i < db_get_w(0, MODULENAME, "ket", 10)*10; i++) {
+ for (int i = 0; i < db_get_w(0, MODULENAME, "ket", 10) * 10; i++) {
Sleep(100);
if (ptr->waitForExchange != 1)
break;
}
- Sent_NetLog("sttWaitForExchange: %d",ptr->waitForExchange);
+ Sent_NetLog("sttWaitForExchange: %d", ptr->waitForExchange);
// if keyexchange failed or timeout
if (ptr->waitForExchange == 1 || ptr->waitForExchange == 3) { // протухло - отправляем незашифрованно, если надо
- if (ptr->msgQueue && msgbox1(0,sim104,MODULENAME,MB_YESNO|MB_ICONQUESTION) == IDYES) {
+ if (ptr->msgQueue && msgbox1(0, sim104, MODULENAME, MB_YESNO | MB_ICONQUESTION) == IDYES) {
EnterCriticalSection(&localQueueMutex);
ptr->sendQueue = true;
pWM ptrMessage = ptr->msgQueue;
- while(ptrMessage) {
- Sent_NetLog("Sent (unencrypted) message from queue: %s",ptrMessage->Message);
+ while (ptrMessage) {
+ Sent_NetLog("Sent (unencrypted) message from queue: %s", ptrMessage->Message);
// send unencrypted messages
- CallContactService(ptr->hContact,PSS_MESSAGE,(WPARAM)ptrMessage->wParam|PREF_METANODB,(LPARAM)ptrMessage->Message);
+ CallContactService(ptr->hContact, PSS_MESSAGE, (WPARAM)ptrMessage->wParam | PREF_METANODB, (LPARAM)ptrMessage->Message);
mir_free(ptrMessage->Message);
pWM tmp = ptrMessage;
ptrMessage = ptrMessage->nextMessage;
@@ -43,10 +43,10 @@ static void sttWaitForExchange(LPVOID param) // we need to resend last send back message with new crypto Key
pWM ptrMessage = ptr->msgQueue;
while (ptrMessage) {
- Sent_NetLog("Sent (encrypted) message from queue: %s",ptrMessage->Message);
+ Sent_NetLog("Sent (encrypted) message from queue: %s", ptrMessage->Message);
// send unencrypted messages
- CallContactService(ptr->hContact,PSS_MESSAGE,(WPARAM)ptrMessage->wParam|PREF_METANODB,(LPARAM)ptrMessage->Message);
+ CallContactService(ptr->hContact, PSS_MESSAGE, (WPARAM)ptrMessage->wParam | PREF_METANODB, (LPARAM)ptrMessage->Message);
mir_free(ptrMessage->Message);
pWM tmp = ptrMessage;
ptrMessage = ptrMessage->nextMessage;
@@ -74,7 +74,7 @@ static void sttWaitForExchange(LPVOID param) // set wait flag and run thread
void waitForExchange(pUinKey ptr, int flag)
{
- switch(flag) {
+ switch (flag) {
case 0: // reset
case 2: // send secure
case 3: // send unsecure
@@ -90,6 +90,3 @@ void waitForExchange(pUinKey ptr, int flag) break;
}
}
-
-
-// EOF
|