diff options
Diffstat (limited to 'accel-pppd/logs/log_pgsql.c')
-rw-r--r-- | accel-pppd/logs/log_pgsql.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/logs/log_pgsql.c b/accel-pppd/logs/log_pgsql.c index 1a62a9ab..0c2152e7 100644 --- a/accel-pppd/logs/log_pgsql.c +++ b/accel-pppd/logs/log_pgsql.c @@ -36,7 +36,7 @@ static PGconn *conn; static LIST_HEAD(msg_queue); static int queue_size; static int sleeping = 0; -static spinlock_t queue_lock = SPINLOCK_INITIALIZER; +static spinlock_t queue_lock; static char *log_buf; static int need_close; @@ -284,6 +284,8 @@ static void init(void) { char *opt; + spinlock_init(&queue_lock); + opt = conf_get_opt("log-pgsql", "conninfo"); if (!opt) return; |