projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Regenerate config file
[privoxy.git]
/
errlog.c
diff --git
a/errlog.c
b/errlog.c
index
b9b39cb
..
7cc4e20
100644
(file)
--- a/
errlog.c
+++ b/
errlog.c
@@
-6,7
+6,7
@@
* printf-like fashion.
*
* Copyright : Written by and Copyright (C) 2001-2014 the
* printf-like fashion.
*
* Copyright : Written by and Copyright (C) 2001-2014 the
- * Privoxy team. http://www.privoxy.org/
+ * Privoxy team. http
s
://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
*
* Based on the Internet Junkbuster originally written
* by and Copyright (C) 1997 Anonymous Coders and
@@
-533,21
+533,12
@@
static inline size_t get_clf_timestamp(char *buffer, size_t buffer_size)
int tz_length = 0;
time (&now);
int tz_length = 0;
time (&now);
-#ifdef HAVE_GMTIME_R
- gmt = *gmtime_r(&now, &gmt);
-#elif defined(MUTEX_LOCKS_AVAILABLE)
- privoxy_mutex_lock(&gmtime_mutex);
- gmt = *gmtime(&now);
- privoxy_mutex_unlock(&gmtime_mutex);
-#else
- gmt = *gmtime(&now);
-#endif
+ gmt = *privoxy_gmtime_r(&now, &gmt);
#ifdef HAVE_LOCALTIME_R
tm_now = localtime_r(&now, &dummy);
#elif defined(MUTEX_LOCKS_AVAILABLE)
privoxy_mutex_lock(&localtime_mutex);
tm_now = localtime(&now);
#ifdef HAVE_LOCALTIME_R
tm_now = localtime_r(&now, &dummy);
#elif defined(MUTEX_LOCKS_AVAILABLE)
privoxy_mutex_lock(&localtime_mutex);
tm_now = localtime(&now);
- privoxy_mutex_unlock(&localtime_mutex);
#else
tm_now = localtime(&now);
#endif
#else
tm_now = localtime(&now);
#endif
@@
-556,6
+547,9
@@
static inline size_t get_clf_timestamp(char *buffer, size_t buffer_size)
mins = hrs * 60 + tm_now->tm_min - gmt.tm_min;
length = strftime(buffer, buffer_size, "%d/%b/%Y:%H:%M:%S ", tm_now);
mins = hrs * 60 + tm_now->tm_min - gmt.tm_min;
length = strftime(buffer, buffer_size, "%d/%b/%Y:%H:%M:%S ", tm_now);
+#if !defined(HAVE_LOCALTIME_R) && defined(MUTEX_LOCKS_AVAILABLE)
+ privoxy_mutex_unlock(&localtime_mutex);
+#endif
if (length > (size_t)0)
{
if (length > (size_t)0)
{
@@
-601,7
+595,7
@@
static inline const char *get_log_level_string(int loglevel)
case LOG_LEVEL_FATAL:
log_level_string = "Fatal error";
break;
case LOG_LEVEL_FATAL:
log_level_string = "Fatal error";
break;
- case LOG_LEVEL_
GPC
:
+ case LOG_LEVEL_
REQUEST
:
log_level_string = "Request";
break;
case LOG_LEVEL_CONNECT:
log_level_string = "Request";
break;
case LOG_LEVEL_CONNECT:
@@
-684,7
+678,7
@@
void log_error(int loglevel, const char *fmt, ...)
* the taskbar icon animate. (There is an option to disable
* this but checking that is handled inside LogShowActivity()).
*/
* the taskbar icon animate. (There is an option to disable
* this but checking that is handled inside LogShowActivity()).
*/
- if ((loglevel == LOG_LEVEL_
GPC
) || (loglevel == LOG_LEVEL_CRUNCH))
+ if ((loglevel == LOG_LEVEL_
REQUEST
) || (loglevel == LOG_LEVEL_CRUNCH))
{
LogShowActivity();
}
{
LogShowActivity();
}
@@
-799,7
+793,7
@@
void log_error(int loglevel, const char *fmt, ...)
break;
case 'c':
/*
break;
case 'c':
/*
- * Note that char param
a
ters are converted to int, so we need to
+ * Note that char param
e
ters are converted to int, so we need to
* pass "int" to va_arg. (See K&R, 2nd ed, section A7.3.2, page 202)
*/
tempbuf[0] = (char) va_arg(ap, int);
* pass "int" to va_arg. (See K&R, 2nd ed, section A7.3.2, page 202)
*/
tempbuf[0] = (char) va_arg(ap, int);