* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.275.10.8 2008/06/25 00:10:40 jinmei Exp $ */
+/* $Id: socket.c,v 1.275.10.9 2008/06/25 22:57:01 jinmei Exp $ */
/*! \file */
sock->peer_address = *addr;
cc = connect(sock->fd, &addr->type.sa, addr->length);
if (cc < 0) {
+ /*
+ * HP-UX "fails" to connect a UDP socket and sets errno to
+ * EINPROGRESS if it's non-blocking. We'd rather regard this as
+ * a success and let the user detect it if it's really an error
+ * at the time of sending a packet on the socket.
+ */
+ if (sock->type == isc_sockettype_udp && errno == EINPROGRESS) {
+ cc = 0;
+ goto success;
+ }
if (SOFT_ERROR(errno) || errno == EINPROGRESS)
goto queue;
/*
* If connect completed, fire off the done event.
*/
+ success:
if (cc == 0) {
sock->connected = 1;
sock->bound = 1;