summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-11-17 00:52:12 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-11-17 00:52:12 +0000
commite95bcaa22ecd7f473cb7ff1b0957db428f7c5184 (patch)
treedca45e7c9c651fdd775f332c9c82719ae93bca3c
parentde2b4b1d2d396ba4f322e334c1106e4a1eabbea0 (diff)
downloadATCD-e95bcaa22ecd7f473cb7ff1b0957db428f7c5184.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-97b43
-rw-r--r--README1
-rw-r--r--ace/OS.i4
-rw-r--r--ace/config-unixware-2.1.2-g++.h2
-rw-r--r--tests/SOCK_Connector_Test.cpp3
5 files changed, 51 insertions, 2 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b
index 2157c0d0e81..9ed02f1ab96 100644
--- a/ChangeLog-97b
+++ b/ChangeLog-97b
@@ -1,5 +1,48 @@
Sun Nov 16 13:34:29 1997 Douglas C. Schmidt <schmidt@merengue.cs.wustl.edu>
+ * tests/SOCK_Connector_Test.cpp (fail_no_listener_nonblocking):
+ Changed the line
+
+ status = con.complete (sock);
+
+ to
+
+ if (sock.get_handle () != ACE_INVALID_HANDLE)
+ status = con.complete (sock);
+
+ The change worksaround a core dump due the the following
+ conditions:
+
+ - the find_another_host function in SOCK_Connector_Test comes
+ up with the entry for an NT machine.
+
+ - the ACE_OS::connect call at line 64 of SOCK_Connector.cpp
+ "successfully" fails returning -1 but in this case
+ errno is set to ECONNREFUSED.
+
+ - Since errno is not EINPROGRESS or EWOULDBLOCK the
+ ACE_SOCK_Stream 'new_stream' close member function is called
+ which, besides closing the "handle", also sets it to
+ ACE_INVALID_HANDLE.
+
+ - Since the errno was ECONNREFUSED the 'if' test at line 97 of
+ SOCK_Connector_Test.cpp is true and the next statement
+
+ status = con.complete (sock);
+
+ is called causing a core dump since sock.get_handle() is
+ ACE_INVALID_HANDLE (-1 on Solaris).
+
+ Thanks to Jack Erickson <jack@pinion.com> for reporting this.
+
+ * ace/OS: Cast away the constness of the parameters to _tempnam()
+ for Borland C++. Thanks to Valik Solrzano Barboza
+ <valik@xs4all.nl> for this.
+
+ * ace/config-unixware-2.1.2-g++.h: Changed
+ ACE_HAS_OSF1_GETTIMEOFDAY to ACE_HAS_SVR4_GETTIMEOFDAY. Thanks
+ to John Connett <jrc@skylon.demon.co.uk> for reporting this.
+
* ace/SPIPE_Addr.cpp (set): Fixed a problem where we were
potentially writing into character constants. Thanks to Darrell
Brunsch for finding this.
diff --git a/README b/README
index b8e98ef40b2..0308af383d6 100644
--- a/README
+++ b/README
@@ -481,6 +481,7 @@ Marios Zikos <zikos@csi.forth.gr>
Mark L Boriack <mark@vtcibm4a>
Caleb Epstein <epstein_caleb_unix@jpmorgan.com>
Valik Solrzano Barboza <valik@xs4all.nl>
+John Connett <jrc@skylon.demon.co.uk>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson and is now at ObjectSpace. Paul devised the recursive
diff --git a/ace/OS.i b/ace/OS.i
index 0538fcd7c42..1bc25b8add1 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -874,7 +874,11 @@ ACE_OS::tempnam (const char *dir, const char *pfx)
ACE_NOTSUP_RETURN (0);
#else
#if defined (WIN32)
+#if defined (__BORLANDC__)
+ ACE_OSCALL_RETURN (::_tempnam ((char *) dir, (char *) pfx), char *, 0);
+#else
ACE_OSCALL_RETURN (::_tempnam (dir, pfx), char *, 0);
+#endif /* __BORLANDC__ */
#else
ACE_OSCALL_RETURN (::tempnam (dir, pfx), char *, 0);
#endif /* WIN32 */
diff --git a/ace/config-unixware-2.1.2-g++.h b/ace/config-unixware-2.1.2-g++.h
index 50bc98f3499..90b0ba85804 100644
--- a/ace/config-unixware-2.1.2-g++.h
+++ b/ace/config-unixware-2.1.2-g++.h
@@ -22,7 +22,7 @@
#define ACE_HAS_GNU_CSTRING_H
#define ACE_HAS_STRING_CLASS
#define ACE_HAS_MSG
-#define ACE_HAS_OSF1_GETTIMEOFDAY
+#define ACE_HAS_SVR4_GETTIMEOFDAY
#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
#define ACE_HAS_MT_SAFE_SOCKETS
#define ACE_HAS_NONCONST_GETBY
diff --git a/tests/SOCK_Connector_Test.cpp b/tests/SOCK_Connector_Test.cpp
index fe96a8a0758..182b5ec356e 100644
--- a/tests/SOCK_Connector_Test.cpp
+++ b/tests/SOCK_Connector_Test.cpp
@@ -96,7 +96,8 @@ fail_no_listener_nonblocking (void)
// ECONNREFUSED directly, instead of EWOULDBLOCK. That is also fine.
if (errno == EWOULDBLOCK || errno == ECONNREFUSED)
{
- status = con.complete (sock);
+ if (sock.get_handle () != ACE_INVALID_HANDLE)
+ status = con.complete (sock);
if (status != -1)
{