When attempting to dial a number within the dial dialog of minicom (CTRL-A D), minicom sometimes fails with the error message "You are already online! Hang up first.". Here is why this might happen: minicom uses the following code to determine if someone is online: sysdep1.c, line 172: ----------------------- snip --------------------------- /* * Get the dcd status */ int m_getdcd(fd) int fd; { #ifdef TIOCMODG int mcs; ioctl(fd, TIOCMODG, &mcs); return(mcs & TIOCM_CAR ? 1 : 0); #else (void)fd; return(0); /* Impossible!! (eg. Coherent) */ #endif } ----------------------- snap --------------------------- It tries to determine the carrier detect signal from the modem. To find out why this fails sometimes, I added some debug stuff to the above code and the result was that the ioctl fails with error 25 which is ENOTTY (Inappropriate ioctl for device). Therefore the result in mcs was undefined and random garbage was returned. Fix: OK, this may be complete bullsh*t but this is what I have done: I didn't find any reference of TIOCMODG in the kernel sources, especially not in i386/isa/sio.c. So I replaced all occurences of TIOCMODG with TIOCMGET and all TIOCMODS with TIOCMODS in sysdep1.c. Then I examined the result of mcs while playing around with the modem and the values returned were OK as far as I could tell from the modem LEDs. The other way would probably be to implement TIOCMODG and TIOCMODS sysctls but I really don't know much about sysctls :-). For reference, here is my patch to sysdep1.c: How-To-Repeat: Just enter some syslog() debug statements in the above code in order to log errno.
Responsible Changed From-To: freebsd-ports->obrien Over to port's maintainer.
State Changed From-To: open->closed Committed. Thanks for the patch!!