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 | |
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')
-rw-r--r-- | src/modules/netlib/netliblog.cpp | 22 | ||||
-rw-r--r-- | src/modules/netlib/netlibopts.cpp | 2 | ||||
-rw-r--r-- | src/modules/netlib/netlibsock.cpp | 11 |
3 files changed, 13 insertions, 22 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);
diff --git a/src/modules/netlib/netlibopts.cpp b/src/modules/netlib/netlibopts.cpp index 20e90d9932..34a07d6df7 100644 --- a/src/modules/netlib/netlibopts.cpp +++ b/src/modules/netlib/netlibopts.cpp @@ -546,7 +546,7 @@ int NetlibOptInitialise(WPARAM wParam, LPARAM) odp.cbSize = sizeof(odp);
odp.position = 900000000;
- odp.hInstance = hMirandaInst;
+ odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NETLIB);
odp.pszTitle = LPGEN("Network");
odp.pfnDlgProc = DlgProcNetlibOpts;
diff --git a/src/modules/netlib/netlibsock.cpp b/src/modules/netlib/netlibsock.cpp index eabbc79484..30db9ce256 100644 --- a/src/modules/netlib/netlibsock.cpp +++ b/src/modules/netlib/netlibsock.cpp @@ -58,11 +58,9 @@ INT_PTR NetlibSend(WPARAM wParam, LPARAM lParam) }
NetlibLeaveNestedCS(&nlc->ncsSend);
- if (((THook*)hSendEvent)->subscriberCount)
- {
- NETLIBNOTIFY nln = { nlb, result };
- CallHookSubscribers(hSendEvent, (WPARAM)&nln, (LPARAM)&nlc->nlu->user);
- }
+ NETLIBNOTIFY nln = { nlb, result };
+ CallHookSubscribers(hSendEvent, (WPARAM)&nln, (LPARAM)&nlc->nlu->user);
+
return result;
}
@@ -95,8 +93,7 @@ INT_PTR NetlibRecv(WPARAM wParam, LPARAM lParam) NetlibDumpData(nlc, (PBYTE)nlb->buf, recvResult, 0, nlb->flags);
- if ((nlb->flags & MSG_PEEK) == 0 && ((THook*)hRecvEvent)->subscriberCount)
- {
+ if ((nlb->flags & MSG_PEEK) == 0) {
NETLIBNOTIFY nln = { nlb, recvResult };
CallHookSubscribers(hRecvEvent, (WPARAM)&nln, (LPARAM)&nlc->nlu->user);
}
|