One more early return to simplify TX callback.
This commit is contained in:
@ -533,15 +533,15 @@ int tx_callback(hackrf_transfer* transfer)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (repeat) {
|
if (!repeat) {
|
||||||
|
stop_main_loop();
|
||||||
|
return -1; /* not repeat mode, end of file */
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(stderr, "Input file end reached. Rewind to beginning.\n");
|
fprintf(stderr, "Input file end reached. Rewind to beginning.\n");
|
||||||
rewind(file);
|
rewind(file);
|
||||||
fread(transfer->buffer + bytes_read, 1, bytes_to_read - bytes_read, file);
|
fread(transfer->buffer + bytes_read, 1, bytes_to_read - bytes_read, file);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
|
||||||
stop_main_loop();
|
|
||||||
return -1; /* not repeat mode, end of file */
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int update_stats(hackrf_device* device, hackrf_m0_state* state, stats_t* stats)
|
static int update_stats(hackrf_device* device, hackrf_m0_state* state, stats_t* stats)
|
||||||
|
Reference in New Issue
Block a user