diff --git a/Changelog b/Changelog index 3a5c2d9..84cc25a 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,12 @@ Changelog +08/06/08 (Arnout, thanks to MeneerJansen for sparking some activity again :) ) +- add 'if (DEBUG)' to debug message +- fix compiler warning by marking some constant + strings 'const' +- set view mode to 'kbps' by default, + instead of the 'grand total' number of bytes + 27/08/05 (Arnout) - giving all unknown connections their own `unknown' process diff --git a/Makefile b/Makefile index 696db41..b3d4bd9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION := 0 -SUBVERSION := 6 -MINORVERSION := 2pre2 +SUBVERSION := 7 +MINORVERSION := snapshot #DESTDIR := /usr DESTDIR := /usr/local @@ -8,7 +8,8 @@ DESTDIR := /usr/local bin := $(DESTDIR)/bin man8 := $(DESTDIR)/share/man/man8/ -all: nethogs decpcap_test nethogs_testsum +all: nethogs decpcap_test +# nethogs_testsum CFLAGS=-g -Wall #CFLAGS=-O2 diff --git a/connection.cpp b/connection.cpp index e9d9801..8c6df0f 100644 --- a/connection.cpp +++ b/connection.cpp @@ -146,7 +146,10 @@ void Connection::add (Packet * packet) std::cout << "Incoming: " << packet->len << std::endl; } sumRecv += packet->len; - std::cout << "sumRecv now: " << sumRecv << std::endl; + if (DEBUG) + { + std::cout << "sumRecv now: " << sumRecv << std::endl; + } recv_packets->add (packet); } } diff --git a/cui.cpp b/cui.cpp index 62c7b85..26eb7d8 100644 --- a/cui.cpp +++ b/cui.cpp @@ -24,7 +24,7 @@ int VIEWMODE_KBPS = 0; int VIEWMODE_TOTAL_KB = 1; int VIEWMODE_TOTAL_B = 2; int VIEWMODE_TOTAL_MB = 3; -int viewMode = VIEWMODE_TOTAL_B; +int viewMode = VIEWMODE_KBPS; int nViewModes = 4; class Line diff --git a/process.h b/process.h index db826ff..af8824f 100644 --- a/process.h +++ b/process.h @@ -44,7 +44,7 @@ class Process { public: /* the process makes a copy of the device name and name. */ - Process (unsigned long m_inode, char * m_devicename, char * m_name = NULL) + Process (unsigned long m_inode, const char * m_devicename, const char * m_name = NULL) { //std::cout << "ARN: Process created with dev " << m_devicename << std::endl; if (DEBUG)