Subject: bin/6834: cu send file broken, patch
To: None <>
From: Frederick Bruckman <>
List: netbsd-bugs
Date: 01/18/1999 09:48:50
>Number:         6834
>Category:       bin
>Synopsis:       cu send file broken, patch
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 18 08:20:02 1999
>Originator:     Frederick Bruckman

>Release:        Jan 18, 1998
System: NetBSD 1.3I NetBSD 1.3I (FB) #203:
Fri Jan 15 09:27:34 CST 1999
/usr/src/sys/arch/mac68k/compile/FB mac68k

	The cu send function, `~[]>', always checks for echoed newlines
	regardless of the settings of the "echocheck" or "binary"
	variables. This is brain dead. It makes it impossible to flash a
	modem, for example. Moreover, any device that's not echoing characters
	isn't going to echo newlines, either!

	The cu man page incorrectly lists the variable as "echo-check."
	The `~[]v' command in cu gives it correctly as "echocheck," no
	Try to flash a modem using cu's "send" command, `~[]>'. 
	This worked for the purpose at hand. I'm not sure that it's exactly
	correct, though. I only use cu to talk to my modems, so I have no way
	of knowing if this does the right thing for uucp connections.
--- /usr/src/gnu/libexec/uucp/cu/cu.c.orig	Thu Feb  5 06:21:29 1998
+++ /usr/src/gnu/libexec/uucp/cu/cu.c	Fri Jan  1 20:34:56 1999
@@ -2101,7 +2101,7 @@
 	 of normal characters; when we send a newline we look for
 	 *zCuvar_echonl.  */
       if ((fCuvar_echocheck && ! fCuvar_binary)
-	  || (fnl && *zCuvar_echonl != '\0'))
+	  && (fnl && *zCuvar_echonl != '\0'))
 	  long iend;