diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-07-19 18:42:28 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-07-19 18:42:28 +0200 |
commit | 82a1522f2aa6d0dcda20168ff6219abc7657e33d (patch) | |
tree | 1486e1e9838b1e812196e12cad38e2d3b75a06c5 | |
parent | 8941abc2fb3dfb2b17c777bd8531e807ff4c0d53 (diff) | |
download | connman-82a1522f2aa6d0dcda20168ff6219abc7657e33d.tar.gz connman-82a1522f2aa6d0dcda20168ff6219abc7657e33d.tar.bz2 connman-82a1522f2aa6d0dcda20168ff6219abc7657e33d.zip |
Ensure that all supplicant and Bluetooth D-Bus calls disable auto-start
-rw-r--r-- | plugins/bluetooth.c | 10 | ||||
-rw-r--r-- | plugins/supplicant.c | 26 |
2 files changed, 36 insertions, 0 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index fac96cf3..2b589ccf 100644 --- a/plugins/bluetooth.c +++ b/plugins/bluetooth.c @@ -108,6 +108,8 @@ static void get_properties(DBusConnection *connection, return; } + dbus_message_set_auto_start(message, FALSE); + if (dbus_connection_send_with_reply(connection, message, &call, TIMEOUT) == FALSE) { connman_error("Failed to get properties for %s", interface); @@ -236,6 +238,8 @@ static int pan_connect(struct connman_network *network) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_append_args(message, DBUS_TYPE_STRING, &uuid, DBUS_TYPE_INVALID); @@ -310,6 +314,8 @@ static int pan_disconnect(struct connman_network *network) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_append_args(message, DBUS_TYPE_INVALID); if (dbus_connection_send_with_reply(data->connection, message, @@ -400,6 +406,8 @@ static int change_powered(DBusConnection *connection, const char *path, if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_iter_init_append(message, &iter); connman_dbus_property_append_variant(&iter, "Powered", DBUS_TYPE_BOOLEAN, &powered); @@ -738,6 +746,8 @@ static void bluetooth_connect(DBusConnection *connection, void *user_data) if (message == NULL) return; + dbus_message_set_auto_start(message, FALSE); + if (dbus_connection_send_with_reply(connection, message, &call, TIMEOUT) == FALSE) { connman_error("Failed to get Bluetooth adapters"); diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 56efadfa..a94893ef 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -350,6 +350,8 @@ static int add_interface(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_iter_init_append(message, &array); dbus_message_iter_append_basic(&array, @@ -438,6 +440,8 @@ static int create_interface(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_append_args(message, DBUS_TYPE_STRING, &task->ifname, DBUS_TYPE_INVALID); @@ -500,6 +504,8 @@ static int remove_interface(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &task->path, DBUS_TYPE_INVALID); @@ -537,6 +543,8 @@ static int set_ap_scan(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_append_args(message, DBUS_TYPE_UINT32, &ap_scan, DBUS_TYPE_INVALID); @@ -578,6 +586,8 @@ static int add_network(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_error_init(&error); reply = dbus_connection_send_with_reply_and_block(connection, @@ -631,6 +641,8 @@ static int remove_network(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &task->netpath, DBUS_TYPE_INVALID); @@ -673,6 +685,8 @@ static int select_network(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &task->netpath, DBUS_TYPE_INVALID); @@ -712,6 +726,8 @@ static int enable_network(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_error_init(&error); reply = dbus_connection_send_with_reply_and_block(connection, @@ -748,6 +764,8 @@ static int disable_network(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_error_init(&error); reply = dbus_connection_send_with_reply_and_block(connection, @@ -789,6 +807,8 @@ static int set_network(struct supplicant_task *task, if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + dbus_message_iter_init_append(message, &array); dbus_message_iter_open_container(&array, DBUS_TYPE_ARRAY, @@ -893,6 +913,8 @@ static int initiate_scan(struct supplicant_task *task) if (message == NULL) return -ENOMEM; + dbus_message_set_auto_start(message, FALSE); + if (dbus_connection_send_with_reply(connection, message, &call, TIMEOUT) == FALSE) { connman_error("Failed to initiate scan"); @@ -1329,6 +1351,8 @@ static void get_properties(struct supplicant_task *task) if (message == NULL) goto noscan; + dbus_message_set_auto_start(message, FALSE); + if (dbus_connection_send_with_reply(connection, message, &call, TIMEOUT) == FALSE) { connman_error("Failed to get network properties"); @@ -1424,6 +1448,8 @@ static void scan_results_available(struct supplicant_task *task) if (message == NULL) return; + dbus_message_set_auto_start(message, FALSE); + if (dbus_connection_send_with_reply(connection, message, &call, TIMEOUT) == FALSE) { connman_error("Failed to request scan result"); |