Skip to content

Commit

Permalink
Merge pull request ceph#32908 from smithfarm/wip-43821-nautilus
Browse files Browse the repository at this point in the history
nautilus: mon/Session: only index osd ids >= 0
  • Loading branch information
yuriw committed Feb 13, 2020
2 parents 11256ac + 5b9a2b7 commit 7a46e53
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mon/Session.h
Expand Up @@ -134,7 +134,8 @@ struct MonSessionMap {
}
s->sub_map.clear();
s->item.remove_myself();
if (s->name.is_osd()) {
if (s->name.is_osd() &&
s->name.num() >= 0) {
for (multimap<int,MonSession*>::iterator p = by_osd.find(s->name.num());
p->first == s->name.num();
++p)
Expand Down Expand Up @@ -163,7 +164,8 @@ struct MonSessionMap {
void add_session(MonSession *s) {
sessions.push_back(&s->item);
s->get();
if (s->name.is_osd()) {
if (s->name.is_osd() &&
s->name.num() >= 0) {
by_osd.insert(pair<int,MonSession*>(s->name.num(), s));
}
if (s->con_features) {
Expand Down

0 comments on commit 7a46e53

Please sign in to comment.