diff options
author | Sverker Eriksson <[email protected]> | 2011-07-08 18:47:50 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-07-27 11:41:26 +0200 |
commit | a6e8634b84f564ec62e44f7c91a1c400af3dd347 (patch) | |
tree | 38ae7f65b568f45256e247bbbb0da56c7c9ee05c /erts/epmd/src/epmd_int.h | |
parent | 089b8c357f5e7c96605c8f8cab4b3c856081dc39 (diff) | |
download | otp-a6e8634b84f564ec62e44f7c91a1c400af3dd347.tar.gz otp-a6e8634b84f564ec62e44f7c91a1c400af3dd347.tar.bz2 otp-a6e8634b84f564ec62e44f7c91a1c400af3dd347.zip |
Fix epmd crash on vxworks caused by faulty argument to select
The first argument g->max_conn to select() in epmd_srv.c seems to be
wrong as it excludes the listening socket(s). Instead we keep track of
the highest fd seen.
However I still don't understand why select() started to fail for
vxworks with R14B03 when the feature of more than one listening socket
was introduced. The default is still 1 listening socket (num_sockets=1),
which would make the first argument to select() unchanged.
Diffstat (limited to 'erts/epmd/src/epmd_int.h')
-rw-r--r-- | erts/epmd/src/epmd_int.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h index 2a0de4df9c..a2d7559f9d 100644 --- a/erts/epmd/src/epmd_int.h +++ b/erts/epmd/src/epmd_int.h @@ -240,6 +240,14 @@ #define put_int16(i, s) {((unsigned char*)(s))[0] = ((i) >> 8) & 0xff; \ ((unsigned char*)(s))[1] = (i) & 0xff;} +#if defined(__GNUC__) +# define EPMD_INLINE __inline__ +#elif defined(__WIN32__) +# define EPMD_INLINE __inline +#else +# define EPMD_INLINE +#endif + /* ************************************************************************ */ /* Stuctures used by server */ @@ -295,6 +303,7 @@ typedef struct { unsigned delay_write; int max_conn; int active_conn; + int select_fd_top; char *progname; Connection *conn; Nodes nodes; |