diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-26 16:50:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-26 16:50:14 +0000 |
commit | c992cb2fdc11f1cac4bc5cbce26e8e2bb3b57da0 (patch) | |
tree | 697bdbf38a8a1f6b828a8bfbd08a478e19a82c6b /src/modules/netlib/netliblog.cpp | |
parent | f616294363c642d138f9dc0ef6eceae639e2434c (diff) |
- microkernel addded;
- version bumped to 0.92.2
git-svn-id: http://svn.miranda-ng.org/main/trunk@641 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib/netliblog.cpp')
-rw-r--r-- | src/modules/netlib/netliblog.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp index 5c4656fd90..3e1265d4dd 100644 --- a/src/modules/netlib/netliblog.cpp +++ b/src/modules/netlib/netliblog.cpp @@ -146,7 +146,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa GetWindowText((HWND)lParam, path, MAX_PATH);
TCHAR *pszNewPath = Utils_ReplaceVarsT(path);
- pathToAbsoluteT(pszNewPath, path, NULL);
+ PathToAbsoluteT(pszNewPath, path, NULL);
SetDlgItemText(hwndDlg, IDC_PATH, path);
mir_free(pszNewPath);
}
@@ -299,7 +299,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa void NetlibLogShowOptions(void)
{
if (logOptions.hwndOpts == NULL)
- logOptions.hwndOpts=CreateDialog(hMirandaInst, MAKEINTRESOURCE(IDD_NETLIBLOGOPTS), NULL, LogOptionsDlgProc);
+ logOptions.hwndOpts=CreateDialog(hInst, MAKEINTRESOURCE(IDD_NETLIBLOGOPTS), NULL, LogOptionsDlgProc);
SetForegroundWindow(logOptions.hwndOpts);
}
@@ -397,11 +397,8 @@ static INT_PTR NetlibLog(WPARAM wParam, LPARAM lParam) LeaveCriticalSection(&logOptions.cs);
}
- if (((THook*)hLogEvent)->subscriberCount)
- {
- LOGMSG logMsg = { szHead, pszMsg };
- CallHookSubscribers(hLogEvent, (WPARAM)nlu, (LPARAM)&logMsg);
- }
+ LOGMSG logMsg = { szHead, pszMsg };
+ CallHookSubscribers(hLogEvent, (WPARAM)nlu, (LPARAM)&logMsg);
SetLastError(dwOriginalLastError);
return 1;
@@ -410,7 +407,7 @@ static INT_PTR NetlibLog(WPARAM wParam, LPARAM lParam) static INT_PTR NetlibLogW(WPARAM wParam, LPARAM lParam)
{
const wchar_t *pszMsg = (const wchar_t*)lParam;
- char* szMsg = Utf8EncodeUcs2(pszMsg);
+ char* szMsg = Utf8EncodeW(pszMsg);
INT_PTR res = NetlibLog(wParam, (LPARAM)szMsg);
mir_free(szMsg);
return res;
@@ -454,12 +451,9 @@ void NetlibDumpData(struct NetlibConnection *nlc, PBYTE buf, int len, int sent, return;
// Check user's log settings
- if ( !(logOptions.toOutputDebugString ||
- ((THook*)hLogEvent)->subscriberCount ||
- (logOptions.toFile && logOptions.szFile[0])))
+ if ( !(logOptions.toOutputDebugString || (logOptions.toFile && logOptions.szFile[0])))
return;
- if ((sent && !logOptions.dumpSent) ||
- ( !sent && !logOptions.dumpRecv))
+ if ((sent && !logOptions.dumpSent) || (!sent && !logOptions.dumpRecv))
return;
if ((flags & MSG_DUMPPROXY) && !logOptions.dumpProxy)
return;
@@ -593,7 +587,7 @@ void NetlibLogInit(void) TCHAR *pszNewPath = Utils_ReplaceVarsT(dbv.ptszVal);
TCHAR path[MAX_PATH];
- pathToAbsoluteT(pszNewPath, path, NULL);
+ PathToAbsoluteT(pszNewPath, path, NULL);
logOptions.szFile = mir_tstrdup(path);
mir_free(pszNewPath);
|