From 3877595290696d958e2e3a5b4e8c2dbc8ada589b Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 22 Jul 2004 03:46:14 +0000 Subject: - Unique id should be in lock --- src/clamsmtpd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c index 7f7d8e6..f021a8b 100644 --- a/src/clamsmtpd.c +++ b/src/clamsmtpd.c @@ -551,13 +551,14 @@ static void* thread_main(void* arg) memset(&ctx, 0, sizeof(ctx)); - /* Assign a unique id to the connection */ - ctx.id = g_unique_id++; - ctx.server = -1; ctx.clam = -1; plock(); + /* Assign a unique id to the connection */ + ctx.id = g_unique_id++; + + /* Get the client socket */ ctx.client = thread->fd; punlock(); -- cgit v1.2.3