P2P: Fix p2p_send_action conversions
authorJouni Malinen <jouni.malinen@atheros.com>
Wed, 20 Oct 2010 18:32:18 +0000 (21:32 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 20 Oct 2010 18:32:18 +0000 (21:32 +0300)
Couple of these missed the change in the first argument and resulted
in various crashes.

src/p2p/p2p_pd.c
src/p2p/p2p_sd.c

index d637859..5f76750 100644 (file)
@@ -291,7 +291,7 @@ int p2p_send_prov_disc_req(struct p2p_data *p2p, struct p2p_device *dev,
                return -1;
 
        p2p->pending_action_state = P2P_PENDING_PD;
-       if (p2p_send_action(p2p->cfg->cb_ctx, freq, dev->p2p_device_addr,
+       if (p2p_send_action(p2p, freq, dev->p2p_device_addr,
                            p2p->cfg->dev_addr, dev->p2p_device_addr,
                            wpabuf_head(req), wpabuf_len(req), 200) < 0) {
                wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
index d5e4fd0..5b286de 100644 (file)
@@ -285,7 +285,7 @@ int p2p_start_sd(struct p2p_data *p2p, struct p2p_device *dev)
        p2p->sd_query = query;
        p2p->pending_action_state = P2P_PENDING_SD;
 
-       if (p2p_send_action(p2p->cfg->cb_ctx, freq, dev->p2p_device_addr,
+       if (p2p_send_action(p2p, freq, dev->p2p_device_addr,
                            p2p->cfg->dev_addr, dev->p2p_device_addr,
                            wpabuf_head(req), wpabuf_len(req), 5000) < 0) {
                wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
@@ -449,7 +449,7 @@ void p2p_sd_response(struct p2p_data *p2p, int freq, const u8 *dst,
                return;
 
        p2p->pending_action_state = P2P_NO_PENDING_ACTION;
-       if (p2p_send_action(p2p->cfg->cb_ctx, freq, dst, p2p->cfg->dev_addr,
+       if (p2p_send_action(p2p, freq, dst, p2p->cfg->dev_addr,
                            p2p->cfg->dev_addr,
                            wpabuf_head(resp), wpabuf_len(resp), 200) < 0)
                wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,