Changeset 132 for trunk/src/sh_utmp.c


Ignore:
Timestamp:
Oct 23, 2007, 11:44:41 PM (17 years ago)
Author:
rainer
Message:

Make utility functions thread-safe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_utmp.c

    r68 r132  
    799799          ) {
    800800        status = sh_utmp_login_a(user->name);
    801         (void) sl_strlcpy(ttt, sh_unix_time (user->time), TIM_MAX);
     801        (void) sh_unix_time (user->time, ttt, TIM_MAX);
    802802        sh_error_handle( ShUtmpLoginSolo, FIL__, __LINE__, 0,
    803803#if defined(HAVE_UTHOST) && defined(HAVE_UTADDR)
     
    823823          {       
    824824            status = sh_utmp_login_a(user->name);
    825             (void) sl_strlcpy(ttt, sh_unix_time (user->time), TIM_MAX);
     825            (void) sh_unix_time (user->time, ttt, TIM_MAX);
    826826            sh_error_handle( ShUtmpLoginMulti, FIL__, __LINE__, 0,
    827827#if defined(HAVE_UTHOST) && defined(HAVE_UTADDR)
     
    858858        {
    859859          status = sh_utmp_login_r(user->name);
    860           /* sl_strlcpy(ttt, sh_unix_time (user->time), TIM_MAX); */
    861           (void) sl_strlcpy(ttt, sh_unix_time (ut->ut_time), TIM_MAX);
     860          (void) sh_unix_time (ut->ut_time, ttt, TIM_MAX);
    862861          sh_error_handle( ShUtmpLogout, FIL__, __LINE__, 0,
    863862#if defined(HAVE_UTHOST) && defined(HAVE_UTADDR)
     
    889888        {
    890889          (void) sl_strlcpy(terminated_line, ut->ut_line, UT_HOSTSIZE);
    891           (void) sl_strlcpy(ttt, sh_unix_time (ut->ut_time), TIM_MAX);
     890          (void) sh_unix_time (ut->ut_time, ttt, TIM_MAX);
    892891          sh_error_handle( ShUtmpLogout, FIL__, __LINE__, 0,
    893892                           MSG_UT_LG3C,
     
    920919      userlist         = user;
    921920
    922       sl_strlcpy(ttt, sh_unix_time (user->time), TIM_MAX);
     921      (void) sh_unix_time (user->time, ttt, TIM_MAX);
    923922
    924923
     
    946945  else  /* probably a logout */
    947946    {
    948       sl_strlcpy(ttt, sh_unix_time (ut->ut_time), TIM_MAX);
    949       /* sl_strlcpy(ttt, sh_unix_time (user->time), TIM_MAX); */
     947      (void) sh_unix_time (ut->ut_time, ttt, TIM_MAX);
    950948
    951949      sh_error_handle( ShUtmpLogout, FIL__, __LINE__, 0,
Note: See TracChangeset for help on using the changeset viewer.