This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
     new 93960f1e2 PROTON-2461: epoll proactor change socket read() to recv()
93960f1e2 is described below

commit 93960f1e2129cf98200bdb2ab31e9ad868f71f61
Author: Clifford Jansen <cliffjan...@apache.org>
AuthorDate: Mon Oct 31 11:59:20 2022 -0700

    PROTON-2461: epoll proactor change socket read() to recv()
---
 c/src/proactor/epoll.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/c/src/proactor/epoll.c b/c/src/proactor/epoll.c
index e78b91f67..ae9971b38 100644
--- a/c/src/proactor/epoll.c
+++ b/c/src/proactor/epoll.c
@@ -1209,14 +1209,14 @@ static pn_event_batch_t 
*pconnection_process(pconnection_t *pc, uint32_t events,
   if (!pconnection_rclosed(pc)) {
     pn_rwbytes_t rbuf = pn_connection_driver_read_buffer(&pc->driver);
     if (rbuf.size > 0 && !pc->read_blocked) {
-      ssize_t n = read(pc->psocket.epoll_io.fd, rbuf.start, rbuf.size);
+      ssize_t n = recv(pc->psocket.epoll_io.fd, rbuf.start, rbuf.size, 0);
       if (n > 0) {
         pn_connection_driver_read_done(&pc->driver, n);
         // If n == rbuf.size then we should enlarge the buffer and see if 
there is more to read
         if ((size_t)n==rbuf.size) {
           rbuf = pn_connection_driver_read_buffer_sized(&pc->driver, n*2);
           if (rbuf.size > 0) {
-            n = read(pc->psocket.epoll_io.fd, rbuf.start, rbuf.size);
+            n = recv(pc->psocket.epoll_io.fd, rbuf.start, rbuf.size, 0);
             if (n > 0) {
               pn_connection_driver_read_done(&pc->driver, n);
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to