diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-03 22:11:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-03 22:11:27 +0000 |
commit | 53e568efe6f2a9e121ac6cf305e5fa9a84137c1a (patch) | |
tree | 60185775025f8fe3a7ed8f1f78b041c5db5770c1 /plugins/YAMN/src/services.cpp | |
parent | b06a96420250b0a6b8de0a3c463e4599ba16e522 (diff) |
- fix for the buffer overrun in YAMN's mime parser
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@2948 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/src/services.cpp')
-rw-r--r-- | plugins/YAMN/src/services.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index 7254a02428..e4a6faedf9 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -32,7 +32,7 @@ static INT_PTR Service_GetStatus(WPARAM wParam, LPARAM lParam) static INT_PTR Service_SetStatus(WPARAM wParam, LPARAM lParam)
{
int newstatus = (wParam != ID_STATUS_OFFLINE)?ID_STATUS_ONLINE:ID_STATUS_OFFLINE;
- if (newstatus != YAMN_STATUS){
+ if (newstatus != YAMN_STATUS) {
int oldstatus = YAMN_STATUS;
YAMN_STATUS = newstatus;
ProtoBroadcastAck(YAMN_DBMODULE, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldstatus, newstatus);
@@ -124,7 +124,8 @@ static INT_PTR ContactApplication(WPARAM wParam, LPARAM lParam) }
DWORD WINAPI SWMRGWaitToRead(PSWMRG pSWMRG, DWORD dwTimeout);
-static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam){
+static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam)
+{
//This service will check/sincronize the account pointed by wParam
HACCOUNT ActualAccount = (HACCOUNT)wParam;
HANDLE ThreadRunningEV;
@@ -367,10 +368,11 @@ void HookEvents(void) hookData[i].hookHandle = HookEvent(hookData[i].hookName, hookData[i].mirandaFunction);
}
}
-void UnhookEvents(void){
- for (int i = 0;i<(sizeof(hookData)/sizeof(hookData[0]));i++) {
- if (hookData[i].hookHandle) UnhookEvent(hookData[i].hookHandle);
- }
+void UnhookEvents(void)
+{
+ for (int i = 0;i<(sizeof(hookData)/sizeof(hookData[0]));i++)
+ if (hookData[i].hookHandle)
+ UnhookEvent(hookData[i].hookHandle);
}
typedef struct { HANDLE serviceHandle; const char *serviceName; MIRANDASERVICE serviceFunction;} ServiceDataType;
|