openbsd-ports/net/slirp/patches/patch-tcp_subr_c
2004-07-23 04:57:56 +00:00

72 lines
2.5 KiB
Plaintext

$OpenBSD: patch-tcp_subr_c,v 1.2 2004/07/23 04:57:56 pvalchev Exp $
--- tcp_subr.c.orig Fri Dec 29 16:45:51 1995
+++ tcp_subr.c Thu Jul 22 22:43:52 2004
@@ -238,14 +238,14 @@ tcp_newtcpcb(so)
* then send a RST to peer.
*/
struct tcpcb *
-tcp_drop(tp, errno)
+tcp_drop(tp, err)
register struct tcpcb *tp;
- int errno;
+ int err;
{
DEBUG_CALL("tcp_drop");
DEBUG_ARG("tp = %lx", (long)tp);
- DEBUG_ARG("errno = %d", errno);
+ DEBUG_ARG("errno = %d", err);
if (TCPS_HAVERCVDSYN(tp->t_state)) {
tp->t_state = TCPS_CLOSED;
@@ -253,10 +253,10 @@ tcp_drop(tp, errno)
tcpstat.tcps_drops++;
} else
tcpstat.tcps_conndrops++;
-/* if (errno == ETIMEDOUT && tp->t_softerror)
- * errno = tp->t_softerror;
+/* if (err == ETIMEDOUT && tp->t_softerror)
+ * err = tp->t_softerror;
*/
-/* so->so_error = errno; */
+/* so->so_error = err; */
return (tcp_close(tp));
}
@@ -900,7 +900,7 @@ tcp_emu(so, m)
*(so_rcv->sb_rptr + num) = 0;
if (ctl_password && !ctl_password_ok) {
/* Need a password */
- if (sscanf(so_rcv->sb_rptr, "pass %256s", buff) == 1) {
+ if (sscanf(so_rcv->sb_rptr, "pass %255s", buff) == 1) {
if (strcmp(buff, ctl_password) == 0) {
ctl_password_ok = 1;
n = sprintf(so_snd->sb_wptr,
@@ -1031,7 +1031,7 @@ do_prompt:
return 1;
/* The %256s is for the broken mIRC */
- if (sscanf(bptr, "DCC CHAT %256s %u %u", buff, &laddr, &lport) == 3) {
+ if (sscanf(bptr, "DCC CHAT %255s %u %u", buff, &laddr, &lport) == 3) {
if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL)
return 1;
@@ -1039,7 +1039,7 @@ do_prompt:
m->m_len += sprintf(bptr, "DCC CHAT chat %lu %u%c\n",
(unsigned long)ntohl(so->so_faddr.s_addr),
ntohs(so->so_fport), 1);
- } else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) {
+ } else if (sscanf(bptr, "DCC SEND %255s %u %u %u", buff, &laddr, &lport, &n1) == 4) {
if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL)
return 1;
@@ -1047,7 +1047,7 @@ do_prompt:
m->m_len += sprintf(bptr, "DCC SEND %s %lu %u %u%c\n",
buff, (unsigned long)ntohl(so->so_faddr.s_addr),
ntohs(so->so_fport), n1, 1);
- } else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) {
+ } else if (sscanf(bptr, "DCC MOVE %255s %u %u %u", buff, &laddr, &lport, &n1) == 4) {
if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL)
return 1;