Skip to content

Fix for Issue #494: check and handle return value of openair0_device_load() (develop branch)

Thomas Dreibholz requested to merge dreibh/device-load-fix-develop-branch into develop

lte-softmodem crashes when the SDR board is not connected, since functions to configure the non-existing board are called.

targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c, init_RU_proc() tried to load the device (e.g. the USRP board) by calling openair0_device_load(&ru->rfdevice,&ru->openair0_cfg). openair0_device_load() returns -1 in case of error (like "No USRP Device found"). But the return value is not checked. So, lte-softmodem just continues and segfaults later.

This merge request fixes the issue in the "develop" branch.

Edited by Thomas Dreibholz

Merge request reports