diff options
author | Gene Cumm <gene.cumm@gmail.com> | 2012-04-27 22:32:02 -0400 |
---|---|---|
committer | Gene Cumm <gene.cumm@gmail.com> | 2012-04-27 22:32:02 -0400 |
commit | b2d6e6e37706f7894d876927cd786362d6162368 (patch) | |
tree | e488dd452c07c42d2623ca2604fd6aab7c40b52b | |
parent | 3ad59fbce2c5af0b208f2a15bd407512c6885c7a (diff) | |
download | syslinux-b2d6e6e37706f7894d876927cd786362d6162368.tar.gz syslinux-b2d6e6e37706f7894d876927cd786362d6162368.tar.xz syslinux-b2d6e6e37706f7894d876927cd786362d6162368.zip |
core/pxe: lwip changes to netconn_recv
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rw-r--r-- | core/fs/pxe/tcp.c | 4 | ||||
-rw-r--r-- | core/fs/pxe/tftp.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/core/fs/pxe/tcp.c b/core/fs/pxe/tcp.c index daff4d70..ec7679e7 100644 --- a/core/fs/pxe/tcp.c +++ b/core/fs/pxe/tcp.c @@ -51,8 +51,8 @@ void tcp_fill_buffer(struct inode *inode) } /* If needed get a new netbuf */ if (!socket->buf) { - socket->buf = netconn_recv(socket->conn); - if (!socket->buf) { + err = netconn_recv(socket->conn, &(socket->buf)); + if (!socket->buf || err) { socket->tftp_goteof = 1; if (inode->size == -1) inode->size = socket->tftp_filepos; diff --git a/core/fs/pxe/tftp.c b/core/fs/pxe/tftp.c index f1e22435..58e8189f 100644 --- a/core/fs/pxe/tftp.c +++ b/core/fs/pxe/tftp.c @@ -119,6 +119,7 @@ static void tftp_get_packet(struct inode *inode) struct netbuf *nbuf; u16_t nbuf_len; struct pxe_pvt_inode *socket = PVT(inode); + err_t err; /* * Start by ACKing the previous packet; this should cause @@ -132,8 +133,8 @@ static void tftp_get_packet(struct inode *inode) ack_packet(inode, socket->tftp_lastpkt); while (timeout) { - nbuf = netconn_recv(socket->conn); - if (!nbuf) { + err = netconn_recv(socket->conn, &nbuf); + if (!nbuf || err) { jiffies_t now = jiffies(); if (now-oldtime >= timeout) { @@ -301,8 +302,8 @@ sendreq: wait_pkt: netconn_disconnect(socket->conn); for (;;) { - nbuf = netconn_recv(socket->conn); - if (!nbuf) { + err = netconn_recv(socket->conn, &nbuf); + if (!nbuf || err) { jiffies_t now = jiffies(); if (now - oldtime >= timeout) goto sendreq; |