Changeset 481 for trunk/src/sh_mail.c


Ignore:
Timestamp:
Jul 18, 2015, 5:06:52 PM (6 years ago)
Author:
katerina
Message:

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_mail.c

    r383 r481  
    6969#undef  BAD
    7070
    71 static int failedMail = SL_FALSE;
     71static int failedMail = S_FALSE;
    7272
    7373static dnsrep * return_mx (char *domain);
     
    337337  SL_ENTER(_("sh_mail_pushstack"));
    338338
    339   if (msg == NULL || failedMail == SL_TRUE /* || sh.srvmail.name[0] == '\0' */)
     339  if (msg == NULL || failedMail == S_TRUE /* || sh.srvmail.name[0] == '\0' */)
    340340    SL_RETURN((0), (_("sh_mail_pushstack")));
    341341
     
    550550     * Return if we cannot mail.
    551551     */
    552     if (failedMail == SL_TRUE)
     552    if (failedMail == S_TRUE)
    553553      SL_RETURN((-1), _("sh_mail_msg"));
    554554
     
    564564        sh_mail_emptystack();
    565565        sh.mailNum.alarm_last = 0;
    566         failedMail = SL_TRUE;
     566        failedMail = S_TRUE;
    567567        SL_RETURN((-1), _("sh_mail_msg"));
    568568      }
     
    12591259  my_time = time(NULL);
    12601260#if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_LOCALTIME_R)
    1261   my_tm   = localtime_r(&my_time, &time_tm);
     1261  my_tm = localtime_r(&my_time, &time_tm);
    12621262#else
    1263   my_tm   = localtime(&my_time);
    1264 #endif
    1265 
     1263  my_tm = localtime(&my_time);
     1264#endif
     1265 
     1266  if (!my_tm)
     1267    {
     1268      sl_strlcpy(my_tbuf, _("Thu, 01 Jan 1970 00:00:00 +00:00"), sizeof(my_tbuf));
     1269    }
     1270  else
     1271    {
    12661272#if defined(HAVE_STRFTIME_Z)
    1267   (void)    strftime(my_tbuf, 127, _("%a, %d %b %Y %H:%M:%S %z"), my_tm);
     1273      (void) strftime(my_tbuf, 127, _("%a, %d %b %Y %H:%M:%S %z"), my_tm);
    12681274#else
    1269   (void)    strftime(my_tbuf, 127, _("%a, %d %b %Y %H:%M:%S %Z"), my_tm);
    1270 #endif
     1275      (void) strftime(my_tbuf, 127, _("%a, %d %b %Y %H:%M:%S %Z"), my_tm);
     1276#endif
     1277    }
    12711278
    12721279  TPT(( 0, FIL__, __LINE__,  _("msg=<From: <%s>%c%cTo: <%s>%c%cDate: %s>%c%c"),
     
    13391346  char * tmp;
    13401347
    1341   if (flag_err_debug == SL_TRUE)
     1348  if (flag_err_debug == S_TRUE)
    13421349    {
    13431350      tmp = sh_util_safe_name_keepspace(reply);
     
    13821389  reply[0] = '\0';
    13831390
    1384   while (sl_read_timeout_fd (ma_socket, &c, 1, time_wait, SL_FALSE) > 0) {
     1391  while (sl_read_timeout_fd (ma_socket, &c, 1, time_wait, S_FALSE) > 0) {
    13851392
    13861393    if (ireply < (sizeof(reply) - 1))
Note: See TracChangeset for help on using the changeset viewer.