Fix: No need to check for handsfree_path now
authorDenis Kenzior <denkenz@gmail.com>
Thu, 4 Feb 2010 19:16:59 +0000 (13:16 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 4 Feb 2010 19:49:36 +0000 (13:49 -0600)
plugins/hfp.c

index 52f532b..981b05b 100644 (file)
@@ -687,9 +687,6 @@ static int hfp_register_ofono_handsfree(struct ofono_modem *modem)
 
        ofono_debug("Registering oFono Agent to bluetooth daemon");
 
-       if (!data->handsfree_path)
-               return -EINVAL;
-
        return send_method_call(BLUEZ_SERVICE, data->handsfree_path,
                                BLUEZ_GATEWAY_INTERFACE, "RegisterAgent",
                                NULL, NULL, DBUS_TYPE_OBJECT_PATH,
@@ -703,9 +700,6 @@ static int hfp_unregister_ofono_handsfree(struct ofono_modem *modem)
 
        ofono_debug("Unregistering oFono Agent from bluetooth daemon");
 
-       if (!data->handsfree_path)
-               return -EINVAL;
-
        return send_method_call(BLUEZ_SERVICE, data->handsfree_path,
                                BLUEZ_GATEWAY_INTERFACE, "UnregisterAgent",
                                NULL, NULL, DBUS_TYPE_OBJECT_PATH,
@@ -743,9 +737,6 @@ static int hfp_connect_ofono_handsfree(struct ofono_modem *modem)
 
        ofono_debug("Connect to bluetooth daemon");
 
-       if (!data->handsfree_path || !connection)
-               return -EINVAL;
-
        return send_method_call(BLUEZ_SERVICE, data->handsfree_path,
                                BLUEZ_GATEWAY_INTERFACE, "Connect",
                                NULL, NULL, DBUS_TYPE_INVALID);
@@ -766,9 +757,6 @@ static int hfp_disconnect_ofono_handsfree(struct ofono_modem *modem)
 {
        struct hfp_data *data = ofono_modem_get_data(modem);
 
-       if (!data->handsfree_path || !connection)
-               return -EINVAL;
-
        return send_method_call(BLUEZ_SERVICE, data->handsfree_path,
                                BLUEZ_GATEWAY_INTERFACE, "Disconnect",
                                NULL, NULL, DBUS_TYPE_INVALID);