Ignore:
Timestamp:
Feb 19, 2021, 1:48:14 PM (10 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
d60d30e
Parents:
78da4ab
Message:

Fix httpforall after changes to I/O

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/protocol.cfa

    r78da4ab r4f762d3  
    5353        while(len > 0) {
    5454                // Call write
    55                 int ret = cfa_write(fd, it, len, 0, -1`s, 0p, 0p);
    56                 // int ret = write(fd, it, len);
     55                int ret = cfa_send(fd, it, len, 0, 0);
    5756                if( ret < 0 ) {
    5857                        if( errno == ECONNRESET || errno == EPIPE ) return -ECONNRESET;
     
    9493
    9594
    96 [HttpCode code, bool closed, * const char file, size_t len] http_read(int fd, []char buffer, size_t len, io_cancellation * cancel) {
     95[HttpCode code, bool closed, * const char file, size_t len] http_read(int fd, []char buffer, size_t len) {
    9796        char * it = buffer;
    9897        size_t count = len - 1;
     
    10099        READ:
    101100        for() {
    102                 int ret = cfa_read(fd, (void*)it, count, 0, -1`s, cancel, 0p);
     101                int ret = cfa_recv(fd, (void*)it, count, 0, 0);
    103102                // int ret = read(fd, (void*)it, count);
    104103                if(ret == 0 ) return [OK200, true, 0, 0];
     
    139138        ssize_t ret;
    140139        SPLICE1: while(count > 0) {
    141                 ret = cfa_splice(ans_fd, &offset, pipe[1], 0p, count, sflags, 0, -1`s, 0p, 0p);
     140                ret = cfa_splice(ans_fd, &offset, pipe[1], 0p, count, sflags, 0);
    142141                // ret = splice(ans_fd, &offset, pipe[1], 0p, count, sflags);
    143142                if( ret < 0 ) {
     
    152151                size_t in_pipe = ret;
    153152                SPLICE2: while(in_pipe > 0) {
    154                         ret = cfa_splice(pipe[0], 0p, fd, 0p, in_pipe, sflags, 0, -1`s, 0p, 0p);
     153                        ret = cfa_splice(pipe[0], 0p, fd, 0p, in_pipe, sflags, 0);
    155154                        // ret = splice(pipe[0], 0p, fd, 0p, in_pipe, sflags);
    156155                        if( ret < 0 ) {
Note: See TracChangeset for help on using the changeset viewer.