Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
2462-Zero-more-counter-when-sequence-ends.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2462-Zero-more-counter-when-sequence-ends.patch of Package erlang
From 082ca11ffbfc16dea7b696935eccd351b0c8985d Mon Sep 17 00:00:00 2001 From: Raimo Niskanen <raimo@erlang.org> Date: Tue, 30 Jan 2024 09:11:54 +0100 Subject: [PATCH 12/14] Zero 'more' counter when sequence ends --- erts/emulator/nifs/unix/unix_socket_syncio.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erts/emulator/nifs/unix/unix_socket_syncio.c b/erts/emulator/nifs/unix/unix_socket_syncio.c index 332d72b599..82c3723211 100644 --- a/erts/emulator/nifs/unix/unix_socket_syncio.c +++ b/erts/emulator/nifs/unix/unix_socket_syncio.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2022-2023. All Rights Reserved. + * Copyright Ericsson AB 2022-2024. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -6975,6 +6975,8 @@ ERL_NIF_TERM recv_check_full_done(ErlNifEnv* env, ESOCK_CNT_INC(env, descP, sockRef, esock_atom_read_byte, &descP->readByteCnt, read); + descP->rNumCnt = 0; + descP->readPkgMaxCnt += read; if (descP->readPkgMaxCnt > descP->readPkgMax) descP->readPkgMax = descP->readPkgMaxCnt; @@ -7011,6 +7013,8 @@ ERL_NIF_TERM recv_check_fail(ErlNifEnv* env, FREE_BIN(buf1P); if (buf2P != NULL) FREE_BIN(buf2P); + descP->rNumCnt = 0; + if (saveErrno == ECONNRESET) { /* +++ Oops - closed +++ */ @@ -7173,13 +7177,15 @@ ERL_NIF_TERM recv_check_partial(ErlNifEnv* env, { ERL_NIF_TERM res; + descP->rNumCnt = 0; + if ((toRead == 0) || (descP->type != SOCK_STREAM) || (COMPARE(recvRef, esock_atom_zero) == 0)) { /* +++ We got it all, but since we +++ * +++ did not fill the buffer, we +++ - * +++ must split it into a sub-binary. +++ + * +++ must deliver part of the binary. +++ */ SSDBG( descP, -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor