aboutsummaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-11-18 22:17:58 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-11-18 22:17:58 +0100
commit529df9922d85574828d95020eebcd228ba3a8164 (patch)
tree8524b46dd4bbbd163d4ce273ea6e82edd7c4b947 /error.c
parentMerge branch 'bugfix2.1' into beta2.2 (diff)
parentMerged add_bypass_address() and add_host_route_if_nonlocal() (diff)
downloadopenvpn-529df9922d85574828d95020eebcd228ba3a8164.tar.xz
Merge branch 'feat_misc' into beta2.2
Conflicts: acinclude.m4 config-win32.h configure.ac misc.c thread.c thread.h - These conflicts was mainly due to feat_misc getting old and mostly caused by the pthread clean-up patches in feat_misc Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'error.c')
-rw-r--r--error.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/error.c b/error.c
index 873718c..5c53251 100644
--- a/error.c
+++ b/error.c
@@ -26,7 +26,6 @@
#include "error.h"
#include "buffer.h"
-#include "thread.h"
#include "misc.h"
#include "win32.h"
#include "socket.h"
@@ -229,8 +228,6 @@ void x_msg (const unsigned int flags, const char *format, ...)
gc_init (&gc);
- mutex_lock_static (L_MSG);
-
m1 = (char *) gc_malloc (ERR_BUF_SIZE, false, &gc);
m2 = (char *) gc_malloc (ERR_BUF_SIZE, false, &gc);
@@ -330,22 +327,12 @@ void x_msg (const unsigned int flags, const char *format, ...)
}
else
{
-#ifdef USE_PTHREAD
- fprintf (fp, "%s [%d] %s%s%s%s",
- time_string (0, 0, show_usec, &gc),
- (int) openvpn_thread_self (),
- prefix,
- prefix_sep,
- m1,
- (flags&M_NOLF) ? "" : "\n");
-#else
fprintf (fp, "%s %s%s%s%s",
time_string (0, 0, show_usec, &gc),
prefix,
prefix_sep,
m1,
(flags&M_NOLF) ? "" : "\n");
-#endif
}
fflush(fp);
++x_msg_line_num;
@@ -355,8 +342,6 @@ void x_msg (const unsigned int flags, const char *format, ...)
if (flags & M_FATAL)
msg (M_INFO, "Exiting");
- mutex_unlock_static (L_MSG);
-
if (flags & M_FATAL)
openvpn_exit (OPENVPN_EXIT_STATUS_ERROR); /* exit point */
@@ -653,10 +638,6 @@ x_check_status (int status,
*/
const char *x_msg_prefix; /* GLOBAL */
-#ifdef USE_PTHREAD
-pthread_key_t x_msg_prefix_key; /* GLOBAL */
-#endif
-
/*
* Allow MSG to be redirected through a virtual_output object
*/
@@ -664,26 +645,6 @@ pthread_key_t x_msg_prefix_key; /* GLOBAL */
const struct virtual_output *x_msg_virtual_output; /* GLOBAL */
/*
- * Init thread-local variables
- */
-
-void
-msg_thread_init (void)
-{
-#ifdef USE_PTHREAD
- ASSERT (!pthread_key_create (&x_msg_prefix_key, NULL));
-#endif
-}
-
-void
-msg_thread_uninit (void)
-{
-#ifdef USE_PTHREAD
- pthread_key_delete (x_msg_prefix_key);
-#endif
-}
-
-/*
* Exiting.
*/