Changeset 481 for trunk/src/sh_html.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_html.c

    r473 r481  
    4141
    4242#include "samhain.h"
    43 #include "sh_forward.h"
     43#include "sh_xfer.h"
    4444#include "sh_error.h"
    4545#include "sh_unix.h"
     
    159159          if (time_ptr != NULL)
    160160            strftime (ts1, 80, _("%d-%m-%Y %H:%M:%S"), time_ptr);
     161          else
     162            sl_strlcpy(ts1, _("01-01-1970 00:00:00"), sizeof(ts1));
    161163          now = time(NULL);
    162164#if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_LOCALTIME_R)
     
    167169          if (time_ptr != NULL)
    168170            strftime (ts2, 80, _("%d-%m-%Y %H:%M:%S"), time_ptr);
     171          else
     172            sl_strlcpy(ts2, _("01-01-1970 00:00:00"), sizeof(ts2));
    169173
    170174          sl_snprintf(outline, 1023,
     
    193197              if (time_ptr != NULL)
    194198                strftime (ts1, 80, _("%d-%m-%Y %H:%M:%S"), time_ptr);
     199              else
     200                sl_strlcpy(ts1, _("01-01-1970 00:00:00"), sizeof(ts1));
    195201              sl_snprintf(outline, 1023,
    196202                          _("<p>Last connection at %s</p>"),
     
    416422  int status;
    417423  int clt_status;
    418   int i, n;
     424  unsigned int i, n;
    419425
    420426  SL_ENTER(_("sh_html_print_one"));
Note: See TracChangeset for help on using the changeset viewer.