diff options
author | Mark Spruiell <mes@zeroc.com> | 2003-04-15 23:57:52 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2003-04-15 23:57:52 +0000 |
commit | 57504fb9487416ccfa74814e2ac117c5e619f7f9 (patch) | |
tree | fcf01d06c135aee964be838e65e989f7a7e0840a /cpp/src | |
parent | bug fix - links were not stored in db (diff) | |
download | ice-57504fb9487416ccfa74814e2ac117c5e619f7f9.tar.bz2 ice-57504fb9487416ccfa74814e2ac117c5e619f7f9.tar.xz ice-57504fb9487416ccfa74814e2ac117c5e619f7f9.zip |
a link cost of 0 means accept all messages regardless of cost
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceStorm/LinkSubscriber.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/IceStorm/LinkSubscriber.cpp b/cpp/src/IceStorm/LinkSubscriber.cpp index dfe14cb8956..31fe7f6051d 100644 --- a/cpp/src/IceStorm/LinkSubscriber.cpp +++ b/cpp/src/IceStorm/LinkSubscriber.cpp @@ -72,9 +72,11 @@ void LinkSubscriber::publish(const Event& event) { // - // Don't forward forwarded, or more costly events. + // Don't propagate a message that has already been forwarded. + // Also, if this link has a non-zero cost, then don't propagate + // a message whose cost exceeds the link cost. // - if(event.forwarded || event.cost > _cost) + if(event.forwarded || (_cost > 0 && event.cost > _cost)) { return; } |