rfsimulator: fix model name for channel
bridge->nb_cnx++ is done before calling snprintf(modelname,... in the function, so we take the model name of the next channel. This commit corrects the issue by using bridge->nb_cnx - 1, ensuring that the model name corresponds to the currently connected client. This bug was introduced by MR !3455. Co-authored-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org> Co-authored-by: Laurent THOMAS <laurent.thomas@open-cells.com>
This commit is contained in:
co-authored by
Bartosz Podrygajlo
Laurent THOMAS
parent
fc1c762cf2
commit
c5bc949a96
@@ -218,7 +218,7 @@ static buffer_t *allocCirBuf(rfsimulator_state_t *bridge, int sock)
|
|||||||
sizeofArray(modelname),
|
sizeofArray(modelname),
|
||||||
"rfsimu_channel_%s%d",
|
"rfsimu_channel_%s%d",
|
||||||
(bridge->role == SIMU_ROLE_SERVER) ? "ue" : "enB",
|
(bridge->role == SIMU_ROLE_SERVER) ? "ue" : "enB",
|
||||||
bridge->nb_cnx);
|
bridge->nb_cnx - 1);
|
||||||
ptr->channel_model = find_channel_desc_fromname(modelname); // path_loss in dB
|
ptr->channel_model = find_channel_desc_fromname(modelname); // path_loss in dB
|
||||||
if (!ptr->channel_model) {
|
if (!ptr->channel_model) {
|
||||||
// Use legacy method to find channel model - this will use the same channel model for all clients
|
// Use legacy method to find channel model - this will use the same channel model for all clients
|
||||||
|
|||||||
Reference in New Issue
Block a user