summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2006-08-25 04:09:20 +0000
committerjsorg71 <jsorg71>2006-08-25 04:09:20 +0000
commit74ff4b4a97efadac4e80d9efe6beb15fca09b2b0 (patch)
tree9f7d3758bc0e69d5c4058f35c4bfafd284a8c533 /common
parent8c73bc31cb2162b53cf7640afe0e4af7a252c93d (diff)
downloadxrdp-proprietary-74ff4b4a97efadac4e80d9efe6beb15fca09b2b0.tar.gz
xrdp-proprietary-74ff4b4a97efadac4e80d9efe6beb15fca09b2b0.zip
fix lock problem
Diffstat (limited to 'common')
-rw-r--r--common/log.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/log.c b/common/log.c
index 01adbd84..05461864 100644
--- a/common/log.c
+++ b/common/log.c
@@ -120,9 +120,11 @@ log_message(const unsigned int lvl, const char* msg, ...)
char buff[LOG_BUFFER_SIZE + 31]; /* 19 (datetime) 4 (space+cr+lf+\0) */
va_list ap;
int len = 0;
+ int rv;
time_t now_t;
struct tm* now;
+ rv = 0;
if (0 == l_cfg)
{
return LOG_ERROR_NO_CFG;
@@ -182,12 +184,12 @@ log_message(const unsigned int lvl, const char* msg, ...)
#ifdef LOG_ENABLE_THREAD
pthread_mutex_lock(&log_lock);
#endif
- return g_file_write(l_cfg->fd, (char*)buff, g_strlen((char*)buff));
+ rv = g_file_write(l_cfg->fd, (char*)buff, g_strlen((char*)buff));
#ifdef LOG_ENABLE_THREAD
pthread_mutex_unlock(&log_lock);
#endif
}
- return 0;
+ return rv;
}
/******************************************************************************/