Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8023 → Rev 8022

/programs/develop/libraries/http/http.asm
134,7 → 134,7
;< eax = buffer size in bytes ;;
;;================================================================================================;;
 
mov eax, [buffersize]
mov eax, BUFFERSIZE
ret
 
endp
147,7 → 147,7
;> eax = buffer size in bytes ;;
;;================================================================================================;;
 
mov [buffersize], eax
; mov [BUFFERSIZE], eax
ret
 
endp
1025,12 → 1025,11
test [ebp + http_msg.flags], FLAG_RING
jz @f
mov ebx, [ebp + http_msg.content_ptr]
add ebx, [buffersize]
add ebx, BUFFERSIZE
cmp [ebp + http_msg.write_ptr], ebx
jb @f
DEBUGF 1, "Restarting at beginning of ring buffer\n"
mov ebx, [buffersize]
sub [ebp + http_msg.write_ptr], ebx
sub [ebp + http_msg.write_ptr], BUFFERSIZE
@@:
; Header was already parsed and connection isnt chunked.
; Update content_received
1088,12 → 1087,11
test [ebp + http_msg.flags], FLAG_RING
jz @f
mov ebx, [ebp + http_msg.content_ptr]
add ebx, [buffersize]
add ebx, BUFFERSIZE
cmp [ebp + http_msg.write_ptr], ebx
jb @f
DEBUGF 1, "Restarting at beginning of ring buffer\n"
mov ebx, [buffersize]
sub [ebp + http_msg.write_ptr], ebx
sub [ebp + http_msg.write_ptr], BUFFERSIZE
@@:
; We only got a partial chunk, or need more chunks, update content_received and request more data
add [ebp + http_msg.content_received], eax
1140,8 → 1138,6
 
.server_closed:
DEBUGF 1, "server closed connection, transfer complete?\n"
mcall close, [ebp + http_msg.socket]
and [ebp + http_msg.flags], not FLAG_CONNECTED
test [ebp + http_msg.flags], FLAG_GOT_HEADER
jz .err_server_closed
test [ebp + http_msg.flags], FLAG_CONTENT_LENGTH