diff options
Diffstat (limited to 'lib/erl_interface/doc/src')
-rw-r--r-- | lib/erl_interface/doc/src/ei.xml | 10 | ||||
-rw-r--r-- | lib/erl_interface/doc/src/ei_connect.xml | 35 | ||||
-rw-r--r-- | lib/erl_interface/doc/src/erl_call.xml | 8 | ||||
-rw-r--r-- | lib/erl_interface/doc/src/erl_connect.xml | 29 | ||||
-rw-r--r-- | lib/erl_interface/doc/src/notes.xml | 157 |
5 files changed, 201 insertions, 38 deletions
diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml index 2f65a8c375..d7af7a1b67 100644 --- a/lib/erl_interface/doc/src/ei.xml +++ b/lib/erl_interface/doc/src/ei.xml @@ -4,7 +4,7 @@ <cref> <header> <copyright> - <year>2001</year><year>2009</year> + <year>2001</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>ei</title> @@ -333,7 +333,7 @@ ei_encode_tuple_header(buf, &i, 0); <desc> <p>This function encodes a list header, with a specified arity. The next <c><![CDATA[arity+1]]></c> terms are the elements - (actually it's <c><![CDATA[arity]]></c> cons cells) and the tail of the + (actually its <c><![CDATA[arity]]></c> cons cells) and the tail of the list. Lists and tuples are encoded recursively, so that a list may contain another list or tuple.</p> <p>E.g. to encode the list <c><![CDATA[[c, d, [e | f]]]]></c>:</p> @@ -581,7 +581,7 @@ ei_x_encode_empty_list(&x); <c><![CDATA[term]]></c> union, it is decoded, and the appropriate field in <c><![CDATA[term->value]]></c> is set, and <c><![CDATA[*index]]></c> is incremented by the term size.</p> - <p>The function returns 0 on successful encoding, -1 on error, + <p>The function returns 0 on successful decoding, -1 on error, and 1 if the term seems alright, but does not fit in the <c><![CDATA[term]]></c> structure. If it returns 0, the <c><![CDATA[index]]></c> will be incremented, and the <c><![CDATA[term]]></c> contains the diff --git a/lib/erl_interface/doc/src/ei_connect.xml b/lib/erl_interface/doc/src/ei_connect.xml index abf705f9e2..f562615ddd 100644 --- a/lib/erl_interface/doc/src/ei_connect.xml +++ b/lib/erl_interface/doc/src/ei_connect.xml @@ -4,7 +4,7 @@ <cref> <header> <copyright> - <year>2001</year><year>2009</year> + <year>2001</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -54,7 +54,7 @@ the operation, if the primitive does not complete within the time specified, the function will return an error and <c><![CDATA[erl_errno]]></c> will be set to <c><![CDATA[ETIMEDOUT]]></c>. With - communication primitive is ment an operation on the socket, like + communication primitive is meant an operation on the socket, like <c><![CDATA[connect]]></c>, <c><![CDATA[accept]]></c>, <c><![CDATA[recv]]></c> or <c><![CDATA[send]]></c>.</p> <p>Obviously the timeouts are for implementing fault tolerance, not to keep hard realtime promises. The <c><![CDATA[_tmo]]></c> functions @@ -116,7 +116,7 @@ int n = 0; struct in_addr addr; ei_cnode ec; -addr = inet_addr("150.236.14.75"); +addr.s_addr = inet_addr("150.236.14.75"); if (ei_connect_xinit(&ec, "chivas", "madonna", @@ -132,7 +132,7 @@ if (ei_connect_xinit(&ec, </p> <code type="none"><![CDATA[ if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) { - fprintf("ERROR when initializing: %d",erl_errno); + fprintf(stderr,"ERROR when initializing: %d",erl_errno); exit(-1); } ]]></code> @@ -177,7 +177,7 @@ int fd = ei_connect(&ec, NODE); /*** Variant 2 ***/ struct in_addr addr; -addr = inet_addr(IP_ADDR); +addr.s_addr = inet_addr(IP_ADDR); fd = ei_xconnect(&ec, &addr, ALIVE); ]]></code> </desc> @@ -508,7 +508,7 @@ if (ei_decode_version(result.buff, &index) < 0 same as the port number that was previously bound to the socket.</p> <p><c><![CDATA[addr]]></c> is the 32-bit IP address of the local host.</p> <p>To unregister with epmd, simply close the returned - descriptor. See also <c><![CDATA[ei_unpublish()]]></c>.</p> + descriptor. Do not use <c><![CDATA[ei_unpublish()]]></c>, which is deprecated anyway.</p> <p>On success, the functions return a descriptor connecting the calling process to epmd. On failure, they return -1 and set <c><![CDATA[erl_errno]]></c> to <c><![CDATA[EIO]]></c>.</p> @@ -558,18 +558,21 @@ typedef struct { </func> <func> <name><ret>int</ret><nametext>ei_unpublish(ei_cnode *ec)</nametext></name> - <fsummary>Unpublish a node name</fsummary> + <fsummary>Forcefully unpublish a node name</fsummary> <desc> <p>This function can be called by a process to unregister a - specified node from epmd on the localhost. This may be - useful, for example, when epmd has not detected the failure of a - node, and will not allow the name to be reused. If you use this - function to unregister your own process, be sure to also close - the descriptor that was returned by <c><![CDATA[ei_publish()]]></c>.</p> - <note> - <p>Careless use of this function may have unpredictable - results, if the registered node is in fact still running.</p> - </note> + specified node from epmd on the localhost. This is however usually not + allowed, unless epmd was started with the -relaxed_command_check + flag, which it normally isn't.</p> + + <p>To unregister a node you have published, you should + close the descriptor that was returned by + <c><![CDATA[ei_publish()]]></c>.</p> + + <warning> + <p>This function is deprecated and will be removed in a future + release.</p> + </warning> <p><c><![CDATA[ec]]></c> is the node structure of the node to unregister.</p> <p>If the node was successfully unregistered from epmd, the function returns 0. Otherwise, it returns -1 and sets diff --git a/lib/erl_interface/doc/src/erl_call.xml b/lib/erl_interface/doc/src/erl_call.xml index 2d88e7616a..c597e11481 100644 --- a/lib/erl_interface/doc/src/erl_call.xml +++ b/lib/erl_interface/doc/src/erl_call.xml @@ -4,7 +4,7 @@ <comref> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>erl_call</title> @@ -61,7 +61,7 @@ <item> <p>(<em>optional</em>): Applies the specified function and returns the result. <c><![CDATA[Mod]]></c> must be specified, however - <em>[]</em> is assumed for unspecified <c><![CDATA[Fun]]></c> and <c><![CDATA[Args]]></c>. <c><![CDATA[Args]]></c> should + <c>start</c> and <c>[]</c> are assumed for unspecified <c><![CDATA[Fun]]></c> and <c><![CDATA[Args]]></c>, respectively. <c><![CDATA[Args]]></c> should be in the same format as for <c><![CDATA[erlang:apply/3]]></c>. Note that this flag takes exactly one argument, so quoting may be necessary in order to group <c><![CDATA[Mod]]></c>, <c><![CDATA[Fun]]></c> diff --git a/lib/erl_interface/doc/src/erl_connect.xml b/lib/erl_interface/doc/src/erl_connect.xml index b2235925b2..bd5e637244 100644 --- a/lib/erl_interface/doc/src/erl_connect.xml +++ b/lib/erl_interface/doc/src/erl_connect.xml @@ -4,7 +4,7 @@ <cref> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -451,7 +451,7 @@ typedef struct { <p><c><![CDATA[port]]></c> is the local name to register, and should be the same as the port number that was previously bound to the socket.</p> <p>To unregister with epmd, simply close the returned - descriptor. See also <c><![CDATA[erl_unpublish()]]></c>. + descriptor. </p> <p>On success, the functions return a descriptor connecting the calling process to epmd. On failure, they return -1 and set @@ -507,21 +507,24 @@ typedef struct { </func> <func> <name><ret>int</ret><nametext>erl_unpublish(alive)</nametext></name> - <fsummary>Unpublish a node name</fsummary> + <fsummary>Forcefully unpublish a node name</fsummary> <type> <v>char *alive;</v> </type> <desc> - <p>This function can be called by a process to unregister a - specified node name from epmd on the localhost. This may be - useful, for example, when epmd has not detected the failure of a - node, and will not allow the name to be reused. If you use this - function to unregister your own process, be sure to also close - the descriptor that was returned by <c><![CDATA[erl_publish()]]></c>.</p> - <note> - <p>Careless use of this function may have unpredictable - results, if the registered node is in fact still running.</p> - </note> + <p>This function can be called by a process to unregister a + specified node from epmd on the localhost. This is however usually not + allowed, unless epmd was started with the -relaxed_command_check + flag, which it normally isn't.</p> + + <p>To unregister a node you have published, you should instead + close the descriptor that was returned by + <c><![CDATA[ei_publish()]]></c>.</p> + + <warning> + <p>This function is deprecated and will be removed in a future + release.</p> + </warning> <p><c><![CDATA[alive]]></c> is the name of the node to unregister, i.e., the first component of the nodename, without the <c><![CDATA[@hostname]]></c>.</p> <p>If the node was successfully unregistered from epmd, the diff --git a/lib/erl_interface/doc/src/notes.xml b/lib/erl_interface/doc/src/notes.xml index 14aec4a4d9..de5ba61938 100644 --- a/lib/erl_interface/doc/src/notes.xml +++ b/lib/erl_interface/doc/src/notes.xml @@ -30,6 +30,163 @@ </header> <p>This document describes the changes made to the Erl_interface application.</p> +<section><title>Erl_Interface 3.7.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + erl_call: remove get_hostent</p> + <p> + get_hostent does not properly handle IPv4 addresses on + little endian platforms and fails with hostnames + beginning with a number. Remove get_hostent and use + ei_gethostbyname directly since gethostbyname supports + IPv4 addresses.</p> + <p> + (Thanks to Michael Santos)</p> + <p> + Own Id: OTP-8890</p> + </item> + <item> + <p> teach ei_x_format to handle unary - and + (Thanks to + Steve Vinoski)</p> + <p> + Own Id: OTP-8891</p> + </item> + <item> + <p>Fix zero byte allocation in registry. (Thanks to + Michael Santos)</p> + <p> + Own Id: OTP-8893</p> + </item> + <item> + <p> Check the length of the node name to prevent an + overflow. Memory error control of ei_alloc_big. (Thanks + to Michael Santos) </p> + <p> + Own Id: OTP-8943</p> + </item> + <item> + <p> + erl_term_len() in erl_interface could returned too large + values for integers (since R14B) and too small values for + refs (since R9B).</p> + <p> + Own Id: OTP-8945</p> + </item> + </list> + </section> + +</section> + +<section><title>Erl_Interface 3.7.1.1</title> + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The <c>erl_interface</c> tracelevel for erlang messages was incorrect. This has now been fixed. + </p> + <p> + Own Id: OTP-8874</p> + </item> + </list> + </section> + +</section> +<section><title>Erl_Interface 3.7.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Removed unused variable in <c>ei_decode_term.c</c>.</p> + <p> + Fixed faulty deallocation in <c>erl_call</c>.</p> + <p> + Own Id: OTP-8748</p> + </item> + <item> + <p>ei_connect: correct man page examples (Thanks to + Michael Santos)</p> + <p> + Own Id: OTP-8813</p> + </item> + <item> + <p>ei: prevent overflow in <c>ei_connect_init</c> and + <c>ei_xconnect</c></p> <p>Add length check of the buffer + before copying. (Thanks to Michael Santos)</p> + <p> + Own Id: OTP-8814</p> + </item> + <item> + <p>Remove DECLSPEC feature which fails on Windows Vista + and use the fallback implementation instead.</p> + <p> + Own Id: OTP-8826</p> + </item> + <item> + <p>erl_call: fix multiple buffer overflows (Thanks to + Michael Santos)</p> + <p> + Own Id: OTP-8827</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Fix incorrect writev iovec buffer handling in + <c>erl_interface</c> (Thanks to Steve Vinoski)</p> + <p> + Own Id: OTP-8837</p> + </item> + </list> + </section> + +</section> + +<section><title>Erl_Interface 3.7</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>compact IEEE 754 double encoding in external binary + format for ei</p> <list><item><p>Implement the compact + IEEE 754 double encoding in external binary format for + ei. Encoding for ei now always produces the NEW_FLOAT_EXT + format. Decoding and term printing handle both the old + ERL_FLOAT_EXT encoding and the new NEW_FLOAT_EXT + encoding. </p></item> <item><p>Legacy erl_interface code + also handles the new encoding, but still produces the + ERL_FLOAT_EXT encoding by default.</p></item> + <item><p>Also enable the DFLAG_NEW_FLOATS distribution + flag.</p></item> <item><p>ei_get_type() will return + ERL_FLOAT_EXT regardless if the external format is + encoded with ERL_FLOAT_EXT or NEW_FLOAT_EXT for + doubles.</p></item> <item><p>Reduce the number of copies + of the code for encoding and decoding doubles throughout + ei and erl_interface by instead calling the ei encoding + and decoding functions wherever possible.</p></item> + <item><p>Restore commented-out float tests in + ei_decode_SUITE and ei_encode_SUITE in + lib/erl_interface/test. Modify them to make them match + the style of other tests in the same suites.</p></item> + </list> <p>These changes are based on an ei float patch + from Serge Aleynikov originally submitted against R12B-2 + in July 2008 and reworked by Steve Vinoski May 2010.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-8684</p> + </item> + </list> + </section> + +</section> + <section><title>Erl_Interface 3.6.5</title> <section><title>Improvements and New Features</title> |