From aa37cc51f16159b1ec474284273d2267b6673625 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Mon, 27 Jan 2003 20:10:53 +0000 Subject: pad minimum frames with 0's; based on netbsd --- sys/dev/usb/if_url.c | 6 ++++-- 1 file 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); -- cgit v1.2.3