diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-10-19 14:57:58 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-10-19 14:57:58 +0000 |
| commit | c0c80adaa2837a325de946043ea3e57f9ce7ddbf (patch) | |
| tree | 4601dc3ea7174895390969a964adb6ee366ba82e /src/RequestSlot.cc | |
| parent | 2040d64fe59f7a4865caa9d58d3f9fb27d0837f2 (diff) | |
2008-10-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added length equality test to operator== to drop a piece message
whose length does not match to the requested one.
* src/RequestSlot.cc
* test/DefaultBtMessageDispatcherTest.cc
Diffstat (limited to 'src/RequestSlot.cc')
| -rw-r--r-- | src/RequestSlot.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/RequestSlot.cc b/src/RequestSlot.cc index b8f0a05e..60c7e643 100644 --- a/src/RequestSlot.cc +++ b/src/RequestSlot.cc @@ -68,7 +68,8 @@ RequestSlot& RequestSlot::operator=(const RequestSlot& requestSlot) bool RequestSlot::operator==(const RequestSlot& requestSlot) const { - return index == requestSlot.index && begin == requestSlot.begin; + return index == requestSlot.index && begin == requestSlot.begin + && length == requestSlot.length; } bool RequestSlot::operator!=(const RequestSlot& requestSlot) const |
