patch-1.3.96 linux/net/ax25/af_ax25.c
Next file: linux/net/ax25/ax25_in.c
Previous file: linux/net/README
Back to the patch index
Back to the overall index
- Lines: 98
- Date:
Fri Apr 26 10:42:04 1996
- Orig file:
v1.3.95/linux/net/ax25/af_ax25.c
- Orig date:
Fri Apr 19 10:08:02 1996
diff -u --recursive --new-file v1.3.95/linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
@@ -614,7 +614,7 @@
break;
case AX25_T3:
- if (ax25_ctl.arg < 1)
+ if (ax25_ctl.arg < 0)
return -EINVAL;
save_flags(flags); cli();
ax25->t3 = ax25_ctl.arg * PR_SLOWHZ;
@@ -624,10 +624,8 @@
break;
case AX25_IDLE:
- if (ax25_ctl.arg < 1)
+ if (ax25_ctl.arg < 0)
return -EINVAL;
- if (ax25->idle == 0)
- return 0;
save_flags(flags); cli();
ax25->idle = ax25_ctl.arg * PR_SLOWHZ * 60;
if (ax25->idletimer != 0)
@@ -682,7 +680,7 @@
ax25->n2 = AX25_DEF_N2;
ax25->paclen = AX25_DEF_PACLEN;
ax25->maxqueue= AX25_DEF_IPMAXQUEUE;
- ax25->idle = 0;
+ ax25->idle = AX25_DEF_IDLE;
ax25->modulus = AX25_DEF_AXDEFMODE;
ax25->fragno = 0;
@@ -753,9 +751,9 @@
ax25->n2 = ax25_dev_get_value(dev, AX25_VALUES_N2);
ax25->paclen = ax25_dev_get_value(dev, AX25_VALUES_PACLEN);
ax25->maxqueue = ax25_dev_get_value(dev, AX25_VALUES_IPMAXQUEUE);
+ ax25->idle = ax25_dev_get_value(dev, AX25_VALUES_IDLE);
ax25->dama_slave = 0;
- ax25->idle = 0;
ax25->modulus = ax25_dev_get_value(dev, AX25_VALUES_AXDEFMODE);
@@ -819,7 +817,7 @@
/* idle timeouts only for mode vc connections */
- ax25->idletimer = ax25->idle = ax25_dev_get_value(ax25->device, AX25_VALUES_IDLE);
+ ax25->idletimer = ax25->idle;
ax25_insert_socket(ax25);
@@ -1196,7 +1194,8 @@
ax25->idle = osk->ax25->idle;
ax25->paclen = osk->ax25->paclen;
- ax25->window = osk->ax25->window;
+ ax25->window = osk->ax25->window;
+ ax25->maxqueue = osk->ax25->maxqueue;
ax25->source_addr = osk->ax25->source_addr;
@@ -1823,7 +1822,7 @@
}
ax25_fillin_cb(ax25, dev);
- ax25->idletimer = ax25->idle = ax25_dev_get_value(ax25->device, AX25_VALUES_IDLE);
+ ax25->idletimer = ax25->idle;
#else
if (mine) {
ax25_rt_rx_frame(&src, dev, &dp);
@@ -2272,7 +2271,6 @@
int len = 0;
off_t pos = 0;
off_t begin = 0;
- int idletimer;
cli();
@@ -2283,9 +2281,6 @@
devname = "???";
else
devname = dev->name;
-
- idletimer = ax25->idletimer / (PR_SLOWHZ * 60);
- idletimer += (ax25->idletimer && ax25->idletimer < ax25->idle)? 1:0;
len += sprintf(buffer + len, "%-9s ",
ax2asc(&ax25->dest_addr));
@@ -2299,8 +2294,8 @@
ax25->t2 / PR_SLOWHZ,
ax25->t3timer / PR_SLOWHZ,
ax25->t3 / PR_SLOWHZ,
- idletimer,
- ax25->idle / (PR_SLOWHZ*60),
+ ax25->idletimer / (PR_SLOWHZ * 60),
+ ax25->idle / (PR_SLOWHZ * 60),
ax25->n2count, ax25->n2,
ax25->rtt / PR_SLOWHZ,
ax25->window,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this