Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6709 → Rev 6708

/programs/develop/libraries/network/network.asm
311,6 → 311,7
mcall 23 ; wait for event - must be stack event
; 2d. Check for timeout.
test eax, eax
lea eax, [esp+4] ; pointer to (1)
jz .timeout
; 3. Got packet. Call processing function.
push edi ; second parameter: pointer to result
328,7 → 329,6
jbe .wait
.timeout:
; 5. Timeout: abort and return error
lea eax, [esp+4] ; pointer to (1)
push eax
call getaddrinfo_abort
and dword [edi], 0
678,11 → 678,10
mcall 76, API_IPv4 + (1 shl 8) + 4 ; protocol IP=0, device number=0, function=get DNS address
cmp eax, -1
je .ret.dnserr
push eax ; save server address to the stack
mov esi, eax ; put server address to esi
; 8. Open UDP socketnum to DNS server, port 53.
; 8a. Create new socketnum.
mcall 75, 0, AF_INET4, SOCK_DGRAM, 0
pop esi ; restore server address saved at step 7
mcall 75, 0, AF_INET4, SOCK_DGRAM
cmp eax, -1 ; error?
jz .ret.dnserr
mov ecx, eax ; put socketnum handle to ecx
689,7 → 688,7
; 8b. Create sockaddr structure on the stack.
push 0
push 0 ; sin_zero
push edi ; sin_addr
push esi ; sin_addr
push AF_INET4 + (53 shl 24)
; sin_family and sin_port in network byte order
; 8c. Connect.