diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c index c860f35..04419e7 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -138,7 +138,8 @@ int sendraw(p_buf buf, const char *data, size_t count, size_t *sent) | |||
| 138 | int err = IO_DONE; | 138 | int err = IO_DONE; |
| 139 | while (total < count && err == IO_DONE) { | 139 | while (total < count && err == IO_DONE) { |
| 140 | size_t done; | 140 | size_t done; |
| 141 | err = io->send(io->ctx, data+total, count-total, &done, tm_get(tm)); | 141 | err = io->send(io->ctx, data+total, count-total, &done, |
| 142 | tm_getsuccess(tm)); | ||
| 142 | total += done; | 143 | total += done; |
| 143 | } | 144 | } |
| 144 | *sent = total; | 145 | *sent = total; |
| @@ -239,7 +240,8 @@ int buf_get(p_buf buf, const char **data, size_t *count) | |||
| 239 | p_tm tm = buf->tm; | 240 | p_tm tm = buf->tm; |
| 240 | if (buf_isempty(buf)) { | 241 | if (buf_isempty(buf)) { |
| 241 | size_t got; | 242 | size_t got; |
| 242 | err = io->recv(io->ctx, buf->data, BUF_SIZE, &got, tm_get(tm)); | 243 | err = io->recv(io->ctx, buf->data, BUF_SIZE, &got, |
| 244 | tm_getsuccess(tm)); | ||
| 243 | buf->first = 0; | 245 | buf->first = 0; |
| 244 | buf->last = got; | 246 | buf->last = got; |
| 245 | } | 247 | } |
