Changeset 38 in libcf for trunk/src/cf_log.c


Ignore:
Timestamp:
02/06/13 10:26:54 (11 years ago)
Author:
cheese
Message:

#1 modify test.c for more detail test of multi-threaded logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_log.c

    r35 r38  
    8484    // Initialize the present time to 0 and the timezone to UTC
    8585    unsigned __int64 ui64 =0;
    86     static int tzflag = 0;
     86    //static int tzflag = 0;
    8787
    8888    if (NULL != tv)
     
    105105    }
    106106
     107    /*
    107108    if (NULL != tz)
    108109    {
     
    117118        tz->tz_dsttime = _daylight;
    118119    }
     120    */
    119121
    120122    return 0;
     
    166168        return CF_ERROR_LOG_FLUSH;
    167169
    168     memset (ctx->buffer, 0x00, ctx->size);
    169170    ctx->length = 0;
    170171
     
    209210    else /* flush되어야 함. */
    210211    {
    211         if (CF_File_Write (ctx->fd, buffer, demandSize) < 0)
     212        ctx->buffer = (char *)buffer;
     213        ctx->length = demandSize;
     214
     215        if (CF_Log_Local_Flush (ctx) < 0)
    212216            return CF_ERROR_LOG_FLUSH;
    213217    }
     
    338342        return CF_ERROR_LOG_INVALID_CTX;
    339343
    340     memset (context->path, 0x00, sizeof (context->path));
    341 
    342     if (context->buffer != NULL)
     344    if (context->size > 0)
    343345    {
    344346        CF_Log_Flush (ctx);
Note: See TracChangeset for help on using the changeset viewer.