diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-06 08:20:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-06 08:20:31 +0000 |
commit | 1ba3fd86fd226554722db54232620faf529438e2 (patch) | |
tree | 589072b61ef323de367311476aefb9b81ca49dc0 /src | |
parent | 0750bd2a0d25bed656d21eb65e6ca6627e7a6b66 (diff) |
misprint in service name
git-svn-id: http://svn.miranda-ng.org/main/trunk@6368 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/netlib/netlib.cpp | 8 | ||||
-rw-r--r-- | src/modules/netlib/netlibopenconn.cpp | 4 | ||||
-rw-r--r-- | src/modules/netlib/netlibsock.cpp | 14 | ||||
-rw-r--r-- | src/modules/protocols/protoopts.cpp | 4 |
4 files changed, 10 insertions, 20 deletions
diff --git a/src/modules/netlib/netlib.cpp b/src/modules/netlib/netlib.cpp index e56cf59811..5825bc9801 100644 --- a/src/modules/netlib/netlib.cpp +++ b/src/modules/netlib/netlib.cpp @@ -359,15 +359,13 @@ INT_PTR NetlibStringToAddressSrv(WPARAM wParam, LPARAM lParam) INT_PTR NetlibAddressToStringSrv(WPARAM wParam, LPARAM lParam)
{
- if (wParam)
- {
+ if (wParam) {
SOCKADDR_INET_M iaddr = {0};
iaddr.Ipv4.sin_family = AF_INET;
iaddr.Ipv4.sin_addr.s_addr = htonl((unsigned)lParam);
return (INT_PTR)NetlibAddressToString(&iaddr);
}
- else
- return (INT_PTR)NetlibAddressToString((SOCKADDR_INET_M*)lParam);
+ return (INT_PTR)NetlibAddressToString((SOCKADDR_INET_M*)lParam);
}
INT_PTR NetlibGetConnectionInfoSrv(WPARAM wParam, LPARAM lParam)
@@ -526,7 +524,7 @@ int LoadNetlibModule(void) CreateServiceFunction(MS_NETLIB_GETMOREPACKETS, NetlibPacketRecverGetMore);
CreateServiceFunction(MS_NETLIB_SETPOLLINGTIMEOUT, NetlibHttpSetPollingTimeout);
CreateServiceFunction(MS_NETLIB_STARTSSL, NetlibStartSsl);
- CreateServiceFunction(MS_NETLIB_STARINGTOADDRESS, NetlibStringToAddressSrv);
+ CreateServiceFunction(MS_NETLIB_STRINGTOADDRESS, NetlibStringToAddressSrv);
CreateServiceFunction(MS_NETLIB_ADDRESSTOSTRING, NetlibAddressToStringSrv);
CreateServiceFunction(MS_NETLIB_GETCONNECTIONINFO, NetlibGetConnectionInfoSrv);
CreateServiceFunction(MS_NETLIB_GETMYIP, NetlibGetMyIp);
diff --git a/src/modules/netlib/netlibopenconn.cpp b/src/modules/netlib/netlibopenconn.cpp index 86fafd0755..b8d0f440e5 100644 --- a/src/modules/netlib/netlibopenconn.cpp +++ b/src/modules/netlib/netlibopenconn.cpp @@ -569,9 +569,7 @@ static bool my_connectIPv6(NetlibConnection *nlc, NETLIBOPENCONNECTION * nloc) }
for (ai = air; ai && !Miranda_Terminated(); ai = ai->ai_next) {
- char* szIp = NetlibAddressToString((SOCKADDR_INET_M*)ai->ai_addr);
- NetlibLogf(nlc->nlu, "(%p) Connecting to ip %s ....", nlc, szIp);
- mir_free(szIp);
+ NetlibLogf(nlc->nlu, "(%p) Connecting to ip %s ....", nlc, ptrA( NetlibAddressToString((SOCKADDR_INET_M*)ai->ai_addr)));
retry:
nlc->s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (nlc->s == INVALID_SOCKET)
diff --git a/src/modules/netlib/netlibsock.cpp b/src/modules/netlib/netlibsock.cpp index 2611ea9f37..c88715da50 100644 --- a/src/modules/netlib/netlibsock.cpp +++ b/src/modules/netlib/netlibsock.cpp @@ -224,20 +224,17 @@ bool NetlibStringToAddress(const char* str, SOCKADDR_INET_M* addr) char* NetlibAddressToString(SOCKADDR_INET_M* addr)
{
char saddr[128];
-
DWORD len = sizeof(saddr);
if ( !WSAAddressToStringA((PSOCKADDR)addr, sizeof(*addr), NULL, saddr, &len))
return mir_strdup(saddr);
- if (addr->si_family == AF_INET)
- {
+
+ if (addr->si_family == AF_INET) {
char *szIp = inet_ntoa(addr->Ipv4.sin_addr);
- if (addr->Ipv4.sin_port != 0)
- {
+ if (addr->Ipv4.sin_port != 0) {
mir_snprintf(saddr, sizeof(saddr), "%s:%d", szIp, htons(addr->Ipv4.sin_port));
return mir_strdup(saddr);
}
- else
- return mir_strdup(szIp);
+ return mir_strdup(szIp);
}
return NULL;
}
@@ -249,8 +246,7 @@ void NetlibGetConnectionInfo(NetlibConnection* nlc, NETLIBCONNINFO *connInfo) SOCKADDR_INET_M sin = {0};
int len = sizeof(sin);
- if ( !getsockname(nlc->s, (PSOCKADDR)&sin, &len))
- {
+ if ( !getsockname(nlc->s, (PSOCKADDR)&sin, &len)) {
connInfo->wPort = ntohs(sin.Ipv4.sin_port);
connInfo->dwIpv4 = sin.si_family == AF_INET ? htonl(sin.Ipv4.sin_addr.s_addr) : 0;
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index 9ae635a6c6..0811956fb5 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -427,9 +427,7 @@ static void sttUpdateAccountInfo(HWND hwndDlg, struct TAccMgrData *dat) SetWindowText( GetDlgItem(hwndDlg, IDC_TXT_INFO), TranslateT("Account is disabled. Please activate it to access options."));
}
else {
- char svc[MAXMODULELABELLENGTH];
- mir_snprintf(svc, SIZEOF(svc), "%s%s", pa->szModuleName, PS_CREATEACCMGRUI);
- hwnd = (HWND)CallService(svc, 0, (LPARAM)hwndDlg);
+ hwnd = (HWND)ProtoCallService(pa->szModuleName, PS_CREATEACCMGRUI, 0, (LPARAM)hwndDlg);
if (hwnd && (hwnd != (HWND)CALLSERVICE_NOTFOUND)) {
RECT rc;
|