[*] 358964ef cont: realloc event callbacks not fired

This commit is contained in:
Reece Wilson 2023-10-16 04:03:19 +01:00
parent f53ea2a0a7
commit 6bb5dd39f2
2 changed files with 17 additions and 1 deletions

View File

@ -633,6 +633,21 @@ namespace Aurora::IO
{
this->uReallocs_[1]++;
this->bLastReallocFail = true;
if (auto pListener = this->request.pListener)
{
pListener->OnPipeReallocEvent(false);
}
}
void IOPipeWork::SuccessRealloc()
{
this->uReallocs_[0]++;
if (auto pListener = this->request.pListener)
{
pListener->OnPipeReallocEvent(true);
}
}
void IOPipeWork::DoReallocTick()
@ -658,7 +673,7 @@ namespace Aurora::IO
}
this->buffer_ = AuMove(replacement);
this->uReallocs_[0]++;
this->SuccessRealloc();
}
AuByteBuffer *IOPipeWork::GetBuffer()

View File

@ -96,6 +96,7 @@ namespace Aurora::IO
void DoReallocTick();
void FailRealloc();
void SuccessRealloc();
AuUInt GetNextFrameLength(AuUInt uBytesMax);
AuUInt GetNextFrameLength2();