Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next

master
Ismael Gomez 7 years ago
commit d80d1f2114

@ -55,7 +55,7 @@ void logger_file::init(std::string file) {
filename = file;
logfile = fopen(filename.c_str(), "w");
if(logfile==NULL) {
printf("Error: could not create log file, no messages will be logged");
printf("Error: could not create log file, no messages will be logged!\n");
}
start();
inited = true;

@ -417,7 +417,7 @@ void mac::get_metrics(mac_metrics_t &m)
metrics.rx_pkts?((float) 100*metrics.rx_errors/metrics.rx_pkts):0.0,
dl_harq.get_average_retx(),
metrics.tx_pkts?((float) 100*metrics.tx_errors/metrics.tx_pkts):0.0,
dl_harq.get_average_retx());
ul_harq.get_average_retx());
metrics.ul_buffer = (int) bsr_procedure.get_buffer_state();
m = metrics;

@ -105,20 +105,18 @@ void usim::stop()
void usim::get_imsi_vec(uint8_t* imsi_, uint32_t n)
{
if (!initiated)
{
usim_log->error("Getting IMSI: USIM not initiated\n");
if (!initiated) {
fprintf(stderr, "USIM not initiated!\n");
return;
}
if(NULL == imsi_ || n < 15)
{
if(NULL == imsi_ || n < 15) {
usim_log->error("Invalid parameters to get_imsi_vec");
return;
}
uint64_t temp = imsi;
for(int i=14;i>=0;i--)
{
for(int i=14;i>=0;i--) {
imsi_[i] = temp % 10;
temp /= 10;
}
@ -126,13 +124,12 @@ void usim::get_imsi_vec(uint8_t* imsi_, uint32_t n)
void usim::get_imei_vec(uint8_t* imei_, uint32_t n)
{
if (!initiated)
{
usim_log->error("Getting IMEI: USIM not initiated\n");
if (!initiated) {
fprintf(stderr, "USIM not initiated!\n");
return;
}
if(NULL == imei_ || n < 15)
{
if(NULL == imei_ || n < 15) {
usim_log->error("Invalid parameters to get_imei_vec");
return;
}
@ -147,9 +144,8 @@ void usim::get_imei_vec(uint8_t* imei_, uint32_t n)
int usim::get_home_plmn_id(LIBLTE_RRC_PLMN_IDENTITY_STRUCT *home_plmn_id)
{
if (!initiated)
{
usim_log->error("Getting Home PLMN Id: USIM not initiated\n");
if (!initiated) {
fprintf(stderr, "USIM not initiated!\n");
return -1;
}

Loading…
Cancel
Save