1<html> 2<head><title>smfi_setpriv</title></head> 3<body> 4<!-- 5$Id: smfi_setpriv.html,v 1.9 2003/03/05 19:57:54 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=150>SYNOPSIS</th><td> 12<pre> 13#include <libmilter/mfapi.h> 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 35<!----------- Arguments ----------> 36<tr><th valign="top" align=left>ARGUMENTS</th><td> 37 <table border="1" cellspacing=0> 38 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr> 39 <tr valign="top"><td>ctx</td> 40 <td>Opaque context structure. 41 </td></tr> 42 <tr valign="top"><td>privatedata</td> 43 <td>Pointer to private data. This value will be returned by subsequent calls to <a href="smfi_getpriv.html">smfi_getpriv</a> using ctx. 44 </td></tr> 45 </table> 46</td></tr> 47 48<!----------- Return values ----------> 49<tr> 50<th valign="top" align=left>RETURN VALUES</th> 51 52<td>smfi_setpriv returns MI_FAILURE if ctx is an invalid context. 53Otherwise, it returns MI_SUCCESS.</td> 54</tr> 55 56<tr> 57<th valign="top" align=left>NOTES</th> 58 59<td>There is only one private data pointer per connection; multiple 60calls to smfi_setpriv with different values will cause previous values 61to be lost. 62<P> 63Before a filter terminates it should release the private data 64and set the pointer to NULL. 65</td> 66 67</tr> 68 69</table> 70 71<hr size="1"> 72<font size="-1"> 73Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers. 74All rights reserved. 75<br> 76By using this file, you agree to the terms and conditions set 77forth in the LICENSE. 78</font> 79</body> 80</html> 81