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
diff --git a/audio/telephony-maemo5.c b/audio/telephony-maemo5.c
index 350df9e..a97137c 100644
--- a/audio/telephony-maemo5.c
+++ b/audio/telephony-maemo5.c
@@ -1385,6 +1385,7 @@ static gboolean iter_get_basic_args(DBusMessageIter *iter,
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 @@ static void handle_hal_property_modified(DBusMessage *msg)
dbus_message_iter_next(&array);
}
}
+#endif /* Disable hal */
static void csd_call_free(struct csd_call *call)
{
@@ -1715,6 +1717,7 @@ done:
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 @@ static void hal_find_device_reply(DBusPendingCall *call, void *user_data)
done:
dbus_message_unref(reply);
}
+#endif /* Disable hal */
static void phonebook_read_reply(DBusPendingCall *call, void *user_data)
{
@@ -2018,9 +2022,11 @@ static DBusHandlerResult signal_filter(DBusConnection *conn,
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 @@ int telephony_init(void)
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 @@ int telephony_init(void)
DBUS_TYPE_STRING, &battery_cap,
DBUS_TYPE_INVALID) < 0)
error("Unable to send HAL method call");
-
+#endif /* Disable hal */
return 0;
}
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index 4430cc1..ab098fb 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -1375,6 +1375,7 @@ static gboolean iter_get_basic_args(DBusMessageIter *iter,
return type == DBUS_TYPE_INVALID ? TRUE : FALSE;
}
+#if 0 /* Disable hal */
static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
{
DBusError err;
@@ -1490,6 +1491,7 @@ static void handle_hal_property_modified(DBusMessage *msg)
dbus_message_iter_next(&array);
}
}
+#endif /* Disable hal */
static void csd_call_free(void *data)
{
@@ -1842,9 +1844,11 @@ static gboolean signal_filter(DBusConnection *conn, DBusMessage *msg,
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);
@@ -1863,6 +1867,7 @@ static void add_watch(const char *sender, const char *path,
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;
@@ -1913,6 +1918,8 @@ done:
remove_pending(call);
}
+#endif /* Disable hal */
+
int telephony_init(void)
{
const char *battery_cap = "battery";
@@ -1952,6 +1959,7 @@ int telephony_init(void)
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",
@@ -1960,7 +1968,7 @@ int telephony_init(void)
DBUS_TYPE_STRING, &battery_cap,
DBUS_TYPE_INVALID) < 0)
error("Unable to send HAL method call");
-
+#endif
return 0;
}
diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c
index 26815cf..175effa 100644
--- a/audio/telephony-ofono.c
+++ b/audio/telephony-ofono.c
@@ -1344,6 +1344,7 @@ static gboolean handle_manager_modem_removed(DBusConnection *conn,
return TRUE;
}
+#if 0 /* Disable hal */
static void hal_battery_level_reply(DBusPendingCall *call, void *user_data)
{
DBusMessage *reply;
@@ -1527,6 +1528,7 @@ done:
dbus_message_unref(reply);
remove_pending(call);
}
+#endif /* Disable hal */
static void handle_service_connect(DBusConnection *conn, void *user_data)
{
@@ -1582,6 +1584,7 @@ int telephony_init(void)
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",
@@ -1591,7 +1594,7 @@ int telephony_init(void)
DBUS_TYPE_INVALID);
if (ret < 0)
return ret;
-
+#endif
DBG("telephony_init() successfully");
telephony_ready_ind(features, ofono_indicators, BTRH_NOT_SUPPORTED,
--
1.7.5.4