diff options
Diffstat (limited to 'lib/erl_interface')
-rw-r--r-- | lib/erl_interface/configure.in | 10 | ||||
-rw-r--r-- | lib/erl_interface/doc/src/ei_connect.xml | 21 | ||||
-rw-r--r-- | lib/erl_interface/doc/src/erl_eterm.xml | 2 | ||||
-rw-r--r-- | lib/erl_interface/doc/src/notes.xml | 2 | ||||
-rw-r--r-- | lib/erl_interface/include/ei.h | 6 | ||||
-rw-r--r-- | lib/erl_interface/src/connect/ei_connect.c | 18 |
6 files changed, 49 insertions, 10 deletions
diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in index 80b229c1c3..2f5b5673bb 100644 --- a/lib/erl_interface/configure.in +++ b/lib/erl_interface/configure.in @@ -100,11 +100,11 @@ if test "x$LD" = "x"; then fi AC_SUBST(LD) -AC_CHECK_SIZEOF(short, $erl_xcomp_short) -AC_CHECK_SIZEOF(int, $erl_xcomp_int) -AC_CHECK_SIZEOF(long, $erl_xcomp_long) -AC_CHECK_SIZEOF(void *, $erl_xcomp_void_p) -AC_CHECK_SIZEOF(long long, $erl_xcomp_long_long) +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(long long) if test $ac_cv_sizeof_void_p = 8; then CFLAGS="$CFLAGS -DEI_64BIT" diff --git a/lib/erl_interface/doc/src/ei_connect.xml b/lib/erl_interface/doc/src/ei_connect.xml index 08e7b122c6..abf705f9e2 100644 --- a/lib/erl_interface/doc/src/ei_connect.xml +++ b/lib/erl_interface/doc/src/ei_connect.xml @@ -619,6 +619,16 @@ typedef struct { <p>These are convenience functions for some common name lookup functions.</p> </desc> </func> + <func> + <name><ret>int</ret><nametext>ei_get_tracelevel(void)</nametext></name> + <name><ret>void</ret><nametext>ei_set_tracelevel(int level)</nametext></name> + <fsummary>Get and set functions for tracing.</fsummary> + <desc> + <p>These functions are used to set tracing on the distribution. The levels are different verbosity levels. A higher level means more information. + See also Debug Information and <c><![CDATA[EI_TRACELEVEL]]></c> below. </p> + <p> <c><![CDATA[ei_set_tracelevel]]></c> and <c><![CDATA[ei_get_tracelevel]]></c> are not thread safe. </p> + </desc> + </func> </funcs> <section> @@ -634,6 +644,17 @@ typedef struct { <item>the environment variable <c><![CDATA[ERL_EPMD_PORT]]></c> is set correctly.</item> </list> + <p>The connection attempt can be traced by setting a tracelevel by either using + <c><![CDATA[ei_set_tracelevel]]></c> or by setting the environment variable <c><![CDATA[EI_TRACELEVEL]]></c>. + The different tracelevels has the following messages:</p> + <list> + <item>1: Verbose error messages</item> + <item>2: Above messages and verbose warning messages </item> + <item>3: Above messages and progress reports for connection handling</item> + <item>4: Above messages and progress reports for communication</item> + <item>5: Above messages and progress reports for data conversion</item> + </list> </section> + </cref> diff --git a/lib/erl_interface/doc/src/erl_eterm.xml b/lib/erl_interface/doc/src/erl_eterm.xml index ce14549672..f403618c59 100644 --- a/lib/erl_interface/doc/src/erl_eterm.xml +++ b/lib/erl_interface/doc/src/erl_eterm.xml @@ -248,7 +248,7 @@ iohead ::= Binary <v>ETERM *list;</v> </type> <desc> - <p>This function converts an IO list to a '\\0' terminated C + <p>This function converts an IO list to a '\0' terminated C string. </p> <p><c><![CDATA[list]]></c> is an Erlang term containing an IO list. The IO list must not contain the integer 0, since C strings may not diff --git a/lib/erl_interface/doc/src/notes.xml b/lib/erl_interface/doc/src/notes.xml index f2519fda0b..21f12f616a 100644 --- a/lib/erl_interface/doc/src/notes.xml +++ b/lib/erl_interface/doc/src/notes.xml @@ -336,7 +336,7 @@ from 0 to 255 as a string. If the original list contains the integer 0, this is considered terminator of the string. This is incorrect. The function has now been - modified to not look for '\\0' in a string, but always + modified to not look for '\0' in a string, but always print all characters.</p> <p>Own Id: OTP-6339 Aux Id: seq10492 </p> </item> diff --git a/lib/erl_interface/include/ei.h b/lib/erl_interface/include/ei.h index 01272244e1..d1a697615a 100644 --- a/lib/erl_interface/include/ei.h +++ b/lib/erl_interface/include/ei.h @@ -339,7 +339,13 @@ const char *ei_thisalivename(const ei_cnode* ec); erlang_pid *ei_self(ei_cnode* ec); +/* + * settings + */ + void ei_set_compat_rel(unsigned rel); +void ei_set_tracelevel(int); +int ei_get_tracelevel(void); /* * We have erl_gethost*() so we include ei versions as well. diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c index 9ac5a93c5a..d2d0a7e7c1 100644 --- a/lib/erl_interface/src/connect/ei_connect.c +++ b/lib/erl_interface/src/connect/ei_connect.c @@ -249,8 +249,22 @@ ei_cnode *ei_fd_to_cnode(int fd) return &sockinfo->cnode; } + +/*************************************************************************** + * Get/Set tracelevel + ***************************************************************************/ + +void ei_set_tracelevel(int level) { + ei_tracelevel = level; +} + +int ei_get_tracelevel(void) { + return ei_tracelevel; +} + + /*************************************************************************** - * XXXX + * Distversion ***************************************************************************/ int ei_distversion(int fd) @@ -1282,8 +1296,6 @@ error: return -1; } -/* FIXME fix the signed/unsigned mess..... */ - static int send_name_or_challenge(int fd, char *nodename, int f_chall, unsigned challenge, |