From 48ad2f3295da1e8b10bfb043fe25a4dc65b8c986 Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Mon, 20 Apr 2009 17:25:30 -0700 Subject: libwimaxll: wimaxll_recv() returns if nothing was received In order to be able to integrate in mainloop driver applications, wimaxll_recv() cannot block waiting for data. So if nl_recv() returns no data, just pass it on. Signed-off-by: Inaky Perez-Gonzalez --- lib/op-open.c | 2 +- lib/op-reset.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/op-open.c b/lib/op-open.c index 4696a15..9865858 100644 --- a/lib/op-open.c +++ b/lib/op-open.c @@ -248,7 +248,7 @@ ssize_t wimaxll_recv(struct wimaxll_handle *wmx) d_printf(3, wmx, "I: ctx.result %zd result %zd\n", ctx.result, result); } while ((ctx.result == -EINPROGRESS || ctx.result == -ENODATA) - && result >= 0); + && result > 0); if (result < 0) wimaxll_msg(wmx, "E: %s: nl_recvmgsgs failed: %zd\n", __func__, result); diff --git a/lib/op-reset.c b/lib/op-reset.c index 0b842b6..7c6585f 100644 --- a/lib/op-reset.c +++ b/lib/op-reset.c @@ -57,7 +57,7 @@ * * \return result of the operation. * - * - 0: wam reset suceeded + * - 0: warm reset suceeded * - -ENODEV: warm reset failed and had to resort to a cold/bus * reset; the device was disconnected from the system and the * current handle is invalid and should be closed. -- cgit v1.2.3