Minor changes

This commit is contained in:
Andrea Bondavalli 2020-03-20 22:58:21 +01:00
parent dff3ab3cba
commit 596500b130
2 changed files with 5 additions and 8 deletions

View File

@ -129,7 +129,7 @@ class Config {
std::string ip_str_; std::string ip_str_;
std::string config_filename_; std::string config_filename_;
/* recofing needs daemon need_restart */ /* reconfig needs daemon restart */
bool need_restart_{false}; bool need_restart_{false};
}; };

View File

@ -444,13 +444,10 @@ static std::array<uint8_t, 6> get_mcast_mac_addr(uint32_t mcast_ip) {
// As defined by IANA, the most significant 24 bits of an IPv4 multicast // As defined by IANA, the most significant 24 bits of an IPv4 multicast
// MAC address are 0x01005E. // Bit 25 is 0, and the other 23 bits are the // MAC address are 0x01005E. // Bit 25 is 0, and the other 23 bits are the
// least significant 23 bits of an IPv4 multicast address. // least significant 23 bits of an IPv4 multicast address.
uint64_t mac_addr = 0x01005E000000 | (mcast_ip & 0x7FFFFF); return { 0x01, 0x00, 0x5e,
return { static_cast<uint8_t>(mac_addr >> 40), static_cast<uint8_t>((mcast_ip >> 16) & 0x7F),
static_cast<uint8_t>(mac_addr >> 32), static_cast<uint8_t>(mcast_ip >> 8),
static_cast<uint8_t>(mac_addr >> 24), static_cast<uint8_t>(mcast_ip) };
static_cast<uint8_t>(mac_addr >> 16),
static_cast<uint8_t>(mac_addr >> 8),
static_cast<uint8_t>(mac_addr) };
} }
std::error_code SessionManager::add_source(const StreamSource& source) { std::error_code SessionManager::add_source(const StreamSource& source) {