1d0cef73dSGregory Neil Shapiro<HTML> 2d0cef73dSGregory Neil Shapiro<HEAD><TITLE>xxfi_close</TITLE></HEAD> 3d0cef73dSGregory Neil Shapiro<BODY> 4e92d3f3fSGregory Neil Shapiro<!-- 54313cc83SGregory Neil Shapiro$Id: xxfi_close.html,v 1.14 2013-11-22 20:51:39 ca Exp $ 6e92d3f3fSGregory Neil Shapiro--> 7d0cef73dSGregory Neil Shapiro<H1>xxfi_close</H1> 840266059SGregory Neil Shapiro 9d0cef73dSGregory Neil Shapiro<TABLE border="0" cellspacing=4 cellpadding=4> 1040266059SGregory Neil Shapiro<!---------- Synopsis -----------> 11d0cef73dSGregory Neil Shapiro<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD> 12d0cef73dSGregory Neil Shapiro<PRE> 1340266059SGregory Neil Shapiro#include <libmilter/mfapi.h> 1440266059SGregory Neil Shapirosfsistat (*xxfi_close)( 1540266059SGregory Neil Shapiro SMFICTX *ctx 1640266059SGregory Neil Shapiro); 17d0cef73dSGregory Neil Shapiro</PRE> 1840266059SGregory Neil ShapiroThe current connection is being closed. 19d0cef73dSGregory Neil Shapiro</TD></TR> 2040266059SGregory Neil Shapiro 2140266059SGregory Neil Shapiro<!----------- Description ----------> 22d0cef73dSGregory Neil Shapiro<TR><TH valign="top" align=left>DESCRIPTION</TH><TD> 23d0cef73dSGregory Neil Shapiro<TABLE border="1" cellspacing=1 cellpadding=4> 24d0cef73dSGregory Neil Shapiro<TR align="left" valign=top> 25d0cef73dSGregory Neil Shapiro<TH width="80">Called When</TH> 26d0cef73dSGregory Neil Shapiro<TD>xxfi_close is always called once at the end of each connection.</TD> 27d0cef73dSGregory Neil Shapiro</TR> 28d0cef73dSGregory Neil Shapiro<TR align="left" valign=top> 29d0cef73dSGregory Neil Shapiro<TH>Default Behavior</TH> 30d0cef73dSGregory Neil Shapiro<TD>Do nothing; return SMFIS_CONTINUE.</TD> 31d0cef73dSGregory Neil Shapiro</TR> 32d0cef73dSGregory Neil Shapiro</TABLE> 33*5b0945b5SGregory Neil Shapiro</TD></TR> 3440266059SGregory Neil Shapiro 3540266059SGregory Neil Shapiro<!----------- Arguments ----------> 36d0cef73dSGregory Neil Shapiro<TR><TH valign="top" align=left>ARGUMENTS</TH><TD> 37d0cef73dSGregory Neil Shapiro <TABLE border="1" cellspacing=0> 38d0cef73dSGregory Neil Shapiro <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR> 39d0cef73dSGregory Neil Shapiro <TR valign="top"><TD>ctx</TD> 40d0cef73dSGregory Neil Shapiro <TD>Opaque context structure. 41d0cef73dSGregory Neil Shapiro </TD></TR> 42d0cef73dSGregory Neil Shapiro </TABLE> 43d0cef73dSGregory Neil Shapiro</TD></TR> 4440266059SGregory Neil Shapiro 4540266059SGregory Neil Shapiro<!----------- Notes ----------> 46d0cef73dSGregory Neil Shapiro<TR> 47d0cef73dSGregory Neil Shapiro<TH valign="top" align=left>NOTES</TH> 48d0cef73dSGregory Neil Shapiro<TD> 49d0cef73dSGregory Neil Shapiro<UL> 50d0cef73dSGregory Neil Shapiro<LI>xxfi_close may be called "out-of-order", i.e. before even the 51e92d3f3fSGregory Neil Shapiroxxfi_connect is called. 52e92d3f3fSGregory Neil ShapiroAfter a connection is established by the MTA to the filter, 53e92d3f3fSGregory Neil Shapiroif the MTA decides this connection's traffic will be discarded 54e92d3f3fSGregory Neil Shapiro(e.g. via an access_db result), no data will be passed to the 55e92d3f3fSGregory Neil Shapirofilter from the MTA until the client closes down. 56e92d3f3fSGregory Neil ShapiroAt that time, xxfi_close is called. 57e92d3f3fSGregory Neil ShapiroIt can therefore be the only callback ever used for a given connection, 58e92d3f3fSGregory Neil Shapiroand developers should anticipate this possibility when crafting their 59e92d3f3fSGregory Neil Shapiroxxfi_close code. 60e92d3f3fSGregory Neil ShapiroIn particular, it is incorrect to assume the private context pointer 61e92d3f3fSGregory Neil Shapirowill be something other than NULL in this callback. 62d0cef73dSGregory Neil Shapiro<LI>xxfi_close is called on close even if the previous mail 6340266059SGregory Neil Shapirotransaction was aborted. 64d0cef73dSGregory Neil Shapiro<LI>xxfi_close is responsible for freeing any resources allocated on a 6540266059SGregory Neil Shapiroper-connection basis. 66d0cef73dSGregory Neil Shapiro<LI>Since the connection is already closing, the return value is 6740266059SGregory Neil Shapirocurrently ignored. 68d0cef73dSGregory Neil Shapiro</UL> 69d0cef73dSGregory Neil Shapiro</TD> 70d0cef73dSGregory Neil Shapiro</TR> 71d0cef73dSGregory Neil Shapiro</TABLE> 7240266059SGregory Neil Shapiro 73d0cef73dSGregory Neil Shapiro<HR size="1"> 74d0cef73dSGregory Neil Shapiro<FONT size="-1"> 755dd76dd0SGregory Neil ShapiroCopyright (c) 2000, 2003, 2004 Proofpoint, Inc. and its suppliers. 7640266059SGregory Neil ShapiroAll rights reserved. 77d0cef73dSGregory Neil Shapiro<BR> 7840266059SGregory Neil ShapiroBy using this file, you agree to the terms and conditions set 795ef517c0SGregory Neil Shapiroforth in the LICENSE. 80d0cef73dSGregory Neil Shapiro</FONT> 81d0cef73dSGregory Neil Shapiro</BODY> 82d0cef73dSGregory Neil Shapiro</HTML> 83