Use proper u16 type preference

This commit is contained in:
Jim Gustafson 2024-03-11 09:57:42 -07:00
parent fec996003b
commit 8ee5fc9619
2 changed files with 4 additions and 4 deletions

View file

@ -62,7 +62,7 @@ RUSTEXPORT void Rust_InjectableNetwork_AddInterface(
const char* name_borrowed,
rtc::AdapterType type,
Ip ip,
int preference);
uint16_t preference);
RUSTEXPORT void Rust_InjectableNetwork_RemoveInterface(
InjectableNetwork* network_borrowed,

View file

@ -158,7 +158,7 @@ class InjectableNetworkImpl : public InjectableNetwork, public rtc::NetworkManag
// type Affects Candidate network cost and other ICE behavior
// preference affects ICE candidate priorities higher is more preferred
void AddInterface(
const char* name, rtc::AdapterType type, Ip ip, int preference) override {
const char* name, rtc::AdapterType type, Ip ip, uint16_t preference) override {
RTC_LOG(LS_INFO) << "InjectableNetworkImpl::AddInterface() name: " << name;
// We need to access interface_by_name_ and SignalNetworksChanged on the network_thread_.
// Make sure to copy the name first!
@ -360,8 +360,8 @@ RUSTEXPORT void Rust_InjectableNetwork_AddInterface(
InjectableNetwork* network_borrowed,
const char* name_borrowed,
rtc::AdapterType type,
Ip ip,
int preference) {
Ip ip,
uint16_t preference) {
network_borrowed->AddInterface(name_borrowed, type, ip, preference);
}