summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clamsmtpd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c
index 4ffb003..a9e8f9d 100644
--- a/src/clamsmtpd.c
+++ b/src/clamsmtpd.c
@@ -575,6 +575,10 @@ static void* thread_main(void* arg)
plock();
/* Assign a unique id to the connection */
ctx->id = g_unique_id++;
+
+ /* We don't care about wraps, but we don't want zero */
+ if(g_unique_id == 0)
+ g_unique_id++;
punlock();
ctx->client.fd = fd;