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)
38 DBG("Wi-Fi flush bss");
40 g_return_val_if_fail(wifi != NULL, TRUE);
42 GDBusConnection *connection = NULL;
45 if_path = netconfig_wifi_get_supplicant_interface();
46 if (if_path == NULL) {
47 netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "FailFlushBss");
48 DBG("Fail to get wpa_supplicant DBus path");
52 connection = netdbus_get_connection();
53 if (connection == NULL) {
54 netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "FailFlushBss");
55 ERR("Failed to get netdbus connection");
61 g_dbus_connection_call(connection,
64 SUPPLICANT_INTERFACE ".Interface",
66 g_variant_new("(u)", 0),
68 G_DBUS_CALL_FLAGS_NONE,
70 netdbus_get_cancellable(),
75 wifi_complete_flush_bss(wifi, context);