]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/common/dpp.c
DPP2: Move dpp_build_conf_result() to be within ifdef block
[thirdparty/hostap.git] / src / common / dpp.c
index 1d91a7adeb18affa1e3883fa7750dc574f10d593..5500cb24cec097eccbf7ad40b42ce6e2296e705f 100644 (file)
@@ -6010,6 +6010,7 @@ fail:
 
 
 #ifdef CONFIG_DPP2
+
 enum dpp_status_error dpp_conf_result_rx(struct dpp_authentication *auth,
                                         const u8 *hdr,
                                         const u8 *attr_start, size_t attr_len)
@@ -6090,7 +6091,6 @@ fail:
        bin_clear_free(unwrapped, unwrapped_len);
        return ret;
 }
-#endif /* CONFIG_DPP2 */
 
 
 struct wpabuf * dpp_build_conf_result(struct dpp_authentication *auth,
@@ -6148,6 +6148,8 @@ fail:
        return NULL;
 }
 
+#endif /* CONFIG_DPP2 */
+
 
 void dpp_configurator_free(struct dpp_configurator *conf)
 {
@@ -9644,6 +9646,7 @@ static int dpp_tcp_rx_gas_resp(struct dpp_connection *conn, struct wpabuf *resp)
        if (auth->peer_version < 2 || auth->conf_resp_status != DPP_STATUS_OK)
                return -1;
 
+#ifdef CONFIG_DPP2
        wpa_printf(MSG_DEBUG, "DPP: Send DPP Configuration Result");
        status = res < 0 ? DPP_STATUS_CONFIG_REJECTED : DPP_STATUS_OK;
        msg = dpp_build_conf_result(auth, status);
@@ -9669,6 +9672,9 @@ static int dpp_tcp_rx_gas_resp(struct dpp_connection *conn, struct wpabuf *resp)
        /* This exchange will be terminated in the TX status handler */
 
        return 0;
+#else /* CONFIG_DPP2 */
+       return -1;
+#endif /* CONFIG_DPP2 */
 }