Commit cae070fbc006a54d8a2c42e39f9a96fdcf62e1bf

Authored by Cédric RICARD
1 parent 871f01d3

fix unit-tests

calexium_lib/mail/authentication.anubis
... ... @@ -65,7 +65,7 @@ define String
65 65 to_lower(to_ascii(md5(key_opad + (md5(key_ipad + data))))). // md5(K (+) ipad) and merge with data
66 66  
67 67  
68   -define Bool
  68 +public define Bool
69 69 hmac_md5_check
70 70 (
71 71 ByteArray data, //message to be cripted
... ...
calexium_lib/mail/send_mail.anubis
... ... @@ -27,7 +27,7 @@ read smtp_client.anubis
27 27 public define String send_mail_log = "SendMail".
28 28 public define LogMask send_mail_mask = logMask("send_mail").
29 29  
30   -define Int smtp_time_out = 300. //5 minutes of timeout
  30 +define Int _sendmail_time_out = 300. //5 minutes of timeout
31 31  
32 32 public type SendMailResult:
33 33 ok,
... ... @@ -70,25 +70,25 @@ define Result(SmtpClientResult, One)
70 70 ) =
71 71 with enhanced_status = sm_session.enhanced_status,
72 72 //send MAIL FROM
73   - if send_mail_from(conn, param.sender.str, sm_session, smtp_time_out, logger) is
  73 + if send_mail_from(conn, param.sender.str, sm_session, _sendmail_time_out, logger) is
74 74 {
75 75 error(result) then error(result),
76 76 ok(_) then
77 77 //send RCPT TO
78   - if send_recipient(conn, param.recipient.str, sm_session, smtp_time_out, logger) is
  78 + if send_recipient(conn, param.recipient.str, sm_session, _sendmail_time_out, logger) is
79 79 {
80 80 error(result) then error(result),
81 81 ok(_) then
82 82 //send DATA
83   - if send_data(conn, sm_session, smtp_time_out, logger) is
  83 + if send_data(conn, sm_session, _sendmail_time_out, logger) is
84 84 {
85 85 error(result) then error(result),
86 86 ok(_) then
87   - if send_content(conn, param.mail_parts, sm_session, smtp_time_out, progress_report, logger) is
  87 + if send_content(conn, param.mail_parts, sm_session, _sendmail_time_out, progress_report, logger) is
88 88 {
89 89 error(result) then error(result),
90 90 ok(_) then
91   - send_quit(conn, sm_session, smtp_time_out, logger);
  91 + send_quit(conn, sm_session, _sendmail_time_out, logger);
92 92 logger(logTrace, "SENT Mail FROM "+param.sender.str+" TO "+param.recipient.str);
93 93 ok(unique)
94 94 }
... ... @@ -115,18 +115,18 @@ public define Result(SmtpClientResult, One)
115 115 //
116 116 // Our connection to the SMTP server is opened. We just have to apply the protocol.
117 117 //
118   - if receive_reply(conn, false, smtp_time_out, logger) is
  118 + if receive_reply(conn, false, _sendmail_time_out, logger) is
119 119 {
120 120 error then error(error),
121 121 timeout then error(timeout),
122 122 reply(code, status, lines) then
123 123 if code = 220 then
124 124 //send EHLO
125   - if send_ehlo(conn, param.host_name.str, smtp_time_out, logger) is
  125 + if send_ehlo(conn, param.host_name.str, _sendmail_time_out, logger) is
126 126 {
127 127 error(result) then error(result),
128 128 ok(sm_session) then
129   - if do_auth(conn, param.auth, sm_session, smtp_time_out, logger) is
  129 + if do_auth(conn, param.auth, sm_session, _sendmail_time_out, logger) is
130 130 {
131 131 error(auth_result) then error(auth_result),
132 132 ok(_) then
... ...
calexium_lib/web/CXM_multihost_http_server.anubis
... ... @@ -552,7 +552,7 @@ public define (String, List(HTTP_header))
552 552 define Maybe(String) get_host_header_value(List(HTTP_header) headers).
553 553  
554 554 define String
555   - utime_to_string
  555 + __utime_to_string
556 556 (
557 557 UTime t
558 558 ) =
... ... @@ -588,7 +588,7 @@ public define One
588 588 (
589 589 String txt
590 590 ) =
591   - println(utime_to_string((UTime)unow - *t0) + " : " + txt).
  591 + println(__utime_to_string((UTime)unow - *t0) + " : " + txt).
592 592  
593 593  
594 594 ----------------------------------- Table of Contents ---------------------------------
... ... @@ -3088,9 +3088,9 @@ define One
3088 3088 send_answer(host_name, desc,connection.conn, request_line, headers, body,
3089 3089 make_generate_trust_ticket(dos))
3090 3090 //with duration = (UTime) unow - *t0,
3091   - //println("Request duration: " + utime_to_string(duration))
3092   - //println("BufferRead duration: " + utime_to_string(*t1));
3093   - //println("next_char duration: " + utime_to_string(*t2))
  3091 + //println("Request duration: " + __utime_to_string(duration))
  3092 + //println("BufferRead duration: " + __utime_to_string(*t1));
  3093 + //println("next_char duration: " + __utime_to_string(*t2))
3094 3094 }
3095 3095 }
3096 3096 }
... ...