msg/Messenger: new bindv() that takes an addrvec

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-06-01 14:14:24 -05:00
parent ff76ac43fc
commit 1b80cfa8ae
2 changed files with 11 additions and 0 deletions

View File

@ -78,3 +78,10 @@ int Messenger::get_default_crc_flags(md_config_t * conf)
r |= MSG_CRC_HEADER;
return r;
}
int Messenger::bindv(const entity_addrvec_t& addrs)
{
lderr(cct) << __func__ << " " << addrs << " fallback to legacy "
<< addrs.legacy_addr() << dendl;
return bind(addrs.legacy_addr());
}

View File

@ -361,6 +361,7 @@ public:
* we can be more specific about the failure.
*/
virtual int bind(const entity_addr_t& bind_addr) = 0;
/**
* This function performs a full restart of the Messenger component,
* whatever that means. Other entities who connect to this
@ -379,6 +380,9 @@ public:
* @return 0 on success, or -1 on error, or -errno if
*/
virtual int client_bind(const entity_addr_t& bind_addr) = 0;
virtual int bindv(const entity_addrvec_t& addrs);
/**
* @} // Configuration
*/