File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,14 @@ int main(int32_t argC, char** argV) {
6262 cout << " # Statistics per IP" << endl;
6363 cout << " | Host | Accepted | Closed |" << endl
6464 << " |------------------------|----------|--------|" << endl;
65- for (const auto & connection : connectionList) {
66- totalAcceptedConnections += connection.second .first ;
67- totalClosedConnections += connection.second .second ;
68- string lastSpacer;
65+ }
6966
67+ for (const auto & connection : connectionList) {
68+ totalAcceptedConnections += connection.second .first ;
69+ totalClosedConnections += connection.second .second ;
70+
71+ if (g_printIpStatistics) {
72+ string lastSpacer;
7073 cout << " |" << (lastSpacer = getSpacerString (24 , connection.first .size ()))
7174 << connection.first << string (24 - connection.first .size () - lastSpacer.size (), ' ' )
7275 << " |" ;
@@ -82,8 +85,8 @@ int main(int32_t argC, char** argV) {
8285 << connection.second .second << string (8 - strLength - lastSpacer.size (), ' ' )
8386 << " |" << endl;
8487 }
85- cout << endl;
8688 }
89+ if (g_printIpStatistics) { cout << endl; }
8790
8891 if (g_printConnectionStatistics) {
8992 // Prepare everything for markdown table while keeping the table code clean-ish
You can’t perform that action at this time.
0 commit comments