ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtc.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtc.C (file contents):
Revision 1.25 by root, Mon Feb 20 22:42:00 2006 UTC vs.
Revision 1.26 by root, Wed Aug 9 22:01:07 2006 UTC

43 client (); 43 client ();
44}; 44};
45 45
46client::client () 46client::client ()
47{ 47{
48 sockaddr_un sa;
49 char *sockname = rxvt_connection::unix_sockname ();
50
51 if (strlen(sockname) >= sizeof(sa.sun_path))
52 {
53 fputs ("socket name too long, aborting.\n", stderr);
54 exit (STATUS_FAILURE);
55 }
56
48 if ((fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) 57 if ((fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
49 { 58 {
50 perror ("unable to create communications socket"); 59 perror ("unable to create communications socket");
51 exit (STATUS_FAILURE); 60 exit (STATUS_FAILURE);
52 } 61 }
53 62
54 char *sockname = rxvt_connection::unix_sockname ();
55 sockaddr_un sa;
56 sa.sun_family = AF_UNIX; 63 sa.sun_family = AF_UNIX;
57 strcpy (sa.sun_path, sockname); 64 strcpy (sa.sun_path, sockname);
58 free (sockname); 65 free (sockname);
59 66
60 if (connect (fd, (sockaddr *)&sa, sizeof (sa))) 67 if (connect (fd, (sockaddr *)&sa, sizeof (sa)))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines