1<HTML>
2<HEAD><TITLE>smfi_setpriv</TITLE></HEAD>
3<BODY>
4<!--
5$Id: smfi_setpriv.html,v 1.12 2013-11-22 20:51:39 ca Exp $
6-->
7<H1>smfi_setpriv</H1>
8
9<TABLE border="0" cellspacing=4 cellpadding=4>
10<!---------- Synopsis ----------->
11<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
12<PRE>
13#include &lt;libmilter/mfapi.h&gt;
14int smfi_setpriv(
15	SMFICTX *ctx,
16	void *privatedata
17);
18</PRE>
19Set the private data pointer for this connection.
20</TD></TR>
21
22<!----------- Description ---------->
23<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
24<TABLE border="1" cellspacing=1 cellpadding=4>
25<TR align="left" valign=top>
26<TH width="80">Called When</TH>
27<TD>smfi_setpriv may be called in any of the xxfi_* callbacks.</TD>
28</TR>
29<TR align="left" valign=top>
30<TH width="80">Effects</TH>
31<TD>Sets the private data pointer for the context ctx.</TD>
32</TR>
33</TABLE>
34</TD></TR>
35
36<!----------- Arguments ---------->
37<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
38    <TABLE border="1" cellspacing=0>
39    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
40    <TR valign="top"><TD>ctx</TD>
41	<TD>Opaque context structure.
42	</TD></TR>
43    <TR valign="top"><TD>privatedata</TD>
44	<TD>Pointer to private data.  This value will be returned by subsequent calls to <A href="smfi_getpriv.html">smfi_getpriv</A> using ctx.
45	</TD></TR>
46    </TABLE>
47</TD></TR>
48
49<!----------- Return values ---------->
50<TR>
51<TH valign="top" align=left>RETURN VALUES</TH>
52
53<TD>smfi_setpriv returns MI_FAILURE if ctx is an invalid context.
54Otherwise, it returns MI_SUCCESS.</TD>
55</TR>
56
57<TR>
58<TH valign="top" align=left>NOTES</TH>
59
60<TD>There is only one private data pointer per connection; multiple
61calls to smfi_setpriv with different values will cause previous values
62to be lost.
63<P>
64Before a filter terminates it should release the private data
65and set the pointer to NULL.
66</TD>
67
68</TR>
69
70</TABLE>
71
72<HR size="1">
73<FONT size="-1">
74Copyright (c) 2000-2001, 2003 Proofpoint, Inc. and its suppliers.
75All rights reserved.
76<BR>
77By using this file, you agree to the terms and conditions set
78forth in the LICENSE.
79</FONT>
80</BODY>
81</HTML>
82