This is the mail archive of the cygwin-patches@cygwin.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]
Other format: [Raw text]

Re: connect patch


On Wed, Feb 06, 2002 at 01:07:28PM -0500, Jason Tishler wrote:
>The attached patch fixes a SEGV when getsockname () is called.  This
>problem can be tickled by the PostgreSQL 7.2 version of psql:
>
>    http://archives.postgresql.org/pgsql-cygwin/2002-02/msg00012.php
>
>Note that I essentially plagiarized the following commit:
>
>    http://cygwin.com/ml/cygwin-cvs/2002-q1/msg00028.html
>
>Was this the right thing to do?

I think so.  It begs the question, though: do we need to apply this
patch elsewhere, too?

cgf

>Index: net.cc
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/net.cc,v
>retrieving revision 1.99
>diff -u -p -r1.99 net.cc
>--- net.cc	2002/01/29 13:39:41	1.99
>+++ net.cc	2002/02/06 17:52:16
>@@ -557,6 +557,8 @@ cygwin_socket (int af, int type, int pro
> 	name = (type == SOCK_STREAM ? "/dev/streamsocket" : "/dev/dgsocket");
> 
>       fdsock (fd, name, soc)->set_addr_family (af);
>+      if (af == AF_LOCAL)
>+	fdsock (fd, name, soc)->set_sun_path (name);
>       res = fd;
>     }
> 

>2002-02-06  Jason Tishler  <jason@tishler.net>
>
>	* net.cc (cygwin_socket): Set sun_path for newly connected socket.


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