Branch: Tag:

2003-10-17

2003-10-17 17:29:00 by Martin Nilsson <mani@lysator.liu.se>

Log fixes and more.

Rev: lib/modules/Protocols.pmod/SMTP.pmod:1.28

233:    constant protocol = "ESMTP";       // the fd of the socket -  static object fd = Stdio.File(); +  static Stdio.File fd = Stdio.File();    // the domains for each i relay    static array(string) mydomains = ({ });    // the input buffer for read_cb
284:   #endif    }    +  //! This function is called whenever the SMTP server logs something. +  //! By default the log function is @[werror]. +  function(string:mixed) logfunction = werror; +     static void log(string fmt, mixed ... args)    {    string errmsg = Calendar.now()->format_time() + -  " Pike SMTP server : "; +  " Pike "+protocol+" server : ";    if(messageid)    errmsg += messageid + ": ";    errmsg += fmt + "\n"; -  werror(errmsg, args); +  logfunction(sprintf(errmsg, @args));    }       // make the received header
522:    return message;    }    -  MIME.Message low_message(string content) +  static MIME.Message low_message(string content)    {    datamode = 0;    if(sizeof(content) > maxsize)
620: Inside #if defined(SMTP_DEBUG)
  #ifdef SMTP_DEBUG    log("calling %O\n", _command);   #endif -  function fun = this_object()[_command]; +  function fun = this[_command];    fun(command[1..] * " ");    };    }
662:    launch_functions(inputbuffer[..end]);    if(lower_case(inputbuffer[..end]) == "quit")    { -  destruct(this_object()); +  destruct(this);    return;    }    pattern = "\n";