]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/simple: fix learned_addr
authorSage Weil <sage@redhat.com>
Wed, 15 Jun 2016 21:04:19 +0000 (17:04 -0400)
committerSage Weil <sage@redhat.com>
Tue, 18 Oct 2016 20:40:10 +0000 (16:40 -0400)
There is a type in entity_addr_t that needs to get set
too.

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/simple/SimpleMessenger.cc

index d89c9d9ef557a4cd4972b0e2bc52c965a10d5fb4..7cf9d9cc50b3f51ea4a169b37ba58c06198aeca8 100644 (file)
@@ -703,9 +703,10 @@ void SimpleMessenger::learned_addr(const entity_addr_t &peer_addr_for_me)
   if (need_addr) {
     entity_addr_t t = peer_addr_for_me;
     t.set_port(my_inst.addr.get_port());
-    ANNOTATE_BENIGN_RACE_SIZED(&my_inst.addr.u, sizeof(my_inst.addr.u),
+    t.set_nonce(my_inst.addr.get_nonce());
+    ANNOTATE_BENIGN_RACE_SIZED(&my_inst.addr, sizeof(my_inst.addr),
                                "SimpleMessenger learned addr");
-    my_inst.addr.u = t.u;
+    my_inst.addr = t;
     ldout(cct,1) << "learned my addr " << my_inst.addr << dendl;
     need_addr = false;
     init_local_connection();