1 diff -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
5 +2005-02-11 Joe Shaw <joeshaw@novell.com>
7 + * NEWS: Update for 0.23.1
9 + * configure.in: Release 0.23.1
11 +2005-02-10 Joe Shaw <joeshaw@novell.com>
13 + * dbus/dbus-connection.c
14 + (_dbus_connection_queue_received_message_link,
15 + _dbus_connection_message_sent): Add the path to
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
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.
35 2005-01-12 Joe Shaw <joeshaw@novell.com>
37 * NEWS: Update for 0.23.
38 diff -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
42 +D-BUS 0.23.1 (11 Feb 2005)
44 +- fix a bug in which the bus daemon wouldn't recognize that a service
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
50 D-BUS 0.23 (11 Jan 2005)
53 diff -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
58 # Define the identity of the package.
64 cat >>confdefs.h <<_ACEOF
65 diff -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
72 -AM_INIT_AUTOMAKE(dbus, 0.23)
73 +AM_INIT_AUTOMAKE(dbus, 0.23.1)
75 AM_CONFIG_HEADER(config.h)
77 diff -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
82 _dbus_connection_wakeup_mainloop (connection);
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",
87 dbus_message_get_type (message),
88 + dbus_message_get_path (message),
89 dbus_message_get_interface (message) ?
90 dbus_message_get_interface (message) :
94 connection->n_outgoing -= 1;
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",
99 dbus_message_get_type (message),
100 + dbus_message_get_path (message),
101 dbus_message_get_interface (message) ?
102 dbus_message_get_interface (message) :
104 @@ -1572,9 +1574,10 @@
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",
111 dbus_message_get_type (message),
112 + dbus_message_get_path (message),
113 dbus_message_get_interface (message) ?
114 dbus_message_get_interface (message) :
116 @@ -1606,12 +1609,30 @@
117 _dbus_connection_do_iteration (connection,
118 DBUS_ITERATION_DO_WRITING,
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);
128 +_dbus_connection_send_preallocated_and_unlock (DBusConnection *connection,
129 + DBusPreallocatedSend *preallocated,
130 + DBusMessage *message,
131 + dbus_uint32_t *client_serial)
133 + DBusDispatchStatus status;
135 + _dbus_connection_send_preallocated_unlocked (connection,
137 + message, client_serial);
139 + status = _dbus_connection_get_dispatch_status_unlocked (connection);
141 + /* this calls out to user code */
142 + _dbus_connection_update_dispatch_status_and_unlock (connection, status);
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));
151 CONNECTION_LOCK (connection);
152 - _dbus_connection_send_preallocated_unlocked (connection,
154 - message, client_serial);
155 - CONNECTION_UNLOCK (connection);
156 + _dbus_connection_send_preallocated_and_unlock (connection,
158 + message, client_serial);
162 @@ -1670,6 +1690,27 @@
167 +_dbus_connection_send_and_unlock (DBusConnection *connection,
168 + DBusMessage *message,
169 + dbus_uint32_t *client_serial)
171 + DBusPreallocatedSend *preallocated;
173 + _dbus_assert (connection != NULL);
174 + _dbus_assert (message != NULL);
176 + preallocated = _dbus_connection_preallocate_send_unlocked (connection);
177 + if (preallocated == NULL)
180 + _dbus_connection_send_preallocated_and_unlock (connection,
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 @@
192 CONNECTION_LOCK (connection);
194 - if (!_dbus_connection_send_unlocked (connection, message, client_serial))
196 - CONNECTION_UNLOCK (connection);
200 - CONNECTION_UNLOCK (connection);
202 + return _dbus_connection_send_and_unlock (connection,
208 @@ -1784,6 +1820,7 @@
210 DBusList *reply_link;
211 dbus_int32_t serial = -1;
212 + DBusDispatchStatus status;
214 _dbus_return_val_if_fail (connection != NULL, FALSE);
215 _dbus_return_val_if_fail (message != NULL, FALSE);
216 @@ -1845,8 +1882,11 @@
218 dbus_pending_call_unref (pending);
220 - CONNECTION_UNLOCK (connection);
222 + status = _dbus_connection_get_dispatch_status_unlocked (connection);
224 + /* this calls out to user code */
225 + _dbus_connection_update_dispatch_status_and_unlock (connection, status);
230 @@ -2256,9 +2296,10 @@
231 link = _dbus_list_pop_first_link (&connection->incoming_messages);
232 connection->n_incoming -= 1;
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",
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) :
242 diff -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
246 private static AssemblyBuilder proxyAssembly;
247 private ModuleBuilder module = null;
249 + // Add a match for signals. FIXME: Can we filter the service?
250 + private const string MatchRule = "type='signal'";
252 internal Service(string name, Connection connection)
261 + if (this.filterCalled != null)
265 public static bool Exists(Connection connection, string name)
267 Error error = new Error();
270 throw new OutOfMemoryException();
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);
278 + private void RemoveFilter()
280 + dbus_connection_remove_filter (Connection.RawConnection,
283 + this.filterCalled = null;
285 + dbus_bus_remove_match (connection.RawConnection, MatchRule, IntPtr.Zero);
288 private int Service_FilterCalled(IntPtr rawConnection,
292 [DllImport("dbus-1")]
293 + private extern static void dbus_connection_remove_filter(IntPtr rawConnection,
294 + DBusHandleMessageFunction filter,
297 + [DllImport("dbus-1")]
298 private extern static void dbus_bus_add_match(IntPtr rawConnection,
302 + [DllImport("dbus-1")]
303 + private extern static void dbus_bus_remove_match(IntPtr rawConnection,