[syslinux:lwip] core/pxe: lwip changes to netconn_recv
syslinux-bot for Gene Cumm
gene.cumm at gmail.com
Tue May 29 16:09:04 PDT 2012
Commit-ID: b2d6e6e37706f7894d876927cd786362d6162368
Gitweb: http://www.syslinux.org/commit/b2d6e6e37706f7894d876927cd786362d6162368
Author: Gene Cumm <gene.cumm at gmail.com>
AuthorDate: Fri, 27 Apr 2012 22:32:02 -0400
Committer: Gene Cumm <gene.cumm at gmail.com>
CommitDate: Fri, 27 Apr 2012 22:32:02 -0400
core/pxe: lwip changes to netconn_recv
Signed-off-by: Gene Cumm <gene.cumm at gmail.com>
---
core/fs/pxe/tcp.c | 4 ++--
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 daff4d7..ec7679e 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 f1e2243..58e8189 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;
More information about the Syslinux-commits
mailing list