From 9d32b9cd791fb5f51dad17567152c70a8511a500 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 25 Jul 2013 20:15:05 +0000 Subject: replace sprintf to mir_snprintf (part 6) git-svn-id: http://svn.miranda-ng.org/main/trunk@5485 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ConnectionNotify/src/netstat.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'plugins/ConnectionNotify/src/netstat.cpp') diff --git a/plugins/ConnectionNotify/src/netstat.cpp b/plugins/ConnectionNotify/src/netstat.cpp index 2dd190c823..36a8302571 100644 --- a/plugins/ConnectionNotify/src/netstat.cpp +++ b/plugins/ConnectionNotify/src/netstat.cpp @@ -1,18 +1,4 @@ -// GetTcpTable.cpp : Defines the entry point for the console application. -// - -// Link to Ws2_32.lib -//#include -#include -// Link to Iphlpapi.lib -#include -#include -#include -#include -#include "netstat.h" -// Note: could also use malloc() and free() -#define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x)) -#define FREE(x) HeapFree(GetProcessHeap(), 0, (x)) +#include "ConnectionNotify.h" struct CONNECTION* GetConnectionsTable() { @@ -176,10 +162,10 @@ void getDnsName(TCHAR *strIp,TCHAR *strHostName) iaHost.s_addr = inet_addr(mir_t2a(strIp)); if ((h = gethostbyaddr ((char *)&iaHost, sizeof(struct in_addr), AF_INET))== NULL) { // get the host info error - _stprintf(strHostName,_T("%s"), strIp); + _stprintf(strHostName,_T("%s"), strIp); //!!!!!!!!!!! return; } - _stprintf(strHostName,_T("%s"),mir_a2t(h->h_name)); + _stprintf(strHostName,_T("%s"),mir_a2t(h->h_name)); //!!!!!!!!!!!!! //_tcsncpy_s(strHostName,128, h->h_name,_tcslen(h->h_name)); } -- cgit v1.2.3