mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-22 06:41:17 +00:00
test/sbc+hfp: use O_RDONLY to read packet log on windows
This commit is contained in:
parent
ca13daef16
commit
6cfd76e47e
@ -85,7 +85,11 @@ static void process_file(const char * pklg_path, const char * wav_path, int pack
|
|||||||
|
|
||||||
printf("Processing %s -> %s: PLC enabled: %u, direction %s\n", pklg_path, wav_path, plc_enabled, packet_type == PAKET_TYPE_SCO_OUT ? "Out" : "In");
|
printf("Processing %s -> %s: PLC enabled: %u, direction %s\n", pklg_path, wav_path, plc_enabled, packet_type == PAKET_TYPE_SCO_OUT ? "Out" : "In");
|
||||||
|
|
||||||
int fd = open(pklg_path, O_RDONLY);
|
int oflags = O_RDONLY;
|
||||||
|
#ifdef _WIN32
|
||||||
|
oflags |= O_BINARY;
|
||||||
|
#endif
|
||||||
|
int fd = open(pklg_path, oflags);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
printf("Can't open file %s", pklg_path);
|
printf("Can't open file %s", pklg_path);
|
||||||
return;
|
return;
|
||||||
|
@ -95,7 +95,11 @@ static void process_file(const char * pklg_path, const char * wav_path, int pack
|
|||||||
|
|
||||||
printf("Processing %s -> %s: PLC enabled: %u, direction %s\n", pklg_path, wav_path, plc_enabled, packet_type == PAKET_TYPE_SCO_OUT ? "Out" : "In");
|
printf("Processing %s -> %s: PLC enabled: %u, direction %s\n", pklg_path, wav_path, plc_enabled, packet_type == PAKET_TYPE_SCO_OUT ? "Out" : "In");
|
||||||
|
|
||||||
int fd = open(pklg_path, O_RDONLY);
|
int oflags = O_RDONLY;
|
||||||
|
#ifdef _WIN32
|
||||||
|
oflags |= O_BINARY;
|
||||||
|
#endif
|
||||||
|
int fd = open(pklg_path, oflags);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
printf("Can't open file %s", pklg_path);
|
printf("Can't open file %s", pklg_path);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user