summaryrefslogtreecommitdiff
path: root/debian/patches/02_disable_hal.patch
blob: 5abd6c8957311caf464908ce7358a94f7fa910f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
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;