typo: writing buffer_len to somewhere undefined
This commit is contained in:
parent
05f614b224
commit
65dc844f54
1 changed files with 1 additions and 23 deletions
24
client.s
24
client.s
|
@ -38,7 +38,7 @@ client__pollin:
|
|||
jle client__pollin__return ; TODO verify this shit
|
||||
|
||||
; buffer_len += read(2) length
|
||||
add [rsi + OFFSET_CLIENT_BUFFER_LEN], al
|
||||
add [r12 - OFFSET_CLIENT_BUFFER + OFFSET_CLIENT_BUFFER_LEN], al
|
||||
|
||||
mov rdi, r13
|
||||
mov rsi, rax
|
||||
|
@ -69,28 +69,6 @@ client__pollin__line_too_long:
|
|||
mov rax, -1024
|
||||
jmp client__pollin__return
|
||||
|
||||
client__pollin__line:
|
||||
pop rdx
|
||||
mov word [pollfds + rdx * pollfd_size + 4], POLLOUT
|
||||
push rdx
|
||||
; TODO do something to the line
|
||||
; problem: we can't write here because the socket may
|
||||
; block;
|
||||
; how do we deal with multiple lines?
|
||||
; XXX call read(2) trying to fill the whole buffer
|
||||
; - if we have at least 1 line,
|
||||
; update the state and go back to main loop;
|
||||
; do whatever logic is necessary until we need to
|
||||
; call read(2) or write(2) next, ie nothing;
|
||||
; set POLLOUT and process line(s) in write(2) block
|
||||
; - if we have no line and we filled the buffer,
|
||||
; return -1024
|
||||
; - if we have no line, go back to main loop
|
||||
; we could have multiple lines, and that's okay
|
||||
; XXX so this plan will work actually
|
||||
; XXX should we do logic here or in the write(2) block?
|
||||
; probably there, so here we just accumulate lines
|
||||
ret
|
||||
|
||||
; Returns:
|
||||
; rax - non-negative from write(2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue