From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 10 15:50:27 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC024D8C for ; Wed, 10 Sep 2014 15:50:27 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA1CA164F for ; Wed, 10 Sep 2014 15:50:27 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8AFoRea088741 for ; Wed, 10 Sep 2014 15:50:27 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 193525] New: Let tip work in hayes mode again Date: Wed, 10 Sep 2014 15:50:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 8.4-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: longwitz@incore.de X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2014 15:50:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193525 Bug ID: 193525 Summary: Let tip work in hayes mode again Product: Base System Version: 8.4-STABLE Hardware: Any OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: longwitz@incore.de After updating some old Freebsd V6 systems to V8 Stable the programm tip does not work in hayes mode anymore. Same behaviour with tip from HEAD. The reason are the lines /* XXX preserve previous braindamaged behavior */ setboolean(value(DC), TRUE); in tip.c, these lines should be deleted, because a line like testcall:dv=/dev/cuau1:br#38400:pa=none:at=hayes:pn=1234567:du: in /etc/remote can't be used with "tip testcall". Further I propose the following patch for hayes.c. The patch allows tip to diconnect a modem connection clean and let compile hayes.c with DEBUG enabled. Be aware that tip does not check returncodes on his read and write systemcalls. --- hayes.c.1st 2013-01-14 15:23:47.000000000 +0100 +++ hayes.c 2014-09-07 23:32:47.000000000 +0200 @@ -146,10 +146,15 @@ void hay_disconnect(void) { + struct termios cntrl; + /* first hang up the modem*/ #ifdef DEBUG printf("\rdisconnecting modem....\n\r"); #endif + tcgetattr(FD, &cntrl); + cntrl.c_cflag |= CLOCAL; + tcsetattr(FD, TCSAFLUSH, &cntrl); ioctl(FD, TIOCCDTR, 0); sleep(1); ioctl(FD, TIOCSDTR, 0); @@ -195,7 +200,7 @@ alarm(0); c &= 0177; #ifdef DEBUG - printf("%c 0x%x ", c, c); + printf("%c 0x%x\n", c, c); #endif for (i = 0; i < strlen(match); i++) if (c == match[i]) @@ -252,7 +257,11 @@ goodbye(void) { int len; +#ifdef DEBUG + int rlen; +#else char c; +#endif tcflush(FD, TCIOFLUSH); if (hay_sync()) { -- You are receiving this mail because: You are the assignee for the bug.