diff --git a/mbcico/emsi.c b/mbcico/emsi.c index d9349228..5dc3bb94 100644 --- a/mbcico/emsi.c +++ b/mbcico/emsi.c @@ -310,18 +310,15 @@ SM_EDECL databuf = xstrcpy(intro); SM_START(checkpkt) - Syslog('I', "rxemsi START"); Syslog('i', "RXEMSI: start"); SM_STATE(waitpkt) - Syslog('I', "rxemsi WAITPKT"); standby = 0; SM_PROCEED(waitchar); SM_STATE(waitchar) - Syslog('I', "rxemsi WAITCHAR"); c = GETCHAR(5); if (c == TIMEOUT) { if (++tries > 9) { @@ -359,7 +356,6 @@ SM_STATE(waitchar) SM_STATE(checkemsi) - Syslog('I', "rxemsi CHECKEMSI"); Syslog('i', "RXEMSI: rcvd %s", printable(buf, 0)); if (strncasecmp(buf, "EMSI_DAT",8) == 0) { @@ -375,8 +371,6 @@ SM_STATE(checkemsi) SM_STATE(getdat) - Syslog('I', "rxemsi GETDAT"); - if (sscanf(buf+8,"%04x",&len) != 1) { SM_PROCEED(sendnak); } @@ -406,7 +400,6 @@ SM_STATE(getdat) SM_STATE(checkpkt) - Syslog('I', "rxemsi CHECKPKT"); if (strncasecmp(databuf,"EMSI_DAT",8) == 0) { SM_PROCEED(checkdat); } @@ -422,13 +415,11 @@ SM_STATE(checkpkt) } else if (strncasecmp(databuf, "EMSI_INQ", 8) == 0) { SM_PROCEED(sendnak); } else { - Syslog('I', "RXEMSI: ignore packet \"%s\"",databuf); SM_PROCEED(waitpkt); } SM_STATE(checkdat) - Syslog('I', "rxemsi CHECKDAT"); sscanf(databuf + 8, "%04x", &len); if (len != (strlen(databuf) - 16)) { Syslog('+', "Bad EMSI_DAT length: %d/%d", len, strlen(databuf)); @@ -453,7 +444,6 @@ SM_STATE(checkdat) SM_STATE(sendnak) - Syslog('I', "rxemsi SENDNAK"); if (++tries > 9) { Syslog('+', "Too many tries getting EMSI_DAT"); SM_ERROR; @@ -472,14 +462,12 @@ SM_STATE(sendnak) SM_STATE(sendack) - Syslog('I', "rxemsi SENDACK"); Syslog('i', "RXEMSI: send **EMSI_ACKA490 (2 times)"); PUTSTR((char *)"**EMSI_ACKA490\r\021"); PUTSTR((char *)"**EMSI_ACKA490\r\021"); SM_SUCCESS; SM_END - Syslog('I', "rxemsi END"); Syslog('i', "RXEMSI: end"); free(databuf); @@ -518,7 +506,6 @@ SM_START(senddata) SM_STATE(senddata) - Syslog('I', "txemsi SENDDATA"); p = mkemsidat(caller); PUTCHAR('*'); PUTCHAR('*'); @@ -531,13 +518,11 @@ SM_STATE(senddata) SM_STATE(waitpkt) - Syslog('I', "txemsi WAITPKT"); standby = 0; SM_PROCEED(waitchar); SM_STATE(waitchar) - Syslog('I', "txemsi WAITCHAR"); c = GETCHAR(8); if (c == TIMEOUT) { if (++tries > 9) { @@ -575,7 +560,6 @@ SM_STATE(waitchar) SM_STATE(checkpkt) - Syslog('I', "txemsi CHECKPKT"); Syslog('i', "TXEMSI: rcvd %s", buf); if (strncasecmp(buf, "EMSI_DAT", 8) == 0) { SM_PROCEED(sendack); @@ -598,7 +582,6 @@ SM_STATE(checkpkt) SM_STATE(sendack) - Syslog('I', "txemsi SENDACK"); Syslog('i', "TXEMSI: send **EMSI_ACKA490 (2 times)"); PUTSTR((char *)"**EMSI_ACKA490\r\021"); PUTSTR((char *)"**EMSI_ACKA490\r\021"); diff --git a/mbcico/m7recv.c b/mbcico/m7recv.c index c8e7b686..6af5e1ef 100644 --- a/mbcico/m7recv.c +++ b/mbcico/m7recv.c @@ -86,7 +86,6 @@ SM_START(waitchar) SM_STATE(sendnak) - Syslog('X', "m7recv SENDNAK count=%d", count); if (count++ > 20) { Syslog('+', "Too many tries getting modem7 name"); SM_ERROR; @@ -103,37 +102,33 @@ SM_STATE(sendnak) SM_STATE(waitack) - Syslog('X', "m7recv WAITACK"); c = GETCHAR(5); if (c == TIMEOUT) { - Syslog('X', "m7 got timeout waiting for ACK"); + Syslog('x', "m7 got timeout waiting for ACK"); SM_PROCEED(sendnak); } else if (c < 0) { SM_ERROR; } else { - Syslog('X', "Got 0x%02x %s", c, printablec(c)); switch (c) { case ACK: SM_PROCEED(waitchar); break; case EOT: last=1; SM_SUCCESS; break; - default: Syslog('X', "m7 got '%s' waiting for ACK", printablec(c)); + default: Syslog('x', "m7 got '%s' waiting for ACK", printablec(c)); break; } } SM_STATE(waitchar) - Syslog('X', "m7recv WAITCHAR"); c = GETCHAR(1); if (c == TIMEOUT) { - Syslog('X', "m7 got timeout waiting for char",c); + Syslog('x', "m7 got timeout waiting for char",c); SM_PROCEED(sendnak); } else if (c < 0) { SM_ERROR; } else { - Syslog('X', "Got 0x%02x %s", c, printablec(c)); switch (c) { case EOT: last=1; SM_SUCCESS; @@ -159,22 +154,19 @@ SM_STATE(waitchar) SM_STATE(sendack) - Syslog('X', "m7recv SENDACK"); PUTCHAR(ACK); SM_PROCEED(waitchar); SM_STATE(sendcheck) - Syslog('X', "m7recv SENDCHECK cs=%d", cs); PUTCHAR(cs); SM_PROCEED(waitckok); SM_STATE(waitckok) - Syslog('X', "m7recv WAITCKOK"); c = GETCHAR(1); if (c == TIMEOUT) { - Syslog('X', "m7 got timeout waiting for ack ACK"); + Syslog('x', "m7 got timeout waiting for ack ACK"); SM_PROCEED(sendnak); } else if (c < 0) { SM_ERROR; diff --git a/mbcico/m7send.c b/mbcico/m7send.c index 254caff4..589ca71a 100644 --- a/mbcico/m7send.c +++ b/mbcico/m7send.c @@ -88,7 +88,6 @@ SM_START(sendack) SM_STATE(waitnak) - Syslog('x', "m7send WAITNAK"); if (count++ > 20) { Syslog('+', "too many tries sending modem7 name"); SM_ERROR; @@ -110,7 +109,6 @@ SM_STATE(waitnak) SM_STATE(sendack) - Syslog('x', "m7send SENDACK"); i = 0; PUTCHAR(ACK); if (STATUS) { @@ -121,7 +119,6 @@ SM_STATE(sendack) SM_STATE(sendchar) - Syslog('x', "m7send SENDCHAR"); if (i > 11) { SM_PROCEED(sendsub); } @@ -135,7 +132,6 @@ SM_STATE(sendchar) SM_STATE(waitack) - Syslog('x', "m7send WAITACK"); c = GETCHAR(1); if (c == TIMEOUT) { Syslog('x', "m7 got timeout waiting ACK for char %d",i); @@ -153,13 +149,11 @@ SM_STATE(waitack) SM_STATE(sendsub) - Syslog('x', "m7send SENDSUB"); PUTCHAR(SUB); SM_PROCEED(waitcheck); SM_STATE(waitcheck) - Syslog('x', "m7send WAITCHECK"); c = GETCHAR(1); if (c == TIMEOUT) { Syslog('x', "m7 got timeout waiting check"); @@ -177,7 +171,6 @@ SM_STATE(waitcheck) SM_STATE(ackcheck) - Syslog('x', "m7send ACKCHECK"); PUTCHAR(ACK); if (STATUS) { SM_ERROR; diff --git a/mbcico/session.c b/mbcico/session.c index a5ab6725..feca9db9 100644 --- a/mbcico/session.c +++ b/mbcico/session.c @@ -45,7 +45,8 @@ #include "callstat.h" -extern int tcp_mode; +extern int tcp_mode; + node *nlent; fa_list *remote=NULL; diff --git a/mbcico/ttyio.c b/mbcico/ttyio.c index bd2cad36..2158f3ef 100644 --- a/mbcico/ttyio.c +++ b/mbcico/ttyio.c @@ -592,3 +592,4 @@ int tty_putget(char **obuf, int *osize, char **ibuf, int *isize) return ((*isize == 0) | ((*osize == 0) << 1)); } + diff --git a/mbcico/ttyio.h b/mbcico/ttyio.h index c33ff2c8..1178c203 100644 --- a/mbcico/ttyio.h +++ b/mbcico/ttyio.h @@ -1,3 +1,5 @@ +/* $Id$ */ + #ifndef TTYIO_H #define TTYIO_H