BSD 4_4 release
[unix-history] / usr / src / usr.bin / uucp / uucico / pk0.c
index e769a5b..5907134 100644 (file)
@@ -1,6 +1,15 @@
+/*-
+ * Copyright (c) 1985, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * This module is believed to contain source code proprietary to AT&T.
+ * Use and redistribution is subject to the Berkeley Software License
+ * Agreement and your Software Agreement with AT&T (Western Electric).
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)pk0.c      5.7 (Berkeley) %G%";
-#endif
+static char sccsid[] = "@(#)pk0.c      8.1 (Berkeley) 6/6/93";
+#endif /* not lint */
 
 #include "uucp.h"
 #include "pk.h"
 
 #include "uucp.h"
 #include "pk.h"
@@ -265,7 +274,7 @@ int icount;
                                                cp++;
                                }
                        }
                                                cp++;
                                }
                        }
-                       pkmove(cp, ibuf, cc, B_READ);
+                       bcopy(cp, ibuf, cc);
                        ibuf += cc;
                        icount -= cc;
                        count += cc;
                        ibuf += cc;
                        icount -= cc;
                        count += cc;
@@ -338,7 +347,7 @@ int icount;
                        partial = B_SHORT;
                } else
                        cc = pk->p_xsize;
                        partial = B_SHORT;
                } else
                        cc = pk->p_xsize;
-               pkmove(cp, ibuf, cc, B_WRITE);
+               bcopy(ibuf, cp, cc);
                ibuf += cc;
                icount -= cc;
                pk->p_osum[x] = chksum(pk->p_ob[x], pk->p_xsize);
                ibuf += cc;
                icount -= cc;
                pk->p_osum[x] = chksum(pk->p_ob[x], pk->p_xsize);
@@ -453,7 +462,6 @@ register struct pack *pk;
                pkxstart(pk, x, seq);
                pk->p_os[seq] = bstate;
                pk->p_state &= ~RXMIT;
                pkxstart(pk, x, seq);
                pk->p_os[seq] = bstate;
                pk->p_state &= ~RXMIT;
-               pk->p_nout++;
                goto out;
        }
        /*
                goto out;
        }
        /*
@@ -461,7 +469,6 @@ register struct pack *pk;
         * and transmission buffers are languishing
         */
        if (pk->p_xcount) {
         * and transmission buffers are languishing
         */
        if (pk->p_xcount) {
-               pk->p_timer = 2;
                pk->p_state |= WAITO;
        } else
                pk->p_state &= ~WAITO;
                pk->p_state |= WAITO;
        } else
                pk->p_state &= ~WAITO;
@@ -489,13 +496,11 @@ register struct pack *pk;
         * try to flush output
         */
        i = 0;
         * try to flush output
         */
        i = 0;
-       pk->p_timer = 2;
        while (pk->p_xcount && pk->p_state&LIVE) {
                if (pk->p_state&(RCLOSE+DOWN) || ++i > 2)
                        break;
                pkoutput(pk);
        }
        while (pk->p_xcount && pk->p_state&LIVE) {
                if (pk->p_state&(RCLOSE+DOWN) || ++i > 2)
                        break;
                pkoutput(pk);
        }
-       pk->p_timer = 0;
        pk->p_state |= DOWN;
 
        /*
        pk->p_state |= DOWN;
 
        /*
@@ -504,7 +509,6 @@ register struct pack *pk;
        i = 0;
        while ((pk->p_state&RCLOSE)==0 && i<2) {
                pk->p_msg = M_CLOSE;
        i = 0;
        while ((pk->p_state&RCLOSE)==0 && i<2) {
                pk->p_msg = M_CLOSE;
-               pk->p_timer = 2;
                pkoutput(pk);
                i++;
        }
                pkoutput(pk);
                i++;
        }
@@ -535,10 +539,8 @@ register struct pack *pk;
                free((char *)bp);
        }
        if (rcheck != pk->p_rwindow) {
                free((char *)bp);
        }
        if (rcheck != pk->p_rwindow) {
-               char buf[256];
-
-               sprintf(buf, "PK0: rc %d rw %d", rcheck, pk->p_rwindow);
-               logent(buf, "pkclose rcheck != p_rwindow");
+               syslog(LOG_WARNING, "%s: pk0: rc %d rw %d", Rmtname, rcheck,
+                       pk->p_rwindow);
        }
        free((char *)pk);
 }
        }
        free((char *)pk);
 }