3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-21 03:32:42 +01:00

netdev: Make sure to set disconnect_cmd_id to 0

This commit is contained in:
Denis Kenzior 2016-09-22 21:03:00 -05:00
parent a51ae8ce0e
commit 0eea6ad4b7

View File

@ -319,6 +319,8 @@ static void netdev_connect_failed(struct l_genl_msg *msg, void *user_data)
void *connect_data = netdev->user_data; void *connect_data = netdev->user_data;
enum netdev_result result = netdev->result; enum netdev_result result = netdev->result;
netdev->disconnect_cmd_id = 0;
/* Done this way to allow re-entract netdev_connect calls */ /* Done this way to allow re-entract netdev_connect calls */
netdev_connect_free(netdev); netdev_connect_free(netdev);
@ -516,6 +518,7 @@ static void netdev_cmd_deauthenticate_cb(struct l_genl_msg *msg,
netdev_disconnect_cb_t disconnect_cb; netdev_disconnect_cb_t disconnect_cb;
bool r; bool r;
netdev->disconnect_cmd_id = 0;
if (!netdev->disconnect_cb) { if (!netdev->disconnect_cb) {
netdev->user_data = NULL; netdev->user_data = NULL;