]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Remove unnecessary SetSelectedRegistrar callback
authorJouni Malinen <j@w1.fi>
Sat, 12 Dec 2009 14:46:33 +0000 (16:46 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 12 Dec 2009 14:46:33 +0000 (16:46 +0200)
This can be handled internally within core WPS code, so there is no
need to go through wps_hostapd.c with a callback function that is just
calling back into the core WPS code.

hostapd/wps_hostapd.c
src/wps/wps_upnp.h
src/wps/wps_upnp_web.c

index b968f2f7547c5eb5a982a65b9aada27fcf456d7b..a5a997c955dbb62587aaaeb4772c9211b790af5e 100644 (file)
@@ -917,14 +917,6 @@ static int hostapd_rx_req_put_wlan_response(
 }
 
 
-static int hostapd_rx_req_set_selected_registrar(void *priv,
-                                                const struct wpabuf *msg)
-{
-       struct hostapd_data *hapd = priv;
-       return wps_registrar_set_selected_registrar(hapd->wps->registrar, msg);
-}
-
-
 static int hostapd_wps_upnp_init(struct hostapd_data *hapd,
                                 struct wps_context *wps)
 {
@@ -939,8 +931,6 @@ static int hostapd_wps_upnp_init(struct hostapd_data *hapd,
        ctx->rx_req_get_device_info = hostapd_rx_req_get_device_info;
        ctx->rx_req_put_message = hostapd_rx_req_put_message;
        ctx->rx_req_put_wlan_response = hostapd_rx_req_put_wlan_response;
-       ctx->rx_req_set_selected_registrar =
-               hostapd_rx_req_set_selected_registrar;
 
        hapd->wps_upnp = upnp_wps_device_init(ctx, wps, hapd);
        if (hapd->wps_upnp == NULL) {
index 063e68c75095ee9a534a03dda838dd25c36d0352..0b0d2af543e965a2ff217e0a837fbc90deb9ed96 100644 (file)
@@ -34,8 +34,6 @@ struct upnp_wps_device_ctx {
                void *priv, enum upnp_wps_wlanevent_type ev_type,
                const u8 *mac_addr, const struct wpabuf *msg,
                enum wps_msg_type msg_type);
-       int (*rx_req_set_selected_registrar)(void *priv,
-                                            const struct wpabuf *msg);
 };
 
 struct upnp_wps_device_sm *
index abdcf15ffe152eea7b981914b38f088277499270..311a1d9821bb73cce98ddef6a74d4a255aa20cae 100644 (file)
@@ -520,8 +520,7 @@ web_process_set_selected_registrar(struct upnp_wps_device_sm *sm, char *data,
        msg = xml_get_base64_item(data, "NewMessage", &ret);
        if (msg == NULL)
                return ret;
-       if (!sm->ctx->rx_req_set_selected_registrar ||
-           sm->ctx->rx_req_set_selected_registrar(sm->priv, msg)) {
+       if (wps_registrar_set_selected_registrar(sm->wps->registrar, msg)) {
                wpabuf_free(msg);
                return HTTP_INTERNAL_SERVER_ERROR;
        }