]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/msg_types.h: add pick_addr()
authorKefu Chai <kchai@redhat.com>
Tue, 28 Jul 2020 12:29:29 +0000 (20:29 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 28 Jul 2020 12:46:47 +0000 (20:46 +0800)
commite668ce72f6fd78fda1e59c0dbd4e0db1674ca097
treef26be3e95d9ec9ba3953ebe2c65fdfb0d6b9bf6b
parentc06e46239e781d519e1f80a43e208fb521a8b554
msg/msg_types.h: add pick_addr()

for picking an addr from an entity_addrvec_t by given protocol type.
so:
  - v2 => v2, any
  - v1 => v1, any
  - any => any, v1, v2

and add a helper of `addr_of_type()` to avoid repeatings.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/msg_types.h