Mercurial > ecos-v3_0-branch
changeset 1815:9e7b53448092
* src/if_8139.c (rltk8139_recv): if eth_drv_recv() wants to
discard an incoming packet it sets the buffer address == 0. Add a
check for this and skip the memcpy if found.
| author | asl |
|---|---|
| date | Tue, 19 Oct 2004 12:24:44 +0000 |
| parents | 728b82c53914 |
| children | 658319b65ae3 |
| files | packages/devs/eth/rltk/8139/current/ChangeLog packages/devs/eth/rltk/8139/current/src/if_8139.c |
| diffstat | 2 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/devs/eth/rltk/8139/current/ChangeLog +++ b/packages/devs/eth/rltk/8139/current/ChangeLog @@ -1,3 +1,9 @@ +2004-10-18 Andrew Dyer <adyer@righthandtech.com> + + * src/if_8139.c (rltk8139_recv): if eth_drv_recv() wants to + discard an incoming packet it sets the buffer address == 0. Add a + check for this and skip the memcpy if found. + 2004-04-21 Yoshinori Sato <ysato@users.sourceforge.jp> * src/if_8139.c:
--- a/packages/devs/eth/rltk/8139/current/src/if_8139.c +++ b/packages/devs/eth/rltk/8139/current/src/if_8139.c @@ -1006,8 +1006,10 @@ rltk8139_recv(struct eth_drv_sc *sc, str #endif for (last_sg = &sg_list[sg_len]; sg_list < last_sg; ++sg_list) { - memcpy((void *)(sg_list->buf), rx_buffer, sg_list->len); - rx_buffer += sg_list->len; + if (sg_list->buf != (CYG_ADDRESS)0) { + memcpy((void *)(sg_list->buf), rx_buffer, sg_list->len); + rx_buffer += sg_list->len; + } } }
