va_end(ap);
}
+#define SUPPLICANT_DBG(fmt, arg...) \
+ debug("%s:%s() " fmt, __FILE__, __FUNCTION__ , ## arg);
+
static GSupplicantMode string2mode(const char *mode)
{
if (mode == NULL)
static void callback_interface_added(GSupplicantInterface *interface)
{
- debug("");
+ SUPPLICANT_DBG("");
if (callbacks_pointer == NULL)
return;
for (i = 0; map[i].str != NULL; i++) {
if (val & map[i].val)
- debug("%s: %s", label, map[i].str);
+ SUPPLICANT_DBG("%s: %s", label, map[i].str);
}
}
supplicant_dbus_array_foreach(iter,
interface_capability_mode, interface);
else
- debug("key %s type %c",
+ SUPPLICANT_DBG("key %s type %c",
key, dbus_message_iter_get_arg_type(iter));
}
mode = g_hash_table_lookup(network->config_table, "mode");
key_mgmt = g_hash_table_lookup(network->config_table, "key_mgmt");
- debug("ssid %s mode %s", ssid, mode);
+ SUPPLICANT_DBG("ssid %s mode %s", ssid, mode);
if (ssid != NULL)
ssid_len = strlen(ssid);
group = g_string_free(str, FALSE);
- debug("%s", group);
+ SUPPLICANT_DBG("%s", group);
g_free(group);
g_strdup(key), g_strdup(str));
}
} else
- debug("key %s type %c",
+ SUPPLICANT_DBG("key %s type %c",
key, dbus_message_iter_get_arg_type(iter));
}
GSupplicantNetwork *network;
const char *path = NULL;
- debug("");
+ SUPPLICANT_DBG("");
dbus_message_iter_get_basic(iter, &path);
if (path == NULL)
if (bss->interface == NULL)
return;
- debug("key %s", key);
+ SUPPLICANT_DBG("key %s", key);
if (key == NULL) {
if (bss->ieee8021x == TRUE)
G_SUPPLICANT_KEYMGMT_WPA_PSK_256))
bss->psk = TRUE;
} else
- debug("key %s type %c",
+ SUPPLICANT_DBG("key %s type %c",
key, dbus_message_iter_get_arg_type(iter));
}
struct g_supplicant_bss *bss;
const char *path = NULL;
- debug("");
+ SUPPLICANT_DBG("");
dbus_message_iter_get_basic(iter, &path);
if (path == NULL)
if (g_strcmp0(path, "/") == 0)
return;
- debug("%s", path);
+ SUPPLICANT_DBG("%s", path);
network = g_hash_table_lookup(interface->bss_mapping, path);
if (network != NULL) {
if (interface == NULL)
return;
- debug("%s", key);
+ SUPPLICANT_DBG("%s", key);
if (key == NULL) {
debug_strvalmap("KeyMgmt capability", keymgmt_map,
callback_interface_state(interface);
}
- debug("state %s (%d)", str, interface->state);
+ SUPPLICANT_DBG("state %s (%d)", str, interface->state);
} else if (g_strcmp0(key, "Scanning") == 0) {
dbus_bool_t scanning = FALSE;
supplicant_dbus_array_foreach(iter, interface_network_added,
interface);
} else
- debug("key %s type %c",
+ SUPPLICANT_DBG("key %s type %c",
key, dbus_message_iter_get_arg_type(iter));
}
GSupplicantInterface *interface;
const char *path = NULL;
- debug("");
+ SUPPLICANT_DBG("");
dbus_message_iter_get_basic(iter, &path);
if (path == NULL)
debug_level = i;
break;
}
- debug("Debug level %d", debug_level);
+ SUPPLICANT_DBG("Debug level %d", debug_level);
} else if (g_strcmp0(key, "DebugTimestamp") == 0) {
dbus_message_iter_get_basic(iter, &debug_timestamp);
- debug("Debug timestamp %u", debug_timestamp);
+ SUPPLICANT_DBG("Debug timestamp %u", debug_timestamp);
} else if (g_strcmp0(key, "DebugShowKeys") == 0) {
dbus_message_iter_get_basic(iter, &debug_showkeys);
- debug("Debug show keys %u", debug_showkeys);
+ SUPPLICANT_DBG("Debug show keys %u", debug_showkeys);
} else if (g_strcmp0(key, "Interfaces") == 0) {
supplicant_dbus_array_foreach(iter, interface_added, NULL);
} else if (g_strcmp0(key, "EapMethods") == 0) {
supplicant_dbus_array_foreach(iter, eap_method, NULL);
debug_strvalmap("EAP method", eap_method_map, eap_methods);
} else
- debug("key %s type %c",
+ SUPPLICANT_DBG("key %s type %c",
key, dbus_message_iter_get_arg_type(iter));
}
{
const char *name = NULL, *old = NULL, *new = NULL;
- debug("");
+ SUPPLICANT_DBG("");
if (g_strcmp0(path, DBUS_PATH_DBUS) != 0)
return;
static void signal_properties_changed(const char *path, DBusMessageIter *iter)
{
- debug("");
+ SUPPLICANT_DBG("");
if (g_strcmp0(path, SUPPLICANT_PATH) != 0)
return;
static void signal_interface_added(const char *path, DBusMessageIter *iter)
{
- debug("path %s %s", path, SUPPLICANT_PATH);
+ SUPPLICANT_DBG("path %s %s", path, SUPPLICANT_PATH);
if (g_strcmp0(path, SUPPLICANT_PATH) == 0)
interface_added(iter, NULL);
static void signal_interface_removed(const char *path, DBusMessageIter *iter)
{
- debug("");
+ SUPPLICANT_DBG("");
if (g_strcmp0(path, SUPPLICANT_PATH) == 0)
interface_removed(iter, NULL);
{
GSupplicantInterface *interface;
- debug("");
+ SUPPLICANT_DBG("");
interface = g_hash_table_lookup(interface_table, path);
if (interface == NULL)
GSupplicantInterface *interface;
dbus_bool_t success = FALSE;
- debug("");
+ SUPPLICANT_DBG("");
interface = g_hash_table_lookup(interface_table, path);
if (interface == NULL)
{
GSupplicantInterface *interface;
- debug("");
+ SUPPLICANT_DBG("");
interface = g_hash_table_lookup(interface_table, path);
if (interface == NULL)
{
GSupplicantInterface *interface;
- debug("");
+ SUPPLICANT_DBG("");
interface = g_hash_table_lookup(interface_table, path);
if (interface == NULL)
{
GSupplicantInterface *interface;
- debug("");
+ SUPPLICANT_DBG("");
interface = g_hash_table_lookup(interface_table, path);
if (interface == NULL)
{
GSupplicantInterface *interface;
- debug("");
+ SUPPLICANT_DBG("");
interface = g_hash_table_lookup(interface_table, path);
if (interface == NULL)
GSupplicantNetwork *network;
struct g_supplicant_bss *bss;
- debug("");
+ SUPPLICANT_DBG("");
interface = g_hash_table_lookup(bss_mapping, path);
if (interface == NULL)
const char *path = NULL;
int err;
- debug("");
+ SUPPLICANT_DBG("");
if (error != NULL) {
g_critical("error %s", error);
struct interface_create_data *data = user_data;
DBusMessageIter dict;
- debug("");
+ SUPPLICANT_DBG("");
supplicant_dbus_dict_open(iter, &dict);
const char *path = NULL;
int err;
- debug("");
+ SUPPLICANT_DBG("");
if (error != NULL) {
g_warning("error %s", error);
goto done;
}
- debug("Creating interface");
+ SUPPLICANT_DBG("Creating interface");
err = supplicant_dbus_method_call(SUPPLICANT_PATH,
SUPPLICANT_INTERFACE,
{
struct interface_create_data *data = user_data;
- debug("");
+ SUPPLICANT_DBG("");
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &data->ifname);
}
{
struct interface_create_data *data;
- debug("ifname %s", ifname);
+ SUPPLICANT_DBG("ifname %s", ifname);
if (ifname == NULL)
return -EINVAL;
static void interface_select_network_result(const char *error,
DBusMessageIter *iter, void *user_data)
{
- debug("");
+ SUPPLICANT_DBG("");
}
static void interface_select_network_params(DBusMessageIter *iter,
if (path == NULL)
goto done;
- debug("PATH: %s", path);
+ SUPPLICANT_DBG("PATH: %s", path);
supplicant_dbus_method_call(data->interface->path,
SUPPLICANT_INTERFACE ".Interface", "SelectNetwork",
struct interface_data *data = user_data;
int result = 0;
- debug("");
+ SUPPLICANT_DBG("");
if (error != NULL)
result = -EIO;
{
struct interface_data *data;
- debug("");
+ SUPPLICANT_DBG("");
if (interface == NULL)
return -EINVAL;
void g_supplicant_unregister(const GSupplicantCallbacks *callbacks)
{
- debug("");
+ SUPPLICANT_DBG("");
if (connection != NULL) {
dbus_bus_remove_match(connection, g_supplicant_rule6, NULL);