2 * Network Extension Module
4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
25 #include <vconf-keys.h>
31 #include "netsupplicant.h"
32 #include "wifi-state.h"
33 #include "wifi-extension.h"
36 gboolean handle_flush_bss(Wifi *wifi, GDBusMethodInvocation *context,
39 DBG("Wi-Fi flush bss");
41 g_return_val_if_fail(wifi != NULL, TRUE);
43 GDBusConnection *connection = NULL;
46 if_path = netconfig_wifi_get_supplicant_interface_path(ifname);
47 if (if_path == NULL) {
48 netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "FailFlushBss");
49 DBG("Fail to get wpa_supplicant DBus path");
53 connection = netdbus_get_connection();
54 if (connection == NULL) {
55 netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "FailFlushBss");
56 ERR("Failed to get netdbus connection");
62 g_dbus_connection_call(connection,
65 SUPPLICANT_INTERFACE ".Interface",
67 g_variant_new("(u)", 0),
69 G_DBUS_CALL_FLAGS_NONE,
71 netdbus_get_cancellable(),
76 wifi_complete_flush_bss(wifi, context);