Ensure that all supplicant and Bluetooth D-Bus calls disable auto-start
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 19 Jul 2009 16:42:28 +0000 (18:42 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 19 Jul 2009 16:42:28 +0000 (18:42 +0200)
plugins/bluetooth.c
plugins/supplicant.c

index fac96cf..2b589cc 100644 (file)
@@ -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");
index 56efadf..a94893e 100644 (file)
@@ -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");