summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/crypt_misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SecureIM/src/crypt_misc.cpp')
-rw-r--r--plugins/SecureIM/src/crypt_misc.cpp21
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