summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-01-27 20:10:53 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-01-27 20:10:53 +0000
commitaa37cc51f16159b1ec474284273d2267b6673625 (patch)
tree40af6e7cc0a1197540fcba0222c31c52e65d19ba /sys/dev/usb
parent55b3b04ac6260246ce699135a264c70bcddb55a7 (diff)
pad minimum frames with 0's; based on netbsd
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_url.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index b3d1ffcb782..d5101b95aa0 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_url.c,v 1.9 2002/11/11 02:32:32 nate Exp $ */
+/* $OpenBSD: if_url.c,v 1.10 2003/01/27 20:10:52 jason Exp $ */
/* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -934,8 +934,10 @@ url_send(struct url_softc *sc, struct mbuf *m, int idx)
c->url_mbuf = m;
total_len = m->m_pkthdr.len;
- if (total_len < URL_MIN_FRAME_LEN)
+ if (total_len < URL_MIN_FRAME_LEN) {
+ bzero(c->url_buf + total_len, URL_MIN_FRAME_LEN - total_len);
total_len = URL_MIN_FRAME_LEN;
+ }
usbd_setup_xfer(c->url_xfer, sc->sc_pipe_tx, c, c->url_buf, total_len,
USBD_FORCE_SHORT_XFER | USBD_NO_COPY,
URL_TX_TIMEOUT, url_txeof);