nl80211: Finish dumps properly (ported from iw.git)
authorJouni Malinen <jouni.malinen@atheros.com>
Wed, 29 Oct 2008 17:28:35 +0000 (19:28 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 29 Oct 2008 17:28:35 +0000 (19:28 +0200)
hostapd/driver_nl80211.c
src/drivers/driver_nl80211.c

index a097617..3a6e14c 100644 (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)
index 50a772b..7037dcd 100644 (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)