forked from KolibriOS/kolibrios
Bugix for telnet receive function.
git-svn-id: svn://kolibrios.org@3703 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d9b8117616
commit
c9f7535c89
@ -179,9 +179,16 @@ mainloop:
|
|||||||
test eax, 0x200 ; con window closed?
|
test eax, 0x200 ; con window closed?
|
||||||
jnz exit
|
jnz exit
|
||||||
|
|
||||||
|
.check_for_data:
|
||||||
mcall recv, [socketnum], buffer_ptr, BUFFERSIZE, 0
|
mcall recv, [socketnum], buffer_ptr, BUFFERSIZE, 0
|
||||||
cmp eax, -1
|
cmp eax, -1
|
||||||
|
jne .parse_data
|
||||||
|
cmp ebx, 6 ; EWOULDBLOCK
|
||||||
je mainloop
|
je mainloop
|
||||||
|
jmp closed
|
||||||
|
|
||||||
|
|
||||||
|
.parse_data:
|
||||||
|
|
||||||
DEBUGF 1, 'TELNET: got %u bytes of data !\n', eax
|
DEBUGF 1, 'TELNET: got %u bytes of data !\n', eax
|
||||||
|
|
||||||
@ -210,7 +217,7 @@ mainloop:
|
|||||||
|
|
||||||
.print:
|
.print:
|
||||||
cmp esi, edi
|
cmp esi, edi
|
||||||
jae mainloop
|
jae .check_for_data
|
||||||
|
|
||||||
push esi
|
push esi
|
||||||
call [con_write_asciiz]
|
call [con_write_asciiz]
|
||||||
@ -241,6 +248,11 @@ hostname_error:
|
|||||||
call [con_write_asciiz]
|
call [con_write_asciiz]
|
||||||
jmp prompt
|
jmp prompt
|
||||||
|
|
||||||
|
closed:
|
||||||
|
push str12
|
||||||
|
call [con_write_asciiz]
|
||||||
|
jmp prompt
|
||||||
|
|
||||||
done:
|
done:
|
||||||
push 1
|
push 1
|
||||||
call [con_exit]
|
call [con_exit]
|
||||||
@ -276,6 +288,7 @@ str9 db ')',10,0
|
|||||||
str5 db 'Name resolution failed.',10,10,0
|
str5 db 'Name resolution failed.',10,10,0
|
||||||
str6 db 'Could not open socket.',10,10,0
|
str6 db 'Could not open socket.',10,10,0
|
||||||
str11 db 'Invalid hostname.',10,10,0
|
str11 db 'Invalid hostname.',10,10,0
|
||||||
|
str12 db 10,'Remote host closed the connection.',10,10,0
|
||||||
|
|
||||||
sockaddr1:
|
sockaddr1:
|
||||||
dw AF_INET4
|
dw AF_INET4
|
||||||
|
Loading…
Reference in New Issue
Block a user