From de6e10d5b73351083495105a6417b88938a5dfa9 Mon Sep 17 00:00:00 2001 From: Eric Faurot Date: Tue, 11 Sep 2012 16:24:29 +0000 Subject: Initialize fd correctly. This fixes a lot of problems. ok gilles@ --- usr.sbin/smtpd/mta_session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c index f2b0101f5ed..3ca6fc0cf95 100644 --- a/usr.sbin/smtpd/mta_session.c +++ b/usr.sbin/smtpd/mta_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta_session.c,v 1.15 2012/09/11 15:05:49 eric Exp $ */ +/* $OpenBSD: mta_session.c,v 1.16 2012/09/11 16:24:28 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -128,6 +128,7 @@ mta_session(struct mta_route *route) session->id = generate_uid(); session->route = route; session->state = MTA_INIT; + session->io.sock = -1; tree_xset(&sessions, session->id, session); TAILQ_INIT(&session->hosts); -- cgit v1.2.3