diff options
author | Stef Walter <stef@memberwebs.com> | 2004-09-03 01:36:15 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-09-03 01:36:15 +0000 |
commit | 3e252f7aa2e3b83311ee174ccc8bfa470d9f6037 (patch) | |
tree | 27d1f5a95c68ae59dfa9aab563647a0e7788484d | |
parent | 1c4ed8a00cd6c5804055bc72d453591854d8ecf7 (diff) |
Wraps on the unique id should skip 0
-rw-r--r-- | common/smtppass.c | 4 | ||||
-rw-r--r-- | src/clamsmtpd.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 4ffb003..a9e8f9d 100644 --- a/common/smtppass.c +++ b/common/smtppass.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; 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; |