Indentation and whitespace fixes.
Straightforward indentation and whitespace modifications. This is the first one in a series of commits that will bring log manager in line with the coding style.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -31,9 +31,9 @@ typedef struct fnames_conf_st fnames_conf_t;
|
|||||||
typedef struct logmanager_st logmanager_t;
|
typedef struct logmanager_st logmanager_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BB_READY = 0x00,
|
BB_READY = 0x00,
|
||||||
BB_FULL,
|
BB_FULL,
|
||||||
BB_CLEARED
|
BB_CLEARED
|
||||||
} blockbuf_state_t;
|
} blockbuf_state_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -54,8 +54,8 @@ typedef enum { FILEWRITER_INIT, FILEWRITER_RUN, FILEWRITER_DONE }
|
|||||||
*/
|
*/
|
||||||
typedef struct log_info_st
|
typedef struct log_info_st
|
||||||
{
|
{
|
||||||
size_t li_sesid;
|
size_t li_sesid;
|
||||||
int li_enabled_logs;
|
int li_enabled_logs;
|
||||||
} log_info_t;
|
} log_info_t;
|
||||||
|
|
||||||
#define LE LOGFILE_ERROR
|
#define LE LOGFILE_ERROR
|
||||||
@ -67,36 +67,36 @@ typedef struct log_info_st
|
|||||||
* Check if specified log type is enabled in general or if it is enabled
|
* Check if specified log type is enabled in general or if it is enabled
|
||||||
* for the current session.
|
* for the current session.
|
||||||
*/
|
*/
|
||||||
#define LOG_IS_ENABLED(id) (((lm_enabled_logfiles_bitmask & id) || \
|
#define LOG_IS_ENABLED(id) (((lm_enabled_logfiles_bitmask & id) || \
|
||||||
(log_ses_count[id] > 0 && \
|
(log_ses_count[id] > 0 && \
|
||||||
tls_log_info.li_enabled_logs & id)) ? true : false)
|
tls_log_info.li_enabled_logs & id)) ? true : false)
|
||||||
|
|
||||||
|
|
||||||
#define LOG_MAY_BE_ENABLED(id) (((lm_enabled_logfiles_bitmask & id) || \
|
#define LOG_MAY_BE_ENABLED(id) (((lm_enabled_logfiles_bitmask & id) || \
|
||||||
log_ses_count[id] > 0) ? true : false)
|
log_ses_count[id] > 0) ? true : false)
|
||||||
/**
|
/**
|
||||||
* Execute the given command if specified log is enabled in general or
|
* Execute the given command if specified log is enabled in general or
|
||||||
* if there is at least one session for whom the log is enabled.
|
* if there is at least one session for whom the log is enabled.
|
||||||
*/
|
*/
|
||||||
#define LOGIF_MAYBE(id,cmd) if (LOG_MAY_BE_ENABLED(id)) \
|
#define LOGIF_MAYBE(id,cmd) if (LOG_MAY_BE_ENABLED(id)) \
|
||||||
{ \
|
{ \
|
||||||
cmd; \
|
cmd; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the given command if specified log is enabled in general or
|
* Execute the given command if specified log is enabled in general or
|
||||||
* if the log is enabled for the current session.
|
* if the log is enabled for the current session.
|
||||||
*/
|
*/
|
||||||
#define LOGIF(id,cmd) if (LOG_IS_ENABLED(id)) \
|
#define LOGIF(id,cmd) if (LOG_IS_ENABLED(id)) \
|
||||||
{ \
|
{ \
|
||||||
cmd; \
|
cmd; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(LOGIF)
|
#if !defined(LOGIF)
|
||||||
#define LOGIF(id,cmd) if (lm_enabled_logfiles_bitmask & id) \
|
#define LOGIF(id,cmd) if (lm_enabled_logfiles_bitmask & id) \
|
||||||
{ \
|
{ \
|
||||||
cmd; \
|
cmd; \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user