Bugix for telnet receive function.

git-svn-id: svn://kolibrios.org@3703 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-06-25 16:31:10 +00:00
parent d9b8117616
commit c9f7535c89

View File

@ -179,9 +179,16 @@ mainloop:
test eax, 0x200 ; con window closed?
jnz exit
.check_for_data:
mcall recv, [socketnum], buffer_ptr, BUFFERSIZE, 0
cmp eax, -1
jne .parse_data
cmp ebx, 6 ; EWOULDBLOCK
je mainloop
jmp closed
.parse_data:
DEBUGF 1, 'TELNET: got %u bytes of data !\n', eax
@ -210,7 +217,7 @@ mainloop:
.print:
cmp esi, edi
jae mainloop
jae .check_for_data
push esi
call [con_write_asciiz]
@ -241,6 +248,11 @@ hostname_error:
call [con_write_asciiz]
jmp prompt
closed:
push str12
call [con_write_asciiz]
jmp prompt
done:
push 1
call [con_exit]
@ -276,6 +288,7 @@ str9 db ')',10,0
str5 db 'Name resolution failed.',10,10,0
str6 db 'Could not open socket.',10,10,0
str11 db 'Invalid hostname.',10,10,0
str12 db 10,'Remote host closed the connection.',10,10,0
sockaddr1:
dw AF_INET4