Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Apr 1999 14:35:43 -0400 (EDT)
From:      cnh@mindspring.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/11388: patch for ircII so /window create works
Message-ID:  <199904291835.OAA46997@foo.ems.mindspring.net>

next in thread | raw e-mail | index | archive | help

>Number:         11388
>Category:       ports
>Synopsis:       patch for ircII so /window create works
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 29 11:40:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Christopher N. Harrell
>Release:        FreeBSD 3.1-STABLE i386
>Organization:
>Environment:

	Any 

>Description:

	The connect() call had an off-by-one, and an error was printed
	even if ttyname(0) succeeded.

>How-To-Repeat:

	cd /usr/ports/net/ircII ; make install ; irc
	/window create

>Fix:


--- wserv.c.orig	Fri Jan 17 14:53:54 1997
+++ wserv.c	Thu Apr 29 14:28:33 1999
@@ -87,7 +87,7 @@
 	strcpy(addr->sun_path, argv[1]);
 	s = socket(AF_UNIX, SOCK_STREAM, 0);
 	if (0 > connect(s, (struct sockaddr *) addr, sizeof(addr->sun_family) +
-						strlen(addr->sun_path)))
+						strlen(addr->sun_path) + 1))
 		exit(0);
 
 	/*
@@ -95,10 +95,10 @@
 	 * can grab the size of the tty, and have it changed.
 	 */
 
-	tmp = ttyname(0);
+	if ((tmp = ttyname(0)) == NULL)
+		perror("ttyname(0)");
 	write(s, tmp, strlen(tmp));
 	write(s, "\n", 1);
-	perror(tmp);
 
 	term_init();
 

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904291835.OAA46997>