forked from KolibriOS/kolibrios
Bugfix in FTPd for r2624
git-svn-id: svn://kolibrios.org@2627 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8bc17ae113
commit
d123dd899e
@ -144,11 +144,13 @@ start:
|
|||||||
invoke ini.get_int, path, str_pasv, str_end, 5000
|
invoke ini.get_int, path, str_pasv, str_end, 5000
|
||||||
mov [pasv_end], ax
|
mov [pasv_end], ax
|
||||||
|
|
||||||
|
mov [alive], 1
|
||||||
|
|
||||||
mainloop:
|
mainloop:
|
||||||
mcall 23, 100 ; Wait here for incoming connections on the base socket (socketnum)
|
mcall 23, 100 ; Wait here for incoming connections on the base socket (socketnum)
|
||||||
; One second timeout, we sill use this to check if console is still working
|
; One second timeout, we will use this to check if console is still working
|
||||||
|
|
||||||
test eax, 1 shl 7 ; network event?
|
test eax, eax ; network event?
|
||||||
jz .checkconsole
|
jz .checkconsole
|
||||||
|
|
||||||
mcall 51, 1, threadstart, 0 ; Start a new thread for every incoming connection
|
mcall 51, 1, threadstart, 0 ; Start a new thread for every incoming connection
|
||||||
@ -161,6 +163,7 @@ mainloop:
|
|||||||
test eax, 0x0200
|
test eax, 0x0200
|
||||||
jz mainloop
|
jz mainloop
|
||||||
mcall close, [socketnum] ; kill the listening socket
|
mcall close, [socketnum] ; kill the listening socket
|
||||||
|
mov [alive], 0
|
||||||
mcall -1 ; and exit
|
mcall -1 ; and exit
|
||||||
|
|
||||||
diff16 "threadstart", 0, $
|
diff16 "threadstart", 0, $
|
||||||
@ -208,6 +211,9 @@ threadloop:
|
|||||||
cmp eax, -1
|
cmp eax, -1
|
||||||
je thread_exit
|
je thread_exit
|
||||||
|
|
||||||
|
cmp [alive], 0 ; Did main thread take a run for it?
|
||||||
|
je thread_exit
|
||||||
|
|
||||||
mcall 10 ; Wait for network event
|
mcall 10 ; Wait for network event
|
||||||
|
|
||||||
cmp [ebp + thread_data.mode], MODE_PASSIVE_WAIT
|
cmp [ebp + thread_data.mode], MODE_PASSIVE_WAIT
|
||||||
@ -405,6 +411,8 @@ diff16 "i_end", 0, $
|
|||||||
|
|
||||||
ini_buf rb 3*4+3+1
|
ini_buf rb 3*4+3+1
|
||||||
|
|
||||||
|
alive db ?
|
||||||
|
|
||||||
mem:
|
mem:
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user