git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f19bfa
)
Для структуры IP_DIR_PAIR добавлен оператор сравнения (точнее несравнения)
author
Maxim Mamontov
<faust@gts.dp.ua>
Mon, 6 Dec 2010 14:27:26 +0000
(16:27 +0200)
committer
Maxim Mamontov
<faust@gts.dp.ua>
Mon, 6 Dec 2010 14:27:26 +0000
(16:27 +0200)
include/user_stat.h
patch
|
blob
|
history
diff --git
a/include/user_stat.h
b/include/user_stat.h
index 126c20f46d0424151ea61592d28268ec8978b453..fd0e79a01d55e05c0f176e6d8f4a440756f3168a 100644
(file)
--- a/
include/user_stat.h
+++ b/
include/user_stat.h
@@
-74,6
+74,22
@@
struct IP_DIR_PAIR
return false;
}
//------------------------
+ bool operator!=(const IP_DIR_PAIR & rvalue) const
+ {
+ if (ip != rvalue.ip)
+ return true;
+
+ #ifdef TRAFF_STAT_WITH_PORTS
+ if (port != rvalue.port)
+ return true;
+ #endif
+
+ if (dir != rvalue.dir)
+ return true;
+
+ return false;
+ }
+ //------------------------
uint32_t ip;
int dir;
#ifdef TRAFF_STAT_WITH_PORTS