summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky.perez-gonzalez>2008-12-05 10:36:28 -0800
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2008-12-05 10:36:28 -0800
commitb3125da65abf030482901104f74578ac49010d47 (patch)
tree2c7e1ec3caed3f69a964a3ccee6bf20ac124dddf /include
parent3740ecc83b38a2395c4d107f2b842976a1edb7a4 (diff)
libwimaxll: (fb Johannes Berg) fix handling of ack/nlerr in op-open
We were not handling the thing properly and thus it was working only by chance. We were missing the nlerr as reponses to messages. The callbacks need to be setup to listen for the message we are waiting for, ack and nlerr. And then we need to call nl_recvmsgs() until the ack / or nlerr handler have been seen. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/wimaxll.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/wimaxll.h b/include/wimaxll.h
index 3632542..7d06c53 100644
--- a/include/wimaxll.h
+++ b/include/wimaxll.h
@@ -319,6 +319,8 @@ typedef int (*wimaxll_state_change_cb_f)(
/**
* General structure for storing callback context
*
+ * \ingroup callbacks
+ *
* Callbacks set by the user receive a user-set pointer to a context
* structure. The user can wrap this struct in a bigger context struct
* and use wimaxll_container_of() during the callback to obtain its
@@ -360,11 +362,16 @@ typedef int (*wimaxll_state_change_cb_f)(
* be interpreted by the message handler as no processing was done
* on the message.
*
- * \ingroup callbacks
+ * \internal
+ *
+ * \param msg_done This is used internally to mark when the acks (or
+ * errors) for a message have been received and the message
+ * receiving loop can be considered done.
*/
struct wimaxll_gnl_cb_context {
struct wimaxll_handle *wmx;
ssize_t result;
+ unsigned msg_done:1; /* internal */
};