Commit ab6ce4f14a4916b5c3eafc15ad3adb118c820c7f

Authored by David RENÉ
1 parent 86040786

The write function has now a timeout argument in third position

mail/smtp_client.anubis
@@ -402,7 +402,7 @@ define Maybe(One) @@ -402,7 +402,7 @@ define Maybe(One)
402 Int buffer_start_time, 402 Int buffer_start_time,
403 (LogLevel, String) -> One logger 403 (LogLevel, String) -> One logger
404 )= 404 )=
405 - if write( target , buffer) is 405 + if write( target , buffer, 10) is
406 { 406 {
407 failure then failure, 407 failure then failure,
408 success(nb_write) then 408 success(nb_write) then
net_services/send_file.anubis
@@ -43,9 +43,8 @@ define Maybe(One) @@ -43,9 +43,8 @@ define Maybe(One)
43 with read_size = min(65536, left_read), 43 with read_size = min(65536, left_read),
44 if read(src_file, read_size, 10) is 44 if read(src_file, read_size, 10) is
45 { 45 {
46 - error then logger(logError, "send_file_state read error");failure,  
47 - timeout then logger(logError, "send_file_state timeout");failure,  
48 - ok(buffer)then 46 + failure then logger(logError, "send_file_state read error");failure,
  47 + success(buffer) then
49 with data_msg = message(_CXM_FTP_DATA), 48 with data_msg = message(_CXM_FTP_DATA),
50 if add_raw(data_msg, "Data", buffer) is 49 if add_raw(data_msg, "Data", buffer) is
51 { 50 {
web/CXM_multihost_http_server.anubis
@@ -902,7 +902,7 @@ define Maybe(ByteArray) @@ -902,7 +902,7 @@ define Maybe(ByteArray)
902 else 902 else
903 with t0 = (UTime) unow, 903 with t0 = (UTime) unow,
904 //if unow > dead_line then record_dubious_connection(connection,dead_line,dos) else 904 //if unow > dead_line then record_dubious_connection(connection,dead_line,dos) else
905 - if read(connection.conn, 32768, time_out) is // the connection is closed after 10 minutes of inactivity 905 + if read(connection.conn, 32768, 0) is // the connection is closed after 10 minutes of inactivity
906 { 906 {
907 failure then println(pid + "read failed ["+to_string(result_buffer)+"]"); failure, 907 failure then println(pid + "read failed ["+to_string(result_buffer)+"]"); failure,
908 success(ba) then 908 success(ba) then