summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-07-22 03:46:14 +0000
committerStef Walter <stef@memberwebs.com>2004-07-22 03:46:14 +0000
commitd558291f6bec8909e81b01bdf05a29681be5c852 (patch)
tree402590eb8a1f18a7318ef369f438061031c5e601
parent7da5df736c8701781699ce52b0f52e1be06717de (diff)
- Unique id should be in lock
-rw-r--r--common/smtppass.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/smtppass.c b/common/smtppass.c
index 7f7d8e6..f021a8b 100644
--- a/common/smtppass.c
+++ b/common/smtppass.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();