From c299e8e460856e52b2f702fd34bca31f27ac0548 Mon Sep 17 00:00:00 2001 From: schmidt Date: Fri, 24 Mar 2000 19:51:29 +0000 Subject: ChangeLogTag:Fri Mar 24 10:30:44 2000 Douglas C. Schmidt --- ChangeLog | 6 ++++++ ChangeLogs/ChangeLog-02a | 6 ++++++ ChangeLogs/ChangeLog-03a | 6 ++++++ THANKS | 1 + ace/LSOCK.cpp | 6 +++++- 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7ba6a7f3b07..01a01ba1d50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ Fri Mar 24 10:30:44 2000 Douglas C. Schmidt + * ace/LSOCK.cpp (recv_handle): For some reason, Linux allocates an extra + handle when doing a recvmsg() with the MSG_PEEK flag set. + Therefore, we need to close this. Thanks to Rick Ohnemus + for reporting this. Fixed [BUGID + 511]. + * examples/IPC_SAP/FILE_SAP/client.cpp. Fixed the formatting to conform to ACE guidelines. Thanks to Steve Luoma for motivating this. diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 7ba6a7f3b07..01a01ba1d50 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,5 +1,11 @@ Fri Mar 24 10:30:44 2000 Douglas C. Schmidt + * ace/LSOCK.cpp (recv_handle): For some reason, Linux allocates an extra + handle when doing a recvmsg() with the MSG_PEEK flag set. + Therefore, we need to close this. Thanks to Rick Ohnemus + for reporting this. Fixed [BUGID + 511]. + * examples/IPC_SAP/FILE_SAP/client.cpp. Fixed the formatting to conform to ACE guidelines. Thanks to Steve Luoma for motivating this. diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 7ba6a7f3b07..01a01ba1d50 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,5 +1,11 @@ Fri Mar 24 10:30:44 2000 Douglas C. Schmidt + * ace/LSOCK.cpp (recv_handle): For some reason, Linux allocates an extra + handle when doing a recvmsg() with the MSG_PEEK flag set. + Therefore, we need to close this. Thanks to Rick Ohnemus + for reporting this. Fixed [BUGID + 511]. + * examples/IPC_SAP/FILE_SAP/client.cpp. Fixed the formatting to conform to ACE guidelines. Thanks to Steve Luoma for motivating this. diff --git a/THANKS b/THANKS index fad76e54d76..2f4483b94c0 100644 --- a/THANKS +++ b/THANKS @@ -939,6 +939,7 @@ David McWeeny Florian Lackerbauer Manuel Benche Steve Luoma +Roger Tragin I would particularly like to thank Paul Stephenson, who worked with me at Ericsson. Paul devised the recursive Makefile scheme that diff --git a/ace/LSOCK.cpp b/ace/LSOCK.cpp index 002f36296c5..15ded5a511d 100644 --- a/ace/LSOCK.cpp +++ b/ace/LSOCK.cpp @@ -122,7 +122,9 @@ ACE_LSOCK::recv_handle (ACE_HANDLE &handle, char *pbuf, int *len) const return 0; } #else - ssize_t nbytes = ACE_OS::recvmsg (this->get_handle (), &recv_msg, MSG_PEEK); + ssize_t nbytes = ACE_OS::recvmsg (this->get_handle (), + &recv_msg, + MSG_PEEK); if (nbytes != ACE_INVALID_HANDLE) { @@ -131,6 +133,8 @@ ACE_LSOCK::recv_handle (ACE_HANDLE &handle, char *pbuf, int *len) const && ((unsigned char *) iov.iov_base)[1] == 0xcd) { #if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) + // Close down the socket that was returned by the MSG_PEEK. + ACE_OS::closesocket (*(ACE_HANDLE *) CMSG_DATA ((cmsghdr *) cmsgbuf)); recv_msg.msg_control = cmsgbuf; recv_msg.msg_controllen = sizeof cmsgbuf; #else -- cgit v1.2.1