1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>DB_ENV->repmgr_set_local_site()</title> 7 <link rel="stylesheet" href="apiReference.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" /> 10 <link rel="up" href="rep.html" title="Chapter��10.�� Replication Methods" /> 11 <link rel="prev" href="repmgrset_ack_policy.html" title="DB_ENV->repmgr_set_ack_policy()" /> 12 <link rel="next" href="repmgrsite_list.html" title="DB_ENV->repmgr_site_list()" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">DB_ENV->repmgr_set_local_site()</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="repmgrset_ack_policy.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��10.�� 23 Replication Methods 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="repmgrsite_list.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="repmgrlocal_site"></a>DB_ENV->repmgr_set_local_site()</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db.h> 39 40int 41DB_ENV->repmgr_set_local_site(DB_ENV *env, 42 const char *host, u_int port, u_int32_t flags); </pre> 43 <p> 44 The <code class="methodname">DB_ENV->repmgr_set_local_site()</code> method specifies the host 45 identification string and port number for the local system. 46 </p> 47 <p> 48 The <code class="methodname">DB_ENV->repmgr_set_local_site()</code> method may not be called after 49 the <a class="xref" href="repmgrstart.html" title="DB_ENV->repmgr_start()">DB_ENV->repmgr_start()</a> 50 method is called. 51 </p> 52 <p> 53 The <code class="methodname">DB_ENV->repmgr_set_local_site()</code> <span> 54 <span> 55 method returns a non-zero error value on failure and 0 on success. 56 </span> 57 58 </span> 59 </p> 60 <div class="sect2" lang="en" xml:lang="en"> 61 <div class="titlepage"> 62 <div> 63 <div> 64 <h3 class="title"><a id="id1702891"></a>Parameters</h3> 65 </div> 66 </div> 67 </div> 68 <div class="sect3" lang="en" xml:lang="en"> 69 <div class="titlepage"> 70 <div> 71 <div> 72 <h4 class="title"><a id="id1702934"></a>flags</h4> 73 </div> 74 </div> 75 </div> 76 <p> 77 The <span class="bold"><strong>flags</strong></span> parameter is currently 78 unused, and must be set to 0. 79 </p> 80 </div> 81 <div class="sect3" lang="en" xml:lang="en"> 82 <div class="titlepage"> 83 <div> 84 <div> 85 <h4 class="title"><a id="id1703241"></a>host</h4> 86 </div> 87 </div> 88 </div> 89 <p> 90 The site's host identification string, generally a TCP/IP host name. 91 </p> 92 </div> 93 <div class="sect3" lang="en" xml:lang="en"> 94 <div class="titlepage"> 95 <div> 96 <div> 97 <h4 class="title"><a id="id1703242"></a>port</h4> 98 </div> 99 </div> 100 </div> 101 <p> 102 The port number on which the local site is listening. 103 </p> 104 </div> 105 </div> 106 <div class="sect2" lang="en" xml:lang="en"> 107 <div class="titlepage"> 108 <div> 109 <div> 110 <h3 class="title"><a id="id1703170"></a>Errors</h3> 111 </div> 112 </div> 113 </div> 114 <p> 115 The <code class="methodname">DB_ENV->repmgr_set_local_site()</code> 116 <span> 117 <span> 118 method may fail and return one of the following non-zero errors: 119 </span> 120 121 </span> 122 </p> 123 <div class="sect3" lang="en" xml:lang="en"> 124 <div class="titlepage"> 125 <div> 126 <div> 127 <h4 class="title"><a id="id1703222"></a>EINVAL</h4> 128 </div> 129 </div> 130 </div> 131 <p> 132 If this method is called from a Base API 133 application; 134 if the method was called after replication is started 135with a call to the <a class="xref" href="repmgrstart.html" title="DB_ENV->repmgr_start()">DB_ENV->repmgr_start()</a> 136method; 137 or if an invalid flag value or parameter was specified. 138 </p> 139 </div> 140 </div> 141 <div class="sect2" lang="en" xml:lang="en"> 142 <div class="titlepage"> 143 <div> 144 <div> 145 <h3 class="title"><a id="id1703223"></a>Class</h3> 146 </div> 147 </div> 148 </div> 149 <p> 150 <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a> 151 </p> 152 </div> 153 <div class="sect2" lang="en" xml:lang="en"> 154 <div class="titlepage"> 155 <div> 156 <div> 157 <h3 class="title"><a id="id1702871"></a>See Also</h3> 158 </div> 159 </div> 160 </div> 161 <p> 162 <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a> 163 </p> 164 </div> 165 </div> 166 <div class="navfooter"> 167 <hr /> 168 <table width="100%" summary="Navigation footer"> 169 <tr> 170 <td width="40%" align="left"><a accesskey="p" href="repmgrset_ack_policy.html">Prev</a>��</td> 171 <td width="20%" align="center"> 172 <a accesskey="u" href="rep.html">Up</a> 173 </td> 174 <td width="40%" align="right">��<a accesskey="n" href="repmgrsite_list.html">Next</a></td> 175 </tr> 176 <tr> 177 <td width="40%" align="left" valign="top">DB_ENV->repmgr_set_ack_policy()��</td> 178 <td width="20%" align="center"> 179 <a accesskey="h" href="index.html">Home</a> 180 </td> 181 <td width="40%" align="right" valign="top">��DB_ENV->repmgr_site_list()</td> 182 </tr> 183 </table> 184 </div> 185 </body> 186</html> 187