nl80211: Finish dumps properly (ported from iw.git)

This commit is contained in:
Jouni Malinen 2008-10-29 19:28:35 +02:00 committed by Jouni Malinen
parent 990ec3787e
commit 8e8df25541
2 changed files with 6 additions and 2 deletions

View file

@ -145,6 +145,8 @@ static int ack_handler(struct nl_msg *msg, void *arg)
static int finish_handler(struct nl_msg *msg, void *arg)
{
int *ret = arg;
*ret = 0;
return NL_SKIP;
}
@ -175,7 +177,7 @@ static int send_and_recv_msgs(struct i802_driver_data *drv,
err = 1;
nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err);
nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, NULL);
nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err);
nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, ack_handler, &err);
if (valid_handler)

View file

@ -103,6 +103,8 @@ static int ack_handler(struct nl_msg *msg, void *arg)
static int finish_handler(struct nl_msg *msg, void *arg)
{
int *ret = arg;
*ret = 0;
return NL_SKIP;
}
@ -133,7 +135,7 @@ static int send_and_recv_msgs(struct wpa_driver_nl80211_data *drv,
err = 1;
nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err);
nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, NULL);
nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err);
nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, ack_handler, &err);
if (valid_handler)