Changeset 5883

Show
Ignore:
Timestamp:
07/24/08 10:44:45 (2 months ago)
Author:
rbertholon
Message:

correction in logger (log.c file)

Location:
trunk/centstorage
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/centstorage/ChangeLog

    r5856 r5883  
    22 CentStorage ChangeLog 
    33######################### 
     4 
     5??? - 07/24/2008 
     6----------------- 
     7* Correction of a little bug in the logger 
    48 
    59??? - 07/23/2008 
  • trunk/centstorage/modules/recup_perf_datas/connection_SSL.c

    r5848 r5883  
    8181  tmp = (argssl_t *)arg; 
    8282 
    83   printf("try creating the SSL connection\n"); 
    8483  if (tmp->reload) 
    8584    { 
  • trunk/centstorage/src/Conf.c

    r5732 r5883  
    166166                      conf->logs->time = 24; 
    167167                  } 
    168                 free(tmp); 
     168                if (tmp) 
     169                  free(tmp); 
    169170                break ; 
    170171              } 
  • trunk/centstorage/src/log.c

    r5649 r5883  
    157157          || !unit && openedTime + (3600 * 24 * ti) < time(NULL)) 
    158158        { 
    159           char  date[32]; 
     159          char  date[32], *tmp; 
    160160          int   i, j, count; 
    161161          char  *arch_log; 
     
    172172                  if (date[j - 1] != UNDERSCORE) 
    173173                    date[j++] = UNDERSCORE; 
     174                  if (conf->logs->unit && count == 3) 
     175                    tmp = &char_time[i] + 1; 
    174176                } 
    175177              else if (count == 1 || count == 2 || count == 4) 
    176178                { 
    177179                  date[j] = char_time[i]; 
     180                  ++j; 
     181                } 
     182            } 
     183          if (conf->logs->unit) 
     184            { 
     185              count = 0; 
     186              date[j++] = '_'; 
     187              for (i = 0; i < 9; ++i) 
     188                { 
     189                  date[j] = tmp[i]; 
     190                  if (date[j] == ':') 
     191                    { 
     192                      if (count == 0) 
     193                        date[j] = 'h'; 
     194                      else if (count == 1) 
     195                        date[j] = 'm'; 
     196                    } 
     197                  else if (date[j] == ' ') 
     198                    date[j] = 's'; 
    178199                  ++j; 
    179200                } 
  • trunk/centstorage/src/reloadConf.c

    r5856 r5883  
    200200 
    201201  reloadModules(saveConf); 
    202  
     202  
    203203  /* this part is written to avoid some mmory leaks */ 
    204204  if (conf->modules)