Deleted Added
full compact
mci.c (141862) mci.c (141887)
1/*
2 * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
1/*
2 * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
12 * $FreeBSD: head/contrib/sendmail/src/mci.c 141862 2005-02-14 02:39:14Z gshapiro $
12 * $FreeBSD: head/contrib/sendmail/src/mci.c 141887 2005-02-14 08:04:08Z gshapiro $
13 */
14
15#include <sendmail.h>
16
17SM_RCSID("@(#)$Id: mci.c,v 8.212 2004/08/04 21:11:31 ca Exp $")
18
19#if NETINET || NETINET6
20# include <arpa/inet.h>

--- 373 unchanged lines hidden (view full) ---

394 mci->mci_lastuse = now;
395 mci->mci_errno = 0;
396 mci->mci_exitstat = EX_OK;
397 }
398 }
399
400 return mci;
401}
13 */
14
15#include <sendmail.h>
16
17SM_RCSID("@(#)$Id: mci.c,v 8.212 2004/08/04 21:11:31 ca Exp $")
18
19#if NETINET || NETINET6
20# include <arpa/inet.h>

--- 373 unchanged lines hidden (view full) ---

394 mci->mci_lastuse = now;
395 mci->mci_errno = 0;
396 mci->mci_exitstat = EX_OK;
397 }
398 }
399
400 return mci;
401}
402
402/*
403/*
404** MCI_CLOSE -- (forcefully) close files used for a connection.
405** Note: this is a last resort, usually smtpquit() or endmailer()
406** should be used to close a connection.
407**
408** Parameters:
409** mci -- the connection to close.
410** where -- where has this been called?
411**
412** Returns:
413** none.
414*/
415
416void
417mci_close(mci, where)
418 MCI *mci;
419 char *where;
420{
421 bool dumped;
422
423 if (mci == NULL)
424 return;
425 dumped = false;
426 if (mci->mci_out != NULL)
427 {
428 if (tTd(56, 1))
429 {
430 sm_dprintf("mci_close: mci_out!=NULL, where=%s\n",
431 where);
432 mci_dump(sm_debug_file(), mci, false);
433 dumped = true;
434 }
435 (void) sm_io_close(mci->mci_out, SM_TIME_DEFAULT);
436 mci->mci_out = NULL;
437 }
438 if (mci->mci_in != NULL)
439 {
440 if (tTd(56, 1))
441 {
442 sm_dprintf("mci_close: mci_in!=NULL, where=%s\n",
443 where);
444 if (!dumped)
445 mci_dump(sm_debug_file(), mci, false);
446 }
447 (void) sm_io_close(mci->mci_in, SM_TIME_DEFAULT);
448 mci->mci_in = NULL;
449 }
450 mci->mci_state = MCIS_CLOSED;
451}
452
453/*
403** MCI_NEW -- allocate new MCI structure
404**
405** Parameters:
406** rpool -- if non-NULL: allocate from that rpool.
407**
408** Returns:
409** mci (new).
410*/

--- 1092 unchanged lines hidden ---
454** MCI_NEW -- allocate new MCI structure
455**
456** Parameters:
457** rpool -- if non-NULL: allocate from that rpool.
458**
459** Returns:
460** mci (new).
461*/

--- 1092 unchanged lines hidden ---