summaryrefslogtreecommitdiff
path: root/debian/patches/02_disable_hal.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/02_disable_hal.patch')
-rw-r--r--debian/patches/02_disable_hal.patch175
1 files changed, 175 insertions, 0 deletions
diff --git a/debian/patches/02_disable_hal.patch b/debian/patches/02_disable_hal.patch
new file mode 100644
index 0000000..5abd6c8
--- /dev/null
+++ b/debian/patches/02_disable_hal.patch
@@ -0,0 +1,175 @@
+Description: Disable usage of Hal in the telephony plugins, and disable the hal plugin. They do not do very useful things anyway, and just cause hal to start up, which is expensive.
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Origin: Ubuntu
+Updated by Michael Biebl <biebl@debian.org>
+Updated by Nobuhiro Iwamatsu <iwamatsu@debian.org>
+Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599023
+
+Index: bluez-4.91/audio/telephony-maemo5.c
+===================================================================
+--- bluez-4.91.orig/audio/telephony-maemo5.c 2010-12-19 06:12:17.000000000 +1100
++++ bluez-4.91/audio/telephony-maemo5.c 2011-04-05 10:12:06.121315919 +1000
+@@ -1385,6 +1385,7 @@
+ return type == DBUS_TYPE_INVALID ? TRUE : FALSE;
+ }
+
++#if 0 /* Disable hal */
+ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusError err;
+@@ -1501,6 +1502,7 @@
+ dbus_message_iter_next(&array);
+ }
+ }
++#endif /* Disable hal */
+
+ static void csd_call_free(struct csd_call *call)
+ {
+@@ -1715,6 +1717,7 @@
+ dbus_message_unref(reply);
+ }
+
++#if 0 /* Disable hal */
+ static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusError err;
+@@ -1768,6 +1771,7 @@
+ done:
+ dbus_message_unref(reply);
+ }
++#endif /* Disable hal */
+
+ static void phonebook_read_reply(DBusPendingCall *call, void *user_data)
+ {
+@@ -2018,9 +2022,11 @@
+ else if (dbus_message_is_signal(msg, NETWORK_INTERFACE,
+ "signal_strength_change"))
+ handle_signal_strength_change(msg);
++#if 0 /* Disable hal */
+ else if (dbus_message_is_signal(msg, "org.freedesktop.Hal.Device",
+ "PropertyModified"))
+ handle_hal_property_modified(msg);
++#endif /* Disable hal */
+ else if (dbus_message_is_signal(msg, SSC_DBUS_IFACE,
+ "modem_state_changed_ind"))
+ handle_modem_state(msg);
+@@ -2077,6 +2083,7 @@
+
+ telephony_ready_ind(features, maemo_indicators, BTRH_NOT_SUPPORTED,
+ chld_str);
++#if 0 /* Disable hal */
+ if (send_method_call("org.freedesktop.Hal",
+ "/org/freedesktop/Hal/Manager",
+ "org.freedesktop.Hal.Manager",
+@@ -2085,7 +2092,7 @@
+ DBUS_TYPE_STRING, &battery_cap,
+ DBUS_TYPE_INVALID) < 0)
+ error("Unable to send HAL method call");
+-
++#endif /* Disable hal */
+ return 0;
+ }
+
+Index: bluez-4.91/audio/telephony-maemo6.c
+===================================================================
+--- bluez-4.91.orig/audio/telephony-maemo6.c 2011-03-29 19:53:53.000000000 +1100
++++ bluez-4.91/audio/telephony-maemo6.c 2011-04-05 10:12:06.121315919 +1000
+@@ -1369,6 +1369,7 @@
+ return type == DBUS_TYPE_INVALID ? TRUE : FALSE;
+ }
+
++#if 0 /* Disable hal */
+ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusError err;
+@@ -1484,6 +1485,7 @@
+ dbus_message_iter_next(&array);
+ }
+ }
++#endif /* Disable hal */
+
+ static void csd_call_free(struct csd_call *call)
+ {
+@@ -1834,9 +1836,11 @@
+ else if (dbus_message_is_signal(msg, CSD_CSNET_SIGNAL,
+ "SignalBarsChanged"))
+ handle_signal_bars_changed(msg);
++#if 0 /* Disable hal */
+ else if (dbus_message_is_signal(msg, "org.freedesktop.Hal.Device",
+ "PropertyModified"))
+ handle_hal_property_modified(msg);
++#endif
+ else if (dbus_message_is_signal(msg, SSC_DBUS_IFACE,
+ "modem_state_changed_ind"))
+ handle_modem_state(msg);
+@@ -1855,6 +1859,7 @@
+ watches = g_slist_prepend(watches, GUINT_TO_POINTER(watch));
+ }
+
++#if 0 /* Disable hal */
+ static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusError err;
+@@ -1905,6 +1910,8 @@
+ remove_pending(call);
+ }
+
++#endif /* Disable hal */
++
+ int telephony_init(void)
+ {
+ const char *battery_cap = "battery";
+@@ -1944,6 +1951,7 @@
+
+ telephony_ready_ind(features, maemo_indicators, BTRH_NOT_SUPPORTED,
+ chld_str);
++#if 0 /* Disable hal */
+ if (send_method_call("org.freedesktop.Hal",
+ "/org/freedesktop/Hal/Manager",
+ "org.freedesktop.Hal.Manager",
+@@ -1952,7 +1960,7 @@
+ DBUS_TYPE_STRING, &battery_cap,
+ DBUS_TYPE_INVALID) < 0)
+ error("Unable to send HAL method call");
+-
++#endif
+ return 0;
+ }
+
+Index: bluez-4.91/audio/telephony-ofono.c
+===================================================================
+--- bluez-4.91.orig/audio/telephony-ofono.c 2011-03-29 19:53:53.000000000 +1100
++++ bluez-4.91/audio/telephony-ofono.c 2011-04-05 10:12:06.121315919 +1000
+@@ -1350,6 +1350,7 @@
+ return TRUE;
+ }
+
++#if 0 /* Disable hal */
+ static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
+ {
+ DBusMessage *reply;
+@@ -1533,6 +1534,7 @@
+ dbus_message_unref(reply);
+ remove_pending(call);
+ }
++#endif /* Disable hal */
+
+ static void handle_service_connect(DBusConnection *conn, void *user_data)
+ {
+@@ -1581,6 +1583,7 @@
+
+ watches = g_slist_prepend(watches, GUINT_TO_POINTER(watch));
+
++#if 0 /* Disable hal */
+ ret = send_method_call("org.freedesktop.Hal",
+ "/org/freedesktop/Hal/Manager",
+ "org.freedesktop.Hal.Manager",
+@@ -1590,7 +1593,7 @@
+ DBUS_TYPE_INVALID);
+ if (ret < 0)
+ return ret;
+-
++#endif
+ DBG("telephony_init() successfully");
+
+ return ret;