Fix D-Bus build without CONFIG_P2P=y
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 27 Jun 2011 18:23:22 +0000 (21:23 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 27 Jun 2011 18:23:22 +0000 (21:23 +0300)
wpa_supplicant/dbus/dbus_new.c
wpa_supplicant/notify.c

index c75fbdf..389afc9 100644 (file)
@@ -1794,6 +1794,7 @@ int wpas_dbus_register_network(struct wpa_supplicant *wpa_s,
        struct network_handler_args *arg;
        char net_obj_path[WPAS_DBUS_OBJECT_PATH_MAX];
 
+#ifdef CONFIG_P2P
        /*
         * If it is a persistent group register it as such.
         * This is to handle cases where an interface is being initialized
@@ -1801,6 +1802,7 @@ int wpas_dbus_register_network(struct wpa_supplicant *wpa_s,
         */
        if (network_is_persistent_group(ssid))
                return wpas_dbus_register_persistent_group(wpa_s, ssid);
+#endif /* CONFIG_P2P */
 
        /* Do nothing if the control interface is not turned on */
        if (wpa_s == NULL || wpa_s->global == NULL)
@@ -1868,9 +1870,11 @@ int wpas_dbus_unregister_network(struct wpa_supplicant *wpa_s, int nid)
 
        ssid = wpa_config_get_network(wpa_s->conf, nid);
 
+#ifdef CONFIG_P2P
        /* If it is a persistent group unregister it as such */
        if (ssid && network_is_persistent_group(ssid))
                return wpas_dbus_unregister_persistent_group(wpa_s, nid);
+#endif /* CONFIG_P2P */
 
        /* Do nothing if the control interface is not turned on */
        if (wpa_s == NULL || wpa_s->global == NULL ||
index 6595fec..b03c589 100644 (file)
@@ -220,14 +220,18 @@ void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
 void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s,
                                        struct wpa_ssid *ssid)
 {
+#ifdef CONFIG_P2P
        wpas_dbus_register_persistent_group(wpa_s, ssid);
+#endif /* CONFIG_P2P */
 }
 
 
 void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
                                          struct wpa_ssid *ssid)
 {
+#ifdef CONFIG_P2P
        wpas_dbus_unregister_persistent_group(wpa_s, ssid->id);
+#endif /* CONFIG_P2P */
 }