diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2008-12-10 13:50:03 -0800 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2008-12-10 13:50:03 -0800 |
commit | 0ed3464107c0c0819c203ebc47e534b46bbbb0be (patch) | |
tree | b4186b51d0ba5ff13cba8c7b8464192f4976d411 | |
parent | e985850a617accbd14d7177f47a82928a7ddbb1f (diff) |
wimaxll_gnl_cb: set only ctx->result if callback said to stop
wimaxll_recv() will call this function for every message until
ctx->result stops being -EINPROGRESS. Thus, if the message handler
said to NL_STOP (which we also pass to nl_recvmsgs()), then update
ctx->result to make sure wimaxll_recv() doesn't call nl_recvmsgs any
more.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
-rw-r--r-- | lib/op-open.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/op-open.c b/lib/op-open.c index 8a43ac9..936624a 100644 --- a/lib/op-open.c +++ b/lib/op-open.c @@ -145,7 +145,8 @@ int wimaxll_gnl_cb(struct nl_msg *msg, void *_ctx) default: goto error_unknown_msg; } - wimaxll_cb_maybe_set_result(ctx, 0); + if (result == NL_STOP) + wimaxll_cb_maybe_set_result(ctx, 0); d_fnend(3, wmx, "(msg %p ctx %p) = %zd\n", msg, ctx, result); return result; |