This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cygwin_bind bug.


>>> On Thu, 25 Nov 1999 10:50:27 -0500
>>> Chris Faylor <cgf@cygnus.com> said:

> Take a look at the recent snapshot patch.  I've fixed this in a different
> way.  Hopefully, it is equivalent.

Unfortunately, there is a bug in the patch. cygwin_bind() with
an address other than AF_UNIX always return -1. The following
patch revert the last part of cygwin_bind() to Sergey's code.

--- net.cc-	Thu Nov 25 15:50:57 1999
+++ net.cc	Fri Nov 26 10:14:38 1999
@@ -814,8 +814,12 @@ cygwin_bind (int fd, struct sockaddr *my
             }
 #undef un_addr
 	}
-      else if (bind (sock->get_socket (), my_addr, addrlen))
-	set_winsock_errno ();
+      else
+	{
+	  res = bind (sock->get_socket (), my_addr, addrlen);
+	  if (res)
+	    set_winsock_errno ();
+	}
     }
 
 out:

____
  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]