Make fifo before it's requests by MMM engines

This commit is contained in:
FlUxIUS 2020-07-22 21:05:31 +02:00
parent 91945b964f
commit fc89f556bd
1 changed files with 4 additions and 3 deletions

View File

@ -153,6 +153,10 @@ int main(int argc, char** argv)
int cellog_fifo;
char logstr[128];
if(stat(fifo_file, &sbuf) != 0) {
mkfifo(fifo_file, 0666);
}
srslte_debug_handle_crash(argc, argv);
parse_args(argc, argv);
@ -242,9 +246,6 @@ int main(int argc, char** argv)
exit(-1);
}
if (ret == SRSLTE_UE_MIB_FOUND) {
if(stat(fifo_file, &sbuf) != 0) {
mkfifo(fifo_file, 0666);
}
cellog_fifo = open(fifo_file, O_WRONLY);
printf("Found CELL ID %d. %d PRB, %d ports\n", cell.id, cell.nof_prb, cell.nof_ports);
sprintf(logstr, "[CellInfo]:CID=%d;DL_EARFCN=%d;FREQ=%.1f MHz;POWER=%.1f dBm\n", cell.id, channels[freq].id, channels[freq].fd, srslte_convert_power_to_dB(found_cells[i].peak));