Skip to content

Commit

Permalink
[XAM] QoS: Set DATA_RECEIVED flag only when data is available
Browse files Browse the repository at this point in the history
  • Loading branch information
Gliniak authored and AdrianCassar committed Jan 1, 2025
1 parent 38d3714 commit 300c40f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/xenia/kernel/xam/xam_net.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,8 @@ dword_result_t NetDll_XNetQosLookup_entry(
chunk.http_code == HTTP_STATUS_CODE::HTTP_NO_CONTENT) {
qos->info[0].data_ptr = 0;
qos->info[0].data_len = (uint16_t)0;
qos->info[0].flags =
XNET_XNQOSINFO::COMPLETE | XNET_XNQOSINFO::TARGET_CONTACTED;

if (chunk.size) {
auto data_ptr = kernel_memory()->SystemHeapAlloc((uint32_t)chunk.size);
Expand All @@ -1057,6 +1059,7 @@ dword_result_t NetDll_XNetQosLookup_entry(
memcpy(data, chunk.response, chunk.size);
qos->info[0].data_ptr = data_ptr;
qos->info[0].data_len = (uint16_t)chunk.size;
qos->info[0].flags |= XNET_XNQOSINFO::DATA_RECEIVED;
}

qos->info[0].probes_xmit = 4;
Expand All @@ -1065,9 +1068,6 @@ dword_result_t NetDll_XNetQosLookup_entry(
qos->info[0].rtt_med_in_msecs = 10;
qos->info[0].up_bits_per_sec = 13125;
qos->info[0].down_bits_per_sec = 21058;
qos->info[0].flags = XNET_XNQOSINFO::COMPLETE |
XNET_XNQOSINFO::TARGET_CONTACTED |
XNET_XNQOSINFO::DATA_RECEIVED;
qos->count_pending = 0;

*qos_ptr = qos_guest;
Expand Down

0 comments on commit 300c40f

Please sign in to comment.