mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-16 14:28:14 +00:00
Do not overwrite RxInfo location if it is already set.
This commit is contained in:
@ -337,12 +337,17 @@ async fn update_gateway_metadata(ufs: &mut UplinkFrameSet) -> Result<()> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
rx_info.location = Some(common::Location {
|
// Do not overwrite the location if it is already set. In case of a 'virtual' it is
|
||||||
latitude: gw_meta.latitude,
|
// possible that the location is already set in the RxInfo. Overwriting this with the
|
||||||
longitude: gw_meta.longitude,
|
// location of the 'virtual' gateway would mean we will get the wrong location.
|
||||||
altitude: gw_meta.altitude as f64,
|
if rx_info.location.is_none() {
|
||||||
..Default::default()
|
rx_info.location = Some(common::Location {
|
||||||
});
|
latitude: gw_meta.latitude,
|
||||||
|
longitude: gw_meta.longitude,
|
||||||
|
altitude: gw_meta.altitude as f64,
|
||||||
|
..Default::default()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
ufs.gateway_private_up_map
|
ufs.gateway_private_up_map
|
||||||
.insert(gw_id, gw_meta.is_private_up);
|
.insert(gw_id, gw_meta.is_private_up);
|
||||||
|
Reference in New Issue
Block a user