summaryrefslogtreecommitdiffstats
path: root/meta/packages/dbus/dbus/0.23.1.diff
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/dbus/dbus/0.23.1.diff')
-rw-r--r--meta/packages/dbus/dbus/0.23.1.diff308
1 files changed, 308 insertions, 0 deletions
diff --git a/meta/packages/dbus/dbus/0.23.1.diff b/meta/packages/dbus/dbus/0.23.1.diff
new file mode 100644
index 0000000000..d56e1afc9c
--- /dev/null
+++ b/meta/packages/dbus/dbus/0.23.1.diff
@@ -0,0 +1,308 @@
1diff -ur dbus-0.23/ChangeLog dbus-0.23.1/ChangeLog
2--- dbus-0.23/ChangeLog 2005-01-13 00:48:43.000000000 +0200
3+++ dbus-0.23.1/ChangeLog 2005-02-11 20:25:48.000000000 +0200
4@@ -1,3 +1,33 @@
5+2005-02-11 Joe Shaw <joeshaw@novell.com>
6+
7+ * NEWS: Update for 0.23.1
8+
9+ * configure.in: Release 0.23.1
10+
11+2005-02-10 Joe Shaw <joeshaw@novell.com>
12+
13+ * dbus/dbus-connection.c
14+ (_dbus_connection_queue_received_message_link,
15+ _dbus_connection_message_sent): Add the path to
16+ the verbose output.
17+ (_dbus_connection_send_preallocated_and_unlock): Added. Calls
18+ _dbus_connection_send_preallocated_unlocked(), updated the
19+ dispatch status, and unlocks. Fixes a bug where certain
20+ situations (like a broken pipe) could cause a Disconnect message
21+ to not be sent, tricking the bus into thinking a service was still
22+ there when the process had quit.
23+ (_dbus_connection_send_preallocated): Call
24+ _dbus_connection_send_preallocated_and_unlock().
25+ (_dbus_connection_send_and_unlock): Added. Calls
26+ _dbus_connection_send_preallocated_and_unlock().
27+ (dbus_connection_send): Call _dbus_connection_send_and_unlock().
28+ (dbus_connection_send_with_reply): Update the dispatch status and
29+ unlock.
30+
31+ * mono/Service.cs (~Service): Added. Removes the filter so that
32+ we don't get unmanaged code calling back into a GCed delegate.
33+ (RemoveFilter); Added.
34+
35 2005-01-12 Joe Shaw <joeshaw@novell.com>
36
37 * NEWS: Update for 0.23.
38diff -ur dbus-0.23/NEWS dbus-0.23.1/NEWS
39--- dbus-0.23/NEWS 2005-01-13 00:20:40.000000000 +0200
40+++ dbus-0.23.1/NEWS 2005-02-11 20:25:16.000000000 +0200
41@@ -1,3 +1,11 @@
42+D-BUS 0.23.1 (11 Feb 2005)
43+===
44+- fix a bug in which the bus daemon wouldn't recognize that a service
45+ owner quit
46+- fix a bug in the mono bindings that would cause unmanaged code to
47+ call back into a delegate that had been garbage collected and
48+ crashed.
49+
50 D-BUS 0.23 (11 Jan 2005)
51 ===
52
53diff -ur dbus-0.23/configure dbus-0.23.1/configure
54--- dbus-0.23/configure 2005-01-13 00:21:25.000000000 +0200
55+++ dbus-0.23.1/configure 2005-02-11 19:53:33.000000000 +0200
56@@ -1826,7 +1826,7 @@
57
58 # Define the identity of the package.
59 PACKAGE=dbus
60- VERSION=0.23
61+ VERSION=0.23.1
62
63
64 cat >>confdefs.h <<_ACEOF
65diff -ur dbus-0.23/configure.in dbus-0.23.1/configure.in
66--- dbus-0.23/configure.in 2005-01-13 00:20:40.000000000 +0200
67+++ dbus-0.23.1/configure.in 2005-02-11 19:53:09.000000000 +0200
68@@ -3,7 +3,7 @@
69
70 AC_INIT(dbus/dbus.h)
71
72-AM_INIT_AUTOMAKE(dbus, 0.23)
73+AM_INIT_AUTOMAKE(dbus, 0.23.1)
74
75 AM_CONFIG_HEADER(config.h)
76
77diff -ur dbus-0.23/dbus/dbus-connection.c dbus-0.23.1/dbus/dbus-connection.c
78--- dbus-0.23/dbus/dbus-connection.c 2005-01-11 21:31:56.000000000 +0200
79+++ dbus-0.23.1/dbus/dbus-connection.c 2005-02-11 19:52:47.000000000 +0200
80@@ -358,9 +358,10 @@
81
82 _dbus_connection_wakeup_mainloop (connection);
83
84- _dbus_verbose ("Message %p (%d %s %s '%s') added to incoming queue %p, %d incoming\n",
85+ _dbus_verbose ("Message %p (%d %s %s %s '%s') added to incoming queue %p, %d incoming\n",
86 message,
87 dbus_message_get_type (message),
88+ dbus_message_get_path (message),
89 dbus_message_get_interface (message) ?
90 dbus_message_get_interface (message) :
91 "no interface",
92@@ -473,9 +474,10 @@
93
94 connection->n_outgoing -= 1;
95
96- _dbus_verbose ("Message %p (%d %s %s '%s') removed from outgoing queue %p, %d left to send\n",
97+ _dbus_verbose ("Message %p (%d %s %s %s '%s') removed from outgoing queue %p, %d left to send\n",
98 message,
99 dbus_message_get_type (message),
100+ dbus_message_get_path (message),
101 dbus_message_get_interface (message) ?
102 dbus_message_get_interface (message) :
103 "no interface",
104@@ -1572,9 +1574,10 @@
105 }
106 #endif
107
108- _dbus_verbose ("Message %p (%d %s %s '%s') added to outgoing queue %p, %d pending to send\n",
109+ _dbus_verbose ("Message %p (%d %s %s %s '%s') added to outgoing queue %p, %d pending to send\n",
110 message,
111 dbus_message_get_type (message),
112+ dbus_message_get_path (message),
113 dbus_message_get_interface (message) ?
114 dbus_message_get_interface (message) :
115 "no interface",
116@@ -1606,12 +1609,30 @@
117 _dbus_connection_do_iteration (connection,
118 DBUS_ITERATION_DO_WRITING,
119 -1);
120-
121+
122 /* If stuff is still queued up, be sure we wake up the main loop */
123 if (connection->n_outgoing > 0)
124 _dbus_connection_wakeup_mainloop (connection);
125 }
126
127+static void
128+_dbus_connection_send_preallocated_and_unlock (DBusConnection *connection,
129+ DBusPreallocatedSend *preallocated,
130+ DBusMessage *message,
131+ dbus_uint32_t *client_serial)
132+{
133+ DBusDispatchStatus status;
134+
135+ _dbus_connection_send_preallocated_unlocked (connection,
136+ preallocated,
137+ message, client_serial);
138+
139+ status = _dbus_connection_get_dispatch_status_unlocked (connection);
140+
141+ /* this calls out to user code */
142+ _dbus_connection_update_dispatch_status_and_unlock (connection, status);
143+}
144+
145 /**
146 * Sends a message using preallocated resources. This function cannot fail.
147 * It works identically to dbus_connection_send() in other respects.
148@@ -1642,10 +1663,9 @@
149 dbus_message_get_member (message) != NULL));
150
151 CONNECTION_LOCK (connection);
152- _dbus_connection_send_preallocated_unlocked (connection,
153- preallocated,
154- message, client_serial);
155- CONNECTION_UNLOCK (connection);
156+ _dbus_connection_send_preallocated_and_unlock (connection,
157+ preallocated,
158+ message, client_serial);
159 }
160
161 static dbus_bool_t
162@@ -1670,6 +1690,27 @@
163 return TRUE;
164 }
165
166+static dbus_bool_t
167+_dbus_connection_send_and_unlock (DBusConnection *connection,
168+ DBusMessage *message,
169+ dbus_uint32_t *client_serial)
170+{
171+ DBusPreallocatedSend *preallocated;
172+
173+ _dbus_assert (connection != NULL);
174+ _dbus_assert (message != NULL);
175+
176+ preallocated = _dbus_connection_preallocate_send_unlocked (connection);
177+ if (preallocated == NULL)
178+ return FALSE;
179+
180+ _dbus_connection_send_preallocated_and_unlock (connection,
181+ preallocated,
182+ message,
183+ client_serial);
184+ return TRUE;
185+}
186+
187 /**
188 * Adds a message to the outgoing message queue. Does not block to
189 * write the message to the network; that happens asynchronously. To
190@@ -1698,14 +1739,9 @@
191
192 CONNECTION_LOCK (connection);
193
194- if (!_dbus_connection_send_unlocked (connection, message, client_serial))
195- {
196- CONNECTION_UNLOCK (connection);
197- return FALSE;
198- }
199-
200- CONNECTION_UNLOCK (connection);
201- return TRUE;
202+ return _dbus_connection_send_and_unlock (connection,
203+ message,
204+ client_serial);
205 }
206
207 static dbus_bool_t
208@@ -1784,6 +1820,7 @@
209 DBusMessage *reply;
210 DBusList *reply_link;
211 dbus_int32_t serial = -1;
212+ DBusDispatchStatus status;
213
214 _dbus_return_val_if_fail (connection != NULL, FALSE);
215 _dbus_return_val_if_fail (message != NULL, FALSE);
216@@ -1845,8 +1882,11 @@
217 else
218 dbus_pending_call_unref (pending);
219
220- CONNECTION_UNLOCK (connection);
221-
222+ status = _dbus_connection_get_dispatch_status_unlocked (connection);
223+
224+ /* this calls out to user code */
225+ _dbus_connection_update_dispatch_status_and_unlock (connection, status);
226+
227 return TRUE;
228
229 error:
230@@ -2256,9 +2296,10 @@
231 link = _dbus_list_pop_first_link (&connection->incoming_messages);
232 connection->n_incoming -= 1;
233
234- _dbus_verbose ("Message %p (%d %s %s '%s') removed from incoming queue %p, %d incoming\n",
235+ _dbus_verbose ("Message %p (%d %s %s %s '%s') removed from incoming queue %p, %d incoming\n",
236 link->data,
237 dbus_message_get_type (link->data),
238+ dbus_message_get_path (link->data),
239 dbus_message_get_interface (link->data) ?
240 dbus_message_get_interface (link->data) :
241 "no interface",
242diff -ur dbus-0.23/mono/Service.cs dbus-0.23.1/mono/Service.cs
243--- dbus-0.23/mono/Service.cs 2004-08-31 06:59:14.000000000 +0300
244+++ dbus-0.23.1/mono/Service.cs 2005-02-11 19:52:47.000000000 +0200
245@@ -23,6 +23,9 @@
246 private static AssemblyBuilder proxyAssembly;
247 private ModuleBuilder module = null;
248
249+ // Add a match for signals. FIXME: Can we filter the service?
250+ private const string MatchRule = "type='signal'";
251+
252 internal Service(string name, Connection connection)
253 {
254 this.name = name;
255@@ -47,6 +50,12 @@
256 this.local = true;
257 }
258
259+ ~Service ()
260+ {
261+ if (this.filterCalled != null)
262+ RemoveFilter ();
263+ }
264+
265 public static bool Exists(Connection connection, string name)
266 {
267 Error error = new Error();
268@@ -113,9 +122,17 @@
269 IntPtr.Zero))
270 throw new OutOfMemoryException();
271
272- // Add a match for signals. FIXME: Can we filter the service?
273- string rule = "type='signal'";
274- dbus_bus_add_match(connection.RawConnection, rule, IntPtr.Zero);
275+ dbus_bus_add_match(connection.RawConnection, MatchRule, IntPtr.Zero);
276+ }
277+
278+ private void RemoveFilter()
279+ {
280+ dbus_connection_remove_filter (Connection.RawConnection,
281+ this.filterCalled,
282+ IntPtr.Zero);
283+ this.filterCalled = null;
284+
285+ dbus_bus_remove_match (connection.RawConnection, MatchRule, IntPtr.Zero);
286 }
287
288 private int Service_FilterCalled(IntPtr rawConnection,
289@@ -200,9 +217,19 @@
290 IntPtr freeData);
291
292 [DllImport("dbus-1")]
293+ private extern static void dbus_connection_remove_filter(IntPtr rawConnection,
294+ DBusHandleMessageFunction filter,
295+ IntPtr userData);
296+
297+ [DllImport("dbus-1")]
298 private extern static void dbus_bus_add_match(IntPtr rawConnection,
299 string rule,
300 IntPtr erro);
301
302+ [DllImport("dbus-1")]
303+ private extern static void dbus_bus_remove_match(IntPtr rawConnection,
304+ string rule,
305+ IntPtr erro);
306+
307 }
308 }