Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 25 of 44) sorted by relevance

12

/packages/modules/Bluetooth/tools/rootcanal/model/setup/
Dtest_channel_transport.cc49 ssize_t bytes_read = socket->Recv(&command_name_size, 1); in OnCommandReady() local
50 if (bytes_read != 1) { in OnCommandReady()
52 bytes_read, 1, strerror(errno)); in OnCommandReady()
57 bytes_read = socket->Recv(command_name_raw.data(), command_name_size); in OnCommandReady()
58 if (bytes_read != command_name_size) { in OnCommandReady()
59 LOG_INFO("Unexpected (command_name) bytes_read: %zd != %d, %s", bytes_read, in OnCommandReady()
72 bytes_read = socket->Recv(&num_args, 1); in OnCommandReady()
73 if (bytes_read != 1) { in OnCommandReady()
74 LOG_INFO("Unexpected (num_args) bytes_read: %zd != %d, %s", bytes_read, 1, in OnCommandReady()
80 bytes_read = socket->Recv(&arg_size, 1); in OnCommandReady()
[all …]
/packages/services/Car/cpp/bugreport/
Dmain.cpp144 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, sizeof(buffer))); in zipFilesToFd() local
145 if (bytes_read == 0) { in zipFilesToFd()
148 if (bytes_read == -1) { in zipFilesToFd()
157 error = writer->WriteBytes(buffer, bytes_read); in zipFilesToFd()
178 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd_in, buffer, buffer_len)); in copyTo() local
179 if (bytes_read == 0) { in copyTo()
182 if (bytes_read == -1) { in copyTo()
192 if (!android::base::WriteFully(fd_out, buffer, bytes_read)) { in copyTo()
196 return bytes_read; in copyTo()
248 ssize_t bytes_read = copyTo(s, progress_socket, buffer, sizeof(buffer)); in doBugreport() local
[all …]
/packages/modules/Bluetooth/tools/rootcanal/model/hci/
Dh4_packetizer.cc63 ssize_t bytes_read; in OnDataReady() local
65 bytes_read = read(fd, buffer.data(), bytes_to_read); in OnDataReady()
66 } while (bytes_read == -1 && errno == EINTR); in OnDataReady()
68 if (bytes_read == 0) { in OnDataReady()
74 if (bytes_read < 0) { in OnDataReady()
89 h4_parser_.Consume(buffer.data(), bytes_read); in OnDataReady()
Dh4_parser.cc107 bool H4Parser::Consume(const uint8_t* buffer, int32_t bytes_read) { in Consume() argument
109 if (bytes_read <= 0) { in Consume()
113 if ((uint32_t)bytes_read > BytesRequested()) { in Consume()
115 static_cast<int>(bytes_read), in Consume()
166 packet_.insert(packet_.end(), buffer, buffer + bytes_read); in Consume()
167 bytes_wanted_ -= bytes_read; in Consume()
Dh4_data_channel_packetizer.cc77 ssize_t bytes_read = socket->Recv(buffer.data(), bytes_to_read); in OnDataReady() local
78 if (bytes_read == 0) { in OnDataReady()
84 if (bytes_read < 0) { in OnDataReady()
98 h4_parser_.Consume(buffer.data(), bytes_read); in OnDataReady()
/packages/modules/Bluetooth/system/gd/hal/
Dsnoop_logger_socket_thread_test.cc199 int bytes_read = -1; in TEST_F() local
208 bytes_read = a.get(); in TEST_F()
209 ASSERT_EQ(bytes_read, -1); in TEST_F()
235 int bytes_read = -1; in TEST_F() local
244 bytes_read = a.get(); in TEST_F()
246 ASSERT_EQ(bytes_read, static_cast<int>(sizeof(SnoopLoggerCommon::FileHeaderType))); in TEST_F()
247 ASSERT_TRUE(std::memcmp(recv_buf, &SnoopLoggerCommon::kBtSnoopFileHeader, bytes_read) == 0); in TEST_F()
276 int bytes_read = -1; in TEST_F() local
287 bytes_read = a.get(); in TEST_F()
291 ASSERT_EQ(bytes_read, static_cast<int>(sizeof(test_data))); in TEST_F()
[all …]
Dhci_hal_host_test.cc241 size_t bytes_read = 0; in read_with_retry() local
244 bytes_read_current = read(socket, data + bytes_read, length - bytes_read); in read_with_retry()
245 bytes_read += bytes_read_current; in read_with_retry()
246 } while (length > bytes_read && bytes_read_current > 0); in read_with_retry()
247 return bytes_read; in read_with_retry()
/packages/modules/Bluetooth/system/bta/hearing_aid/
Dhearing_aid_audio_source.cc95 uint32_t bytes_read; in send_audio_data() local
97 bytes_read = bluetooth::audio::hearing_aid::read(p_buf, bytes_per_tick); in send_audio_data()
99 bytes_read = UIPC_Read(*uipc_hearing_aid, UIPC_CH_ID_AV_AUDIO, p_buf, in send_audio_data()
103 LOG_DEBUG("bytes_read: %u", bytes_read); in send_audio_data()
104 if (bytes_read < bytes_per_tick) { in send_audio_data()
105 stats.media_read_total_underflow_bytes += bytes_per_tick - bytes_read; in send_audio_data()
111 std::vector<uint8_t> data(p_buf, p_buf + bytes_read); in send_audio_data()
/packages/modules/Bluetooth/system/vendor_libs/linux/interface/
Dh4_protocol.cc120 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, kMaxPacketLength)); in OnDataReady() local
121 if (bytes_read == 0) { in OnDataReady()
127 if (bytes_read < 0) { in OnDataReady()
131 send_data_to_packetizer(buffer, bytes_read); in OnDataReady()
/packages/modules/Bluetooth/system/gd/rust/linux/utils/src/
Dsocket.rs306 let mut bytes_read; in read_mgmt_packet() localVariable
308 bytes_read = libc::read( in read_mgmt_packet()
315 let retry = (bytes_read == -1) in read_mgmt_packet()
324 if bytes_read == -1 { in read_mgmt_packet()
332 if bytes_read < (MGMT_PKT_HEADER_SIZE as isize) { in read_mgmt_packet()
333 debug!("read_mgmt_packet got {} bytes (not enough for header)", bytes_read); in read_mgmt_packet()
338 (bytes_read - (MGMT_PKT_HEADER_SIZE as isize)).try_into().unwrap(); in read_mgmt_packet()
/packages/modules/Bluetooth/system/audio_hal_interface/
Da2dp_encoding_host.cc272 uint32_t bytes_read = 0; in read() local
276 bytes_read = UIPC_Read(*a2dp_uipc, UIPC_CH_ID_AV_AUDIO, p_buf, len); in read()
277 total_bytes_read_ += bytes_read; in read()
281 return bytes_read; in read()
/packages/modules/Bluetooth/system/stack/a2dp/
Da2dp_vendor_aptx_hd_encoder.cc316 uint32_t bytes_read = 0; in a2dp_vendor_aptx_hd_send_frames() local
324 bytes_read = a2dp_aptx_hd_encoder_cb.read_callback((uint8_t*)read_buffer32, in a2dp_vendor_aptx_hd_send_frames()
327 bytes_read; in a2dp_vendor_aptx_hd_send_frames()
328 if (bytes_read < expected_read_bytes) { in a2dp_vendor_aptx_hd_send_frames()
330 __func__, bytes_read, expected_read_bytes); in a2dp_vendor_aptx_hd_send_frames()
362 a2dp_aptx_hd_encoder_cb.enqueue_callback(p_buf, 1, bytes_read); in a2dp_vendor_aptx_hd_send_frames()
Da2dp_vendor_aptx_encoder.cc331 uint32_t bytes_read = 0; in a2dp_vendor_aptx_send_frames() local
339 bytes_read = a2dp_aptx_encoder_cb.read_callback((uint8_t*)read_buffer16, in a2dp_vendor_aptx_send_frames()
341 a2dp_aptx_encoder_cb.stats.media_read_total_actual_read_bytes += bytes_read; in a2dp_vendor_aptx_send_frames()
342 if (bytes_read < expected_read_bytes) { in a2dp_vendor_aptx_send_frames()
344 __func__, bytes_read, expected_read_bytes); in a2dp_vendor_aptx_send_frames()
374 a2dp_aptx_encoder_cb.enqueue_callback(p_buf, 1, bytes_read); in a2dp_vendor_aptx_send_frames()
Da2dp_vendor_opus_encoder.cc97 static bool a2dp_opus_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read);
381 uint32_t bytes_read = 0; in a2dp_opus_encode_frames() local
395 bytes_read += temp_bytes_read; in a2dp_opus_encode_frames()
446 bytes_read)) in a2dp_opus_encode_frames()
455 static bool a2dp_opus_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read) { in a2dp_opus_read_feeding() argument
477 *bytes_read = nb_byte_read; in a2dp_opus_read_feeding()
Da2dp_vendor_ldac_encoder.cc121 static bool a2dp_ldac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read);
463 uint32_t bytes_read = 0; in a2dp_ldac_encode_frames() local
478 bytes_read += temp_bytes_read; in a2dp_ldac_encode_frames()
530 bytes_read)) in a2dp_ldac_encode_frames()
543 static bool a2dp_ldac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read) { in a2dp_ldac_read_feeding() argument
565 *bytes_read = nb_byte_read; in a2dp_ldac_read_feeding()
Da2dp_aac_encoder.cc106 static bool a2dp_aac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read);
600 uint32_t bytes_read = 0; in a2dp_aac_encode_frames() local
601 if (a2dp_aac_read_feeding(read_buffer, &bytes_read)) { in a2dp_aac_encode_frames()
635 total_bytes_read += bytes_read; in a2dp_aac_encode_frames()
664 static bool a2dp_aac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read) { in a2dp_aac_read_feeding() argument
676 *bytes_read = nb_byte_read; in a2dp_aac_read_feeding()
/packages/services/Car/cpp/security/vehicle_binding_util/src/
DVehicleBindingUtil.cpp128 ssize_t bytes_read; in fill() local
130 while ((bytes_read = TEMP_FAILURE_RETRY(read(fd, bufptr, size))) > 0) { in fill()
131 size -= bytes_read; in fill()
132 bufptr += bytes_read; in fill()
/packages/modules/adb/client/
Dincremental.cpp231 int bytes_read; in wait_for_installation() local
234 while ((bytes_read = adb_read(read_fd, child_stdout.data() + buf_size, in wait_for_installation()
237 fprintf(stdout, "%.*s", bytes_read, child_stdout.data() + buf_size); in wait_for_installation()
239 buf_size += bytes_read; in wait_for_installation()
Dincremental_server.cpp160 int64_t bytes_read = -1; in ReadDataBlock() local
162 bytes_read = adb_pread(fd_, buf, kBlockSize, offsetStart); in ReadDataBlock()
163 return bytes_read; in ReadDataBlock()
166 int64_t bytes_read = -1; in ReadTreeBlock() local
168 bytes_read = adb_pread(tree_fd_, buf, kBlockSize, offsetStart); in ReadTreeBlock()
169 return bytes_read; in ReadTreeBlock()
/packages/modules/Bluetooth/system/btif/src/
Dbtif_a2dp_source.cc269 uint32_t bytes_read);
936 uint32_t bytes_read = 0; in btif_a2dp_source_read_callback() local
939 bytes_read = bluetooth::audio::a2dp::read(p_buf, len); in btif_a2dp_source_read_callback()
941 bytes_read = UIPC_Read(*a2dp_uipc, UIPC_CH_ID_AV_AUDIO, p_buf, len); in btif_a2dp_source_read_callback()
944 if (bytes_read < len) { in btif_a2dp_source_read_callback()
946 bytes_read, len); in btif_a2dp_source_read_callback()
948 (len - bytes_read); in btif_a2dp_source_read_callback()
954 len - bytes_read); in btif_a2dp_source_read_callback()
957 return bytes_read; in btif_a2dp_source_read_callback()
961 uint32_t bytes_read) { in btif_a2dp_source_enqueue_callback() argument
[all …]
/packages/modules/Bluetooth/system/audio_hal_interface/aidl/
Dhearing_aid_software_encoding_aidl.cc122 void LogBytesRead(size_t bytes_read) override { in LogBytesRead() argument
123 if (bytes_read) { in LogBytesRead()
124 total_bytes_read_ += bytes_read; in LogBytesRead()
/packages/modules/Bluetooth/system/audio_hal_interface/hidl/
Dhearing_aid_software_encoding_hidl.cc116 void LogBytesRead(size_t bytes_read) override { in LogBytesRead() argument
117 if (bytes_read) { in LogBytesRead()
118 total_bytes_read_ += bytes_read; in LogBytesRead()
/packages/modules/Bluetooth/system/gd/os/linux_generic/
Drepeating_alarm.cc76 auto bytes_read = read(fd_, &times_invoked, sizeof(uint64_t)); in on_fire() local
79 ASSERT(bytes_read == static_cast<ssize_t>(sizeof(uint64_t))); in on_fire()
Dalarm.cc76 auto bytes_read = read(fd_, &times_invoked, sizeof(uint64_t)); in on_fire() local
79 ASSERT(bytes_read == static_cast<ssize_t>(sizeof(uint64_t))); in on_fire()
/packages/modules/adb/tls/
Dtls_connection.cpp330 int bytes_read = in ReadFully() local
332 if (bytes_read <= 0) { in ReadFully()
336 size -= bytes_read; in ReadFully()
337 offset += bytes_read; in ReadFully()

12