--- main.c.orig	Fri Feb  4 17:34:46 2000
+++ main.c	Tue Feb  8 22:40:17 2000
@@ -195,9 +195,9 @@
 		if(t_dial>=cci) {
 			t_dial=0;
 			dable=0;
-			
-			if(!(port=tty_findport(cfgsl(CFG_PORT))) ||
-			   !q_queue || isnodial(port)) dable=1;
+
+			port=tty_findport(cfgsl(CFG_PORT));			
+			if(!port || !q_queue || isnodial(port)) dable=1;
 			i=q_queue;
 #ifdef Q_DEBUG			
 			log("dabl");
@@ -245,6 +245,7 @@
 				log("%s %s %s [%d]", ftnaddrtoa(&current->addr),
 					rnode?rnode->phone:"$",rnode->haswtime?rnode->wtime:"$",rnode->hidnum);
 #endif
+				rnode->tty=strdup(baseport(port));
 				if(can_dial(rnode, current->flv&Q_IMM) &&
 				   checktimegaps(cfgs(CFG_CANCALL))) {
 					dable=1;current->flv|=Q_DIAL;
@@ -256,7 +257,6 @@
 					if(chld==0) {
 						if(!bso_locknode(&current->addr)) exit(S_BUSY);
 						log_done();
-						rnode->tty=strdup(baseport(port));
 						if(!log_init(cfgs(CFG_LOG),rnode->tty)) {
 							fprintf(stderr, "can't init log %s!",ccs);
 						}
