From cae070fbc006a54d8a2c42e39f9a96fdcf62e1bf Mon Sep 17 00:00:00 2001 From: Cedric RICARD Date: Wed, 3 Jun 2009 07:33:25 +0000 Subject: [PATCH] fix unit-tests --- calexium_lib/mail/authentication.anubis | 2 +- calexium_lib/mail/send_mail.anubis | 18 +++++++++--------- calexium_lib/web/CXM_multihost_http_server.anubis | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/calexium_lib/mail/authentication.anubis b/calexium_lib/mail/authentication.anubis index 6fdb132..11f0625 100644 --- a/calexium_lib/mail/authentication.anubis +++ b/calexium_lib/mail/authentication.anubis @@ -65,7 +65,7 @@ define String to_lower(to_ascii(md5(key_opad + (md5(key_ipad + data))))). // md5(K (+) ipad) and merge with data -define Bool +public define Bool hmac_md5_check ( ByteArray data, //message to be cripted diff --git a/calexium_lib/mail/send_mail.anubis b/calexium_lib/mail/send_mail.anubis index e000776..ea7794d 100644 --- a/calexium_lib/mail/send_mail.anubis +++ b/calexium_lib/mail/send_mail.anubis @@ -27,7 +27,7 @@ read smtp_client.anubis public define String send_mail_log = "SendMail". public define LogMask send_mail_mask = logMask("send_mail"). -define Int smtp_time_out = 300. //5 minutes of timeout +define Int _sendmail_time_out = 300. //5 minutes of timeout public type SendMailResult: ok, @@ -70,25 +70,25 @@ define Result(SmtpClientResult, One) ) = with enhanced_status = sm_session.enhanced_status, //send MAIL FROM - if send_mail_from(conn, param.sender.str, sm_session, smtp_time_out, logger) is + if send_mail_from(conn, param.sender.str, sm_session, _sendmail_time_out, logger) is { error(result) then error(result), ok(_) then //send RCPT TO - if send_recipient(conn, param.recipient.str, sm_session, smtp_time_out, logger) is + if send_recipient(conn, param.recipient.str, sm_session, _sendmail_time_out, logger) is { error(result) then error(result), ok(_) then //send DATA - if send_data(conn, sm_session, smtp_time_out, logger) is + if send_data(conn, sm_session, _sendmail_time_out, logger) is { error(result) then error(result), ok(_) then - if send_content(conn, param.mail_parts, sm_session, smtp_time_out, progress_report, logger) is + if send_content(conn, param.mail_parts, sm_session, _sendmail_time_out, progress_report, logger) is { error(result) then error(result), ok(_) then - send_quit(conn, sm_session, smtp_time_out, logger); + send_quit(conn, sm_session, _sendmail_time_out, logger); logger(logTrace, "SENT Mail FROM "+param.sender.str+" TO "+param.recipient.str); ok(unique) } @@ -115,18 +115,18 @@ public define Result(SmtpClientResult, One) // // Our connection to the SMTP server is opened. We just have to apply the protocol. // - if receive_reply(conn, false, smtp_time_out, logger) is + if receive_reply(conn, false, _sendmail_time_out, logger) is { error then error(error), timeout then error(timeout), reply(code, status, lines) then if code = 220 then //send EHLO - if send_ehlo(conn, param.host_name.str, smtp_time_out, logger) is + if send_ehlo(conn, param.host_name.str, _sendmail_time_out, logger) is { error(result) then error(result), ok(sm_session) then - if do_auth(conn, param.auth, sm_session, smtp_time_out, logger) is + if do_auth(conn, param.auth, sm_session, _sendmail_time_out, logger) is { error(auth_result) then error(auth_result), ok(_) then diff --git a/calexium_lib/web/CXM_multihost_http_server.anubis b/calexium_lib/web/CXM_multihost_http_server.anubis index c907c08..e8c114e 100644 --- a/calexium_lib/web/CXM_multihost_http_server.anubis +++ b/calexium_lib/web/CXM_multihost_http_server.anubis @@ -552,7 +552,7 @@ public define (String, List(HTTP_header)) define Maybe(String) get_host_header_value(List(HTTP_header) headers). define String - utime_to_string + __utime_to_string ( UTime t ) = @@ -588,7 +588,7 @@ public define One ( String txt ) = - println(utime_to_string((UTime)unow - *t0) + " : " + txt). + println(__utime_to_string((UTime)unow - *t0) + " : " + txt). ----------------------------------- Table of Contents --------------------------------- @@ -3088,9 +3088,9 @@ define One send_answer(host_name, desc,connection.conn, request_line, headers, body, make_generate_trust_ticket(dos)) //with duration = (UTime) unow - *t0, - //println("Request duration: " + utime_to_string(duration)) - //println("BufferRead duration: " + utime_to_string(*t1)); - //println("next_char duration: " + utime_to_string(*t2)) + //println("Request duration: " + __utime_to_string(duration)) + //println("BufferRead duration: " + __utime_to_string(*t1)); + //println("next_char duration: " + __utime_to_string(*t2)) } } } -- libgit2 0.21.4