1 2005-05-18 Havoc Pennington <hp@redhat.com>
3 * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
4 gettext. Not really worth requiring yet perhaps, but any
5 production quality 1.0 would require it so we should go ahead and
6 get things set up. We do have a couple token calls to
7 bindtextdomain in the code already.
9 2005-05-16 John (J5) Palmieri <johnp@redhat.com>
11 * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
12 when using recursive g_main_loops
14 * python/_dbus.py (class Bus): add the ProxyObjectClass
15 alias for ProxyObject to make it easier for the Twisted
16 networking framework to integrate dbus.
18 * python/proxies.py (class ProxyObject): add the ProxyMethodClass
19 alias for ProxyMethod to make it easier for the Twisted
20 networking framework to integrate dbus.
22 2005-05-11 Ross Burton <ross@burtonini.com>
24 * glib/dbus-glib-tool.c: Add --prefix argument.
25 * glib/dbus-binding-tool-glib.h: Add prefix argument.
26 * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
28 (generate_glue): Pass prefix argument down.
29 (dbus_binding_tool_output_glib_server): Pass prefix to
32 2005-05-11 Colin Walters <walters@verbum.org>
34 * tools/dbus-send.c (append_array): New function.
35 (append_arg): Broken out from main.
36 (main): Add cheesy hack to send arrays and variants.
38 * tools/dbus-print-message.c (print_iter): Broken out
41 2005-05-11 Colin Walters <walters@verbum.org>
43 * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
44 New function, returns signature string for signature iter.
45 * dbus/dbus-signature.h: Prototype it.
46 * dbus/dbus-message.c (dbus_message_iter_get_signature):
47 New function, returns signature string for message iter.
48 (dbus_message_iter_get_array_len): New function, returns
50 (dbus_message_iter_get_fixed_array): Fix assertion; this
51 function should be used when the iter is pointing to the
53 * dbus/dbus-message.h: Prototypes.
54 * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
55 New function; returns length of an array.
56 * dbus/dbus-marshal-recursive.h: Prototype it.
58 2005-05-11 Colin Walters <walters@verbum.org>
60 * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
63 2005-05-08 Havoc Pennington <hp@redhat.com>
65 * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
66 daemon's pid, not the parent's pid, to the file descriptor.
67 Reported by Taj Morton.
69 2005-05-05 Havoc Pennington <hp@redhat.com>
71 * configure.in (LT_*): add notes on how the libtool versioning
72 works to save thinking. Increment soname to indicate protocol
73 breakage (though really the library interface hasn't changed I
76 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
77 verify the GUID received from server matches what we were
78 expecting, if we had an expectation
80 * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
81 (_dbus_auth_get_guid_from_server): new function
82 (send_begin): parse the OK args
84 * doc/dbus-specification.xml: add GUID to the auth protocol
86 2005-05-05 John (J5) Palmieri <johnp@redhat.com>
88 * Fix my name in previous changelog ;)
90 * python/proxies.py (ProxyObject.__getattr__): add further patch
91 from Anthony Baxter to throw an AttributeError when python
92 __special__ functions are called instead of marshling them over
93 the bus (Bug#1685 comment 3).
95 2005-05-04 John (J5) Palmieri <johnp@redhat.com>
97 * python/Makefile.am: changed to use pyexecdir for the binding
98 shared libraries (Bug#2494)
100 * python/exceptions.py: bring exceptions over from the bindings
101 so they can be used in applications (Bug#2036)
102 Make all exceptions derive from DBusException
104 * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
105 of classes so that print obj doesn't throw an exception (Bug #1685)
107 2005-05-03 Ross Burton <ross@burtonini.com>
109 * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
110 Return if we get an error during registration. Set up a
111 weak reference on object to unregister if object is destroyed.
112 (unregister_gobject): New function.
114 2005-05-01 John (J5) Palmieri <johnp@redhat.com>
116 * python/dbus_bindings.pyx.in:
117 - added new type classes for hinting to the marashaler what type
118 to send over the wire
119 - added int16 and uint16 marshalers
120 - Fixed a bug in the type constants that caused int32 to go out
121 as uint16 over the wire
122 * python/dbus.py: split up into different files and renamed _dbus.py
123 * python/__init__.py, python/_util.py, python/decorators.py,
124 python/exceptions.py, python/proxies.py, python/services.py,
125 python/types.py: new files split off from dbus.py
126 * python/Makefile.am: Add new files, remove dbus.py and
127 install all python files to <python module dir>/dbus
128 * python/examples/*: Added #!/usr/bin/env python to the top of
129 every example. Patch provided by Tatavarty Kalyan
131 2005-04-25 John (J5) Palmieri <johnp@redhat.com>
133 * NEWS: Update to 0.33
135 2005-04-25 John (J5) Palmieri <johnp@redhat.com>
137 * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
138 method for doing async calls
139 (_pending_call_notification): New C function for handling pendning call
141 (set_notify): New method for setting pending call notification
143 * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
144 Async capabilities added to remote method calls
145 (Sender): class removed
146 (RemoteService): class removed
147 (ObjectTree): class removed for now
148 (RemoteObject): Renamed to ProxyObject
149 (RemoteMethod): Renamed to ProxyMethod
150 (method): Decorator added for decorating python methods as dbus methods
151 (signal): Decorator added for decorating python methods as signal emitters
152 (ObjectType): Metaclass added for generating introspection data and the
153 method callback vtable
154 (Interface): Wrapper class added to wrap objects in a dbus interface
155 (Object): Uses ObjectType as its metaclass and exports Introspect
156 of the org.freedesktop.DBus.Introspectable interface
157 (ValidationException, UnknownMethodException): new exceptions
159 * python/examples/*: Modified to fit with the new bindings
161 2005-04-23 Havoc Pennington <hp@redhat.com>
163 * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
164 reported by Tony Houghton
166 * test/test-service.c (main): test
167 dbus_connection_get_object_path_data()
169 * dbus/dbus-object-tree.c (find_handler): be sure we always init
171 (_dbus_object_tree_get_user_data_unlocked): new function used by
172 dbus_connection_get_object_path_data()
173 (do_register): add assertion test for get_user_data_unlocked
174 (object_tree_test_iteration): more tests
176 * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
177 new function from Dan Reed to let you get the user data from
178 dbus_connection_register_object_path()
180 2005-04-23 John (J5) Palmieri <johnp@redhat.com>
182 * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
183 in numerous places that did not account for the NULL terminator
184 (signature_from_seed): changed the manual string copy loop to
185 just use strcpy instead
186 make check should now pass
188 2005-04-19 John (J5) Palmieri <johnp@redhat.com>
190 * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
191 so that it allows messages that are not signals to pass in
192 NULL as the interface.
194 2005-04-18 David Zeuthen <davidz@redhat.com>
196 * glib/dbus-gmain.c (io_handler_destroy_source):
197 (timeout_handler_destroy_source, connection_setup_free):
198 Also unref the source to avoid memory leaks.
200 2005-04-13 David Zeuthen <davidz@redhat.com>
202 * bus/config-parser.c (bus_config_parser_new): Bump this to a
203 more reasonable, yet still totally arbitrary, value :-).
205 2005-04-13 David Zeuthen <davidz@redhat.com>
207 * doc/TODO: Added an "important for 1.0" item about selinux
210 2005-04-13 David Zeuthen <davidz@redhat.com>
212 * bus/selinux.c: Add c-file-style to top of file
213 (log_audit_callback): Don't free the data here anymore
214 (bus_selinux_check): Don't take spid and tpid since appending
215 that to auxdata may OOM.
216 (bus_selinux_allows_acquire_service): Handle OOM and signal back
217 to the caller if we are OOM by taking an error object.
218 (bus_selinux_allows_send): -do-
220 * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
221 and bus_selinux_allows_send
223 * bus/bus.c (bus_context_check_security_policy): Pass error and
224 pass on OOM thrown by bus_selinux_allows_send()
226 * bus/services.c (bus_registry_acquire_service): Pass error and
227 pass on OOM thrown by bus_selinux_allows_acquire_service()
229 2005-04-13 Havoc Pennington <hp@redhat.com>
231 * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
232 message at a time to avoid monopolizing the main loop, bug
233 #2953 from Benjamin Otte
235 2005-04-09 Havoc Pennington <hp@redhat.com>
237 * dbus/dbus-string.c (copy): change a memcpy to memmove due to
238 possible overlap, fix from Daniel Reed
239 (fixup_alignment): fix signedness warnings
240 (_dbus_string_append_unichar): ditto
242 2005-04-09 Havoc Pennington <hp@redhat.com>
244 * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
246 * glib/dbus-glib-tool.c (main): fix warning
248 * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
250 * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
251 add a new function that can be used in simple applications that
252 don't have a main loop and are willing to block
254 2005-04-05 David Zeuthen <davidz@redhat.com>
256 Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
259 (io_handler_destroy_source): Remove from list of IO handlers
260 of the ConnectionSetup object
261 (timeout_handler_destroy_source): -do- for timeout handlers
262 (io_handler_source_finalized): Don't remove from list since
263 we now do that in io_handler_destroy_source(). Renamed from
264 io_handler_source_destroyed
265 (timeout_handler_source_destroyed): -do- for timeout handlers
266 (connection_setup_free): It is now safe to iterate over all
267 IO and timeout handlers as the _destroy_source removes them
268 from the list synchronously
270 2005-03-30 Havoc Pennington <hp@redhat.com>
272 * configure.in: change check to gtk 2.4
274 * tools/dbus-viewer.c (name_combo_changed_callback): remove
275 gtk_combo_box_get_active_text() usage to decrement GTK requirement
278 2005-03-29 John (J5) Palmieri <johnp@redhat.com>
282 * HACKING: Fixed realease instructions. configure.in should be updated to
283 the next release by the person who made the last release.
285 2005-03-29 John (J5) Palmieri <johnp@redhat.com>
287 * python/lvalue_cast_post_process.py - removed. Patch has been
288 submitted to Pyrex maintainers that fixes gcc4.0 errors
290 * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
292 2005-03-24 Daniel Reed <n@ml.org>
294 * tools/Makefile.am: Make print-introspect and
295 dbus-bus-introspect.xml building conditional on HAVE_GLIB.
297 2005-03-22 John (J5) Palmieri <johnp@redhat.com>
299 * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
301 * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have
302 had in Red Hat packages for a while but for some reason never
304 (_dbus_is_a_number): New checks if a string
305 can be converted to a number and does the conversion if it can
306 (_dbus_user_database_lookup): Add check to see if the given username
307 is a udi. This allows udi's to be used instead of usernames in the
309 (_dbus_user_database_lookup_group): Add check to see if the given groupname
310 is a gdi. This allows gdi's to be used instead of groupnames in the
313 2005-03-21 John (J5) Palmieri <johnp@redhat.com>
315 * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
316 code so that it compiles with gcc4.0
318 * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
319 run dbus_bindings.c through lvalue_cast_post_process.py and copy the
320 results back to dbus_binding.c
322 2005-03-20 Colin Walters <walters@verbum.org>
324 Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
326 * configure.in: Require GTK+ 2.6.
328 2005-03-20 Colin Walters <walters@verbum.org>
330 * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
332 2005-03-17 Tom Parker <palfrey@tevp.net>
334 * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
335 print DBUS_UID_UNSET; instead print passed username. Also
336 be sure to actually use gid looked up in cache.
338 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
339 for DBUS_GID_UNSET and groupname.
341 2005-03-17 Colin Walters <walters@verbum.org>
343 * bus/print-introspect.c: Move to tools/.
344 * bus/run-with-tmp-session-bus.sh: Ditto.
346 * glib/Makefile.am (dbus-glib-bindings.h): Move
347 generation to tools/Makefile.am.
349 * test/glib/run-test.sh: Update to handle move
350 of run-with-tmp-session-bus.sh.
352 * test/glib/test-service-glib.c: Update to handle
353 move of dbus-glib-bindings.h.
355 * tools/print-introspect.c: Moved here
356 from bus/, and ported to GLib bindings.
358 * tools/run-with-tmp-session-bus.sh: Moved here
361 * tools/Makefile.am: Generate dbus-glib-bindings.h
362 and dbus-bus-introspect.xml here.
364 * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
367 2005-03-17 Colin Walters <walters@verbum.org>
369 * bus/driver.c (write_args_for_direction): Use
370 _dbus_string_get_const_data to retrieve string;
371 _dbus_string_get_const_data_len doesn't actually return
372 a NULL-terminated substring.
374 * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
375 (main): Change to use org_freedesktop_DBus_request_name
376 instead of using g_proxy_begin_call/end_call.
378 2005-03-15 Joe Shaw <joeshaw@novell.com>
380 * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
381 generating the finalizer. Fixes from Ben Maurer.
383 2005-03-12 Joe Shaw <joeshaw@novell.com>
385 * mono/BusDriver.cs: Update method names: ListServices
386 becomes ListNames; GetOwner becomes GetNameOwner.
388 * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
389 onto the eval stack when removing the delegate.
391 2005-03-12 Joe Shaw <joeshaw@novell.com>
393 * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
394 LT_CURRENT. Set it to the autoconf variable.
396 * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
397 classes that disconnects the signal handler delegate from the
398 service object. Fixes a big leak of proxy objects on the
399 client side of things. Patch from Ben Maurer
402 2005-03-12 Colin Walters <walters@verbum.org>
404 * bus/driver.c (write_args_for_direction): New function,
405 parses a type signature into arguments and outputs to
407 (bus_driver_handle_introspect): Use it instead of
408 hardcoding XML for certain signatures.
410 * bus/Makefile.am (dbus-bus-introspect.xml): Add
411 dependency on dbus-daemon.
413 * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
414 argument, pass it to dbus_binding_tool_output_glib_client.
416 * glib/dbus-binding-tool-glib.c
417 (generate_client_glue): Protect against multiple inclusion.
418 (dbus_binding_tool_output_glib_client): Add
419 G_BEGIN_DECLS/G_END_DECLS.
421 * glib/dbus-binding-tool-glib.c (compute_client_method_name):
422 Change to just take iface prefix directly.
423 (write_formal_parameters): Clarify error message.
424 (check_supported_parameters): New function; checks to see type
425 signatures of method parameters are supported.
426 (generate_client_glue): Handle ignore_unsupported flag.
427 (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
430 * glib/Makefile.am (dbus-glib-bindings.h): Pass
431 --ignore-unsupported by default until glib bindings
434 2005-03-11 Colin Walters <walters@verbum.org>
436 * glib/Makefile.am: Generate dbus-glib-bindings.h and
439 * bus/print-introspect.c: New file; prints introspection
440 data for a given name and object path.
442 * bus/run-with-tmp-session-bus.sh: New file, refactored
443 from test/glib/run-test.sh. Creates a temporary session
444 bus and runs another program.
446 * test/glib/run-test.sh: Refactor to invoke
447 run-with-tmp-session-bus.sh.
449 * bus/driver.c (bus_driver_handle_introspect): Fix to print new
450 introspection format. Also change to use DBUS_TYPE_x_AS_STRING
451 macros instead of hardcoding.
453 * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
455 2005-03-11 Joe Shaw <joeshaw@novell.com>
457 * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
458 this unref; it doesn't match up evenly in some codepaths.
459 (_dbus_connection_block_pending_call): Unref at every exitpoint;
460 this evenly matches with the ref near the top of this function.
462 2005-03-09 Joe Shaw <joeshaw@novell.com>
464 * dbus/dbus-object-tree.c
465 (_dbus_object_tree_unregister_and_unlock): If checks are enabled
466 and we try to unregister a path that's not registered, still go
467 through the process of unlocking and don't just return.
469 2005-03-09 Colin Walters <walters@verbum.org>
471 * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
472 to this are generated for client-side wrappers. Invokes a
473 D-BUS method and returns reply values.
475 * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
476 function; writes signature string for argument direction.
477 (write_args_for_direction): Change to pass input values directly
478 instead of via address, and fix indentation.
479 (generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
480 make generated wrappers inlineable.
482 * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
483 note about using dbus_type_is_fixed.
485 * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
486 dbus/dbus-signature.c as dbus_type_is_fixed.
490 * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
491 from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
493 * dbus/dbus-signature.h: Prototype.
495 * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
498 * test/glib/test-dbus-glib.c (main): Be sure to clear error as
499 appropriate instead of just freeing it.
500 (main): Free returned strings using g_free.
502 * test/glib/Makefile.am (test-service-glib-glue.h)
503 (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
505 * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
506 simply maps a simple D-BUS type to GType.
507 (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
509 (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
510 initialize the value with it.
511 (dbus_gvalue_binding_type_from_type): Unused, delete.
512 (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
513 various types instead of unmarshalling to value data directly.
514 Remove can_convert boolean.
515 (dbus_gvalue_marshal): Remove duplicate initialization; switch to
516 returning directly instead of using can_convert boolean.
517 (dbus_gvalue_store): New function; not related to D-BUS per-se.
518 Stores a GValue in a pointer to a value of its corresponding C
521 * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
522 add dbus_gvalue_store.
524 2005-03-08 Joe Shaw <joeshaw@novell.com>
526 Fix a bunch of lifecycle and memory management problems
527 in the mono bindings.
529 * mono/Arguments.cs (Arguments): Implement IDisposable
531 * mono/Bus.cs (Bus): Don't allow public instantiation. This is
532 strictly a static class.
534 * mono/Connection.cs: Move the DBusObjectPathVTable and associated
535 delegates into this file.
536 (Connection): Implement IDisposable.
537 (Dispose): Disconnect the connection and set the raw connection
538 pointer to IntPtr.Zero.
539 (~Connection): Call Dispose().
540 (RegisterObjectPath): Added. Manages the registration of object
541 paths so we can cleanly disconnect them at dispose/finalize time.
542 (UnregisterObjectPath): Ditto.
543 (set_RawConnection): Unregister all of the object paths when
544 changing the underlying DBusConnection. Add them back onto the
545 new connection, if any.
547 * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
548 more unmanaged resources anymore, so it's not necessary. Move all
549 the DBusObjectPathVTable stuff out of here.
550 (Handler): Save references to our delegates so that they don't get
551 finalized. Call Connection.RegisterObjectPath() instead of
552 dbus_connection_register_object_path() directly.
553 (Message_Called): Dispose the message after we're finished with
556 * mono/Message.cs (Message): Implement IDisposable.
557 (Dispose): Dispose the Arguments, and set the RawMessage to
559 (SendWithReplyAndBlock): We own the ref to the reply that comes
560 back from dbus_connection_send_with_reply_and_block() so add a
561 comment about that and unref it after we've constructed a managed
562 MethodReturn class around it. Fixes a big, big leak.
564 * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
566 (BuildSignalHandler): After we've sent the Signal message, dispose
568 (BuildMethod): Dispose of the method call and reply messages after
569 we've sent the message and extracted the data we want from the
572 * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
574 (Service_FilterCalled): Dispose of the message after we're
577 2005-03-08 Joe Shaw <joeshaw@novell.com>
579 * dbus/dbus-connection.c (dbus_connection_send_with_reply):
580 After we attach our pending call to the connection, unref
583 * mono/Connection.cs (set_RawConnection): Disconnect our
584 filter and match callbacks from the old connection and
585 reconnect them to the new connection, if any.
587 * mono/DBusType/Array.cs: "Code" is a static member, so
588 don't use "this" to refer to it. Fix for stricter checking
591 * mono/DBusType/ObjectPath.cs (Append): Don't leak the
592 object path that we pass into unmanaged code.
594 * mono/DBusType/String.cs (Append): Don't leak the string
595 that we pass into unmanged code.
597 2005-03-07 John (J5) Palmieri <johnp@redhat.com>
598 * NEWS: Update for 0.31
600 * configure.in: Release 0.31
601 add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
603 * qt/Makefile.am: fixed build
605 * dbus/Makefile.am: soname bump for libdbus
607 * glib/Makefile.am: soname bump for libdbus-glib
609 2005-03-05 Havoc Pennington <hp@redhat.com>
611 * dbus/dbus-sysdeps.c:
612 (pseudorandom_generate_random_bytes_buffer): fix to have no return
614 (_dbus_generate_random_bytes_buffer): fix return value
616 * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
617 checks actually work, from Tom Parker <fdo@tevp.net>
619 2005-03-01 Colin Walters <walters@verbum.org>
621 * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
622 functions copied from dbus-glib-tool.c.
623 (main): Convert lots of error code to use them.
624 Also add some testing for introspection bits.
626 2005-03-01 Colin Walters <walters@verbum.org>
628 * doc/TODO: Remove introspection signature TODO.
630 2005-02-27 Colin Walters <walters@verbum.org>
632 * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
633 Change return value to const char * instead of int so we can do
635 (struct PropertyInfo, struct ArgInfo): Store char *.
636 (property_info_new, arg_info_new): Update parameters, strdup.
637 (property_info_unref, arg_info_unref): Free.
639 * glib/dbus-gidl.h: Update prototypes.
641 * glib/dbus-gparser.c (basic_type_from_string): Delete.
642 (validate_signature): New function, just validates signature and
644 (parse_property, parse_arg): Invoke validate_signature. Store
645 signature instead of just type code.
647 * glib/dbus-gvalue.c (base_type_from_signature): New utility
648 function to return a primary type for a signature, dropping
649 information about types in container types.
650 (dbus_gvalue_genmarshal_name_from_type)
651 (dbus_gvalue_binding_type_from_type)
652 (dbus_gvalue_ctype_from_type): Update to take full signature
653 instead of type code.
654 (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
656 * glib/dbus-gvalue.h: Update prototypes for above.
658 * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
659 glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
660 (introspect_properties, introspect_signals, write_interface):
661 Update to handle signatures, and remove usage of
662 _dbus_gutils_type_to_string.
663 (handle_introspect): Print out type codes instead of e.g. "string"
664 in hardcoded introspection XML; also use x_AS_STRING constants
665 instead of hardcoding in string.
667 * glib/dbus-glib-tool.c (pretty_print): Handle signature change
668 to string. Remove usage of _dbus_gutils_type_to_string.
670 * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
672 * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
675 * glib/dbus-binding-tool-glib.c (compute_marshaller)
676 (compute_marshaller_name, generate_glue): Handle signature change
678 (write_formal_parameters, write_args_for_direction): Ditto, and
681 * tools/dbus-tree-view.c (type_to_string): Delete.
682 (info_set_func_text): Update to print full signatures.
684 * test/glib/test-service-glib.xml: Change types to new
685 introspection format.
687 2005-02-26 Havoc Pennington <hp@redhat.com>
689 * doc/TODO: remove the "guid" item
691 * test/glib/test-profile.c (no_bus_thread_func): use open_private
692 (with_bus_thread_func): use open_private
694 * dbus/dbus-connection.c (dbus_connection_open_private): new
695 function that works like the old dbus_connection_open()
696 (dbus_connection_open): now returns an existing connection if
699 * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
700 through the GUID to the transport
702 * dbus/dbus-server.c (_dbus_server_init_base): keep around the
703 GUID in hex-encoded form.
705 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
706 pass GUID argument in to the transport
708 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
711 * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
713 * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
715 2005-02-25 Havoc Pennington <hp@redhat.com>
717 * doc/dbus-specification.xml: document the GUID thing
719 * dbus/dbus-server.c (_dbus_server_init_base): initialize a
720 globally unique ID for the server, and put a "guid=hexencoded"
723 * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
725 * dbus/dbus-message.c: ditto
727 * dbus/dbus-dataslot.c: ditto
729 * dbus/dbus-list.c: ditto
731 * dbus/dbus-internals.h: wait, just include
732 dbus-threads-internal.h here
734 * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
737 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
739 2005-02-24 Colin Walters <walters@verbum.org>
741 * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
743 2005-02-24 John (J5) Palmieir <johnp@redhat.com>
745 * glib/Makefile.am: added dbus-gobject.h to sources list
746 so distcheck doesn't fail
748 2005-02-24 Havoc Pennington <hp@redhat.com>
750 * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
751 you must disconnect before unref, since locking and other things
752 are screwed up otherwise. Fix assorted other locking stuff.
754 * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
757 * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
758 into a private header and don't export from the library
760 * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
762 2005-02-24 Colin Walters <walters@verbum.org>
764 * dbus/dbus-signature.c: New file; implements various functions
765 related to type signatures. Includes an interator for parsing,
766 validation functions.
767 (dbus_type_is_basic): Moved here from
768 dbus-marshal-basic.c:_dbus_type_is_basic.
769 (dbus_type_is_container): Moved here from
770 dbus-marshal-basic.c:_dbus_type_is_container.
772 All callers of _dbus_type_is_container and _dbus_type_is_basic
773 updated, and include dbus-signature.h.
775 * dbus/dbus-signature.h: New file; prototypes for the above.
777 * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
780 * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
781 function factored out of _dbus_first_type_in_signature.
782 (_dbus_first_type_in_signature_c_str): New function; returns first
783 type code for a type signature character.
785 * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
786 handle function moves.
788 * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
790 * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
791 function; skips to next complete type in type signature.
792 Implemented using previous skip_one_complete_type. Now
793 skip_one_complete_type just delegates to
794 _dbus_type_signature_next.
796 * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
798 (_dbus_type_is_container): Ditto.
800 * doc/dbus-specification.xml: Update introspection sample to
801 use real type signatures.
803 * dbus/dbus-test.h: Prototype signature test.
805 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
808 * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
810 2005-02-23 John (J5) Palmieri <johnp@redhat.com>
812 * python/dbus_bindings.pyx.in (PendingCall::get_reply):
813 s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
815 2005-02-21 Colin Walters <walters@verbum.org>
817 * dbus/dbus-test-main.c (main): Take optional specific test
820 * dbus/dbus-test.c (run_test): New function, runs a test function
821 with no data directory.
822 (run_data_test): Like above, but takes data directory.
823 (dbus_internal_do_not_use_run_tests): Take
824 specific test argument. Replace lots of cut n' paste code
825 with run_test and run_data_test.
827 * dbus/dbus-test.h: Update prototype for
828 dbus_internal_do_not_use_run_tests.
830 2005-02-20 Havoc Pennington <hp@redhat.com>
832 Fix bugs reported by Daniel P. Berrange
834 * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
835 (protected_change_watch): new function
836 (_dbus_server_toggle_watch, _dbus_server_remove_watch)
837 (_dbus_server_add_watch): change to work like the
838 dbus-connection.c equivalents; like those, probably kind of
839 busted, but should at least mostly work for now
840 (dbus_server_disconnect): drop the lock if we were already
841 disconnected, patch from Daniel P. Berrange
843 * dbus/dbus-server.c (_dbus_server_toggle_timeout)
844 (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
847 * doc/TODO: todo about unscrewing this mess
849 2005-02-19 Colin Walters <walters@verbum.org>
851 * glib/dbus-binding-tool-glib.c
852 (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
854 * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
855 as errno.h and sys/stat.h.
856 (lose): New function, prints error with
858 (lose_gerror): Similar, but takes GError for message.
859 (main): Add --output argument to specify output file to write to,
860 instead of always printing to stdout. In this mode, determine
861 timestamps on source files to see whether any are newer than the
862 target file. If not, exit. Also convert a number of error
863 messages to use lose (since it's shorter), and switch to using
864 g_io_channel_shutdown.
866 2005-02-19 Havoc Pennington <hp@redhat.com>
868 * glib/dbus-gobject.c
869 (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
871 * glib/dbus-glib.c: fix doxygen warnings
873 * glib/dbus-gparser.c (parse_annotation): error if an annotation
876 2005-02-17 Colin Walters <walters@verbum.org>
878 * glib/dbus-gobject.h: Don't export
879 _dbus_glib_marshal_dbus_message_to_gvalue_array.
881 * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
882 (invoke_object_method): Handle it.
884 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
887 2005-02-17 Colin Walters <walters@verbum.org>
889 * bus/.cvsignore, doc/.cvsignore
890 * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
893 2005-02-17 Colin Walters <walters@verbum.org>
895 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
896 Rename to DBUS_SERVICE_DBUS.
897 (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
898 (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
899 Change the value from "org.freedesktop.Local"
900 to "org.freedesktop.DBus.Local".
901 (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
902 (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
903 DBUS_INTERFACE_INTROSPECTABLE.
904 Change the value from "org.freedesktop.Introspectable"
905 to "org.freedesktop.DBus.Introspectable".
906 (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
907 DBUS_INTERFACE_PROPERTIES.
908 Change the value from "org.freedesktop.Properties"
909 to "org.freedesktop.DBus.Properties".
910 (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
912 Change the value from "org.freedesktop.Peer"
913 to "org.freedesktop.DBus.Peer".
914 (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
915 DBUS_INTERFACE_LOCAL.
916 Change the value from "org.freedesktop.Local"
917 to "org.freedesktop.DBus.Local".
919 All other users of those constants have been changed.
921 * bus/driver.c (bus_driver_handle_introspect): Use constants.
923 * glib/dbus-gobject.c (handle_introspect): Use constants.
925 * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
927 2005-02-17 Colin Walters <walters@verbum.org>
929 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
930 (parse_node, parse_interface, parse_method, parse_signal)
931 (parse_property, parse_annotation): Lose if we're currently in an
933 (parse_annotation): New function.
934 (parser_start_element, parser_end_element): Handle annotation.
935 (parse_method, parse_interface): Remove support for c_name attribute,
936 switch to annotations.
938 * glib/dbus-gidl.h (interface_info_get_binding_names)
939 (method_info_get_binding_names)
940 (interface_info_get_binding_name, method_info_get_binding_name)
941 (interface_info_set_binding_name, method_info_set_binding_name):
943 (interface_info_get_annotations, method_info_get_annotations)
944 (interface_info_get_annotation, method_info_get_annotation)
945 (interface_info_add_annotation, method_info_add_annotation):
948 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
950 (struct MethodInfo): Ditto.
951 Straightfoward conversion of binding methods into annotation methods
954 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
956 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
958 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
959 Use new annotation API.
961 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
964 * doc/dbus-specification.xml: Discuss introspection annotations,
965 include list of well-known annotations.
967 * test/glib/test-service-glib.xml: Make validate against new DTD.
969 2005-02-17 Colin Walters <walters@verbum.org>
971 This patch is based on initial work from
972 Paul Kuliniewicz <kuliniew@purdue.edu>.
974 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
975 initialization of GValue from dbus type to here.
976 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
977 for the "glib-genmarshal" program from a DBus type.
978 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
979 into the C name for it we use in the glib bindings.
980 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
981 glib C type (not GValue).
982 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
984 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
987 * glib/dbus-gutils.h: Prototype it.
989 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
990 (marshal_dbus_message_to_g_marshaller): Use new shared function
991 dbus_glib_marshal_dbus_message_to_gvalue_array.
993 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
994 Will be changed once we have annotations.
996 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
997 GStaticRWLock. Callers updated.
998 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
999 (string_table_next): New function for iterating over zero-terminated
1001 (string_table_lookup): New function; retrieves specific entry in
1003 (get_method_data): New function; look up method data in object data chunk.
1004 (object_error_domain_prefix_from_object_info)
1005 (object_error_code_from_object_info): New functions, but not implemented yet.
1006 (method_interface_from_object_info): New function; retrieve interface name.
1007 (method_name_from_object_info): New function; retrieve method name.
1008 (method_arg_info_from_object_info): New function; retrieve argument data.
1009 (arg_iterate): New function; iterates over serialized argument data.
1010 (method_dir_signature_from_object_info): New function; returns a
1011 GString holding type signature for arguments for just one
1012 direction (input or output).
1013 (method_input_signature_from_object_info)
1014 (method_output_signature_from_object_info): New functions.
1015 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
1016 converts dbus message arguments into a GValue array. Used for both
1017 signal handling and method invocation.
1018 (struct DBusGlibWriteIterfaceData): New utility structure.
1019 (write_interface): New function; generate introspection XML for
1021 (introspect_interfaces): New function; gathers all interface->methods,
1022 generates introspection XML for them.
1023 (handle_introspect): Invoke introspect_interfaces.
1024 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
1025 (lookup_object_and_method): New function; examines an incoming message
1026 and attempts to match it up (via interface, method name, and argument
1027 signature) with a known object and method.
1028 (gerror_domaincode_to_dbus_error_name): New function; converts a
1029 GError domain and code into a DBus error name. Needs GError data
1030 added to object introspection to work well.
1031 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
1033 (invoke_object_method): New function to invoke an object method
1034 looked up via lookup_object_and_method. Parses the incoming
1035 message, turns it into a GValue array, then invokes the marshaller
1036 specified in the DBusGMethodInfo. Creates a new message with
1037 either return values or error message as appropriate.
1038 (gobject_message_function): Invoke lookup_object_and_method and
1039 invoke_object_method.
1041 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
1042 (enum DBusBindingOutputMode): New enum for binding output modes.
1043 (pretty_print): Print binding names.
1044 (dbus_binding_tool_error_quark): GError bits.
1045 (version): Fix typo.
1046 (main): Create GIOChannel for output. Parse new --mode argument,
1047 possible values are "pretty-print", "glib-server", "glib-client".
1048 Use mode to invoke appropriate function.
1050 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
1052 * glib/dbus-glib-tool.h: New header, just includes GError bits
1055 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
1056 maps binding style to name.
1057 (struct MethodInfo): Ditto.
1058 (get_hash_keys, get_hash_key): Utility function, returns keys for
1060 (interface_info_new, method_info_new): Initialize bindings.
1061 (interface_info_unref, method_info_unref): Destroy bindings.
1062 (method_info_get_binding_names, method_info_get_binding_name)
1063 (interface_info_get_binding_names, interface_info_get_binding_name):
1064 Functions for retrieving binding names.
1065 (method_info_set_binding_name, interface_info_set_binding_name):
1066 Functions for setting binding names.
1068 * glib/dbus-binding-tool-glib.h: New file, has prototypes
1069 for glib binding generation.
1071 * glib/dbus-binding-tool-glib.c: New file, implements server-side
1072 and client-side glib glue generation.
1074 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
1075 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
1078 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
1079 of using GClosureMarshal directly.
1080 (struct DBusGObjectInfo): Add n_infos member.
1082 * test/glib/test-service-glib.xml: New file; contains introspection data
1083 for MyTestObject used in test-service-glib.c.
1085 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
1086 (my_object_do_nothing, my_object_increment, my_object_throw_error)
1087 (my_object_uppercase, my_object_many_args): New test methods.
1088 (main): Use dbus_g_object_class_install_info to include generated object
1091 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
1092 as well as client-side bindings.
1094 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
1095 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
1096 using both the dbus_gproxy stuff directly as well as the generated bindings.
1098 2005-02-15 Havoc Pennington <hp@redhat.com>
1100 * dbus/dbus-connection.c (dbus_connection_dispatch): always
1101 complete a pending call, don't run filters first.
1103 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
1104 dbus_pending_call_steal_reply
1106 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
1107 _dbus_connection_block_pending_call
1108 (dbus_pending_call_get_reply): change to steal_reply and return a
1111 * dbus/dbus-connection.c
1112 (dbus_connection_send_with_reply_and_block): port to work in terms
1114 (_dbus_connection_block_pending_call): replace block_for_reply
1117 2005-02-14 Havoc Pennington <hp@redhat.com>
1119 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
1120 properly handle looking up group information by name; fix
1123 2005-02-13 Havoc Pennington <hp@redhat.com>
1125 * dbus/dbus-connection.c (dbus_connection_return_message)
1126 (dbus_connection_borrow_message): hold dispatch lock while message
1128 (_dbus_connection_block_for_reply): hold dispatch lock while we
1129 block for the reply, so nobody steals our reply
1130 (dbus_connection_pop_message): hold the dispatch lock while we
1133 2005-02-13 Havoc Pennington <hp@redhat.com>
1135 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
1136 (_dbus_connection_release_dispatch)
1137 (_dbus_connection_acquire_io_path)
1138 (_dbus_connection_release_io_path): make the mutex and condvar
1139 control access to the "acquired" flag. Drop the connection lock
1140 while waiting on the condvar. Hopefully these are baby steps in
1141 roughly the right direction.
1143 2005-02-13 Havoc Pennington <hp@redhat.com>
1145 * dbus/dbus-connection.c: use separate mutexes for the condition
1146 variables; this is some kind of baseline for sanity, but the
1147 condition variables still aren't used correctly afaict
1149 2005-02-13 Havoc Pennington <hp@redhat.com>
1151 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
1154 * dbus/dbus-connection.c
1155 (_dbus_connection_detach_pending_call_unlocked): add this
1157 Initial semi-correct pass through to fix thread locking; there are
1158 still some issues with the condition variable paths I'm pretty
1161 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
1164 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
1165 rename to add _unlocked
1166 (struct DBusConnection): move "dispatch_acquired" and
1167 "io_path_acquired" to use only one bit each.
1168 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
1169 (dbus_connection_set_watch_functions): hacky fix to reentrancy
1170 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
1171 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
1172 (_dbus_connection_remove_timeout)
1173 (_dbus_connection_toggle_timeout): drop lock when calling out to
1174 user functions; done in a hacky/bad way.
1175 (_dbus_connection_send_and_unlock): add a missing unlock
1176 (_dbus_connection_block_for_reply): add a missing unlock
1178 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
1179 drop lock in a hacky probably unsafe way to call out to user
1182 2005-02-12 Havoc Pennington <hp@redhat.com>
1184 * tools/dbus-tree-view.c (info_set_func_text): display more
1187 * bus/driver.c (bus_driver_handle_list_services): list the bus
1190 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
1192 * glib/dbus-gidl.c (signal_info_get_n_args): new function
1193 (method_info_get_n_args): new function
1195 2005-02-12 Havoc Pennington <hp@redhat.com>
1197 * bus/driver.c (bus_driver_handle_introspect): add introspection
1200 2005-02-12 Havoc Pennington <hp@redhat.com>
1202 * bus/driver.c: put the signature of each bus driver method in the
1203 table of handlers and check it on incoming calls; this isn't
1204 really useful, but going to add introspect support in a minute.
1206 2005-02-11 Joe Shaw <joeshaw@novell.com>
1208 * mono/Connection.cs: The unpredictability of finalizers in mono
1209 prevents us from deterministically disconnecting the filters from
1210 the Service class's finalizer, so move tracking of filters and
1211 matches here. Add API for that.
1213 * mono/Service.cs: Remove the code, add code which calls the
1214 methods now on the Connection class.
1216 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
1218 * python/dbus.py (class Sender): added to support dbus signals better
1219 (Bus::add_signal_receiver): added expand_args parameter which defaults
1220 to True. When expand args is True the signal handler will pass the
1221 message arguments as parameters to the signal handler. If False
1222 revert to previous behavior where the signal handler must get the
1223 argument list from the message. This is to help port applications
1224 like HAL that have a tendancy to send variable length argument lists.
1225 self._match_rule_to_receivers is now a dict of dicts.
1226 (Bus::remove_signal_receiver): pop handler off the dict intead of
1227 removing it from a list
1228 (Bus::_signal_func): change signal handlers so that interface,
1229 signal_name, service, path and message are packed into a Sender
1230 object and that is passed to the handler. If expand_args is True
1231 extract the args list from the message and append it to the parameter
1234 * python/dbus_bindings.pyx.in (class Signature): added to support
1236 (MessageIter::__init__): changed iteration limit to match D-BUS
1237 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
1238 STRUCT and VARIENT type support
1239 (MessageIter::python_value_to_dbus_sig): made recursive to support
1241 (MessageIter::append*): added Signature, dict, tuple
1244 * python/examples/example-client.py: added examples of getting tuples
1247 * python/examples/example-service.py: added examples of sending tuples
1250 * python/examples/example-signal-recipient.py: Fixed to handle new
1251 signal callback format
1253 2005-02-10 Havoc Pennington <hp@redhat.com>
1255 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
1256 (call dbus_g_proxy_add_signal)
1258 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1260 (_dbus_server_new_for_domain_socket): escape the path
1262 * dbus/dbus-address.c (dbus_address_escape_value): new
1263 (dbus_address_unescape_value): new
1264 (dbus_parse_address): unescape values
1266 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
1268 * doc/dbus-specification.xml: explain how to escape values in
1271 2005-02-10 Havoc Pennington <hp@redhat.com>
1273 * dbus/dbus-message-factory.c (generate_special): modify test to
1274 avoid using a non-basic dict key
1276 * dbus/dbus-marshal-validate-util.c: add test for the below
1278 * doc/dbus-specification.xml: require that dict keys are a basic
1281 * dbus/dbus-marshal-validate.c
1282 (_dbus_validate_signature_with_reason): require that dict key is a
1285 2005-02-10 Havoc Pennington <hp@redhat.com>
1287 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
1288 change to be _and_unlock instead of _unlocked
1290 * dbus/dbus-connection.c
1291 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
1292 have no_update so we can find this bug quickly in future
1294 2005-02-10 Havoc Pennington <hp@redhat.com>
1296 * dbus/dbus-message-util.c (verify_test_message): tests for string
1299 * dbus/dbus-message.c (dbus_message_append_args_valist): add
1300 support for arrays of string/signature/path
1302 2005-02-10 Joe Shaw <joeshaw@novell.com>
1304 * dbus/dbus-connection.c
1305 (_dbus_connection_queue_received_message_link,
1306 _dbus_connection_message_sent): Add the path to
1308 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
1309 _dbus_connection_send_preallocated_unlocked(), updated the
1310 dispatch status, and unlocks. Fixes a bug where certain
1311 situations (like a broken pipe) could cause a Disconnect message
1312 to not be sent, tricking the bus into thinking a service was still
1313 there when the process had quit.
1314 (_dbus_connection_send_preallocated): Call
1315 _dbus_connection_send_preallocated_and_unlock().
1316 (_dbus_connection_send_and_unlock): Added. Calls
1317 _dbus_connection_send_preallocated_and_unlock().
1318 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
1319 (dbus_connection_send_with_reply): Update the dispatch status and
1322 * mono/Service.cs (~Service): Added. Removes the filter so that
1323 we don't get unmanaged code calling back into a GCed delegate.
1324 (RemoveFilter); Added.
1326 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
1328 * dbus/dbus-message.c (dbus_message_iter_open_container):
1329 - Removed check for iterator type being an array because
1330 get_arg_type does not work with writer iterators
1331 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
1333 2005-02-07 Havoc Pennington <hp@redhat.com>
1335 * doc/dbus-specification.xml: some more language cleanups; add
1336 stuff about how to deal with invalid protocol and extension
1337 points; add _ to allowed chars in auth commands; add EXTENSION_
1340 2005-02-06 Havoc Pennington <hp@redhat.com>
1342 * s/expected/required/ in a couple places for clarity
1344 2005-02-07 Colin Walters <walters@verbum.org>
1346 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
1347 sender or proposed_recipient.
1349 2005-02-06 Havoc Pennington <hp@redhat.com>
1351 * dbus/dbus-message-factory.c (generate_special): more tests
1353 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
1354 array length that exceeds the maximum
1356 2005-02-05 Havoc Pennington <hp@redhat.com>
1358 * dbus/dbus-message-factory.c (generate_special): more test cases,
1361 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
1362 reason why a signature was invalid
1364 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
1365 skip the length of the string before we look at it in validation
1367 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
1370 * dbus/dbus-message.c (_dbus_message_loader_new): default
1371 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
1373 2005-02-05 Havoc Pennington <hp@redhat.com>
1375 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
1376 if the signature of a variant was empty
1377 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
1378 struct with no element type)
1380 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
1381 mangled messages to break things
1383 2005-02-04 Havoc Pennington <hp@redhat.com>
1385 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
1386 g_quark_try_string() so it actually can return 0
1387 (dbus_g_proxy_connect_signal): ditto
1389 2005-02-04 Havoc Pennington <hp@redhat.com>
1391 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
1393 (tristring_from_message): assert cleanly on null path/interface
1394 (should not be possible though I decided later)
1395 (dbus_g_proxy_dispose): move proxy manager unregistration here
1396 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
1397 g_return_if_fail() checks
1399 2005-02-04 Havoc Pennington <hp@redhat.com>
1401 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
1403 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
1404 (with some minor changes)
1406 * doc/dbus-specification.xml: add deprecated attribute to
1407 introspection format
1409 2005-01-31 Havoc Pennington <hp@redhat.com>
1411 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
1412 think it's sort of right
1414 2005-01-30 Havoc Pennington <hp@redhat.com>
1416 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
1418 2005-01-30 Havoc Pennington <hp@redhat.com>
1420 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
1422 * autogen.sh: change to autotools 1.9
1424 * glib/dbus-gproxy.c: completely change how signals work
1425 (dbus_g_proxy_add_signal): new function to specify signature of a
1427 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
1428 and g_warning if the incoming message has the wrong signature.
1430 2005-01-30 Havoc Pennington <hp@redhat.com>
1432 * tools/dbus-names-model.c (have_names_notify): fix this
1434 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
1435 up the string array handling a bit
1437 2005-01-30 Havoc Pennington <hp@redhat.com>
1439 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
1440 (dbus_g_pending_call_cancel): new function
1442 * dbus/dbus-glib.h: move GType decls for connection/message here;
1443 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
1444 here, just kind of rationalizing how we handle all that
1446 * tools/dbus-names-model.c: new file for a tree model listing the
1449 * tools/dbus-tree-view.c (model_new): use proper typing on the
1452 2005-01-30 Havoc Pennington <hp@redhat.com>
1454 * glib/dbus-gmain.c: add a custom GSource back that just checks
1455 whether the message queue has anything in it; otherwise, there are
1456 cases where we won't see messages in the queue since there was no
1457 IO visible to the glib main loop
1459 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
1460 increase default message timeout to 25 seconds
1462 2005-01-30 Havoc Pennington <hp@redhat.com>
1464 * test/glib/test-profile.c (no_bus_stop_server): remove the
1465 warning about the g_warning that I just fixed
1467 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
1468 custom source, seems to be a lot easier to understand and work
1471 2005-01-30 Havoc Pennington <hp@redhat.com>
1473 I think this main loop thing is conceptually broken, but here are
1474 some band aids. I'll maybe rewrite it in a minute.
1476 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
1477 custom GSource, so don't pass it in; confusing
1478 (gsource_server_finalize, gsource_connection_finalize): add
1479 finalize handlers that remove all the watches.
1481 2005-01-30 Havoc Pennington <hp@redhat.com>
1483 * glib/dbus-gobject.c (introspect_properties): fix the XML
1486 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
1487 which effectively detects the use of freed messages
1489 * glib/dbus-gobject.c (handle_introspect): modify and return the
1490 reply message instead of the incoming message
1492 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
1493 gee, maybe it should SEND THE XML instead of just making a string
1494 and freeing it again ;-)
1496 * tools/dbus-print-message.c (print_message): improve printing of
1499 * configure.in: add debug-glib.service to the output
1501 2005-01-30 Havoc Pennington <hp@redhat.com>
1503 dbus-viewer introspected and displayed the bus driver
1505 * dbus/dbus-object-tree.c
1506 (object_tree_test_iteration): add tests for a handler registered on "/"
1508 * dbus/dbus-object-tree.c
1509 (_dbus_decompose_path): fix to handle path "/" properly
1510 (run_decompose_tests): add tests for path decomposition
1512 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
1515 * glib/dbus-gobject.c (handle_introspect): fix quotes
1517 * test/glib/run-test.sh: support launching the bus, then running
1520 * test/glib/test-service-glib.c (main): put in a trivial gobject
1521 subclass and register it on the connection
1523 * bus/driver.c (bus_driver_handle_introspect): implement
1524 introspection of the bus driver service
1526 * dbus/dbus-protocol.h: add #defines for the XML namespace,
1527 identifiers, doctype decl
1529 * bus/driver.c (bus_driver_handle_get_service_owner): handle
1530 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
1531 returning the service unchanged.
1532 (bus_driver_handle_message): remove old check for reply_serial in
1533 method calls, now the message type deals with that
1534 (bus_driver_handle_message): handle NULL interface
1536 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
1538 * glib/dbus-gloader-expat.c (description_load_from_string): allow
1541 * tools/dbus-viewer.c: add support for introspecting a service on
1544 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
1545 (dbus_g_pending_call_unref): add
1547 2005-01-29 Havoc Pennington <hp@redhat.com>
1549 * tools/dbus-tree-view.c: add support for displaying properties.
1550 (run dbus-viewer with an introspect xml file as arg, then resize
1551 the window so the tree elements show up, not sure what that is)
1553 * glib/dbus-gobject.c (handle_introspect): return
1554 org.freedesktop.Properties and org.freedesktop.Introspectable
1555 interfaces when we are introspected.
1557 * doc/dbus-specification.xml: allow empty interface name when
1560 2005-01-29 Havoc Pennington <hp@redhat.com>
1562 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
1563 though it uses glib, it could be extended for any binding in
1566 * glib/dbus-gobject.c (gobject_message_function): change to the
1567 new way properties work
1569 * dbus/dbus-protocol.h: add the new interfaces
1571 * doc/dbus-specification.xml: document the introspection format,
1572 Introspectable interface, and add an org.freedesktop.Properties
1575 * glib/dbus-gparser.c: add support for a <property> element
1577 * glib/dbus-gidl.c: add PropertyInfo
1579 * glib/dbus-gobject.c (handle_introspect): put the outermost
1580 <node> outside the signal and property descriptions.
1581 (introspect_properties): export properties as <property> rather
1582 than as method calls
1584 2005-01-28 Havoc Pennington <hp@redhat.com>
1586 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
1587 related to authentication protocol
1589 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
1591 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
1592 - BUS_ACTIVATION -> BUS_STARTER
1593 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
1594 - class MessageIter (__init__): Added recursion checking
1595 so we throw a nice error instead of just disconnecting from the
1597 (get): Added arg_type parameter for recursion.
1598 Removed the nil type
1599 Added signiture type placeholder (not implemented)
1600 Added struct type placeholder (not implemented)
1601 Added varient type placeholder (not implemented)
1602 Commented out dict type for now
1603 (get_element_type): renamed from get_array_type
1604 (get_*): changed to use the dbus_message_iter_get_basic API
1605 (get_*_array): removed in favor of recursive get_array method
1606 (get_array): new recursive method which calls get to marshal
1607 the elements of the array
1608 (value_to_dbus_sig): New method returns the corrasponding
1609 dbus signiture to a python value
1610 (append): Comment out dict handling for now
1611 Handle lists with the new recursive API
1612 Comment out None handling for now
1613 (append_nil): removed
1614 (append_*): changed to use dbus_message_iter_append_basic API
1615 (append_*_array): removed in favor of recursive append_array
1617 (__str__): Make it easier to print out recursive iterators
1619 - class Message (__str__): moved type inspection to the
1620 MessageIter class' __str__ method
1621 (get_iter): Added an append parameter wich defaults to False
1622 If True use the new API's to create an append iterator
1624 * python/dbus.py: Update to use new bindings API
1625 - TYPE_ACTIVATION -> TYPE_STARTER
1626 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
1627 - class ActivationBus -> class StarterBus
1628 - class RemoteObject (__call__): get an append iterator
1629 - (_dispatch_dbus_method_call): get an append iterator
1630 - class Object (emit_signal): get an append iterator
1632 * python/examples/: Fixed up the examples to work with the new API
1634 2005-01-28 Joe Shaw <joeshaw@novell.com>
1636 * configure.in: Bump version up to 0.30.
1638 * HACKING: Add a release item to bump the version number up after
1641 2005-01-28 Havoc Pennington <hp@redhat.com>
1643 * doc/dbus-specification.xml: update to describe 16-bit types and
1646 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
1649 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
1652 * dbus/dbus-marshal-recursive.c: implement
1654 2005-01-27 Havoc Pennington <hp@redhat.com>
1656 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
1658 * configure.in: find the right type for 16 and 32 bit ints as well
1661 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
1662 the 16-bit types so people don't have to stuff them in 32-bit or
1665 2005-01-27 Havoc Pennington <hp@redhat.com>
1667 * dbus/dbus-message.c: byteswap the message if you init an
1668 iterator to read/write from it
1670 * dbus/dbus-marshal-byteswap.c: new file implementing
1671 _dbus_marshal_byteswap()
1673 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
1675 2005-01-26 Havoc Pennington <hp@redhat.com>
1677 * dbus/dbus-marshal-validate-util.c: break this out (and fix
1678 build, apparently - nobody noticed?)
1680 2005-01-26 Havoc Pennington <hp@redhat.com>
1682 * dbus/dbus-marshal-recursive.h: remove todo comment
1684 2005-01-25 Joe Shaw <joeshaw@novell.com>
1686 * Land the mono binding changes to conform to the new APIs.
1688 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
1689 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
1691 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
1692 type code as a string.
1693 (InitAppending): Rename dbus_message_append_iter_init() to
1694 dbus_message_iter_init_append().
1696 * mono/BusDriver.cs: Rename ServiceEventHandler to
1697 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
1698 Rename ServiceOwnerChanged to NameOwnerChanged.
1700 * mono/Connection.cs: Rename BaseService to UniqueName, and the
1703 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
1705 * mono/Service.cs: Rename Exists to HasOwner, internally rename
1706 dbus_bus_acquire_service() to dbus_bus_request_name().
1708 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
1709 of Type.UnderlyingSystemType to get the correct element type for
1711 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
1712 dbus_message_get_{element|arg}_type() instead of
1713 dbus_message_iter_init_array_iterator().
1714 (Append): Replace dbus_message_iter_append_array() with
1715 dbus_message_iter_open_container() and
1716 dbus_message_iter_close_container().
1718 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
1719 types have been removed.
1721 * mono/DBusType/*.cs: Replace calls of
1722 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
1723 but specify the type in the DllImport extern declaration. Ditto
1724 for dbus_message_iter_append_[type]() ->
1725 dbus_message_iter_append_basic().
1727 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
1728 NameOwnerChangedHandler.
1730 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
1732 * python/dbus_bindings.pyx.in: Rename of methods and bindings
1733 - get_base_service -> get_unique_name
1734 - bus_get_base_service -> bus_get_unique_name
1735 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
1736 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
1737 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
1738 - bus_activate_service -> bus_start_service_by_name
1739 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
1740 - bus_acquire_service -> bus_request_name
1741 - dbus_bus_acquire_service -> dbus_bus_request_name
1742 - bus_service_exists -> bus_name_has_owner
1743 - dbus_bus_service_exists -> dbus_bus_name_has_owner
1745 * python/dbus.py: Rename of methods
1746 - activate_service -> start_service_by_name
1747 - bus_acquire_service -> bus_request_name
1748 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
1749 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
1752 2005-01-24 Joe Shaw <joeshaw@novell.com>
1754 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
1755 signature for the method that can't be found.
1757 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
1758 the message has any arguments, we need to call
1759 _dbus_type_reader_get_current_type(), not
1760 _dbus_type_reader_has_next().
1762 2005-01-24 Havoc Pennington <hp@redhat.com>
1764 * dbus/dbus-message-factory.c: more testing of message validation
1766 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
1769 2005-01-23 Havoc Pennington <hp@redhat.com>
1771 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
1772 get this all working, not many tests in the framework yet though
1774 2005-01-22 Havoc Pennington <hp@redhat.com>
1776 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
1777 tutorial, based on work from David Wheeler.
1779 2005-01-21 Havoc Pennington <hp@redhat.com>
1781 * dbus/dbus-bus.c: add more return_if_fail checks
1783 * dbus/dbus-message.c (load_message): have the "no validation"
1784 mode (have to edit the code to toggle the mode for now though)
1786 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
1787 skips all validation; I want to use this at least for benchmark
1788 baseline, I'm not sure if it should be a publicly-available switch.
1790 2005-01-21 Havoc Pennington <hp@redhat.com>
1792 * glib/dbus-gmain.c: don't put the GLib bindings in the same
1793 toplevel doxygen group as the low-level API stuff
1795 * dbus/dbus.h: note that libdbus is the low-level API
1797 2005-01-20 Havoc Pennington <hp@redhat.com>
1799 * update-dbus-docs.sh: script to update docs on the web site, only
1800 works for me though. neener.
1802 2005-01-20 Havoc Pennington <hp@redhat.com>
1804 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
1805 code can reveal bugs in it
1807 2005-01-20 Havoc Pennington <hp@redhat.com>
1809 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
1810 select() version, patches from Tor Lillqvist
1812 2005-01-20 Havoc Pennington <hp@redhat.com>
1814 * doc/dbus-tutorial.xml: replace > with >
1816 * bus/services.c (bus_registry_acquire_service): validate the name
1817 and return a better error if it's no good.
1819 * doc/dbus-specification.xml: note NO_AUTO_START change
1821 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
1822 from AUTO_START, we're toggling the default
1824 * bus/dispatch.c: adapt the tests to change of auto-start default
1826 2005-01-18 Havoc Pennington <hp@redhat.com>
1828 * rename dbus-daemon-1 to dbus-daemon throughout
1830 2005-01-18 Havoc Pennington <hp@redhat.com>
1832 * Throughout, grand renaming to strip out the use of "service",
1833 just say "name" instead (or "bus name" when ambiguous). Did not
1834 change the internal code of the message bus itself, only the
1835 programmer-facing API and messages.
1837 * doc/dbus-specification.xml: further update the message bus section
1839 * bus/config-parser.c (all_are_equiv): fix bug using freed string
1842 2005-01-17 Havoc Pennington <hp@redhat.com>
1844 * dbus/dbus-types.h: remove 16-bit types since we don't use them
1847 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
1848 "invalid name character" not only non-ASCII
1850 * doc/dbus-specification.xml: further update spec, message bus
1851 parts are still out-of-date but the marshaling etc. stuff is now
1854 2005-01-17 Havoc Pennington <hp@redhat.com>
1856 * doc/dbus-specification.xml: partially update spec
1858 2005-01-17 Havoc Pennington <hp@redhat.com>
1860 * Throughout, align variant bodies according to the contained
1861 type, rather than always to 8. Should save a fair bit of space in
1864 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
1865 fix handling of case where p == end
1867 * doc/TODO: remove the dbus_bool_t item and variant alignment items
1869 2005-01-17 Havoc Pennington <hp@redhat.com>
1871 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
1873 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
1874 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
1875 are marshaling/unmarshaling a boolean.
1877 2005-01-16 Havoc Pennington <hp@redhat.com>
1879 This is about it on what can be disabled/deleted from libdbus
1880 easily, back below 150K anyhow. Deeper cuts are more work than
1881 just turning the code off as I've done here.
1883 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
1884 signed int convenience funcs
1886 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
1889 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
1890 things out of libdbus
1892 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
1894 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
1895 tests-enabled-only, though it should probably be deleted)
1897 * dbus/dbus-message-util.c: same stuff
1899 * dbus/dbus-auth-util.c: same stuff
1901 2005-01-16 Havoc Pennington <hp@redhat.com>
1903 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
1905 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
1906 way for stripping down dbus-userdb.c stuff included in libdbus.
1907 Rename _dbus_parse_uid for consistency.
1909 2005-01-16 Havoc Pennington <hp@redhat.com>
1911 * dbus/dbus-internals.c (_dbus_real_assert): print the function
1912 name the assertion failed in
1914 * dbus/dbus-internals.h (_dbus_return_if_fail)
1915 (_dbus_return_val_if_fail): assert that the name of the function
1916 containing the check doesn't start with '_', since we only want to
1917 use checks on public functions
1919 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
1920 checks to assertions
1922 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
1923 change checks to asserts for private function
1925 * dbus/dbus-message.c (_dbus_message_set_serial): checks
1926 to asserts for private function
1928 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
1929 broken assertion that was breaking make check
1930 (_dbus_type_reader_array_is_empty): remove this rather than fix
1931 it, was only used in assertions
1933 2005-01-16 Havoc Pennington <hp@redhat.com>
1935 * test/unused-code-gc.py: hacky script to find code that's used
1936 only by the bus (not libdbus) or used only by tests or not used at
1937 all. It has some false alarms, but looks like we can clean up a
1938 lot of size from libdbus.
1940 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
1941 dbus/Makefile.am: initially move 10K of binary size out of libdbus
1943 2005-01-16 Havoc Pennington <hp@redhat.com>
1945 * Add and fix docs according to Doxygen warnings throughout
1948 * dbus/dbus-marshal-recursive.c
1949 (_dbus_type_reader_array_is_empty): change this to just call
1950 array_reader_get_array_len() and make it static
1952 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
1954 (dbus_message_iter_init_append): rename from append_iter_init
1956 * dbus/dbus-marshal-recursive.c
1957 (_dbus_type_reader_get_element_type): rename from
1958 _dbus_type_reader_get_array_type
1960 2005-01-15 Havoc Pennington <hp@redhat.com>
1962 * test/glib/test-profile.c (with_bus_server_filter): fix crash
1964 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
1965 when DBUS_DISABLE_ASSERT
1966 (_dbus_marshal_set_basic): be sure we align for the string length
1968 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
1971 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
1972 inline macro version
1973 (_dbus_string_set_byte): provide inline macro version
1975 2005-01-15 Havoc Pennington <hp@redhat.com>
1977 * Land the new message args API and type system.
1979 This patch is huge, but the public API change is not
1980 really large. The set of D-BUS types has changed somewhat,
1981 and the arg "getters" are more geared toward language bindings;
1982 they don't make a copy, etc.
1984 There are also some known issues. See these emails for details
1986 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
1987 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
1989 * dbus/dbus-marshal-*: all the new stuff
1991 * dbus/dbus-message.c: basically rewritten
1993 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
1994 freed blocks to be all non-nul bytes so using freed memory is less
1995 likely to work right
1997 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
1998 DBUS_FAIL_MALLOC=N environment variable, so you can do
1999 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
2000 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
2003 * qt/message.cpp: port to the new message args API
2004 (operator<<): use str.utf8() rather than str.unicode()
2005 (pretty sure this is right from the Qt docs?)
2007 * glib/dbus-gvalue.c: port to the new message args API
2009 * bus/dispatch.c, bus/driver.c: port to the new message args API
2011 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
2012 "locked" flag to TRUE and align_offset to 0; I guess we never
2013 looked at these anyhow, but seems cleaner.
2015 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
2016 move allocation padding macro to this header; use it to implement
2017 (_DBUS_STRING_STATIC): ability to declare a static string.
2019 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
2020 change to return TRUE if the interface is not set.
2022 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
2023 to dbus-marshal-validate.[hc]
2025 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
2028 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
2029 to dbus-marshal-*.[hc]
2031 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
2032 function here from dbus-marshal.c
2034 2005-01-12 Joe Shaw <joeshaw@novell.com>
2036 * NEWS: Update for 0.23.
2038 * configure.in: Release 0.23.
2040 2005-01-12 Joe Shaw <joeshaw@novell.com>
2042 * mono/Makefile.am, mono/example/Makefile.am: Always build the
2043 dbus DLL with --debug. Clean up after the .mdb files this leaves
2046 * mono/doc/Makefile.am: Need to uninstall the docs on "make
2049 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
2050 is an enum, get the enum's underlying type. Another mono
2053 2005-01-11 Joe Shaw <joeshaw@novell.com>
2055 Patch from Sjoerd Simons <sjoerd@luon.net>
2057 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
2058 DESTDIR. It breaks stuff.
2060 2005-01-11 Joe Shaw <joeshaw@novell.com>
2062 Patch from Tambet Ingo <tambet@ximian.com>
2064 * mono/DBusType/Array.cs (Get): Get the underlying element type by
2065 calling type.GetElementType(). The code previously depended on
2066 broken Mono behavior, which was fixed in Mono 1.1.3.
2068 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
2069 Activator.CreateInstance() so that the class's constructor is
2070 called with the right parameters.
2072 2005-01-11 Joe Shaw <joeshaw@novell.com>
2074 Patch from Timo Teräs <ext-timo.teras@nokia.com>
2076 * dbus/dbus-connection.c
2077 (_dbus_connection_queue_received_message_link): Call
2078 _dbus_connection_remove_timeout() instead of the _locked()
2079 variant, since it's always called from
2080 _dbus_connection_handle_watch(), which handles the locking.
2081 Removed the _locked() variant since it's no longer used.
2083 2005-01-03 Havoc Pennington <hp@redhat.com>
2085 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
2088 2004-12-26 Havoc Pennington <hp@redhat.com>
2090 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
2092 2005-01-03 Havoc Pennington <hp@redhat.com>
2094 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
2097 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
2099 2005-01-02 Havoc Pennington <hp@redhat.com>
2101 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
2103 2005-01-01 Havoc Pennington <hp@redhat.com>
2105 * configure.in: add -Wfloat-equal
2107 2005-01-01 Havoc Pennington <hp@redhat.com>
2109 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
2110 for a variety of reasons '==' doesn't do this.
2112 2004-12-31 Havoc Pennington <hp@redhat.com>
2114 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
2115 I keep wishing I had
2117 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
2119 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
2121 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
2123 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
2124 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
2125 dbus-protocol.h. Because they are defines and not enums they are not
2128 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
2130 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
2131 dbus_bus_activate_service
2133 * python/dbus.py (Bus.activate_service): activate a service on the
2136 2004-12-24 Havoc Pennington <hp@redhat.com>
2138 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
2139 file format has also changed and I haven't adapted to that yet
2141 * Makefile.am: load .gcno files from latest gcc
2143 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
2144 * Patch from Rob Taylor <robtaylor@fastmail.fm>
2146 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
2149 * python/dbus.py (get_unix_user): Added binding to
2150 call dbus_bindings.bus_get_unix_user
2152 * python/extract.py: Modified the proto_pat regex to
2153 handle unsigned long
2155 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2157 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
2158 better POSIX compliance.
2160 2004-12-19 Havoc Pennington <hp@redhat.com>
2162 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
2163 (_dbus_string_insert_8_aligned): new functions
2165 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
2167 2004-12-18 Havoc Pennington <hp@redhat.com>
2169 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
2172 * dbus/dbus-message.c: fix a comment, and add a still-unused
2173 not-implemented function
2175 * dbus/dbus-marshal.h: fix comment
2177 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
2179 2004-12-17 Joe Shaw <joeshaw@novell.com>
2181 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
2182 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
2183 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
2184 Type.UnderlyingSystemType to get the actual system type
2185 underneath. This code previously depended on the broken Mono
2186 behavior, which was fixed in 1.1.3.
2188 2004-11-27 Havoc Pennington <hp@redhat.com>
2190 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
2192 (_dbus_string_get_const_data): inline when asserts are disabled
2194 * dbus/dbus-message.c: record the _dbus_current_generation of
2195 creation so we can complain if dbus_shutdown() is used improperly.
2196 Do this only if checks are enabled.
2198 * dbus/dbus-connection.c: ditto
2200 2004-11-26 Havoc Pennington <hp@redhat.com>
2202 * test/glib/test-profile.c: add with_bus mode to profile echoes
2203 that go through the bus.
2205 * test/glib/run-test.sh: add ability to run test-profile
2207 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
2210 2004-11-26 Havoc Pennington <hp@redhat.com>
2212 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
2213 thing was implemented
2215 2004-11-26 Havoc Pennington <hp@redhat.com>
2217 * test/glib/test-profile.c: tweak a bit, add support for some
2218 made-up minimal malloc overhead with plain sockets, since in
2219 real life some sort of buffers are unavoidable thus we could
2220 count them in the theoretical best case
2222 2004-11-26 Havoc Pennington <hp@redhat.com>
2224 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
2225 where I was trying to cache one too many messages
2227 2004-11-26 Havoc Pennington <hp@redhat.com>
2229 * dbus/dbus-message.c: reimplement message cache as an array which
2230 makes the cache about twice as fast and saves maybe 1.5% overall
2232 2004-11-26 Havoc Pennington <hp@redhat.com>
2234 * dbus/dbus-threads.c (init_global_locks): forgot to put the
2235 message cache lock here
2237 2004-11-26 Havoc Pennington <hp@redhat.com>
2239 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
2240 the "char byte_order" next to each other to save 4 bytes
2241 (dbus_message_new_empty_header): reduce preallocation, since the
2242 message cache should achieve a similar effect
2243 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
2244 message cache that keeps a few DBusMessage around in a pool,
2245 another 8% speedup or so.
2247 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
2249 2004-11-25 Havoc Pennington <hp@redhat.com>
2251 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
2252 to write, without reading or blocking, try it before the poll()
2253 and skip the poll() if nothing remains to write. This is about a
2254 3% speedup in the echo client/server
2256 2004-11-25 Havoc Pennington <hp@redhat.com>
2258 The primary change here is to always write() once before adding
2259 the write watch, which gives us about a 10% performance increase.
2261 * dbus/dbus-transport-unix.c: a number of modifications to cope
2262 with removing messages_pending
2263 (check_write_watch): properly handle
2264 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
2265 messages_pending stuff
2266 (check_read_watch): properly handle WAITING_FOR_MEMORY and
2268 (unix_handle_watch): after writing, see if the write watch can be
2270 (unix_do_iteration): assert that write_watch/read_watch are
2271 non-NULL rather than testing that they aren't, since they
2272 aren't allowed to be NULL. check_write_watch() at the end so
2273 we add the watch if we did not finish writing (e.g. got EAGAIN)
2275 * dbus/dbus-transport-protected.h: remove messages_pending call,
2276 since it resulted in too much inefficient watch adding/removing;
2277 instead we now require that the transport user does an iteration
2278 after queueing outgoing messages, and after trying the first
2279 write() we add a write watch if we got EAGAIN or exceeded our
2280 max bytes to write per iteration setting
2282 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
2285 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
2286 freed and then accessed, valgrind flagged this bug, fix it
2288 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
2289 as the last valid field plus 1, where really it is equal to the
2290 last valid field. Corrects some message corruption issues.
2292 * dbus/dbus-mainloop.c: verbosity changes
2294 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
2295 instead of aborting in one of the test codepaths
2297 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
2298 caused not printing the pid ever again if a verbose was missing
2299 the newline at the end
2300 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
2302 * dbus/dbus-connection.c: verbosity changes;
2303 (dbus_connection_has_messages_to_send): new function
2304 (_dbus_connection_message_sent): no longer call transport->messages_pending
2305 (_dbus_connection_send_preallocated_unlocked): do one iteration to
2306 try to write() immediately, so we can avoid the write watch. This
2307 is the core purpose of this patchset
2308 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
2309 dump the outgoing message queue, so nobody will get confused
2310 trying to send them or thinking stuff is pending to be sent
2312 * bus/test.c: verbosity changes
2314 * bus/driver.c: verbosity/assertion changes
2316 * bus/dispatch.c: a bunch of little tweaks to get it working again
2317 because this patchset changes when/where you need to block.
2319 2004-11-23 Havoc Pennington <hp@redhat.com>
2321 * test/glib/test-profile.c: modify to accept a plain_sockets
2322 argument in which case it will bench plain sockets instead of
2323 libdbus, for comparison purposes.
2325 2004-11-22 Havoc Pennington <hp@redhat.com>
2327 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
2328 threads for more time, so sysprof can get a grip on it.
2330 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
2333 2004-11-13 Havoc Pennington <hp@redhat.com>
2335 * test/glib/test-profile.c: fix this thing up a bit
2337 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
2338 preallocation sizes by a fair bit; not sure if this will be an
2339 overall performance win or not, but it does reduce reallocs.
2341 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
2342 the test hack that forced constant realloc if asserts are
2343 disabled, so we can profile sanely. Sprinkle in some
2344 _DBUS_UNLIKELY() which are probably pointless, but before I
2345 noticed the real performance problem I put them in.
2346 (_dbus_string_validate_utf8): micro-optimize this thing a little
2347 bit, though callgrind says it didn't help; then special-case
2348 ascii, which did help a lot; then be sure we detect nul bytes as
2349 invalid, which is a bugfix.
2350 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
2351 superstition; use memset to nul the padding instead of a manual
2353 (_dbus_string_get_length): inline this as a
2354 macro; it showed up in the profile because it's used for loop
2357 2004-11-10 Colin Walters <walters@verbum.org>
2359 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
2362 2004-11-09 Colin Walters <walters@verbum.org>
2364 * dbus/dbus-string.c (_dbus_string_get_length): New
2365 function, writes DBusString to C buffer.
2367 * dbus/dbus-string.h: Prototype it.
2369 * dbus/dbus-message.c (dbus_message_type_to_string): New
2370 function, converts message type into C string.
2372 * dbus/dbus-message.h: Prototype it.
2374 * bus/selinux.c (bus_selinux_check): Take source pid,
2375 target pid, and audit data. Pass audit data to
2377 (log_audit_callback): New function, appends extra
2379 (bus_selinux_allows_acquire_service): Also take
2380 service name, add it to audit data.
2381 (bus_selinux_allows_send): Also take message
2382 type, interface, method member, error name,
2383 and destination, and add them to audit data.
2384 (log_cb): Initialize func_audit.
2386 * bus/selinux.h (bus_selinux_allows_acquire_service)
2387 (bus_selinux_allows_send): Update prototypes
2389 * bus/services.c (bus_registry_acquire_service): Pass
2390 service name to bus_selinux_allows_acquire_service.
2392 * bus/bus.c (bus_context_check_security_policy): Pass
2393 additional audit data. Move assignment of dest
2396 2004-11-07 Colin Walters <walters@verbum.org>
2398 * dbus/dbus-transport-unix.c (do_authentication): Always
2399 initialize auth_completed.
2401 2004-11-07 Colin Walters <walters@verbum.org>
2403 * bus/bus.c (load_config): Break into three
2404 separate functions: process_config_first_time_only,
2405 process_config_every_time, and process_config_postinit.
2406 (process_config_every_time): Move call of
2407 bus_registry_set_service_context_table into
2408 process_config_postinit.
2409 (process_config_postinit): New function, does
2410 any processing that needs to happen late
2411 in initialization (and also on reload).
2412 (bus_context_new): Instead of calling load_config,
2413 open config parser here and call process_config_first_time_only
2414 and process_config_every_time directly. Later, after
2415 we have forked but before changing UID,
2416 invoke bus_selinux_full_init, and then call
2417 process_config_postinit.
2418 (bus_context_reload_config): As in bus_context_new,
2419 load parse file inside here, and call process_config_every_time
2420 and process_config_postinit.
2422 * bus/services.h, bus/services.c
2423 (bus_registry_set_service_context_table): Rename
2424 from bus_registry_set_sid_table. Take string hash from config
2425 parser, and convert them here into SIDs.
2427 * bus/config-parser.c (struct BusConfigParser): Have
2428 config parser only store a mapping of service->context
2430 (merge_service_context_hash): New function.
2431 (merge_included): Merge context string hashes instead
2432 of using bus_selinux_id_table_union.
2433 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
2434 simply create a new string hash.
2435 (bus_config_parser_unref): Unref it.
2436 (start_selinux_child): Simply insert strings into hash,
2437 don't call bus_selinux_id_table_copy_over.
2439 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
2440 (bus_selinux_id_table_copy_over): Delete.
2442 2004-11-03 Colin Walters <walters@verbum.org>
2444 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
2447 2004-11-03 Colin Walters <walters@verbum.org>
2449 * bus/test-main.c (test_pre_hook): Fix test logic,
2450 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
2452 2004-11-02 Colin Walters <walters@redhat.com>
2454 * bus/selinux.c (bus_selinux_init): Split into two functions,
2455 bus_selinux_pre_init and bus_selinux_post_init.
2456 (bus_selinux_pre_init): Just determine whether SELinux is
2458 (bus_selinux_post_init): Do everything else.
2460 * bus/main.c (main): Call bus_selinux_pre_init before parsing
2461 config file, and bus_selinux_post_init after. This ensures that
2462 we don't lose the policyreload notification thread that
2463 bus_selinux_init created before forking previously.
2465 * bus/test-main.c (test_pre_hook): Update for split.
2467 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
2469 Patch from Johan Fischer <linux@fischaz.com>
2471 * mono/doc/Makefile.am (install-data-local): Added directory
2474 2004-10-29 Colin Walters <walters@redhat.com>
2476 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
2477 parameter for fd to write pid to.
2479 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
2481 * bus/bus.c (bus_context_new): Pass print_pid_fd
2482 to _dbus_become_daemon (bug #1720)
2484 2004-10-29 Colin Walters <walters@redhat.com>
2486 Patch from Ed Catmur <ed@catmur.co.uk>
2488 * mono/doc/Makefile.am (install-data-local): Handle
2491 2004-10-29 Colin Walters <walters@redhat.com>
2493 * bus/.cvsignore, qt/.cvsignore: Update.
2495 2004-10-29 Colin Walters <walters@redhat.com>
2497 Patch from Kristof Vansant <de_lupus@pandora.be>
2499 * configure.in: Detect Slackware.
2500 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
2501 * bus/rc.messagebus.in: New file.
2503 2004-10-29 Colin Walters <walters@redhat.com>
2505 * tools/dbus-monitor.c (filter_func): Return
2506 DBUS_HANDLER_RESULT_HANDLED in filter function
2508 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
2510 2004-10-29 Colin Walters <walters@redhat.com>
2512 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
2514 * bus/services.c (bus_registry_acquire_service):
2515 Correctly retrieve service name from DBusString
2518 2004-10-29 Colin Walters <walters@redhat.com>
2520 * dbus/dbus-glib.h: Update documentation to not
2521 refer to internal APIs.
2523 2004-10-27 Joe Shaw <joeshaw@novell.com>
2525 * mono/Arguments.cs (GetDBusTypeConstructor):
2526 type.UnderlyingSystemType will return "System.Byte" if you do it
2527 on "byte[]", which is not what we want. So check the type.IsArray
2528 property and use System.Array instead.
2530 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
2532 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
2533 the DBusUserInfo structure since this is passed into the function.
2534 This would cause a double free when the function that allocated
2535 the structure would try to free it when an error occured.
2537 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
2538 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
2539 for service activation to avoid 32bit/64bit parallel install issues
2541 2004-10-21 Colin Walters <walters@verbum.org>
2543 * AUTHORS: Fix my email address, the @gnu.org one
2544 has been bouncing for some time. Also add J5.
2546 2004-10-21 Colin Walters <walters@verbum.org>
2548 * dbus/dbus-transport-unix.c (do_authentication): Return
2549 authentication status to callers.
2550 (unix_handle_watch): If we completed authentication this round,
2551 don't do another read. Instead wait until the next iteration,
2552 after we've read any pending data in the auth buffer.
2553 (unix_do_iteration): Ditto.
2554 (unix_handle_watch): Updated for new do_authentication prototype.
2556 2004-10-18 Colin Walters <walters@verbum.org>
2558 * bus/selinux.c (bus_selinux_enabled): Handle
2559 --disable-selinux case.
2561 2004-10-18 Colin Walters <walters@verbum.org>
2563 * bus/selinux.h: Add bus_selinux_enabled.
2565 * bus/selinux.c (bus_selinux_enabled): Implement it.
2567 * bus/config-parser.c (struct include): Add
2568 if_selinux_enabled member.
2569 (start_busconfig_child): Parse if_selinux_enabled
2570 attribute for include.
2571 (bus_config_parser_content): Handle it.
2573 * bus/session.conf.in, bus/system.conf.in: Add
2574 inclusion of context mapping to default config files;
2575 conditional on SELinux being enabled.
2577 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
2579 * test/data/invalid-config-files/badselinux-1.conf,
2580 test/data/invalid-config-files/badselinux-2.conf:
2581 Test files for bad syntax.
2583 2004-10-17 Colin Walters <walters@verbum.org>
2585 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
2586 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
2587 format specifier mismatches.
2589 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
2591 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
2594 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
2595 pointer (bug #1540, Leonardo Boiko).
2597 2004-09-28 Jon Trowbridge <trow@ximian.com>
2599 * mono/BusDriver.cs: Changed BusDriver struct to remove
2600 the ServiceCreated and ServiceDeleted events and replace them
2601 with the new ServiceOwnerChanged event.
2603 * mono/example/BusListener.cs: Added a new example program,
2604 which listens for and reports any ServiceOwnerChanged events
2607 * mono/example/Makefile.am (DESTDIR): Build changes for the
2608 new BusListener.cs example.
2610 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
2612 * bus/signals.c (bus_match_rule_parse): validate the components of
2613 match rules (bug #1439).
2615 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
2617 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
2619 * doc/dbus-specification.xml: document ServiceOwnerChanged
2622 * bus/driver.c, bus/driver.h, bus/services.c: Use
2623 ServiceOwnerChanged signal instead of ServiceCreated and
2626 * bus/dispatch.c: update testcase for the new signal.
2628 2004-09-20 Jon Trowbridge <trow@ximian.com>
2630 Patch from Nat Friedman <nat@novell.com>
2632 * mono/Makefile.am: A number of small build fixes to allow "make
2633 distcheck" to succeed.
2635 * mono/example/Makefile.am: "make distcheck" fixes.
2637 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
2640 * test/Makefile.am: "make distcheck" fixes.
2642 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
2644 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
2646 * doc/busconfig.dtd: update the DTD for the at_console attribute.
2648 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
2649 messages after the first one (bug #1389).
2651 * bus/dispatch.c (check_double_hello_message): add a test case for
2652 the double hello message bug.
2653 (check_existent_service_activation): fix check of spawning error.
2655 2004-09-16 David Zeuthen <david@fubar.dk>
2657 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
2659 2004-09-12 David Zeuthen <david@fubar.dk>
2661 Patch from Kay Sievers <kay.sievers@vrfy.org>
2663 * bus/bus.c (bus_context_new):
2665 * bus/main.c (usage)
2667 Add commandline option --nofork to override configuration file
2670 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
2672 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
2673 compilers don't like it (bug #974).
2675 2004-09-04 Harald Fernengel <harry@kdevelop.org>
2677 * qt/connection.*: Applied patch by Jérôme Lodewyck
2678 <lodewyck@clipper.ens.fr> to integrate an existing
2679 connection into the Qt eventloop
2681 2004-08-30 Jon Trowbridge <trow@ximian.com>
2683 * mono/BusDriver.cs: Added. This is a class for interacting with
2684 the org.freedesktop.DBus service.
2686 * mono/Message.cs: Added a mechanism to expose the message that is
2687 currently being dispatched via the static Message.Current
2688 property. Added Message.Sender and Message.Destination
2691 * mono/Handler.cs: Expose the dispatched message via
2692 Message.Current when handling method calls.
2694 * mono/Service.cs: Expose the dispatched message via
2695 Message.Current when handling signal emissions.
2697 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
2698 Connection.BaseService property.
2700 2004-08-28 Havoc Pennington <hp@redhat.com>
2702 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
2704 More fixes from Steve Grubb
2706 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
2707 (_dbus_listen_tcp_socket): fix fd leak
2709 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
2710 EINTR to a bit lower in the code
2712 2004-08-26 Jon Trowbridge <trow@ximian.com>
2714 * bus/driver.c (bus_driver_handle_service_exists): Respond with
2715 TRUE if we are inquiring about the existence of the built-in
2716 org.freedesktop.DBus service.
2718 2004-08-25 John Palmieri <johnp@redhat.com>
2719 * bus/config-parser.c:
2720 (struct PolicyType): Add POLICY_CONSOLE
2721 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
2722 (start_busconfig_child): Sets up console element when
2723 <policy at_console=""> is encountered in a policy file
2724 (append_rule_from_element): Convert console elements to console
2728 (bus_policy_create_client_policy): Add console rules to the client
2729 policy based on if the client is at the console
2730 (bus_policy_append_console_rule): New function for adding a
2731 console rule to a policy
2732 (bus_policy_merge): Handle console rule merging
2734 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
2735 where we check for console user files
2737 * dbus/dbus-sysdeps.c:
2738 (_dbus_file_exists): New function which checks if the given
2740 (_dbus_user_at_console): New function which does the system
2741 specific process of checking if the user is at the console
2743 * dbus/dbus-userdb.c:
2744 (_dbus_is_console_user): New function converts a UID to user name
2745 and then calls the system specific _dbus_user_at_console to
2746 see if the user is at the console and therefor a console user
2748 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
2750 * bus/config-parser.c (set_limit):
2751 * bus/dbus-daemon-1.1.in:
2752 * test/data/valid-config-files/many-rules.conf: set the
2753 max_match_rules_per_connection limt from the config file.
2755 * doc/busconfig.dtd: update the DTD.
2757 * bus/driver.c: remove some unused variables.
2759 2004-08-24 Mikael Hallendal <micke@imendio.com>
2761 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
2762 it's been replaced by dbus_g_bus_get
2764 2004-08-23 Colin Walters <walters@redhat.com>
2766 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2768 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
2770 * bus/selinux.c: Create a thread for policy reload notification.
2771 (bus_selinux_get_policy_root): Implement.
2773 * bus/config-parser.c (start_busconfig_child)
2774 (bus_config_parser_content): Support SELinux-root relative
2777 * configure.in <HAVE_SELINUX>: Add -lpthread.
2779 * bus/test-main.c (test_pre_hook, test_post_hook): New.
2780 (test_post_hook): Move memory checking into here.
2781 (test_pre_hook, test_post_hook): Move SELinux checks in
2782 here, but conditional on a DBUS_TEST_SELINUX environment
2783 variable. Unfortunately we can't run the SELinux checks
2784 as a normal user, since they won't have any permissions
2785 for /selinux. So this will have to be tested manually
2786 for now, until we have virtualization for most of
2789 2004-08-23 Havoc Pennington <hp@redhat.com>
2791 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
2792 drop supplementary groups, suggested by Steve Grubb
2794 2004-08-20 Colin Walters <walters@redhat.com>
2796 * bus/config-parser.c (start_busconfig_child): Remove some unused
2799 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
2802 2004-08-17 Joe Shaw <joeshaw@novell.com>
2804 * configure.in: If --enable-mono is passed in, if we can't find
2807 * mono/Makefile.am: Use /gacutil to install assemblies into the
2810 2004-08-12 Havoc Pennington <hp@redhat.com>
2812 * NEWS: update for 0.22
2814 * configure.in: release 0.22
2816 2004-08-11 Colin Walters <walters@redhat.com>
2818 * tools/dbus-send.c (main, usage): Add --reply-timeout
2821 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
2823 * bus/bus.c (process_config_first_time_only): get rid of an unused
2824 DBusError that was causing a memoy leak (bug #989).
2826 * dbus/dbus-keyring.c, dbus/dbus-message.c:
2827 fix compilation on Solaris/Forte C (bug #974)
2829 * bus/main.c (main): plug two minuscule memleaks.
2831 2004-08-10 Havoc Pennington <hp@redhat.com>
2833 * doc/dbus-tutorial.xml: add some more info on GLib bindings
2835 2004-08-09 Havoc Pennington <hp@redhat.com>
2837 * COPYING: switch to Academic Free License version 2.1 instead of
2838 2.0, to resolve complaints about patent termination clause.
2840 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
2842 * README: added documentation for the --enable-python
2845 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
2847 * bus/config-parser.c (bus_config_parser_new): fix an invalid
2848 _unref in the SELinux support.
2850 * doc/busconfig.dtd: update DTD for SELinux support.
2852 * bus/config-loader-libxml.c: fix error handler and parser
2853 initialisation/cleanup. OOM test now works with libxml2 HEAD.
2855 * configure.in: remove the warning about libxml2.
2857 * dbus/dbus-bus.c: silence doxygen warning.
2859 2004-07-31 Colin Walters <walters@redhat.com>
2861 * configure.in: Move #error in SELinux check to its own line.
2863 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
2865 * dbus/dbus-internals.h (_DBUS_SET_OOM):
2866 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
2869 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
2870 broken by the change in the _SET_OOM macros.
2872 2004-07-31 Colin Walters <walters@redhat.com>
2874 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
2877 2004-07-31 Colin Walters <walters@redhat.com>
2879 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
2880 to correctly detect DBUS__ACQUIRE_SVC. Also add an
2883 2004-07-24 Havoc Pennington <hp@redhat.com>
2885 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2887 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
2890 * configure.in: add --enable-selinux
2892 * bus/policy.c (bus_policy_merge): add FIXME to a comment
2894 * bus/main.c (main): initialize and shut down selinux
2896 * bus/connection.c: store SELinux ID on each connection, to avoid
2897 repeated getting of the string context and converting it into
2900 * bus/bus.c (bus_context_get_policy): new accessor, though it
2902 (bus_context_check_security_policy): check whether the security
2903 context of sender connection can send to the security context of
2904 recipient connection
2906 * bus/config-parser.c: add parsing for <selinux> and <associate>
2908 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
2909 implement dbus_connection_get_unix_fd()
2911 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
2912 function, used by the selinux stuff
2914 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
2916 * bus/config-loader-libxml.c: complete the implementation of
2917 libxml backend for config file loader. Doesn't work with full OOM
2920 * configure.in: change error when selecting libxml into a warning.
2922 * test/data/invalid-config-files: add two non-well-formed XML
2925 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
2927 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
2928 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
2929 be necessary to read all the buffer. (bug #894)
2931 * bus/activation.c (bus_activation_activate_service): fix a
2932 potential assertion failure (bug #896). Small optimization in the
2933 case of auto-activation messages.
2935 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
2936 add test case for byte-through-vararg bug (#901). patch by Kimmo
2939 2004-07-28 Anders Carlsson <andersca@gnome.org>
2942 * python/dbus_bindings.pyx.in:
2943 Add dbus.init_gthreads (), allow emit_signal to pass
2944 arguments to the signal.
2946 2004-07-24 Havoc Pennington <hp@redhat.com>
2948 * AUTHORS: add some people, not really comprehensively, let me
2949 know if I missed you
2951 2004-07-24 Havoc Pennington <hp@redhat.com>
2953 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
2956 * test/Makefile.am (DIST_SUBDIRS): here also
2958 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2960 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
2961 breaking build on Solaris, reported by Farhad Saberi on the ML.
2963 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
2964 va_arg invocation to account for integer promotion in the case of
2965 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
2967 * bus/services.c (bus_service_remove_owner): fix bug #902, use
2968 _dbus_list_get_first_link, not _dbus_list_get_first.
2970 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
2972 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
2973 handler functions so that the asserts in _dbus_object_subtree_unref
2976 * dbus/dbus-transport-unix.c (do_reading):
2977 _dbus_transport_queue_messages return value is of type
2978 dbus_bool_t, not DBusDispatchStatus.
2980 2004-07-19 David Zeuthen <david@fubar.dk>
2982 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
2985 (check_get_connection_unix_user): Debug says GetProperty; but the
2986 method is called GetConnectionUnixUser
2987 (check_get_connection_unix_process_id): New function
2988 (bus_dispatch_test): Actually call check_get_connection_unix_user();
2989 also call check_get_connection_unix_process_id()
2992 (bus_driver_handle_get_connection_unix_process_id): New function,
2993 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
2997 (handle_server_data_external_mech): Set pid from the credentials
2998 obtained from the socket
3000 * dbus/dbus-connection.c:
3001 (dbus_connection_get_unix_process_id): New function
3003 * dbus/dbus-connection.h:
3004 Add prototype for dbus_connection_get_unix_process_id
3006 * dbus/dbus-transport.c:
3007 (_dbus_transport_get_unix_process_id): New function
3009 * dbus/dbus-transport.h:
3010 Add prototype for _dbus_transport_get_unix_process_id
3012 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
3014 * dbus/dbus-message.c: Message counter fix, patch by Christian
3015 Hammond <chipx86@gnupdate.org>
3017 2004-07-18 Seth Nickell <seth@gnome.org>
3020 * python/dbus_bindings.pyx.in:
3021 * python/tests/test-client.py:
3023 Add dbus.ByteArray and dbus_bindings.ByteArray
3024 types so that byte streams can be passed back.
3026 Give jdahlin the heaps of credit that are so
3029 2004-07-12 Seth Nickell <seth@gnome.org>
3033 Add message argument to the default object_method_handler
3036 * python/dbus_bindings.pyx.in:
3038 Automatically return NIL when passed an empty list
3039 (we can't pass back a list since lists are typed
3040 and we don't have any idea what type the the client
3041 intended the list to be... :-( )
3043 2004-07-10 Seth Nickell <seth@gnome.org>
3045 * python/examples/Makefile.am:
3047 Fix distcheck breakage caused by new examples.
3049 2004-07-10 Seth Nickell <seth@gnome.org>
3053 Add "message" argument to service-side dbus.Object
3054 methods. This will break existing services written
3055 using the python bindings, but will allow extraction
3056 of all the message information (e.g. who its from).
3058 Add improved "object oriented" signal handling/emission.
3060 * python/examples/example-service.py:
3064 * python/examples/example-signal-emitter.py:
3065 * python/examples/example-signal-recipient.py:
3067 Two new examples that show how to emit and receive
3068 signals using the new APIs.
3070 * python/examples/example-signals.py:
3071 * python/examples/gconf-proxy-service.py:
3072 * python/examples/gconf-proxy-service2.py:
3074 Add "message" argument to service methods.
3076 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
3078 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
3079 * dbus/bus.c (dbus_bus_get_unix_user)
3080 * doc/dbus-specification.xml: implement GetConnectionUnixUser
3081 method of org.freedesktop.DBus interface.
3083 * bus/dispatch.c: test case
3085 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
3087 * python/Makefile.am: switched include directory from glib/ to dbus/
3088 since dbus-glib.h moved
3090 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
3092 * configure.in: prevent building the gcj stuff and libxml loader
3093 since they are broken.
3095 2004-06-20 Havoc Pennington <hp@redhat.com>
3097 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
3098 codes from the dbus error names
3100 * glib/dbus-glib.h: move to subdir dbus/ since it's included
3101 as dbus/dbus-glib.h and that breakage is now visible due to
3102 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
3104 * glib/dbus-glib.h: s/gproxy/g_proxy/
3106 * dbus/dbus-shared.h: new header to hold stuff shared with
3109 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
3112 * glib/dbus-glib.h (dbus_set_g_error): move to
3113 dbus-glib-lowlevel.h
3115 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
3116 of stuff to enable this
3118 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
3120 * a bunch of other changes with the same basic "separate glib
3121 bindings from dbus.h" theme
3123 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
3125 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
3127 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
3129 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
3131 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
3132 the reply value of the ServiceExists message.
3134 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
3136 * python/dbus_bindings.pyx.in: No longer need to parse path
3137 elements and pass them as arrays of strings. The C API now
3138 accepts plain path strings.
3139 (_build_parsed_path): removed
3141 2004-06-07 Havoc Pennington <hp@redhat.com>
3143 * doc/TODO: remove auto-activation item since it's done; sort
3144 items by importance/milestone
3146 2004-06-07 Havoc Pennington <hp@redhat.com>
3148 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
3149 random signature when using REQUIRED_FIELDS (this hack won't work
3152 * dbus/dbus-message.c: change the signature to be a header field,
3153 instead of message->signature special-case string. Incremental
3154 step forward. Then we can fix up code to send the signature in the
3155 message, then fix up code to validate said signature, then fix up
3156 code to not put the typecodes inline, etc.
3157 (load_one_message): don't make up the signature after the fact
3158 (decode_header_data): require signature field for the known
3161 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
3163 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
3165 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
3167 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
3169 * mono/Handler.cs: Updated to follow new path argument for
3170 (un-)registering objects.
3172 * mono/example/Makefile.am:
3174 * configure.in: Bumped required version for mono and use new -pkg
3177 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
3179 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
3180 registration functions take the path argument as char* instead of
3183 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
3184 split off the path decompostion part of
3185 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
3188 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
3190 2004-06-02 Kristian Høgsberg <krh@redhat.com>
3192 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
3193 machine approach. A state is implemented as a function that
3194 handles incoming events as specified for that state.
3196 * doc/dbus-specification.xml: Update auth protocol state machine
3197 specification to match implementation. Remove some leftover
3200 2004-06-02 Kristian Høgsberg <krh@redhat.com>
3202 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
3203 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
3206 * Doxyfile.in: remove deprecated options.
3208 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
3209 glib/test-thread.h, glib/test-thread-client.c,
3210 glib/test-thread-server.c, glib/test-profile.c,
3211 glib/test-dbus-glib.c: remove these unused files.
3213 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
3215 * dbus/dbus-object-tree.c
3216 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
3217 non-fallback handlers (bug #684).
3218 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
3219 (find_subtree_recurse): report wether the returned subtree is an
3220 exact match or a "fallback" match higher up in the tree.
3221 (object_tree_test_iteration): update test case.
3223 2004-06-01 Seth Nickell <seth@gnome.org>
3225 * python/dbus_bindings.pyx.in:
3226 * python/tests/test-client.py:
3228 Round off basic type support. Add dicts (yay!), and
3229 remaining array types.
3231 Make MessageIter more general so it works for dicts too.
3233 Mark all loop variables as C integers.
3235 2004-05-31 Havoc Pennington <hp@redhat.com>
3237 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
3240 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
3242 * glib/dbus-glib-tool.c (main): set up to have a --self-test
3243 option that runs the tests, and start filling in some code
3244 including for starters just dumping the interfaces to stdout
3246 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
3248 * test/data/valid-introspection-files/lots-of-types.xml: test of
3249 an example introspection file
3251 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
3254 2004-05-31 Seth Nickell <seth@gnome.org>
3256 * python/dbus_bindings.pyx.in:
3257 * python/tests/test-client.py:
3262 Fix string array memory trashing bug... oops...
3264 2004-05-30 Seth Nickell <seth@gnome.org>
3268 Add a nicer-but-less-flexible alternate API for handling
3269 calls to virtual objects in dbus.ObjectTree.
3271 Screw up the argument order to the dbus.Object constructor
3272 for consistency with dbus.ObjectTree (and to make dbus_methods
3273 optional for future extension)
3275 * python/examples/Makefile.am:
3276 * python/examples/gconf-proxy-service.py:
3277 * python/examples/gconf-proxy-service2.py:
3279 Alternate implementation of gconf-proxy-service using the
3280 nicer dbus.ObjectTree API.
3282 * python/examples/example-service.py:
3283 * python/tests/test-server.py
3285 Reverse the argument order to deal with dbus.Object constructor
3288 2004-05-30 Seth Nickell <seth@gnome.org>
3290 * python/examples/example-client.py:
3291 * python/examples/example-service.py:
3293 Take it back. Lists seem to work but they're broken
3294 in the test suite. Make the base examples use
3297 2004-05-30 Seth Nickell <seth@gnome.org>
3299 * python/dbus_bindings.pyx.in:
3300 * python/tests/test-client.py:
3302 Add some more tests and fix errors that crop up.
3303 Unfortunately, currently it seems like marshalling
3304 and unmarshalling of lists is completely broken :-(
3306 2004-05-30 Seth Nickell <seth@gnome.org>
3308 * python/dbus_bindings.pyx.in:
3310 Add support for ObjectPath type.
3314 Refactor message handling code to a common function.
3316 * python/tests/test-client.py:
3317 * python/tests/test-server.py:
3319 Add tests that check to make sure values of all types
3320 can be echoed from a service w/o mangling.
3322 2004-05-29 Seth Nickell <seth@gnome.org>
3326 Add ObjectTree class which allows implementation
3327 of trees of "virtual" objects. Basically the python
3328 wrapper for "register_fallback".
3330 * python/examples/Makefile.am
3331 * python/examples/gconf-proxy-client.py:
3332 * python/examples/gconf-proxy-service.py:
3334 Implement a simple GConf proxy service that supports
3335 get/set on string and int GConf keys using the ObjectTree.
3337 2004-05-29 Seth Nickell <seth@gnome.org>
3340 * python/examples/example-client.py:
3341 * python/examples/example-service.py:
3342 * python/examples/list-system-services.py:
3344 Add SessionBus, SystemBus and ActivationBus classes
3345 so you don't need to know the special little BUS_TYPE
3348 2004-05-29 Havoc Pennington <hp@redhat.com>
3350 * bus/config-parser.c (process_test_valid_subdir): temporarily
3351 stop testing config parser OOM handling, since expat has issues
3352 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
3354 * bus/dbus-daemon-1.1.in: change requested_reply to
3355 send_requested_reply/receive_requested_reply so we can send the
3356 replies, not just receive them.
3358 * bus/config-parser.c: parse the new
3359 send_requested_reply/receive_requested_reply
3361 * bus/policy.c (bus_client_policy_check_can_send): add
3362 requested_reply argument and use it
3364 * bus/bus.c (bus_context_check_security_policy): pass through
3365 requested_reply status to message send check
3367 * bus/system.conf.in: adapt to requested_reply change
3369 2004-05-28 Havoc Pennington <hp@redhat.com>
3371 * test/glib/test-service-glib.c (main): remove unused variable
3373 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
3375 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
3376 from the enum, no longer in use.
3378 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
3381 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
3382 whether error_name passed in is a valid error name.
3384 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
3386 * dbus/dbus-message.c (dbus_message_get_args): Added support for
3387 OBJECT_PATH and OBJECT_PATH_ARRAY
3389 2004-05-28 Seth Nickell <seth@gnome.org>
3391 * python/examples/Makefile.am:
3393 Forget to add Makefile.am. Do not pass go.
3395 2004-05-28 Michael Meeks <michael@ximian.com>
3397 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
3400 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
3402 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
3403 (_dbus_message_iter_get_basic_type_array): impl.
3404 drastically simplify ~all relevant _get methods to use these.
3405 (_dbus_message_iter_append_basic_array),
3406 (dbus_message_iter_append_basic): impl
3407 drastically simplify ~all relevant _append methods to use these.
3409 * dbus/dbus-message-builder.c (parse_basic_type)
3410 (parse_basic_array, lookup_basic_type): impl.
3411 (_dbus_message_data_load): prune scads of duplicate /
3414 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
3415 (_dbus_demarshal_basic_type): implement,
3416 (demarshal_and_validate_len/arg): beef up debug.
3417 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
3419 2004-05-27 Seth Nickell <seth@gnome.org>
3422 * python/Makefile.am:
3424 Include the example python apps in the tarball.
3426 * python/examples/list-system-services.py
3428 Add a python new example that fetches the list of services
3429 from the system bus.
3431 2004-05-27 Seth Nickell <seth@gnome.org>
3434 * python/dbus_bindings.pyx.in:
3436 Fix failure to notify that a signal was not handled,
3437 resulted in hung functions.
3439 2004-05-25 Colin Walters <walters@redhat.com>
3441 * tools/dbus-monitor.c (main): Monitor all types of messages.
3443 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
3445 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
3446 which unregisters the object path and disposes the handler.
3448 2004-05-23 Kristian Høgsberg <krh@redhat.com>
3450 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
3452 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
3453 operands to && so we call dbus_message_iter_next () for the last
3456 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3458 * dbus/dbus-object-tree.c
3459 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
3460 children even if the requested path isn't registered.
3461 (object_tree_test_iteration): test object_tree_list_registered.
3463 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
3466 2004-05-20 Kristian Høgsberg <krh@redhat.com>
3468 * doc/TODO: Remove resolved items.
3470 * bus/expirelist.h (struct BusExpireList): remove unused n_items
3473 * bus/connection.c (bus_connections_expect_reply): Enforce the
3474 per-connection limit on pending replies.
3476 Patch from Jon Trowbridge <trow@ximian.com>:
3478 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
3479 up a watch that triggers a config reload when one end of the pipe
3481 (signal_handler): Instead of doing the config reload in our SIGHUP
3482 handler, just write to the reload pipe and let the associated
3483 watch handle the reload when control returns to the main loop.
3485 * bus/driver.c (bus_driver_handle_reload_config): Added.
3486 Implements a ReloadConfig method for requesting a configuration
3487 file reload via the bus driver.
3489 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
3491 * HACKING: Updated release instructions concerning the wiki page.
3493 2004-05-18 Kristian Høgsberg <krh@redhat.com>
3495 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
3496 filter against auth->allowed_mechs; we only add allowed mechs in
3497 record_mechanisms().
3499 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
3500 ALLOWED_MECHS to auth-script format so we can set the list of
3503 * data/auth/client-out-of-mechanisms.auth-script: New test to
3504 check client disconnects when it is out of mechanisms to try.
3506 * dbus/dbus-auth.c (process_command): Remove check for lines
3507 longer that 1 MB; we only buffer up maximum 16 kB.
3509 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3510 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
3511 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
3512 assume there might be unused bytes.
3514 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
3515 client-out-of-mechs, it is handled in process_reject(). Move check
3516 for max failures to send_rejected(), as it's a server-only thing.
3518 * dbus/dbus-auth.c: Factor out protocol reply code into functions
3519 send_auth(), send_data(), send_rejected(), send_error(),
3520 send_ok(), send_begin() and send_cancel().
3522 2004-05-17 Kristian Høgsberg <krh@redhat.com>
3524 Remove base64 encoding, replace with hex encoding. Original patch
3525 from trow@ximian.com, added error handling.
3527 * dbus/dbus-string.c (_dbus_string_base64_encode)
3528 (_dbus_string_base64_decode): Remove.
3529 (_dbus_string_hex_decode): Add end_return argument so we can
3530 distinguish between OOM and invalid hex encoding.
3531 (_dbus_string_test): Remove base64 tests and add test case for
3534 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
3535 Replace base64 with hex.
3537 * test/data/auth/invalid-hex-encoding.auth-script: New test case
3538 for invalid hex encoded data in auth protocol.
3540 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
3542 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
3545 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
3547 * mono/dbus-sharp.dll.config.in: Added for GAC
3548 * mono/dbus-sharp.snk: Added for GAC
3549 * mono/Assembly.cs.in: Added for GAC
3550 * mono/Makefile.am: Changes for GAC installation
3551 * configure.in: Added refs for dbus-sharp.dll.config.in and
3552 Assembly.cs.in. More fixes for mono testing
3553 * mono/example/Makefile.am: Changed var to CSC
3554 * Makefile.am: Changed flag name to DBUS_USE_CSC
3556 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
3558 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
3559 * mono/doc/*: Added documentation framework
3560 * configure.in: Added monodoc check
3561 * README: Added description of mono configure flags
3563 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
3565 * doc/dbus-specification.xml: Added a "Required" column to the
3566 header fields table and changed the "zero or more" verbage in
3567 the above paragraph to read "The header must contain the required
3568 named header fields and zero or more of the optional named header
3570 * test/data/invalid-messages/*.message: Added the required PATH
3571 named header field to the tests so that they don't fail on
3572 'Missing path field'
3574 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
3576 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
3577 the stack by implicitly defining variable and parameter types and
3578 removing the hack of defining C pointers as python objects and later
3581 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
3583 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
3585 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
3587 * mono/DBusType/Dict.cs: Handle empty dicts
3588 * mono/DBusType/Array.cs: Handle empty arrays
3589 * mono/Arguments.cs: Handle empty arguments
3591 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
3593 * dbus-sharp.pc.in: Modified to include include Libs and Requires
3596 2004-04-25 Kristian Høgsberg <krh@redhat.com>
3598 * test/data/valid-messages/standard-*.message: Update message
3599 test scripts to new header field names.
3601 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
3603 * test/break-loader.c (randomly_do_n_things): tracked down buffer
3604 overflow to times_we_did_each_thing array which would chop off the
3605 first character of the failure_dir string. Increased the size of
3606 the array to 7 to reflect the number of random mutation functions
3609 2004-04-21 Kristian Høgsberg <krh@redhat.com>
3611 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
3612 unix_server->watch here, it is unreffed in disconnect.
3613 (_dbus_server_new_for_tcp_socket): convert NULL host to
3614 "localhost" here so we don't append NULL to address.
3616 * dbus/dbus-server.c (_dbus_server_test): Add test case for
3617 various addresses, including tcp with no explicit host.
3619 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3621 * dbus/dbus-message.c (decode_header_data, decode_string_field):
3622 fix incorrect setting of .name_offset in the HeaderField (it was
3623 off by two bytes, positioned right after the name and typecode)
3625 * bus/bus.c (bus_context_new, bus_context_unref): test before
3626 calling dbus_server_free_data_slot and _dbus_user_database_unref
3627 in case of an error.
3629 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
3632 2004-04-19 Kristian Høgsberg <krh@redhat.com>
3634 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
3635 _dbus_poll() instead of select().
3637 2004-04-15 Jon Trowbridge <trow@ximian.com>
3639 * bus/main.c (signal_handler): Reload the configuration files
3641 (main): Set up our SIGHUP handler.
3643 * bus/bus.c (struct BusContext): Store the config file, user and
3644 fork flag in the BusContext.
3645 (process_config_first_time_only): Added. Contains the code
3646 (previously in bus_context_new) for setting up the BusContext from
3647 the BusConfigParser that should only be run the first time the
3648 config files are read.
3649 (process_config_every_time): Added. Contains the code (previously
3650 in bus_context_new) for setting up the BusContext from the
3651 BusConfigParser that should be run every time the config files are
3653 (load_config): Added. Builds a BusConfigParser from the config
3654 files and passes the resulting structure off to
3655 process_config_first_time_only (assuming this is the first time)
3656 and process_config_every_time.
3657 (bus_context_new): All of the config-related code has been moved
3658 to process_config_first_time_only and process_config_every_time.
3659 Now this function just does the non-config-related initializations
3660 and calls load_config.
3661 (bus_context_reload_config): Added.
3663 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
3665 * bus/driver.c (bus_driver_handle_get_service_owner):
3666 implement a GetServiceOwner method.
3667 * doc/dbus-specification.xml: document it.
3668 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
3670 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
3671 implement, using the bus GetServiceOwner method.
3673 * test/glib/test-dbus-glib.c:
3674 use dbus_gproxy_new_for_service_owner so that we can receive the
3677 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
3679 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
3680 dbus/dbus-message.c, dbus/dbus-protocol.h
3681 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
3683 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
3684 dbus/dbus-message.c, dbus/dbus-protocol.h
3685 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
3687 * dbus/dbus-internals.c (_dbus_header_field_to_string):
3688 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
3689 DBUS_HEADER_FIELD_SENDER resolves to "sender"
3691 * doc/dbus-specification.xml (Header Fields Table):
3692 s/SERVICE/DESTINATION
3693 s/SENDER_SERVICE/SENDER
3696 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
3698 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
3701 2004-04-13 Michael Meeks <michael@ximian.com>
3703 * glib/dbus-gobject.c (handle_introspect): split out
3704 (introspect_properties): this.
3705 (handle_introspect): implement this.
3707 * test/glib/Makefile.am: use the absolute path so the bus
3708 daemon's chdir ("/") doesn't kill us dead.
3710 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
3712 2004-04-12 Jon Trowbridge <trow@ximian.com>
3714 * bus/config-parser.c (struct BusConfigParser): Added
3715 included_files field.
3716 (seen_include): Added. Checks whether or not a file has already
3717 been included by any parent BusConfigParser.
3718 (bus_config_parser_new): Copy the parent's included_files.
3719 (include_file): Track which files have been included, and fail on
3720 circular inclusions.
3721 (process_test_valid_subdir): Changed printf to report if we are
3722 testing valid or invalid conf files.
3723 (all_are_equiv): Changed printf to be a bit clearer about
3724 what we are actually doing.
3725 (bus_config_parser_test): Test invalid configuration files.
3727 2004-04-09 Jon Trowbridge <trow@ximian.com>
3729 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
3730 argument. If non-null, the newly-constructed BusConfigParser will
3731 be initialized with the parent's BusLimits instead of the default
3733 (include_file): When including a config file, pass in
3734 the current parser as the parent and then copy the BusLimits
3735 from the included BusConfigParser pack to the current parser.
3736 (process_test_valid_subdir): Renamed from process_test_subdir.
3737 (process_test_equiv_subdir): Added. Walks through a directory,
3738 descending into each subdirectory and loading the config files
3739 it finds there. If any subdirectory contains two config files
3740 that don't produce identical BusConfigParser structs, fail.
3741 For now, the BusConfigParser's BusPolicies are not compared.
3742 (bus_config_parser_test): Call both process_test_valid_subdir and
3743 process_test_equiv_subdir.
3745 * bus/config-loader-libxml.c (bus_config_load): Take a parent
3746 argument and pass it along to the call to bus_config_parser_new.
3747 Also made a few small changes to allow this code to compile.
3749 * bus/config-loader-expat.c (bus_config_load): Take a parent
3750 argument and pass it along to the call to bus_config_parser_new.
3752 * bus/bus.c (bus_context_new): Load the config file
3753 with a NULL parent argument.
3755 2004-03-29 Michael Meeks <michael@ximian.com>
3757 * glib/dbus-gobject.c (introspect_properties): split
3758 out, fix mangled 'while' flow control.
3759 (introspect_signals): implement.
3760 (handle_introspect): update.
3762 2004-03-29 Michael Meeks <michael@ximian.com>
3764 * glib/dbus-gobject.c (set_object_property): split out /
3765 re-work, use the property type, and not the message type(!)
3766 (get_object_property): ditto.
3768 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
3769 (dbus_gvalue_marshal): make this code re-usable, needed
3770 for signals too, also on both proxy and server side.
3771 Re-write for more efficiency / readability.
3773 2004-03-29 Michael Meeks <michael@ximian.com>
3775 * dbus/dbus-message.c
3776 (dbus_message_new_error_printf): impl.
3778 * dbus/dbus-connection.c
3779 (dbus_connection_unregister_object_path): fix warning.
3781 * configure.in: fix no-mono-installed situation.
3783 2004-03-27 Havoc Pennington <hp@redhat.com>
3785 Patch from Timo Teräs:
3787 * tools/dbus-send.c (main): if --print-reply, assume type is
3788 method call; support boolean type args
3790 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
3791 bunch of memleak and logic bugs
3793 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
3795 * mono/Arguments.cs:
3796 * mono/Introspector.cs:
3798 * mono/InterfaceProxy.cs:
3800 * mono/ProxyBuilder.cs:
3802 Added InterfaceProxy class to avoid building proxies for every
3806 * dbus-message.c (dbus_message_append_args_valist)
3807 (dbus_message_iter_get_object_path)
3808 (dbus_message_iter_get_object_path_array)
3809 (dbus_message_iter_append_object_path)
3810 (dbus_message_iter_append_object_path_array):
3811 Added object_path iter functions to handle OBJECT_PATH arguments
3813 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
3815 First checkin of mono bindings.
3818 Build stuff for the bindings
3819 * dbus-sharp.pc.in: Added for pkgconfig
3821 2004-03-21 Havoc Pennington <hp@redhat.com>
3823 * test/test-service.c (main): remove debug spew
3825 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3827 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
3830 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
3831 (dbus_message_iter_init_array_iterator)
3832 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
3833 indicate whether the iterator is empty
3835 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
3838 2004-03-19 Havoc Pennington <hp@redhat.com>
3840 * NEWS: 0.21 updates
3842 * configure.in: 0.21
3844 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
3846 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
3847 you don't need pyrex to make dist
3849 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
3852 2004-03-18 Richard Hult <richard@imendio.com>
3854 * dbus/dbus-message.c (dbus_message_get_auto_activation)
3855 (dbus_message_set_auto_activation): Add doxygen docs.
3857 2004-03-16 Richard Hult <richard@imendio.com>
3859 * bus/activation.c: (bus_activation_service_created),
3860 (bus_activation_send_pending_auto_activation_messages),
3861 (bus_activation_activate_service):
3863 * bus/dispatch.c: (bus_dispatch),
3864 (check_nonexistent_service_auto_activation),
3865 (check_service_auto_activated),
3866 (check_segfault_service_auto_activation),
3867 (check_existent_service_auto_activation), (bus_dispatch_test):
3868 * bus/driver.c: (bus_driver_handle_activate_service):
3869 * bus/services.c: (bus_registry_acquire_service):
3870 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
3871 (dbus_message_get_auto_activation):
3872 * dbus/dbus-message.h:
3873 * dbus/dbus-protocol.h: Implement auto-activation.
3875 * doc/dbus-specification.xml: Add auto-activation to the spec.
3877 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
3879 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
3880 fix a bug with CUSTOM types.
3882 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
3883 a unit test for this bug (used to fail).
3885 2004-03-12 Mikael Hallendal <micke@imendio.com>
3888 (babysitter_watch_callback): notify all pending activations waiting for
3889 the same exec that the activation failed.
3890 (bus_activation_activate_service): shortcut the activation if we
3891 already waiting for the same executable to start up.
3893 2004-03-12 Mikael Hallendal <micke@imendio.com>
3896 - Added service file reloading.
3897 Each service files directory is kept in an hash table in
3898 BusActivation and each BusActivationEntry knows what .service-file it
3899 was read from. So when you try to activate a service the bus will
3900 check if it's been updated, removed or if new .service-files has
3902 - Test code at the bottom for the service file reloading.
3903 * bus/test-main.c: (main):
3905 - added service reloading test.
3906 * dbus/dbus-sysdeps.c:
3907 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
3909 2004-03-08 Michael Meeks <michael@ximian.com>
3911 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
3912 bail immediately if disconnected, to avoid busy loop.
3914 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
3915 cleanup cut/paste/inefficiency.
3917 2004-03-01 David Zeuthen <david@fubar.dk>
3919 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
3920 bug where args were used twice. This bug resulted in a segfault
3921 on a Debian/PPC system when starting the messagebus daemon. Include
3922 dbus-sysdeps.h for DBUS_VA_COPY
3924 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
3926 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
3927 appropriate va_copy implementation. From GLib
3929 2004-02-24 Joe Shaw <joe@ximian.com>
3931 * bus/services.c (bus_registry_acquire_service): We need to pass
3932 in the service name to dbus_set_error() to prevent a crash.
3934 2003-12-26 Anders Carlsson <andersca@gnome.org>
3936 * AUTHORS: Reveal my True identity.
3938 2003-12-17 Mikael Hallendal <micke@imendio.com>
3940 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3941 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
3943 2003-12-13 Mikael Hallendal <micke@imendio.com>
3945 * doc/TODO: Added not about better error check of configuration files.
3947 2003-12-02 Richard Hult <richard@imendio.com>
3949 * Update AFL version to 2.0 throughout the source files to reflect
3950 the update that was done a while ago.
3952 2003-12-02 Richard Hult <richard@imendio.com>
3954 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
3955 wrote_dict_key to FALSE on the iter that the dict is appended to,
3956 just like when appending other types. Fixes a bug where a dict
3957 couldn't be put inside a dict.
3958 (dbus_message_iter_append_dict_key): Fix typo in warning message.
3959 (message_iter_test, _dbus_message_test): Add test case for dict
3962 2003-12-01 David Zeuthen <david@fubar.dk>
3964 * python/dbus.py: Add the actual message when calling the reciever
3965 of a signal such that parameters can be inspected. Add the method
3966 remove_signal_receiver
3968 2003-11-26 Mikael Hallendal <micke@imendio.com>
3972 * glib/*.[ch]: Made ref functions return the pointer
3974 2003-11-25 Zack Rusin <zack@kde.org>
3976 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
3978 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
3981 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
3982 the Integrator and to better fit with the server,
3984 2003-11-24 Zack Rusin <zack@kde.org>
3986 * qt/connection.h, qt/connection.cpp: removing initDbus method since
3987 the integrator handles it now
3989 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
3990 since QTimer wasn't really meant to be used the way DBusTimeout is
3992 2003-11-24 Zack Rusin <zack@kde.org>
3994 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
3995 Integrator class which integrates D-BUS with the Qt event loop,
3997 * qt/connection.h, qt/connection.cpp: Move all the code which
3998 was dealing with D-BUS integration to the Integrator class,
3999 and start using Integrator,
4001 2003-11-23 Zack Rusin <zack@kde.org>
4003 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
4006 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
4007 switching namespaces to DBusQt, reworking the class,
4009 * Makefile.cvs: switching dependencies so that it matches KDE
4012 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
4015 2003-11-19 Havoc Pennington <hp@redhat.com>
4019 * configure.in: bump version to 0.20
4021 * configure.in (have_qt): add yet another place to look for qt
4022 (someone hand trolltech a .pc file...)
4024 2003-11-01 Havoc Pennington <hp@redhat.com>
4026 * doc/dbus-specification.xml: add state machine docs on the auth
4027 protocol; just a first draft, I'm sure it's wrong.
4029 2003-10-28 David Zeuthen <david@fubar.dk>
4031 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
4032 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
4034 2003-10-28 Havoc Pennington <hp@redhat.com>
4036 * dbus/dbus-message.c (get_next_field): delete unused function
4038 2003-10-28 Havoc Pennington <hp@redhat.com>
4040 * bus/expirelist.c (do_expiration_with_current_time): detect
4041 failure of the expire_func due to OOM
4043 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
4045 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
4046 NoReply error that's now created by the bus when the service exits
4048 2003-10-28 Havoc Pennington <hp@redhat.com>
4050 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
4051 tests for set_path, set_interface, set_member, etc.
4053 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
4055 * dbus/dbus-message.c (set_string_field): always just delete and
4056 re-append the field; accept NULL for deletion
4057 (re_align_fields_recurse): reimplement
4059 2003-10-26 Havoc Pennington <hp@redhat.com>
4061 * dbus/dbus-connection.c: fix docs to properly describe the
4062 disconnected message
4063 (_dbus_connection_notify_disconnected): remove this function;
4064 we can't synchronously add the disconnected message, we have to
4065 do it after we've queued any remaining real messages
4066 (_dbus_connection_get_dispatch_status_unlocked): queue the
4067 disconnect message only if the transport has finished queueing all
4068 its real messages and is disconnected.
4069 (dbus_connection_disconnect): update the dispatch status here
4071 2003-10-22 Havoc Pennington <hp@redhat.com>
4073 * bus/bus.c (bus_context_check_security_policy): fix up assertion
4075 * bus/connection.c (bus_transaction_send_from_driver): set the
4076 destination to the connection's base service
4078 2003-10-20 Havoc Pennington <hp@redhat.com>
4080 hmm, make check is currently not passing.
4082 * doc/dbus-specification.xml: add requirement that custom type
4083 names follow the same rules as interface names.
4085 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
4086 duplication and allow 'c' to be 'custom'; dict is now 'm' for
4089 * doc/dbus-specification.xml: update type codes to match
4090 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
4091 CUSTOM. Add type OBJECT_PATH to the spec.
4093 2003-10-17 Havoc Pennington <hp@redhat.com>
4095 * bus/driver.c (create_unique_client_name): use "." as separator
4096 in base service names instead of '-'
4098 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
4099 byte at the end of the string
4101 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
4102 optimization macros since string validation seems to be a slow
4105 * doc/dbus-specification.xml: restrict valid
4106 service/interface/member/error names. Add test suite code for the
4109 * dbus/dbus-string.c: limit service/interface/member/error names
4112 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
4113 format arg to verbose spew
4115 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
4116 memory, return instead of g_error
4118 * test/test-service.c (path_message_func): support emitting a
4121 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
4122 activation bus type if DBUS_BUS_ACTIVATION was set; default to
4123 assuming the activation bus was the session bus so that services
4124 started manually will still register.
4125 (init_connections_unlocked): fix so that in OOM situation we get
4126 the same semantics when retrying the function
4128 * test/test-service.c (main): change to use path registration, to
4129 test those codepaths; register with DBUS_BUS_ACTIVATION rather
4130 than DBUS_BUS_SESSION
4132 2003-10-16 Havoc Pennington <hp@redhat.com>
4134 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
4136 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
4137 coverage of the tests
4138 (coverage-report.txt): don't move the .da and .bbg files around
4140 2003-10-16 Havoc Pennington <hp@redhat.com>
4142 * bus/bus.c (struct BusContext): remove struct field I didn't mean
4145 2003-10-16 Havoc Pennington <hp@redhat.com>
4147 * bus/connection.c (bus_pending_reply_expired): either cancel or
4149 (bus_connections_check_reply): use unlink, not remove_link, as we
4150 don't want to free the link; fixes double free mess
4152 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
4153 where no reply was received
4155 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
4158 * bus/signals.c (match_rule_matches): add special cases for the
4159 bus driver, so you can match on sender/destination for it.
4161 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
4162 DBUS_PRINT_BACKTRACE is set
4164 * dbus/dbus-internals.c: add pid to assertion failure messages
4166 * dbus/dbus-connection.c: add message type code to the debug spew
4168 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
4169 sender=foo not service=foo
4171 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
4172 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
4173 DBUS_ACTIVATION_ADDRESS instead
4175 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
4176 DBUS_SYSTEM_BUS_ADDRESS if appropriate
4178 * bus/bus.c (bus_context_new): handle OOM copying bus type into
4181 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
4182 (dbus_message_iter_get_object_path_array): new function (half
4183 finished, disabled for the moment)
4185 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
4186 DBUS_MESSAGE_TYPE_ERROR
4188 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
4189 avoid redirecting stderr to /dev/null
4190 (babysit): close stdin if not doing the "exit_with_session" thing
4192 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
4193 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
4194 stdout/stdin, so things don't get confused
4196 * bus/system.conf.in: fix to allow replies, I modified .conf
4197 instead of .conf.in again.
4199 2003-10-14 David Zeuthen <david@fubar.dk>
4201 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
4202 argtype to arg_type when raising unknown arg type exception.
4203 Changed type list to reflect the changes in dbus-protocol.h so
4204 the bindings actually work.
4206 2003-10-14 Havoc Pennington <hp@redhat.com>
4208 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
4209 to have a bug keeping it from outputting the .da files sometimes
4210 (string_get_string): don't append garbage nul bytes to the string.
4212 2003-10-15 Seth Nickell <seth@gnome.org>
4214 * python/Makefile.am:
4216 Include dbus_h_wrapper.h in the dist tarball.
4218 2003-10-14 Havoc Pennington <hp@redhat.com>
4220 * bus/bus.c (bus_context_check_security_policy): revamp this to
4221 work more sanely with new policy-based requested reply setup
4223 * bus/connection.c (bus_transaction_send_from_driver): set bus
4224 driver messages as no reply
4226 * bus/policy.c (bus_client_policy_check_can_receive): handle a
4227 requested_reply attribute on allow/deny rules
4229 * bus/system.conf: add <allow requested_reply="true"/>
4231 * bus/driver.c (bus_driver_handle_message): fix check for replies
4232 sent to the bus driver, which was backward. How did this ever work
4233 at all though? I think I'm missing something.
4235 * dbus/dbus-message.c (decode_header_data): require error and
4236 method return messages to have a reply serial field to be valid
4237 (_dbus_message_loader_queue_messages): break up this function;
4238 validate that reply serial and plain serial are nonzero;
4239 clean up the OOM/error handling.
4240 (get_uint_field): don't return -1 from this
4241 (dbus_message_create_header): fix signed/unsigned bug
4243 * bus/connection.c (bus_connections_expect_reply): save serial of
4244 the incoming message, not reply serial
4246 2003-10-14 Havoc Pennington <hp@redhat.com>
4248 * bus/connection.c: implement pending reply tracking using
4251 * bus/bus.c (bus_context_check_security_policy): verify that a
4252 reply is pending in order to allow a reply to be sent. Deny
4253 messages of unknown type.
4255 * bus/dbus-daemon-1.1.in: update to mention new resource limits
4257 * bus/bus.c (bus_context_get_max_replies_per_connection): new
4258 (bus_context_get_reply_timeout): new
4260 2003-10-13 Seth Nickell <seth@gnome.org>
4262 * python/Makefile.am:
4264 Pass "make distcheck": remove a couple files from DIST_FILES
4265 that weren't included in the final version.
4267 2003-10-12 Havoc Pennington <hp@pobox.com>
4269 Added test code that 1) starts an actual bus daemon and 2) uses
4270 DBusGProxy; fixed bugs that were revealed by the test. Lots
4271 more testing possible, but this is the basic framework.
4273 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
4274 empty proxy lists from the proxy list hash
4276 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
4277 couple of return_if_fail checks
4279 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
4280 to allocate, so everything is cleared to NULL as it should be.
4282 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
4283 source as data to dbus_connection_set_timeout_functions() as the
4284 timeout functions expected
4286 * test/glib/run-test.sh: add a little script to start up a message
4287 bus and run tests using it
4289 * tools/dbus-launch.1: updates
4291 * tools/dbus-launch.c (main): add --config-file option
4293 * tools/dbus-launch.c (main): remove confusing else if (runprog)
4294 that could never be reached.
4296 * dbus/dbus-message.c (dbus_message_new_method_return)
4297 (dbus_message_new_error, dbus_message_new_signal): set the
4298 no-reply-expected flag on all these. Redundant, but may
4299 as well be consistent.
4301 2003-10-11 Havoc Pennington <hp@pobox.com>
4303 * test/decode-gcov.c (function_solve_graph): make broken block
4304 graph a nonfatal error since it seems to be broken. Need to debug
4307 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
4308 can't just check type > INVALID < LAST anymore
4310 * dbus/dbus-message.c (dbus_message_get_signature): new function
4311 (dbus_message_has_signature): new function
4312 (struct DBusMessage): add signature field (right now it isn't sent
4313 over the wire, just generated on the fly)
4314 (dbus_message_copy): copy the signature, and init strings to
4315 proper length to avoid some reallocs
4316 (dbus_message_iter_init_array_iterator): return void, since it
4318 (dbus_message_iter_init_dict_iterator): return void since it can't fail
4319 (_dbus_message_loader_queue_messages): add silly temporary hack to
4320 fill in message->signature on load
4322 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
4323 characters, so they are relatively human-readable.
4325 2003-10-11 Havoc Pennington <hp@pobox.com>
4327 * dbus/dbus-message.c (_dbus_message_test): add more test
4328 coverage, but #if 0 for now since they uncover a bug
4329 not fixed yet; I think in re_align_field_recurse()
4330 (re_align_field_recurse): add FIXME about broken assertion
4332 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
4334 * bus/connection.c: share a couple code bits with expirelist.c
4336 * bus/expirelist.h, bus/expirelist.c: implement a generic
4337 expire-items-after-N-seconds facility, was going to share between
4338 expiring connections and replies, decided not to use for expiring
4339 connections for now.
4341 * COPYING: include AFL 2.0 (still need to change all the file headers)
4343 2003-10-09 Havoc Pennington <hp@redhat.com>
4345 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
4346 gcc 3.3. Not that we do anything about it yet.
4348 * bus/signals.c (bus_match_rule_parse): impose max length on the
4351 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
4353 2003-10-09 Havoc Pennington <hp@redhat.com>
4355 Make matching rules theoretically work (add parser).
4357 * bus/bus.c (bus_context_check_security_policy): fix up to handle
4358 the case where destination is explicitly specified as bus driver
4359 and someone else is eavesdropping.
4361 * bus/policy.c (bus_client_policy_check_can_receive): fix up
4362 definition of eavesdropping and assertion
4364 * tools/dbus-send.c (main): use dbus_message_type_from_string
4366 * bus/signals.c (bus_match_rule_parse): implement
4368 * dbus/dbus-message.c (dbus_message_type_from_string): new
4370 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
4372 2003-10-02 Havoc Pennington <hp@pobox.com>
4374 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
4375 dbus_gproxy_oneway_call
4377 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
4378 (dbus_server_setup_with_g_main): fix to allow calling them more
4379 than once on the same args
4380 (dbus_bus_get_with_g_main): new function
4382 2003-10-02 Havoc Pennington <hp@redhat.com>
4384 * doc/dbus-tutorial.xml: write some stuff
4386 2003-09-29 Havoc Pennington <hp@pobox.com>
4388 * configure.in: split checks for Doxygen from XML docs, check for
4391 * doc/Makefile.am: XML-ify all the docs, and add a blank
4394 2003-09-29 Havoc Pennington <hp@pobox.com>
4396 * Merge dbus-object-names branch. To see the entire patch
4397 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
4398 it's huuuuge though.
4399 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
4401 2003-09-28 Havoc Pennington <hp@pobox.com>
4403 * HACKING: update to reflect new server
4405 2003-09-26 Seth Nickell <seth@gnome.org>
4408 * python/examples/example-signals.py:
4410 Start implementing some notions of signals. The API
4411 is really terrible, but they sort of work (with the
4412 exception of being able to filter by service, and to
4413 transmit signals *as* a particular service). Need to
4414 figure out how to make messages come from the service
4417 * python/dbus_bindings.pyx.in:
4419 Removed duplicate message_handler callbacks.
4421 2003-09-25 Havoc Pennington <hp@redhat.com>
4423 * bus/session.conf.in: fix my mess
4425 2003-09-25 Havoc Pennington <hp@pobox.com>
4427 * bus/session.conf.in: fix security policy, reported by Seth Nickell
4429 2003-09-25 Seth Nickell <seth@gnome.org>
4431 * python/examples/example-service.py:
4433 Johan notices complete wrong code in example-service, but
4434 completely wrong in a way that works exactly the same (!).
4435 Johan is confused, how could this possibly work? Example
4436 code fails to serve purpose of making things clear.
4439 2003-09-25 Mark McLoughlin <mark@skynet.ie>
4441 * doc/dbus-specification.sgml: don't require header fields
4442 to be 4-byte aligned and specify that fields should be
4443 distinguished from padding by the fact that zero is not
4446 * doc/TODO: remove re-alignment item and add item to doc
4447 the OBJECT_PATH type.
4449 * dbus/dbus-message.c:
4450 (HeaderField): rename the original member to value_offset
4451 and introduce a name_offset member to keep track of where
4452 the field actually begins.
4453 (adjust_field_offsets): remove.
4454 (append_int_field), (append_uint_field),
4455 (append_string_field): don't align the start of the header
4456 field to a 4-byte boundary.
4457 (get_next_field): impl finding the next marhsalled field
4458 after a given field.
4459 (re_align_field_recurse): impl re-aligning a number of
4460 already marshalled fields.
4461 (delete_field): impl deleting a field of any type and
4462 re-aligning any following fields.
4463 (delete_int_or_uint_field), (delete_string_field): remove.
4464 (set_int_field), (set_uint_field): no need to re-check
4465 that we have the correct type for the field.
4466 (set_string_field): ditto and impl re-aligning any
4468 (decode_header_data): update to take into account that
4469 the fields aren't 4-byte aligned any more and the new
4470 way to distinguish padding from header fields. Also,
4471 don't exit when there is too much header padding.
4472 (process_test_subdir): print the directory.
4473 (_dbus_message_test): add test to make sure a following
4474 field is re-aligned correctly after field deletion.
4476 * dbus/dbus-string.[ch]:
4477 (_dbus_string_insert_bytes): rename from insert_byte and
4478 allow the insert of multiple bytes.
4479 (_dbus_string_test): test inserting multiple bytes.
4481 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
4482 warning note to docs about having to re-align any
4483 marshalled values following the string.
4485 * dbus/dbus-message-builder.c:
4486 (append_string_field), (_dbus_message_data_load):
4487 don't align the header field.
4489 * dbus/dbus-auth.c: (process_test_subdir): print the
4492 * test/break-loader.c: (randomly_add_one_byte): upd. for
4495 * test/data/invalid-messages/bad-header-field-alignment.message:
4498 * test/data/valid-messages/unknown-header-field.message: shove
4499 a dict in the unknown field.
4501 2003-09-25 Seth Nickell <seth@gnome.org>
4504 * python/dbus_bindings.pyx.in:
4506 Handle return values.
4508 * python/examples/example-client.py:
4509 * python/examples/example-service.py:
4511 Pass back return values from the service to the client.
4513 2003-09-24 Seth Nickell <seth@gnome.org>
4517 Connect Object methods (when you are sharing an object) up... pass
4518 in a list of methods to be shared. Sharing all the methods just
4519 worked out too weird. You can now create nice Services over the
4522 * python/dbus_bindings.pyx.in:
4524 Keep references to user_data tuples passed into C functions so
4525 Python doesn't garbage collect on us.
4527 Implement MethodReturn and Error subclasses of Message for creating
4528 DBusMessage's of those types.
4530 * python/examples/example-client.py:
4531 * python/examples/example-service.py:
4533 Simple example code showing both how create DBus services and objects,
4534 and how to use them.
4536 2003-09-23 Havoc Pennington <hp@pobox.com>
4538 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
4540 2003-09-23 Havoc Pennington <hp@redhat.com>
4542 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
4543 (dbus_gproxy_disconnect_signal): implement
4544 (dbus_gproxy_manager_remove_signal_match): implement
4545 (dbus_gproxy_manager_add_signal_match): implement
4546 (dbus_gproxy_oneway_call): implement
4548 2003-09-23 Havoc Pennington <hp@pobox.com>
4550 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
4551 subclass. This means dropping the transparent thread safety of the
4552 proxy; you now need a separate proxy per-thread, or your own
4553 locking on the proxy. Probably right anyway.
4554 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
4556 2003-09-22 Havoc Pennington <hp@redhat.com>
4558 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
4560 2003-09-21 Seth Nickell <seth@gnome.org>
4562 First checkin of the Python bindings.
4564 * python/.cvsignore:
4565 * python/Makefile.am:
4566 * python/dbus_bindings.pyx.in:
4567 * python/dbus_h_wrapper.h:
4569 Pieces for Pyrex to operate on, building a dbus_bindings.so
4570 python module for low-level access to the DBus APIs.
4574 High-level Python module for accessing DBus objects.
4579 Build stuff for the python bindings.
4583 Extra macro needed for finding the Python C header files.
4585 2003-09-21 Havoc Pennington <hp@pobox.com>
4587 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
4588 implementing the proxy manager, didn't get very far.
4590 * dbus/dbus-bus.c (dbus_bus_add_match): new
4591 (dbus_bus_remove_match): new
4593 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
4594 path_name argument; adjust the other not-yet-implemented
4595 gproxy constructors to be what I think they should be.
4597 2003-09-21 Havoc Pennington <hp@pobox.com>
4599 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
4600 by default for message bus connections.
4602 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
4603 exit_on_disconnect flag is set and we process the disconnected
4605 (dbus_connection_set_exit_on_disconnect): new function
4607 2003-09-21 Havoc Pennington <hp@pobox.com>
4609 Get matching rules mostly working in the bus; only actually
4610 parsing the rule text remains. However, the client side of
4611 "signal connections" hasn't been started, this patch is only the
4614 * dbus/dispatch.c: fix for the matching rules changes
4616 * bus/driver.c (bus_driver_handle_remove_match)
4617 (bus_driver_handle_add_match): send an ack reply from these
4620 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
4621 arguments, reported by Seth Nickell
4623 * bus/config-parser.c (append_rule_from_element): support
4624 eavesdrop=true|false attribute on policies so match rules
4625 can be prevented from snooping on the system bus.
4627 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
4628 and "destination" in attribute names; fix some docs bugs;
4629 add eavesdrop=true|false attribute
4631 * bus/driver.c (bus_driver_handle_add_match)
4632 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
4635 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
4636 rid of broadcast service concept, signals are just always broadcast
4638 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
4639 mostly implement matching rules stuff (currently only exposed as signal
4642 2003-09-21 Mark McLoughlin <mark@skynet.ie>
4644 * doc/dbus-specification.sgml: Change the header field name
4645 to be an enum and update the rest of the spec to reference
4646 the fields using the conventinal name.
4648 * dbus/dbus-protocol.h: update to reflect the spec.
4650 * doc/TODO: add item to remove the 4 byte alignment requirement.
4652 * dbus/dbus-message.c: Remove the code to generalise the
4653 header/body length and serial number header fields as named
4654 header fields so we can reference field names using the
4656 (append_int_field), (append_uint_field), (append_string_field):
4657 Append the field name as a byte rather than four chars.
4658 (delete_int_or_uint_field), (delete_string_field): reflect the
4659 fact that the field name and typecode now occupy 4 bytes instead
4661 (decode_string_field), (decode_header_data): update to reflect
4662 protocol changes and move the field specific encoding from
4663 decode_string_field() back into decode_header_data().
4665 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
4666 Add utility to aid debugging.
4668 * dbus/dbus-message-builder.c:
4669 (append_string_field), (_dbus_message_data_load): Update to
4670 reflect protocol changes; Change the FIELD_NAME directive
4671 to HEADER_FIELD and allow it to take the field's conventional
4672 name rather than the actual value.
4674 * test/data/*/*.message: Update to use HEADER_FIELD instead
4675 of FIELD_NAME; Always align the header on an 8 byte boundary
4676 *before* updating the header length.
4678 2003-09-15 Havoc Pennington <hp@pobox.com>
4680 * dbus/dbus-pending-call.c: add the get/set object data
4681 boilerplate as for DBusConnection, etc. Use generic object data
4682 for the notify callback.
4684 * glib/dbus-gparser.c (parse_node): parse child nodes
4686 * tools/dbus-viewer.c: more hacking on the dbus-viewer
4688 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
4689 contain functions shared between the convenience lib and the
4692 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
4693 -export-symbols-regex to the GLib library
4695 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
4696 fix the locking in here, and add a default handler for
4697 Introspect() that just returns sub-nodes.
4699 2003-09-14 Havoc Pennington <hp@pobox.com>
4701 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
4702 rather than gfoo consistent
4704 * glib/dbus-gproxy.h: delete for now, move contents to
4705 dbus-glib.h, because the include files don't work right since we
4706 aren't in the dbus/ subdir.
4708 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
4709 (dbus_gproxy_end_call): finish
4710 (dbus_gproxy_begin_call): finish
4712 * glib/dbus-gmain.c (dbus_set_g_error): new
4714 * glib/dbus-gobject.c (handle_introspect): include information
4715 about child nodes in the introspection
4717 * dbus/dbus-connection.c (dbus_connection_list_registered): new
4718 function to help in implementation of introspection
4720 * dbus/dbus-object-tree.c
4721 (_dbus_object_tree_list_registered_and_unlock): new function
4723 2003-09-12 Havoc Pennington <hp@pobox.com>
4725 * glib/dbus-gidl.h: add common base class for all the foo_info
4728 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
4731 * test/Makefile.am: try test srcdir -ef . in addition to test
4732 srcdir = ., one of them should work (yeah lame)
4734 * glib/Makefile.am: build the "idl" parser stuff as a convenience
4737 * glib/dbus-gparser.h: make description_load routines return
4738 NodeInfo* not Parser*
4740 * Makefile.am (SUBDIRS): build test dir after all library dirs
4742 * configure.in: add GTK+ detection
4744 2003-09-07 Havoc Pennington <hp@pobox.com>
4746 * Make Doxygen contented.
4748 2003-09-07 Havoc Pennington <hp@pobox.com>
4750 * doc/dbus-specification.sgml: more updates
4752 2003-09-06 Havoc Pennington <hp@pobox.com>
4754 * doc/dbus-specification.sgml: partial updates
4756 * bus/dbus-daemon-1.1.in: fix the config file docs for the
4757 zillionth time; hopefully I edited the right file this time.
4759 * bus/config-parser.c (append_rule_from_element): support
4760 send_type, send_path, receive_type, receive_path
4762 * bus/policy.c: add message type and path to the list of things
4763 that can be "firewalled"
4765 2003-09-06 Havoc Pennington <hp@pobox.com>
4767 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
4768 (dbus_connection_register_object_path): make this not handle
4769 messages to paths below the given path
4771 2003-09-03 Havoc Pennington <hp@pobox.com>
4773 * test/glib/Makefile.am: add this with random glib-linked test
4776 * glib/Makefile.am: remove the random test programs from here,
4777 leave only the unit tests
4779 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
4780 uscore/javacaps conversion, and fix
4781 (get_object_property, set_object_property): change to .NET
4782 convention for mapping props to methods, set_FooBar/get_FooBar,
4783 since one language has such a convention we may as well copy it.
4784 Plus real methods in either getFooBar or get_foo_bar style won't
4785 collide with this convention.
4787 2003-09-01 Havoc Pennington <hp@pobox.com>
4789 * glib/dbus-gparser.c: implement
4791 * glib/dbus-gobject.c: start implementing skeletons support
4793 * configure.in: when disabling checks/assert, also define
4794 G_DISABLE_ASSERT and G_DISABLE_CHECKS
4796 2003-09-01 Havoc Pennington <hp@pobox.com>
4798 * glib/Makefile.am: rearrange a bunch of files and get "make
4799 check" framework set up
4801 2003-08-31 Havoc Pennington <hp@pobox.com>
4803 * fix build with --disable-tests
4805 2003-08-30 Havoc Pennington <hp@pobox.com>
4807 * dbus/dbus-connection.c: purge DBusMessageHandler
4809 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
4810 use callbacks everywhere
4812 2003-08-30 Havoc Pennington <hp@pobox.com>
4814 * test/data/valid-config-files/system.d/test.conf: change to
4815 root for the user so warnings don't get printed
4817 * dbus/dbus-message.c: add dbus_message_get_path,
4818 dbus_message_set_path
4820 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
4821 dispatching to a path
4823 * dbus/dbus-string.c (_dbus_string_validate_path): add
4825 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
4826 (_dbus_marshal_object_path): implement
4828 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
4829 to contain the path to the target object
4830 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
4831 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
4833 2003-08-30 Havoc Pennington <hp@pobox.com>
4835 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
4837 2003-08-29 Havoc Pennington <hp@pobox.com>
4839 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
4841 (struct DBusObjectSubtree): shrink this
4842 a lot, since we may have a lot of them
4843 (_dbus_object_tree_free_all_unlocked): implement
4844 (_dbus_object_tree_dispatch_and_unlock): implement
4846 2003-08-29 Havoc Pennington <hp@pobox.com>
4848 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
4850 2003-08-28 Havoc Pennington <hp@pobox.com>
4854 * dbus/dbus-connection.c: port to no ObjectID, create a
4855 DBusObjectTree, rename ObjectTree to ObjectPath in public API
4857 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
4858 everything except UnregisterFunction and MessageFunction
4860 * dbus/dbus-marshal.c: port away from DBusObjectID,
4861 add DBUS_TYPE_OBJECT_PATH
4863 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
4864 dbus/dbus-objectid.[hc]: remove these, we are moving to
4865 path-based object IDs
4867 2003-08-25 Havoc Pennington <hp@pobox.com>
4869 Just noticed that dbus_message_test is hosed, I wonder when I
4870 broke that. I thought make check was passing earlier...
4872 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
4873 container tree, will replace most of dbus-object-registry
4875 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
4878 2003-08-19 Havoc Pennington <hp@pobox.com>
4880 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
4881 (dbus_message_is_error): fix this function
4883 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
4886 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
4887 reflect clarified man page
4888 (bus_client_policy_check_can_send): ditto
4890 * bus/session.conf.in: fixup
4892 * bus/system.conf.in: fixup
4894 2003-08-18 Havoc Pennington <hp@redhat.com>
4896 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
4898 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4899 dumb bug created earlier (wrong order of args to
4900 decode_header_data())
4902 * tools/dbus-send.c: port
4904 * tools/dbus-print-message.c (print_message): port
4906 * test/data/*messages: port all messages over
4908 * dbus/dbus-message-builder.c: support including
4911 * bus/driver.c: port over
4913 * bus/dispatch.c: port over to new stuff
4915 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4916 rename disconnect signal to "Disconnected"
4918 2003-08-17 Havoc Pennington <hp@pobox.com>
4920 This doesn't compile yet, but syncing up so I can hack on it from
4921 work. What are branches for if not broken code? ;-)
4923 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
4924 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
4925 DBUS_HEADER_FIELD_ERROR_NAME
4927 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
4928 for the interface+member pairs
4929 (string_hash): change to use g_str_hash algorithm
4930 (find_direct_function, find_string_function): refactor these to
4933 * dbus/dbus-message.c: port all of this over to support
4934 interface/member fields instead of name field
4936 * dbus/dbus-object-registry.c: port over
4938 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
4939 from _dbus_string_validate_name
4941 * bus/dbus-daemon-1.1: change file format for the
4942 <deny>/<allow> stuff to match new message naming scheme
4944 * bus/policy.c: port over
4946 * bus/config-parser.c: parse new format
4948 2003-08-16 Havoc Pennington <hp@pobox.com>
4950 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
4953 * glib/dbus-gproxy.c: some hacking
4955 2003-08-15 Havoc Pennington <hp@redhat.com>
4957 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
4959 * dbus/dbus-connection.c
4960 (dbus_connection_send_with_reply_and_block): factor out internals;
4961 change to convert any error replies to DBusError instead of
4962 returning them as a message
4964 2003-08-15 Havoc Pennington <hp@pobox.com>
4966 * dbus/dbus-connection.c,
4967 dbus/dbus-pending-call.c: Finish the pending call stuff
4969 2003-08-14 Havoc Pennington <hp@redhat.com>
4971 * dbus/dbus-pending-call.c: start on new object that will replace
4972 DBusMessageHandler and ReplyHandlerData for tracking outstanding
4975 * dbus/dbus-gproxy.c: start on proxy object used to communicate
4976 with remote interfaces
4978 * dbus/dbus-gidl.c: do the boring boilerplate in here
4980 2003-08-12 Havoc Pennington <hp@pobox.com>
4982 * bus/dispatch.c (bus_dispatch): make this return proper
4983 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
4985 * dbus/dbus-errors.c (dbus_set_error): use
4986 _dbus_string_append_printf_valist
4988 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
4989 (_dbus_string_append_printf): new
4991 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
4994 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
4995 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
4996 message is unhandled.
4998 2003-08-11 Havoc Pennington <hp@pobox.com>
5000 * bus/test.c (client_disconnect_handler): change to return
5001 HANDLED (would have been REMOVE_MESSAGE)
5003 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
5004 HANDLED/NOT_YET_HANDLED instead of
5005 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
5008 2003-08-10 Havoc Pennington <hp@pobox.com>
5010 * tools/dbus-send.c (main): add --type argument, for now
5011 supporting only method_call and signal types.
5013 * tools/dbus-print-message.c: print message type
5015 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5016 init connection->objects
5018 * doc/dbus-specification.sgml: fix sgml
5020 * bus/*.c: port over to object-instance API changes
5022 * test/test-service.c: ditto
5024 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
5025 name, we will have to fix up the rest of the code to also handle
5027 (dbus_message_new): generic message-creation call
5028 (set_string_field): allow appending name field
5030 2003-08-06 Havoc Pennington <hp@pobox.com>
5032 * dbus/dbus-object-registry.c: implement signal connection
5035 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
5037 * dbus/dbus-internals.c (_dbus_memdup): new function
5039 2003-08-02 Havoc Pennington <hp@pobox.com>
5041 * dbus/dbus-message.c (dbus_message_get_no_reply)
5042 (dbus_message_set_no_reply): add these and remove
5043 set_is_error/get_is_error
5045 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
5046 remove the ERROR flag, since there's now an ERROR type
5048 2003-08-01 Havoc Pennington <hp@pobox.com>
5050 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
5053 * dbus/dbus-message.c (dbus_message_get_type): new function
5055 * doc/dbus-specification.sgml: add "type" byte to messages
5057 2003-08-01 Havoc Pennington <hp@pobox.com>
5059 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
5060 a message type enum to distinguish kinds of message
5061 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
5062 that need not be replied to
5064 2003-08-01 Havoc Pennington <hp@pobox.com>
5066 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
5067 (unpack_8_octets): fix no-64-bit-int bug
5069 * dbus/dbus-object-registry.c (validate_id): validate the
5070 connection ID bits, not just the instance ID.
5072 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
5073 the connection-global 33 bits of the object ID
5075 * dbus/dbus-object-registry.c (info_from_entry): fill in
5076 object ID in the new way
5078 * dbus/dbus-objectid.h: rather than high/low bits, specifically
5079 define server/client/instance bits.
5081 2003-07-30 Havoc Pennington <hp@pobox.com>
5083 * dbus/dbus-connection.c (dbus_connection_register_object): fix
5086 2003-07-13 Havoc Pennington <hp@pobox.com>
5088 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
5089 fields to DBusObjectVTable and DBusObjectInfo
5091 2003-07-12 Havoc Pennington <hp@pobox.com>
5093 * dbus/dbus-object-registry.c: implement unit test,
5094 fix bugs discovered in process
5096 * dbus/dbus-connection.c: remove handler_table and
5097 register_handler(), add DBusObjectRegistry usage
5099 * dbus/dbus-objectid.c (dbus_object_id_is_null)
5100 (dbus_object_id_set_null): new functions
5102 2003-07-08 Havoc Pennington <hp@pobox.com>
5104 * dbus/dbus-object.c: implement some of this
5106 * dbus/dbus-object-registry.c
5107 (_dbus_object_registry_add_and_unlock): fill in the object_id out
5109 (_dbus_object_registry_new): handle OOM
5111 2003-07-08 Havoc Pennington <hp@pobox.com>
5113 * dbus/dbus-object.h: sketch out an API for registering objects
5114 with a connection, that allows us to use as little as 24 bytes
5115 per object and lets application code represent an object in
5116 any conceivable way.
5118 * dbus/dbus-object-registry.c: implement the hard bits of the
5119 DBusConnection aspect of object API. Not yet wired up.
5121 2003-07-06 Havoc Pennington <hp@pobox.com>
5123 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
5124 (_dbus_marshal_object_id): new
5125 (_dbus_demarshal_object_id): new
5126 (_dbus_marshal_get_arg_end_pos): support object ID type, and
5127 consolidate identical switch cases. Don't conditionalize handling
5128 of DBUS_TYPE_UINT64, need to handle the type always.
5129 (_dbus_marshal_validate_arg): consolidate identical cases, and
5130 handle DBUS_TYPE_OBJECT_ID
5132 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
5134 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
5136 2003-09-28 Havoc Pennington <hp@pobox.com>
5140 2003-09-28 Havoc Pennington <hp@pobox.com>
5142 * doc/Makefile.am (dbus-specification.html): testing a funky hack
5143 to work with Debian db2html
5145 2003-09-28 Havoc Pennington <hp@pobox.com>
5147 * configure.in: 0.13
5149 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
5150 stylesheet-images for benefit of Debian
5152 Change back to using filesystem-linked sockets for the system
5153 bus, so only root can create the default system bus address.
5155 * bus/system.conf.in: change to use
5156 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
5158 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
5161 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
5162 here, and AC_DEFINE DBUS_SYSTEM_PATH
5164 2003-08-09 Anders Carlsson <andersca@codefactory.se>
5167 * doc/busconfig.dtd:
5170 2003-08-09 Anders Carlsson <andersca@codefactory.se>
5172 * doc/dbus-specification.sgml:
5173 Add activation reply values.
5175 2003-08-05 Havoc Pennington <hp@redhat.com>
5177 * configure.in: 0.12
5179 2003-08-05 Anders Carlsson <andersca@codefactory.se>
5181 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
5182 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
5183 (add_watch), (remove_watch), (create_source):
5184 Refcount fds, fixes some reentrancy issues.
5186 2003-07-30 Havoc Pennington <hp@redhat.com>
5188 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
5189 bus address to be abstract if we have abstract sockets
5193 2003-07-28 Havoc Pennington <hp@redhat.com>
5195 * bus/messagebus.in: fix to avoid processname/servicename
5196 confusion, from Michael Kearey
5197 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
5199 2003-07-23 Havoc Pennington <hp@pobox.com>
5201 * dbus/dbus-message.c (dbus_message_iter_get_named):
5202 fix from Andy Hanton to remove broken "+1"
5204 2003-07-16 Havoc Pennington <hp@pobox.com>
5206 * tools/dbus-launch.c (babysit): close stdout/stderr in the
5207 babysitter process, as suggested by Thomas Leonard, so
5208 an "eval `dbus-launch --exit-with-session`" will actually
5211 2003-07-16 Havoc Pennington <hp@pobox.com>
5213 * configure.in: print out EXPANDED_* variables in the summary at
5214 the end; clean up the code that computes EXPANDED_ variables and
5215 get the ones using exec_prefix right. Should make things work
5216 when you build without --prefix
5218 2003-06-29 Havoc Pennington <hp@pobox.com>
5220 * mono/Test.cs (class Test): fire up a main loop and run it
5222 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
5223 done once, the app has to do it
5225 2003-06-26 Havoc Pennington <hp@pobox.com>
5227 * mono/Connection.cs: set up connection with the glib main loop
5229 2003-07-01 Havoc Pennington <hp@redhat.com>
5231 * doc/dbus-specification.sgml: clarify the format of a type code,
5232 change suggested by Jim Blandy
5234 2003-06-29 Miloslav Trmac <mitr@volny.cz>
5237 * tools/Makefile.am: Don't assume srcdir == builddir.
5239 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
5240 the allocated block.
5241 (_dbus_memory_test): New function.
5242 * dbus/dbus-test.h: Add _dbus_memory_test ().
5243 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
5245 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
5247 (dbus_message_new): Remove obsolete @todo.
5249 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
5250 (_dbus_marshal_set_uint64): Fix comment.
5252 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
5253 hardcode FIELD_REPLY_SERIAL.
5255 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
5256 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
5258 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
5259 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
5261 2003-06-24 Havoc Pennington <hp@pobox.com>
5263 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
5265 2003-06-23 Anders Carlsson <andersca@codefactory.se>
5271 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
5272 * gcj/org/.cvsignore:
5273 * gcj/org/Makefile.am:
5274 * gcj/org/freedesktop/.cvsignore:
5275 * gcj/org/freedesktop/Makefile.am:
5276 * gcj/org/freedesktop/dbus/.cvsignore:
5277 * gcj/org/freedesktop/dbus/Makefile.am:
5278 * gcj/org/freedesktop/dbus/Message.java: (Message),
5280 * gcj/org/freedesktop/dbus/natMessage.cc:
5281 Fix the build system.
5283 2003-06-22 Havoc Pennington <hp@pobox.com>
5285 * mono/Connection.cs: add more bindings
5287 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
5290 2003-06-22 Havoc Pennington <hp@pobox.com>
5292 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
5293 Start wrapping more stuff.
5295 2003-06-22 Havoc Pennington <hp@pobox.com>
5297 * mono/Message.cs: implement Message.Wrap() that ensures we only
5298 have a single C# wrapper per DBusMessage, assuming it works which
5299 it probably doesn't.
5301 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
5302 (dbus_message_free_data_slot): new
5303 (dbus_message_set_data): new
5304 (dbus_message_get_data): new
5306 2003-06-22 Havoc Pennington <hp@pobox.com>
5308 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
5309 (_dbus_data_slot_allocator_alloc): rework these to keep a
5310 reference count on each slot and automatically manage a global
5311 slot ID variable passed in by address
5313 * bus/bus.c: convert to new dataslot API
5315 * dbus/dbus-bus.c: convert to new dataslot API
5317 * dbus/dbus-connection.c: convert to new dataslot API
5319 * dbus/dbus-server.c: convert to new dataslot API
5321 * glib/dbus-gmain.c: ditto
5325 * bus/connection.c: ditto
5327 2003-06-22 Anders Carlsson <andersca@codefactory.se>
5329 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
5330 after the gcj checks so that the correct configuration tags
5331 will be added to libtool.
5333 * dbus-glib-1.pc.in: No need to specify any includes since
5334 dbus-1.pc.in has those.
5336 2003-06-22 Havoc Pennington <hp@pobox.com>
5338 * mono/*, gcj/*, configure.in, Makefile.am:
5339 Check in makefiles and subdirs for mono and gcj bindings.
5340 Neither binding actually exists, just trying to get through
5341 all the build and other boring bits.
5343 2003-06-21 Philip Blundell <philb@gnu.org>
5345 * tools/dbus-monitor.1: Updated.
5347 * tools/dbus-send.1: Likewise.
5349 2003-06-20 Anders Carlsson <andersca@codefactory.se>
5351 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
5352 for hangup and error after checking read so we won't discard
5353 pending data if both hangup and read are set.
5355 2003-06-19 Philip Blundell <philb@gnu.org>
5357 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
5359 * tools/dbus-send.c: Accept both --system and --session.
5361 * tools/dbus-monitor.c: Same here.
5363 2003-06-19 Anders Carlsson <andersca@codefactory.se>
5365 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
5366 from C++ (Patch by Miloslav Trmac).
5368 2003-06-15 Joe Shaw <joe@assbarn.com>
5370 * configure.in: Check for socklen_t.
5372 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
5374 * test/test-segfault.c: Add #include <sys/time.h>
5376 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
5377 dbus-launch needs it.
5379 2003-06-09 Havoc Pennington <hp@redhat.com>
5381 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
5382 SUN_LEN, it breaks abstract socket usage
5384 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
5387 2003-06-04 Havoc Pennington <hp@pobox.com>
5389 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
5390 using unix:abstract=/foo, and when listening in a tmpdir
5391 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
5393 * dbus/dbus-transport.c (_dbus_transport_open): support
5396 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
5397 support abstract sockets
5399 * dbus/dbus-transport-unix.c
5400 (_dbus_transport_new_for_domain_socket): support abstract sockets
5402 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
5403 toggle as an argument, implement abstract namespace support
5404 (_dbus_listen_unix_socket): ditto
5406 * configure.in: add --enable-abstract-sockets and implement
5407 a configure check for autodetection of the right value.
5409 2003-06-01 Havoc Pennington <hp@pobox.com>
5411 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
5412 in /tmp (though on Linux this will end up being useless,
5413 when we add abstract namespace support)
5415 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
5418 2003-05-28 Colin Walters <walters@verbum.org>
5420 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
5422 2003-05-18 Anders Carlsson <andersca@codefactory.se>
5424 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
5426 2003-05-17 Colin Walters <walters@gnu.org>
5428 * tools/dbus-send.c: Don't exit with an error code if --help was
5429 passed. Default to using the session bus instead of the system
5432 * tools/dbus-launch.c: Ditto.
5434 * tools/dbus-monitor.c: Ditto.
5436 * tools/dbus-send.1: Update with new arguments.
5438 * tools/dbus-launch.c: Emit code to export variables. New
5439 arguments -s and -c to specify shell syntax, and a bit of code to
5440 autodetect syntax. Also, allow specifying a program to run.
5442 * tools/dbus-launch.1: Update with new arguments.
5444 * tools/dbus-send.1: Ditto.
5446 * tools/dbus-monitor.1: Ditto.
5448 2003-05-17 Havoc Pennington <hp@pobox.com>
5450 * bus/config-parser.c (merge_included): merge in policies from
5451 child configuration file.
5453 * bus/policy.c (bus_policy_merge): function to merge two policies
5456 2003-05-16 Havoc Pennington <hp@redhat.com>
5458 * dbus/dbus-connection.c: disable verbose lock spew
5460 * tools/dbus-send.c: add --print-reply command line option
5462 * tools/dbus-print-message.h (print_message): new util function
5463 shared by dbus-send and dbus-monitor
5465 * tools/dbus-monitor.c (handler_func): exit on disconnect
5467 * dbus/dbus-transport-unix.c (do_reading): if the transport is
5468 disconnected, don't try to use the read_watch
5470 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
5471 so we can find this bug more easily
5473 2003-05-16 Havoc Pennington <hp@redhat.com>
5475 * bus/policy.c (free_rule_list_func): avoid a crash when passed
5476 NULL as DBusHashTable is annoyingly likely to do.
5478 2003-05-16 Colin Walters <walters@verbum.org>
5480 * tools/dbus-monitor.c: Add --session argument and usage()
5483 * tools/dbus-monitor.1: Update with new --session arg.
5485 * bus/Makefile.am (install-data-hook): Create
5486 $(libdir)/dbus-1.0/services so that the session bus is happy.
5488 2003-05-15 Havoc Pennington <hp@redhat.com>
5490 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
5491 on non-x86. ifdef's are evil.
5493 2003-05-15 Havoc Pennington <hp@redhat.com>
5495 * configure.in: 0.11
5499 * bus/Makefile.am (initddir): apparently we are supposed to put
5500 init scripts in /etc/rc.d/init.d not /etc/init.d
5502 * bus/Makefile.am: remove the "you must --enable-tests to make
5503 check" as it broke distcheck
5505 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
5507 2003-05-13 James Willcox <jwillcox@gnome.org>
5510 * bus/activation.c: (bus_activation_service_created),
5511 (bus_activation_activate_service):
5512 * bus/driver.c: (bus_driver_send_service_deleted),
5513 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5514 (bus_driver_send_service_acquired),
5515 (bus_driver_send_welcome_message),
5516 (bus_driver_handle_list_services):
5517 * bus/session.conf.in:
5518 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
5519 (dbus_bus_service_exists), (dbus_bus_activate_service):
5522 Add some convenience API which lets you activate a service, and did a
5523 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
5524 and dbus_message_get_args()
5526 2003-05-11 Havoc Pennington <hp@pobox.com>
5528 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
5529 calling _dbus_marshal_validate_arg() for every byte in a byte
5532 * dbus/dbus-message-handler.c: use atomic reference counting to
5533 reduce number of locks slightly; the global lock in here sucks
5535 * dbus/dbus-connection.c
5536 (_dbus_connection_update_dispatch_status_and_unlock): variant of
5537 update_dispatch_status that can be called with lock held; then use
5538 in a couple places to reduce locking/unlocking
5539 (dbus_connection_send): hold the lock over the whole function
5540 instead of acquiring it twice.
5542 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
5544 * bus/connection.c (bus_connections_setup_connection): fix access
5545 to already-freed memory.
5547 * dbus/dbus-connection.c: keep a little cache of linked list
5548 nodes, to avoid using the global linked list alloc lock in the
5549 normal send-message case. Instead we just use the connection lock
5550 that we already have to take.
5552 * dbus/dbus-list.c (_dbus_list_find_last): new function
5554 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
5555 change to use a struct for the atomic type; fix docs,
5556 they return value before increment, not after increment.
5558 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
5559 (_dbus_string_append_8_aligned): new functions to try to
5560 microoptimize this operation.
5561 (reallocate_for_length): break this out of set_length(), to
5562 improve profile info, and also so we can consider inlining the
5565 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
5566 strings with some preallocation, cuts down on our calls to realloc
5567 a fair bit. Though if we can get the "move entire string to empty
5568 string" optimization below to kick in here, it would be better.
5570 * dbus/dbus-string.c (_dbus_string_move): just call
5571 _dbus_string_move_len
5572 (_dbus_string_move_len): add a special case for moving
5573 an entire string into an empty string; we can just
5574 swap the string data instead of doing any reallocs.
5575 (_dbus_string_init_preallocated): new function
5577 2003-05-11 Havoc Pennington <hp@pobox.com>
5579 Write a "test-profile" that does echo client-server with threads;
5580 profile reveals lock contention, memcpy/realloc of buffers, and
5581 UTF-8 validation as hot spots. 20% of lock contention eliminated
5582 with dbus_atomic_inc/dec implementation on x86. Much remaining
5583 contention is global mempool locks for GList and DBusList.
5585 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
5588 * dbus/dbus-connection.c (struct DBusConnection): use
5589 dbus_atomic_t for the reference count
5591 * dbus/dbus-message.c (struct DBusMessage): declare
5592 dbus_atomic_t values as volatile
5594 * configure.in: code to detect ability to use atomic integer
5595 operations in assembly, from GLib patch
5597 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
5598 time, tired of it being wrong in threads and forked processes
5600 * glib/test-profile.c: a little program to bounce messages back
5601 and forth between threads and eat CPU
5603 * dbus/dbus-connection.c: add debug spew macros for debugging
5604 thread locks; include config.h at top; fix deadlock in
5605 dbus_connection_flush()
5607 2003-05-08 Havoc Pennington <hp@pobox.com>
5609 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
5610 data from getting written, and there wasn't a good reason to
5613 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
5614 dbus_verbose lines in test coverage
5615 (main): add list of functions sorted by # of untested blocks
5616 to the coverage report
5618 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
5620 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
5622 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
5623 extend test coverage
5625 * test/data/auth/cancel.auth-script: test canceling an
5628 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
5629 aren't used. in CVS history if we end up needing them.
5631 2003-05-04 Havoc Pennington <hp@pobox.com>
5633 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
5636 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
5637 function, which assumed length was in # of strings, not bytes
5639 * dbus/dbus-message.c (_dbus_message_test): add tests for some
5642 * dbus/dbus-connection.c
5643 (_dbus_connection_queue_received_message): disable function for
5644 now, we are only using it in test mode
5646 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
5647 remove a mistaken FIXME
5649 2003-05-04 Havoc Pennington <hp@pobox.com>
5651 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
5652 unlock mutex on successful return, patch from Anders Gustafsson
5654 2003-05-04 Havoc Pennington <hp@pobox.com>
5656 * dbus-glib-1.pc.in (Requires): fix dependencies, from
5659 2003-05-04 Havoc Pennington <hp@pobox.com>
5661 * tools/dbus-launch.c: implement
5663 * bus/main.c (main), bus/bus.c (bus_context_new):
5664 implement --print-pid and --fork
5666 2003-05-03 Havoc Pennington <hp@redhat.com>
5668 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
5669 the address had no value, and add to test suite. Fix and
5670 regression test from Miloslav Trmac
5672 2003-05-03 Havoc Pennington <hp@pobox.com>
5674 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
5675 watch is invalid when handled
5677 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
5678 dbus-launch utility to launch the bus from a shell script. Didn't
5679 actually implement dbus-launch yet, it's just a placeholder still.
5681 2003-05-03 Havoc Pennington <hp@pobox.com>
5683 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
5684 daemon; also documents daemon config file, so replaces
5685 doc/config-file.txt. Corrected some stuff from config-file.txt in
5686 the process of moving it.
5688 2003-05-03 Havoc Pennington <hp@pobox.com>
5690 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
5693 2003-05-03 Colin Walters <walters@verbum.org>
5695 * dbus/dbus-sysdeps.c (fill_user_info): Test against
5696 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
5698 * Makefile.am: Update to use new .pc versioning scheme.
5700 2003-05-02 Havoc Pennington <hp@redhat.com>
5702 * bus/system.conf.in: allow send/receive to/from message bus
5705 2003-04-30 Havoc Pennington <hp@redhat.com>
5707 * configure.in: print a note when building with unit tests and
5710 2003-04-30 Havoc Pennington <hp@redhat.com>
5712 * Makefile.am: add a check-local that complains if you didn't
5713 configure with --enable-tests
5715 2003-04-29 Havoc Pennington <hp@redhat.com>
5717 * glib/dbus-gmain.c: docs cleanups
5719 * dbus/dbus-types.h: add docs on int64 types
5721 * dbus/dbus-memory.c: fix docs to avoid putting private API in
5722 public API docs section
5724 2003-04-29 Havoc Pennington <hp@redhat.com>
5726 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
5727 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
5728 parallel install API version, not with the D-BUS package version.
5730 * HACKING: move some of README over here
5732 * README: updates, and document API/ABI policy
5734 * configure.in: reindentation
5736 2003-04-29 Havoc Pennington <hp@redhat.com>
5738 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
5739 to use this library" to be sure people have the right
5742 2003-04-28 Havoc Pennington <hp@redhat.com>
5744 * configure.in: add --enable-docs which by default is auto yes if
5745 doxygen and db2html found, no otherwise; but can be forced on/off
5747 * doc/Makefile.am: conditionalize whether to build docs on
5750 2003-04-28 Havoc Pennington <hp@redhat.com>
5752 * configure.in: 0.10
5756 * bus/system.conf.in: add <includedir>system.d</includedir>
5758 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
5759 username was provided but not uid
5761 * bus/config-parser.c (struct BusConfigParser): keep track of
5762 whether the parser is toplevel or was included; change some
5763 of the error handling if it's included.
5765 2003-04-27 Havoc Pennington <hp@pobox.com>
5769 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5770 report correct status if we finish processing authentication
5771 inside this function.
5773 * bus/activation.c (try_send_activation_failure): use
5774 bus_transaction_send_error_reply
5776 * bus/connection.c (bus_connection_get_groups): return an error
5777 explaining the problem
5779 * bus/bus.c (bus_context_check_security_policy): implement
5780 restriction here that inactive connections can only send the
5781 hello message. Also, allow bus driver to send anything to
5784 * bus/connection.c (bus_connection_complete): create the
5785 BusClientPolicy here instead of on-demand.
5786 (bus_connection_get_policy): don't return an error
5788 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
5789 sender field in message being replied to
5791 * bus/bus.c (bus_context_check_security_policy): fix silly typo
5792 causing it to return FALSE always
5794 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
5795 we checked sender rather than destination
5797 2003-04-25 Havoc Pennington <hp@redhat.com>
5799 test suite is slightly hosed at the moment, will fix soon
5801 * bus/connection.c (bus_connections_expire_incomplete): fix to
5802 properly disable the timeout when required
5803 (bus_connection_set_name): check whether we can remove incomplete
5804 connections timeout after we complete each connection.
5806 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
5807 probably still broken.
5809 * bus/services.c (bus_registry_acquire_service): implement max
5810 number of services owned, and honor allow/deny rules on which
5811 services a connection can own.
5813 * bus/connection.c (bus_connection_get_policy): report errors here
5815 * bus/activation.c: implement limit on number of pending
5818 2003-04-25 Havoc Pennington <hp@redhat.com>
5820 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
5821 where we used >= 0 instead of != DBUS_UID_UNSET.
5823 2003-04-25 Havoc Pennington <hp@redhat.com>
5825 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
5826 were toggled without add/remove, fix from Anders Gustafsson
5828 2003-04-24 Havoc Pennington <hp@redhat.com>
5830 * test/data/valid-config-files/basic.conf: add <limit> tags to
5833 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
5834 <limit> tag in configuration file.
5836 2003-04-24 Havoc Pennington <hp@redhat.com>
5838 * bus/dispatch.c: somehow missed some name_is
5840 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
5841 (_dbus_timeout_set_interval): new
5843 * bus/connection.c (bus_connections_setup_connection): record time
5844 when each connection is first set up, and expire them after the
5845 auth timeout passes.
5847 2003-04-24 Havoc Pennington <hp@redhat.com>
5849 * dbus/dbus-message.c (dbus_message_name_is): rename
5850 (dbus_message_service_is): rename
5851 (dbus_message_sender_is): rename
5852 (dbus_message_get_service): rename
5854 2003-04-24 Havoc Pennington <hp@redhat.com>
5856 * configure.in: add --enable-checks
5858 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
5860 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
5861 to use thread locks.
5862 (_dbus_connection_handler_destroyed_locked): move some private
5863 functions into proper docs group
5865 * dbus/dbus-internals.h: add _dbus_return_if_fail,
5866 _dbus_return_val_if_fail
5868 Throughout: use dbus_return_if_fail
5870 2003-04-23 James Willcox <jwillcox@gnome.org>
5873 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
5874 (dbus_connection_setup_with_g_main),
5875 (dbus_server_setup_with_g_main):
5876 * glib/test-dbus-glib.c: (main):
5877 * glib/test-thread-client.c: (main):
5878 * glib/test-thread-server.c: (new_connection_callback), (main):
5879 * tools/dbus-monitor.c: (main):
5881 Added a GMainContext argument to dbus_connection_setup_with_g_main()
5882 and dbus_server_setup_with_g_main().
5884 2003-04-20 Havoc Pennington <hp@pobox.com>
5886 * doc/dbus-specification.sgml: document the restrictions on
5887 message and service names
5889 2003-04-22 Havoc Pennington <hp@redhat.com>
5891 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
5892 support, and do some code cleanups to share more code and
5893 speed up array marshal/demarshal.
5895 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
5897 * configure.in: generate dbus-arch-deps.h
5899 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
5902 2003-04-22 Havoc Pennington <hp@redhat.com>
5904 * test/data/valid-messages/opposite-endian.message: fix test
5905 to use proper type for rply field
5907 * test/data/invalid-messages: add tests for below validation
5909 * dbus/dbus-message.c (decode_header_data): validate field types,
5910 and validate that named fields are valid names
5911 (decode_name_field): consider messages in the
5912 org.freedesktop.Local. namespace to be invalid.
5914 * dbus/dbus-string.c (_dbus_string_validate_name): new
5916 2003-04-19 Havoc Pennington <hp@pobox.com>
5918 * bus/driver.c (bus_driver_handle_hello): check limits and
5919 return an error if they are exceeded.
5921 * bus/connection.c: maintain separate lists of active and inactive
5922 connections, and a count of each. Maintain count of completed
5923 connections per user. Implement code to check connection limits.
5925 * dbus/dbus-list.c (_dbus_list_unlink): export
5927 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
5928 number of bytes in the message queue for a connection
5930 2003-04-18 Havoc Pennington <hp@pobox.com>
5932 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
5934 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
5937 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
5938 on realloc be sure to update the pointer in the keyring
5940 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
5941 offset to avoid writing to unallocated memory
5943 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
5944 try the next mechanism, so we properly handle OOM
5946 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
5948 (_dbus_keyring_new): fix OOM bug
5949 (_dbus_keyring_new_homedir): always set error; impose a maximum
5950 number of keys we'll load from the file, mostly to speed up the
5951 test suite and make its OOM checks more useful, but also for
5954 * dbus/dbus-auth.c (process_error_server): reject authentication
5955 if we get an error from the client
5956 (process_cancel): on cancel, send REJECTED, per the spec
5957 (process_error_client): send CANCEL if we get an error from the
5960 2003-04-18 Havoc Pennington <hp@pobox.com>
5962 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
5965 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
5968 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
5969 about DBUS_TEST_HOMEDIR once
5971 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
5974 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
5975 config file so we test the right thing
5977 Throughout: assorted docs improvements
5979 2003-04-18 Havoc Pennington <hp@pobox.com>
5981 * glib/dbus-gmain.c: adapt to watch changes
5983 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
5985 * dbus/dbus-server.h: remove dbus_server_handle_watch
5987 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
5989 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
5990 like DBusTimeout, so we don't need dbus_connection_handle_watch
5993 2003-04-17 Havoc Pennington <hp@redhat.com>
5995 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
5996 database usage so it all goes via the DBusUserDatabase cache.
5998 2003-04-17 Havoc Pennington <hp@redhat.com>
6000 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
6001 there was an OOM watch we skipped, we always return TRUE so we
6002 iterate again to have a look at it again. Fixes test suite hang.
6003 Code rearrangement also lets us lose some memset and only iterate
6004 over callbacks once.
6006 * bus/driver.c (bus_driver_handle_message): sense of test for
6009 2003-04-16 Havoc Pennington <hp@pobox.com>
6011 * doc/dbus-specification.sgml: make spec say serials are unsigned
6013 * dbus/dbus-message.h: change message serials to unsigned
6015 * dbus/dbus-connection.c: adapt to message serials being unsigned
6017 2003-04-15 Havoc Pennington <hp@pobox.com>
6019 * bus/bus.c: create and keep around a shared DBusUserDatabase
6022 * bus/connection.c (bus_connection_get_groups): don't cache
6023 groups for user in the connection object, since user database
6024 object now does that.
6026 2003-04-16 Havoc Pennington <hp@redhat.com>
6028 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
6029 list of size counters
6030 (_dbus_message_loader_putback_message_link): put back a popped link
6032 * dbus/dbus-connection.c
6033 (dbus_connection_set_max_live_messages_size): rename
6035 (dbus_connection_get_outgoing_size): get size of outgoing
6037 (_dbus_connection_set_connection_counter): remove this cruft
6039 2003-04-14 Havoc Pennington <hp@redhat.com>
6041 * dbus/dbus-userdb.c: user database abstraction, mostly to get
6042 caching, but at some point we might want to be able to use a
6045 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
6046 SHA1 conf file to test the sha1 auth mechanism, since the regular
6047 test always uses EXTERNAL when available.
6050 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
6051 add conf file that requires use of sha1 auth
6053 2003-04-13 Havoc Pennington <hp@pobox.com>
6055 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
6056 from Philip Blundell to send messages and monitor them.
6058 2003-04-13 Havoc Pennington <hp@pobox.com>
6060 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
6063 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
6066 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
6067 fix to only recover unused bytes if we're already authenticated
6068 (_dbus_transport_get_is_authenticated): fix to still mark us
6069 authenticated if there are unused bytes.
6071 * bus/dispatch.c: implement security policy checking
6073 * bus/connection.c (bus_transaction_send_from_driver): new
6075 * bus/bus.c (bus_context_check_security_policy): new
6077 * bus/dispatch.c (send_service_nonexistent_error): delete this,
6078 now we just set the DBusError and it gets converted to an error
6081 * bus/connection.c (allow_user_function): enable code using actual
6082 data from the config file
6084 * bus/policy.c (list_allows_user): handle wildcard rules for
6085 user/group connection perms
6087 2003-04-13 Havoc Pennington <hp@pobox.com>
6089 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
6091 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
6093 * bus/policy.c (bus_policy_append_mandatory_rule)
6094 (bus_policy_append_default_rule, bus_policy_append_user_rule)
6095 (bus_policy_append_group_rule): new functions
6097 2003-04-12 Havoc Pennington <hp@pobox.com>
6099 * bus/config-parser.c (bus_config_parser_new): fix a memleak
6101 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
6102 the pid/gid/uid, just for paranoia.
6104 * test/break-loader.c (randomly_do_n_things): find a byte
6105 containing a type code, and randomly change it to a different
6108 2003-04-12 Havoc Pennington <hp@pobox.com>
6110 * bus/policy.h: change BusPolicy to be the thing from the config
6111 file, and rename old BusPolicy to BusClientPolicy
6113 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
6114 match change in how policy works
6116 * dbus/dbus-internals.h: mark assert_not_reached as
6117 __attribute((noreturn))__
6119 2003-04-11 Havoc Pennington <hp@redhat.com>
6121 * doc/dbus-specification.sgml: fix a spot with the wrong name for
6122 the broadcast service. Use boolean return for ServiceExists.
6124 2003-04-11 Havoc Pennington <hp@redhat.com>
6126 * configure.in: add another directory to look for qt in.
6128 2003-04-11 Havoc Pennington <hp@redhat.com>
6130 * AUTHORS: add Colin Walters
6132 2003-04-11 Havoc Pennington <hp@redhat.com>
6138 2003-04-11 Havoc Pennington <hp@redhat.com>
6140 * bus/messagebus.in: remove pid file when stopping the
6141 message bus, since the bus won't have privileges to remove it
6144 2003-04-11 Havoc Pennington <hp@redhat.com>
6146 * bus/bus.c (bus_context_new): move credentials change after
6149 2003-04-11 Havoc Pennington <hp@pobox.com>
6151 * test/decode-gcov.c: add "below average functions" to the
6152 coverage report, and change how some of the code works.
6154 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
6155 not in the coverage stats.
6157 * test/test-service.c (main): use _dbus_verbose not fprintf in a
6158 couple places so running the test suite doesn't result in megaspam.
6160 2003-04-11 Havoc Pennington <hp@pobox.com>
6162 * bus/dispatch.c (check_existent_service_activation): accept a no
6163 memory error in a place we didn't before
6165 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
6166 in case the first one failed," since the test suite is less
6169 2003-04-10 Havoc Pennington <hp@pobox.com>
6171 * bus/dispatch.c (check_segfault_service_activation): add test
6172 for launching an executable that just crashes.
6174 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
6175 don't leave a million cores. We'll see how portable this is.
6177 2003-04-10 Havoc Pennington <hp@pobox.com>
6179 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
6180 the possible parent failures before we fork, so that we don't
6181 fail to create a babysitter after creating the child.
6183 * bus/activation.c (bus_activation_activate_service): kill child
6184 if we don't successfully complete the activation.
6186 2003-04-10 Havoc Pennington <hp@redhat.com>
6188 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
6189 the connection if it's disconnected
6191 * bus/activation.c (bus_activation_service_created): use new
6192 transaction features to roll back removal of pending activation if
6193 we don't successfully create the service after all. Don't remove
6194 pending activation if the function fails.
6196 * dbus/dbus-list.c (_dbus_list_insert_before_link)
6197 (_dbus_list_insert_after_link): new code to facilitate
6200 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
6201 new functionality, so we can preallocate the ability to insert
6204 * bus/connection.c (bus_transaction_add_cancel_hook): new function
6205 allowing us to put custom hooks in a transaction to be used for
6206 cancelling said transaction
6208 * doc/dbus-specification.sgml: add some discussion of secondary
6209 service owners, and disallow zero-length service names
6211 * bus/services.c (bus_registry_acquire_service): new function,
6212 splits out part of bus_driver_handle_acquire_service() and fixes
6213 a bug where we didn't remove the service doing the acquiring
6214 from the secondary queue if we failed to remove the current owner
6215 from the front of the queue.
6217 2003-04-10 Alexander Larsson <alexl@redhat.com>
6219 * doc/dbus-specification.sgml:
6220 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
6222 2003-04-10 Alexander Larsson <alexl@redhat.com>
6227 Added files to cvsignore
6229 * dbus/dbus-message.h:
6230 * dbus/dbus-message.c: (dbus_message_iter_get_named):
6231 Make get_named() take two out argument and return a boolean.
6232 (dbus_message_iter_get_args_valist):
6233 Update usage of get_named().
6234 (dbus_message_iter_append_byte):
6236 (dbus_message_iter_append_named)
6238 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
6241 2003-04-10 Alexander Larsson <alexl@redhat.com>
6243 * dbus/dbus-marshal.[ch]:
6244 Add array_type_pos argument to _dbus_marshal_validate_arg.
6245 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
6247 * dbus/dbus-message.[ch]:
6248 Multi-dimensional arrays have full type specification in the
6249 outermost array. Iter code re-arranged to handle this.
6250 Added some more iter tests.
6252 * doc/dbus-specification.sgml:
6255 Update new array encoding description.
6256 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
6258 * test/data/invalid-messages/array-with-mixed-types.message:
6259 * test/data/valid-messages/array-of-array-of-uint32.message:
6260 Change to the new array format.
6262 * test/data/invalid-messages/too-short-dict.message:
6265 * test/data/valid-messages/recursive-types.message:
6266 Fix up and extend test.
6268 2003-04-10 Havoc Pennington <hp@pobox.com>
6270 * bus/dispatch.c: lots of fixes
6272 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
6273 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
6274 that was crack, broke the test service.
6276 * dbus/dbus-transport.c (_dbus_transport_open): fix error
6277 handling to avoid piling up errors if we get a failure on the
6280 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
6281 pid in assertion failures.
6283 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
6284 to some fixed size of file descriptor array. Don't return TRUE
6285 anytime a timeout exists, that led to lots of busy loop silliness
6288 2003-04-09 Havoc Pennington <hp@redhat.com>
6290 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
6291 I'd checked this in earlier but hadn't.
6293 2003-04-09 Havoc Pennington <hp@redhat.com>
6295 * bus/dispatch.c (bus_dispatch_test): get a bit further through
6296 the activation test (man this is getting old!)
6298 2003-04-09 Havoc Pennington <hp@redhat.com>
6300 * test/test-utils.c: use dispatch status function to fix this up
6302 * bus/connection.c (connection_watch_callback): don't dispatch
6304 (connection_timeout_callback): don't dispatch from here
6305 (bus_connections_setup_connection): set the dispatch status function
6306 (bus_connection_disconnected): unset it
6308 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
6309 used to add a connection to be dispatched
6310 (_dbus_loop_iterate): do the dispatching at the end of each
6313 * dbus/dbus-connection.c
6314 (dbus_connection_set_dispatch_status_function): new function
6315 allowing us to fix up main loop usage
6316 (_dbus_connection_last_unref): free all the various function
6318 (dbus_connection_dispatch): call the DispatchStatusFunction
6319 whenever this function returns
6320 (dbus_connection_handle_watch): call DispatchStatusFunction
6321 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
6322 (reply_handler_timeout): call DispatchStatusFunction
6323 (dbus_connection_flush): call DispatchStatusFunction
6325 2003-04-09 Havoc Pennington <hp@redhat.com>
6327 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
6330 * bus/dispatch.c (check_service_activated): fix bug in test
6332 * dbus/dbus-mainloop.c (check_timeout): fix this up
6334 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
6335 verbose output so we can sort out output from different processes,
6336 e.g. in the activation case.
6338 2003-04-08 Colin Walters <walters@gnu.org>
6340 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
6342 (bus_context_new): Set it.
6343 (bus_context_unref): Use it to delete the pid file.
6345 2003-04-08 Havoc Pennington <hp@redhat.com>
6347 * test/data/invalid-messages/array-with-mixed-types.message:
6348 regression test that fails for the moment
6350 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
6351 tests for convenience
6353 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
6354 array of nil, it broke things.
6356 * test/data/invalid-messages/array-of-nil.message: regression test
6358 * test/data/valid-messages/array-of-array-of-uint32.message:
6359 happened to write this so added it to suite
6361 2003-04-08 Havoc Pennington <hp@redhat.com>
6363 * bus/driver.c (bus_driver_handle_acquire_service): init
6364 retval/reply before checking name
6366 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
6367 recursion depth argument
6369 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
6370 in the public struct for future extension
6372 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
6375 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
6378 * doc/dbus-specification.sgml: fix typo
6380 2003-04-08 Alexander Larsson <alexl@redhat.com>
6382 Implemented recursive types, named types and new-style iters
6385 * glib/test-thread-client.c: (thread_func):
6386 * glib/test-thread-server.c: (handle_test_message):
6387 * test/test-service.c: (handle_echo):
6396 * dbus/dbus-internals.c: (_dbus_type_to_string):
6397 Update for new types.
6399 * dbus/dbus-marshal.[ch]:
6400 Implement recursive types and the new marshalling format.
6401 Remove hardcoded dict marshalling.
6402 Marshal named types.
6404 * dbus/dbus-message-builder.c:
6406 Remove references to old types
6408 * dbus/dbus-message.[ch]:
6409 New non-refcounted iter API that supports recursive iters.
6410 Use iters for appending, including support for recursive
6412 Add byte and named type support.
6413 Update everything to new marshalling formats.
6414 Add tests for new API.
6416 * dbus/dbus-protocol.h:
6417 Remove old array types.
6418 Add types: BYTE, ARRAY, DICT, NAMED
6420 * dbus/dbus-string.c:
6421 * dbus/dbus-sysdeps.c:
6422 Make parse_double locale safe.
6424 * dbus/dbus-test-main.c:
6430 * doc/dbus-specification.sgml:
6433 * test/data/incomplete-messages/missing-body.message:
6434 * test/data/invalid-messages/bad-boolean.message:
6435 * test/data/invalid-messages/bad-boolean-array.message:
6436 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
6437 * test/data/invalid-messages/boolean-has-no-value.message-raw:
6438 * test/data/invalid-messages/too-short-dict.message:
6439 * test/data/valid-messages/dict-simple.message:
6440 * test/data/valid-messages/dict.message:
6441 * test/data/valid-messages/emptiness.message:
6442 * test/data/valid-messages/lots-of-arguments.message:
6443 * test/data/valid-messages/no-padding.message:
6444 * test/data/valid-messages/recursive-types.message:
6445 Add missing NAME fields
6446 Fix up dicts & arrays
6448 * test/data/invalid-messages/dict-with-nil-value.message:
6449 Removed, this is not invalid anymore.
6451 * test/data/valid-messages/recursive-types.message:
6452 Add new test for deeply recursive types.
6454 2003-04-07 Havoc Pennington <hp@pobox.com>
6456 * bus/driver.c (bus_driver_handle_acquire_service): return an
6457 error if you try to acquire a service that starts with ':'
6459 2003-04-07 Havoc Pennington <hp@redhat.com>
6461 * doc/dbus-specification.sgml: require that base service names
6462 start with ':' and that the base service is created/deleted
6463 as first and last things a connection does on the bus
6465 * bus/dispatch.c (check_existent_service_activation): lots more
6466 work on the activation test; it doesn't fully pass yet...
6468 * test/test-service.c (main): fix so we don't memleak the
6469 connection to the message bus
6470 (filter_func): accept a message asking us to exit
6472 2003-04-06 Havoc Pennington <hp@pobox.com>
6474 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
6477 * configure.in: fixes to Qt detection from Colin Walters
6479 * doc/Makefile.am: Only remove generated docbook dirs if they
6480 exist, from Colin Walters
6482 * dbus/dbus-bus.c: change how we set well-known connections to
6483 NULL, so that it works if a single connection is stored in
6484 two well-known array slots.
6486 * test/Makefile.am: remove a lot of stuff that isn't immediately
6487 useful, it's in CVS history if we want it.
6489 * test/test-service.c: use dbus-mainloop instead of that
6492 2003-04-06 Havoc Pennington <hp@pobox.com>
6494 * dbus/Makefile.am: split lists of sources into stuff that goes in
6495 the library, util functions that go in the lib and are also used
6496 elsewhere, and util functions that are used in tests/daemon but
6497 don't go in the lib.
6499 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
6500 here so it can be used in test binaries also
6502 2003-04-06 Havoc Pennington <hp@pobox.com>
6504 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
6505 here in the parent process, so we can return an error if it
6506 fails. Also, move some of the code into the child so the parent
6507 is less hosed if we fail midway through.
6509 * bus/bus.c (bus_context_new): move pidfile detection further up
6510 in the function, before we start overwriting sockets and such.
6512 * bus/messagebus.in: adjust this a bit, not sure if it will work.
6514 * configure.in: add --with-system-pid-file and --with-system-socket
6516 2003-04-06 Colin Walters <walters@verbum.org>
6518 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
6520 * bus/system.conf.in: Declare a pidfile.
6522 * bus/bus.c (bus_context_new): Test for an existing pid file, and
6523 create one (if appropriate).
6525 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
6526 (struct BusConfigParser) [pidfile]: New.
6527 (element_type_to_name, merge_included, start_busconfig_child)
6528 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
6529 (bus_config_parser_unref): Free it.
6530 (bus_config_parser_get_pidfile): New function.
6532 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
6534 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
6536 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
6538 * dbus/dbus-sysdeps.h: Prototype it.
6540 2003-04-06 Havoc Pennington <hp@pobox.com>
6542 * bus/bus.c (bus_context_new): print the address in here, rather
6543 than in main(), because we need to do it before forking the daemon
6545 * bus/dispatch.c (send_service_nonexistent_error): set the sender
6546 on the service nonexistent error
6548 * bus/driver.c (bus_driver_handle_acquire_service): set the
6549 sender on the AcquireService reply
6551 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
6552 server also listen on a UNIX socket so services can connect to it.
6554 2003-04-06 Havoc Pennington <hp@pobox.com>
6556 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
6557 so it detects deadlocks and also we actually init threads when
6560 2003-04-06 Havoc Pennington <hp@pobox.com>
6562 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
6563 save the domain socket name, and unlink it when we disconnect the
6564 server. Means that at least when we exit normally, we won't leave
6565 a bunch of junk in /tmp
6567 * dbus/dbus-transport-unix.c
6568 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
6569 memory management). (I was making a real change here but then
6572 2003-04-06 Havoc Pennington <hp@pobox.com>
6574 * bus/bus.c (bus_context_new): fix wrong handling of
6575 server_data_slot_unref() in the error case.
6577 * dbus/dbus-internals.h (_dbus_assert): change so it passes
6578 "(condition) != 0" to _dbus_real_assert so that
6579 "_dbus_assert (pointer)" doesn't cause a warning
6581 * bus/main.c (main): accept --print-address option to print out
6582 the message bus address
6584 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
6586 * dbus/dbus-transport.c (_dbus_transport_open): special error for
6587 "tmpdir" option to unix: address on client side
6589 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
6592 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
6593 we can use to create sockets in the test suite.
6595 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
6596 cleanly. To be used for testing.
6598 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
6600 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
6602 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6603 handle trying to call this when there's no servers active
6605 2003-04-05 Havoc Pennington <hp@pobox.com>
6611 2003-04-05 Havoc Pennington <hp@pobox.com>
6613 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
6614 crash on startup. Need to get "try starting the daemon"
6615 in the test suite I guess. ;-)
6617 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
6618 tracked the number of open connections; it's better done in
6619 application-specific code as you want it to span all servers etc.
6621 2003-04-05 Havoc Pennington <hp@pobox.com>
6623 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
6624 patch from Colin Walters
6626 2003-04-05 Havoc Pennington <hp@pobox.com>
6628 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
6629 reality; in fact multiple mechanisms are allowed.
6631 * dbus/dbus-internals.c (_dbus_real_assert)
6632 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
6633 _dbus_assert_not_reached() into functions, so that they don't show
6634 up in basic block counts for test coverage, and don't use up as
6635 much disk space. Does mean slower execution speed though, so
6636 assumes --disable-asserts is the normal production case.
6638 2003-04-05 Havoc Pennington <hp@pobox.com>
6640 * test/Makefile.am (dist-hook): also dist *.in files
6646 2003-04-05 Havoc Pennington <hp@pobox.com>
6648 * dbus/dbus-string.c: docs warning
6650 * dbus/dbus-spawn.c: missing docs
6652 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
6654 2003-04-05 Havoc Pennington <hp@pobox.com>
6656 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
6659 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
6660 to -1 once we've reaped the babysitter
6661 (_dbus_babysitter_handle_watch): do as much work as we can, not
6664 * bus/activation.c: add code using DBusBabysitter so that we
6665 handle it when a service fails to start up properly.
6666 (bus_activation_service_created): don't remove the activation
6667 entries as we go, just let them get removed when we free the pending
6668 activation. Unref reply messages after sending them.
6670 2003-04-05 Havoc Pennington <hp@pobox.com>
6672 * test/decode-gcov.c (main): print per-directory stats in the report
6674 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
6676 2003-04-05 Havoc Pennington <hp@pobox.com>
6678 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
6680 * test/decode-gcov.c: hack up a little program to suck data
6681 out of gcov files. Yes this is sort of silly.
6683 * configure.in: define something in config.h and do an
6684 AM_CONDITIONAL when gcov is enabled
6686 2003-04-04 Havoc Pennington <hp@redhat.com>
6688 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
6689 return a "babysitter" object that is used to monitor the status of
6690 the spawned process and reap it when required.
6692 * test/test-segfault.c, test/test-exit.c,
6693 test/test-sleep-forever.c: binaries that do various lame things,
6694 used in the test suite.
6696 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
6698 2003-04-03 Havoc Pennington <hp@pobox.com>
6700 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
6701 in preparation for modifying it, dbus-sysdeps is getting
6704 2003-04-03 Havoc Pennington <hp@redhat.com>
6706 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
6709 * bus/*.[hc]: adapt to mainloop change
6711 2003-04-03 Havoc Pennington <hp@redhat.com>
6713 * bus/activation.c (load_directory): fix up memleaks
6714 (bus_activation_entry_free): free the entry
6716 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
6717 we get one from the message bus; fix memleaks.
6719 * dbus/dbus-message.c (dbus_set_error_from_message): new function
6721 2003-04-03 Havoc Pennington <hp@pobox.com>
6723 * bus/config-parser.c (bus_config_parser_unref): free
6724 list of mechanisms, bug discovered by test suite enhancements
6725 (putting system.conf and session.conf into suite)
6727 * test/Makefile.am, test/test-service.c: add placeholder for a
6728 test service that we'll activate as part of test suite. Doesn't
6731 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
6732 setting NULL value, and use system malloc not dbus_malloc()
6733 when we have unavoidable memleakage.
6735 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
6736 didn't work, and support DBUS_BUS_ACTIVATION.
6738 * bus/activation.c (child_setup): pass our well-known bus type to
6741 * bus/config-parser.c: support <type> to specify well-known type
6743 * doc/dbus-specification.sgml: document the env variables to
6744 locate well-known buses and find service activator
6746 2003-04-02 Havoc Pennington <hp@redhat.com>
6748 * test/Makefile.am (all-local): add a rule to copy tests to
6749 builddir, so we can have generated tests. Use this to remove the
6750 silly hack for testing system.conf and session.conf. Will use this
6751 shortly to generate .service files pointing to test binaries.
6753 2003-04-02 Havoc Pennington <hp@redhat.com>
6755 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
6756 current alloc and needed new length, not max of the doubled
6757 allocation and needed new length. Also, when building tests,
6758 don't do the double-allocation stuff, just realloc every time.
6760 2003-04-02 Havoc Pennington <hp@redhat.com>
6762 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
6764 (_dbus_string_get_dirname): new
6765 (_dbus_sysdeps_test): new
6766 (_dbus_directory_open): include dirnames in error messages
6768 * bus/config-parser.c: interpret <include> and <includedir> and
6769 <servicedir> relative to config file location if the given
6770 filename is not absolute.
6772 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
6774 2003-04-02 Havoc Pennington <hp@redhat.com>
6776 * bus/connection.c (bus_transaction_send_error_reply): set sender
6777 service for the error, and unref the reply on success
6779 * bus/activation.c: convert to use BusTransaction so OOM can be
6781 (bus_activation_service_created): set sender of the message
6783 2003-04-01 Havoc Pennington <hp@redhat.com>
6785 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
6786 <includedir> (at least mostly)
6788 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
6789 first, then the user ID
6791 2003-04-01 Havoc Pennington <hp@pobox.com>
6793 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
6796 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
6798 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
6800 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
6801 socket 0777, and unlink any existing socket.
6803 * bus/bus.c (bus_context_new): change our UID/GID and fork if
6804 the configuration file so specifies; set up auth mechanism
6807 * bus/config-parser.c (bus_config_parser_content): add support
6808 for <fork> option and fill in code for <auth>
6810 * bus/system.conf.in: add <fork/> to default configuration,
6811 and limit auth mechanisms to EXTERNAL
6813 * doc/config-file.txt (Elements): add <fork>
6815 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
6816 (_dbus_change_identity): new function
6818 2003-03-31 Havoc Pennington <hp@redhat.com>
6820 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
6821 (_dbus_listen_unix_socket): fix off-by-one error in null
6822 termination spotted by Nalin
6824 2003-03-31 Havoc Pennington <hp@redhat.com>
6826 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
6827 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
6828 having a real home directory available.
6830 2003-03-31 Havoc Pennington <hp@redhat.com>
6832 * bus/Makefile.am (install-data-hook): create /var/run/dbus
6834 * bus/messagebus.in: add init script for Red Hat /etc/init.d
6836 * configure.in: add support for specifying a style of init script
6839 2003-03-31 Havoc Pennington <hp@redhat.com>
6841 Fix some annoying DBusString API and fix all affected code.
6843 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
6845 (_dbus_string_get_data): change to return string instead of using
6847 (_dbus_string_get_const_data): ditto
6848 (_dbus_string_get_data_len): ditto
6849 (_dbus_string_get_const_data_len): ditto
6851 2003-03-31 Havoc Pennington <hp@redhat.com>
6853 * bus/main.c (main): fix up the command line arguments to be nicer
6855 2003-03-31 Havoc Pennington <hp@redhat.com>
6857 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
6858 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
6859 final location that lands in the config file
6861 * bus/config-loader-expat.c (bus_config_load): fix type of
6864 * doc/TODO: remove TODO item for dbus_bus_get()
6866 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
6868 2003-03-31 Havoc Pennington <hp@pobox.com>
6870 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
6871 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
6872 argument since they are always client side
6874 * dbus/dbus-server.c (dbus_server_get_address): new function
6876 * bus/main.c (main): take the configuration file as an argument.
6878 * test/data/valid-config-files/debug-allow-all.conf: new file to
6879 use with dispatch.c tests for example
6881 * bus/test-main.c (main): require test data dir
6883 * bus/bus.c (bus_context_new): change this to take a
6884 configuration file name as argument
6886 * doc/config-file.txt (Elements): add <servicedir>
6888 * bus/system.conf, bus/session.conf: new files
6890 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
6891 well-known socket if none set
6893 * configure.in: create system.conf and session.conf
6895 2003-03-30 Havoc Pennington <hp@pobox.com>
6897 * bus/config-parser.c: hacking
6899 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
6900 to shut down, since it could cause weirdness with the DBusList
6903 * dbus/dbus-list.c (_dbus_list_test): add tests for the
6904 link-oriented stack routines
6905 (alloc_link): free the mempool if the first alloc from it fails
6907 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
6909 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
6911 (_dbus_string_skip_white): new
6913 * doc/config-file.txt (Elements): add <includedir>
6915 2003-03-28 Havoc Pennington <hp@pobox.com>
6917 * dbus/dbus-string.c (_dbus_string_copy_data_len)
6918 (_dbus_string_copy_data): new functions
6920 2003-03-28 Anders Carlsson <andersca@codefactory.se>
6922 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
6926 * dbus/dbus-memory.c:
6929 2003-03-28 Havoc Pennington <hp@pobox.com>
6931 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
6932 I think it may have just been superstition. Not sure.
6934 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
6935 failures that were not being handled.
6937 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
6939 * dbus/dbus-memory.c: add ability to set number of mallocs in a
6940 row that will fail on out-of-memory.
6942 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
6943 function for testing out-of-memory handling.
6945 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
6946 allocation functions, they do map exactly to the expat ones.
6948 2003-03-27 Havoc Pennington <hp@redhat.com>
6950 * bus/config-loader-libxml.c (bus_config_load): add another error
6953 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6956 Add note about automatic service activation.
6958 * doc/dbus-specification.sgml:
6959 Rename the specification and clarify a few things.
6961 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6964 * dbus/dbus-address.c:
6966 * dbus/dbus-marshal.c:
6967 * dbus/dbus-server-debug-pipe.c:
6968 * dbus/dbus-transport-unix.c:
6969 Fix documentation warnings.
6971 2003-03-26 Havoc Pennington <hp@pobox.com>
6973 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
6974 after every test so it's quick and easy to see which leaked, and
6975 so we test multiple dbus_shutdown() calls
6977 * configure.in: change configure.in XML stuff to also support
6980 * config-loader-libxml.c: some hacking
6982 * config-loader-expat.c: some hacking
6984 * config-parser.c: some hacking, plus tests
6986 2003-03-25 Havoc Pennington <hp@redhat.com>
6988 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
6990 * configure.in: add --with-xml option to specify XML library,
6991 right now only libxml is supported.
6993 * bus/config-loader-libxml.c, config-parser.c: sync some minor
6994 nonworking code between home and work, still just stubs
6996 2003-03-24 Havoc Pennington <hp@redhat.com>
6998 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
7001 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
7002 NULL argument for "message" if the error is a well-known one,
7003 fill in a generic message in this case.
7005 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
7008 * bus/test.c (bus_test_flush_bus): add
7010 * bus/policy.c (bus_policy_test): test code stub
7012 2003-03-24 Havoc Pennington <hp@pobox.com>
7014 * bus/connection.c (bus_connections_setup_connection): set up
7015 the "can this user connect" function, but it always returns
7016 TRUE until we have a config file parser so we can have a config
7017 file that allows connections.
7019 2003-03-23 Havoc Pennington <hp@pobox.com>
7021 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
7022 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
7023 the mutex, so we can check for proper memory management
7026 * dbus/dbus-dataslot.c: remove the mutex from
7027 DBusDataSlotAllocator and lock it manually when using it,
7028 to simplify fitting it into the global slots framework.
7030 * dbus/dbus-threads.c (init_static_locks): rework how we're
7031 handling global locks so they are easily shut down.
7033 * bus/policy.c (bus_policy_append_rule): fix
7035 * bus/test-main.c (main): check for memleaks
7037 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
7038 test suite check for memleaks
7040 * dbus/dbus-memory.c: add support in test mode for tracking
7041 number of outstanding blocks
7043 2003-03-23 Havoc Pennington <hp@pobox.com>
7045 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
7048 * dbus/dbus-hash.h: add ULONG hash keys
7050 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
7051 (_dbus_get_group_id): new function
7053 2003-03-20 Havoc Pennington <hp@redhat.com>
7055 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
7057 (dbus_connection_get_unix_user): new function
7059 2003-03-20 Havoc Pennington <hp@pobox.com>
7061 * bus/connection.c (bus_connection_send_oom_error): assert that
7062 message has a sender
7063 (connection_execute_transaction): ditto
7064 (bus_connection_preallocate_oom_error): fix to set the sender, and
7065 set recipient to the destination service, not the bus driver
7067 * bus/policy.c: hacking
7069 * dbus/dbus-message.c (dbus_message_service_is): new function
7070 (dbus_message_sender_is): new
7072 2003-03-19 Havoc Pennington <hp@redhat.com>
7074 * bus/policy.c: start sketching code for policy restrictions on
7075 what connections can do.
7077 2003-03-18 Havoc Pennington <hp@redhat.com>
7079 * doc/TODO: some notes on high-level todo items. Little nitpick
7080 stuff is all in @todo, so no need to add it here.
7082 * doc/config-file.txt: some notes on how config file might look
7084 2003-03-18 Anders Carlsson <andersca@codefactory.se>
7090 2003-03-17 Havoc Pennington <hp@redhat.com>
7092 * dbus/dbus-internals.h: add gcc attributes so that
7093 our printf-style functions warn on bad arguments to
7096 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
7099 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7102 2003-03-17 Havoc Pennington <hp@redhat.com>
7104 * bus/test-main.c (main): make it print something as it runs
7105 so make check doesn't look stuck
7107 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
7108 from CVS, now obsolete
7110 2003-03-17 Anders Carlsson <andersca@codefactory.se>
7112 * bus/dispatch.c: (bus_dispatch):
7113 Refetch the service name since it may have been reallocated
7114 when dbus_message_set_sender was called.
7116 * dbus/dbus-sysdeps.c: (_dbus_accept):
7117 Add address and address length variables and use them to stop
7118 valgrind from complaining.
7120 2003-03-17 Havoc Pennington <hp@pobox.com>
7122 All tests pass, no memleaks, no valgrind complaints.
7124 * bus/test.c: refcount handler_slot
7126 * bus/connection.c (bus_connections_new): refcount
7127 connection_data_slot
7129 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
7130 bytes so that auth scripts pass.
7132 * bus/dispatch.c: init message_handler_slot so it gets allocated
7135 * bus/dispatch.c (message_handler_slot_ref): fix memleak
7137 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
7138 dealloc server_pipe_hash when no longer used for benefit of
7141 * dbus/dbus-auth.c (process_command): memleak fix
7143 * bus/dispatch.c (check_hello_message): memleak fix
7145 2003-03-16 Havoc Pennington <hp@pobox.com>
7147 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
7149 2003-03-17 Anders Carlsson <andersca@codefactory.se>
7151 * bus/activation.c (bus_activation_activate_service): Append
7152 the pending activation entry to the list of pending activations.
7154 2003-03-16 Havoc Pennington <hp@pobox.com>
7156 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
7159 * dbus/dbus-address.c (create_entry): fix OOM handling when
7160 failing to alloc entry->method
7162 2003-03-16 Havoc Pennington <hp@pobox.com>
7164 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
7167 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
7168 add some missing dbus_set_result
7170 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
7171 alloc the DBusMessageHandler
7173 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
7174 the transport here, since we call this from the finalizer; it
7175 resulted in a double-finalize.
7177 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
7178 where we tried to use transport->connection that was NULL,
7179 happened when transport was disconnected early on due to OOM
7181 * bus/*.c: adapt to handle OOM for watches/timeouts
7183 * dbus/dbus-transport-unix.c: port to handle OOM during
7186 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
7187 reference to unused bytes instead of a copy
7189 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
7192 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
7195 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
7198 2003-03-16 Anders Carlsson <andersca@codefactory.se>
7200 * doc/dbus-specification.sgml:
7201 Document reply message for ActivateService.
7203 2003-03-16 Anders Carlsson <andersca@codefactory.se>
7205 * bus/activation.c: (bus_pending_activation_entry_free),
7206 (bus_pending_activation_free), (bus_activation_new),
7207 (bus_activation_unref), (bus_activation_service_created),
7208 (bus_activation_activate_service):
7210 * bus/bus.c: (bus_context_new):
7211 * bus/desktop-file.c: (new_section):
7212 * bus/driver.c: (bus_driver_send_service_deleted),
7213 (bus_driver_handle_activate_service):
7214 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
7216 * dbus/dbus-connection.c:
7217 (dbus_connection_send_with_reply_and_block):
7218 * dbus/dbus-message.c: (dbus_message_append_args_valist):
7219 * dbus/dbus-protocol.h:
7220 Make activation work better. Now pending activations will be queued
7221 and the daemon won't try to activate services that are already registered.
7223 2003-03-16 Havoc Pennington <hp@pobox.com>
7225 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
7228 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
7229 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
7231 2003-03-16 Havoc Pennington <hp@pobox.com>
7233 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
7234 this. always run the test suite before commit...
7236 * bus/*: adapt to DBusConnection API changes
7238 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
7239 requires renaming stuff to avoid dbus_connection_dispatch name
7242 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
7245 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
7246 separate from _dbus_message_loader_return_buffer()
7248 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
7249 this, because it's now always broken to use; the number of
7250 messages in queue vs. the number still buffered by the message
7251 loader is undefined/meaningless. Should use
7252 dbus_connection_get_dispatch_state().
7253 (dbus_connection_dispatch): rename from
7254 dbus_connection_dispatch_message
7256 2003-03-16 Havoc Pennington <hp@pobox.com>
7258 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
7261 2003-03-16 Anders Carlsson <andersca@codefactory.se>
7263 * dbus/dbus-connection.c:
7264 (dbus_connection_send_with_reply_and_block):
7265 Decrease connection->n_incoming when removing an entry
7267 * dbus/dbus-dict.c: (dbus_dict_entry_free),
7268 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
7269 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
7270 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
7271 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
7272 (dbus_dict_get_byte_array):
7273 Handle NULL arrays and strings. Also add support for byte arrays.
7275 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
7276 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
7277 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
7278 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
7279 (_dbus_demarshal_dict), (demarshal_and_validate_len),
7280 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
7281 * dbus/dbus-marshal.h:
7282 Add support for marshalling and demarshalling empty arrays and strings.
7284 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7285 (dbus_message_append_string_array),
7286 (dbus_message_iter_get_boolean),
7287 (dbus_message_iter_get_boolean_array),
7288 (dbus_message_iter_get_int32_array),
7289 (dbus_message_iter_get_uint32_array),
7290 (dbus_message_iter_get_double_array),
7291 (dbus_message_iter_get_byte_array),
7292 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
7293 (check_message_handling):
7294 Add support for getting empty arrays and dicts.
7296 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
7297 Don't do any validation at all for now, that's better than just checking
7300 * test/data/valid-messages/emptiness.message:
7301 New test message with lots of empty arrays.
7303 2003-03-16 Havoc Pennington <hp@pobox.com>
7305 * dbus/dbus-connection.c
7306 (_dbus_connection_queue_received_message_link): new function that
7307 can't fail due to OOM
7309 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
7310 new function pops a message together with a list link
7313 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
7314 message queuing functions to avoid needing to alloc memory
7316 2003-03-16 Havoc Pennington <hp@pobox.com>
7318 Oops - test code was only testing failure of around 30 of the
7319 mallocs in the test path, but it turns out there are 500+
7320 mallocs. I believe this was due to misguided linking setup such
7321 that there was one copy of dbus_malloc etc. in the daemon and one
7322 in the shared lib, and only daemon mallocs were tested. In any
7323 case, the test case now tests all 500+ mallocs, and doesn't pass
7324 yet, though there are lots of fixes in this patch.
7326 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7327 this so that it doesn't need to allocate memory, since it
7328 has no way of indicating failure due to OOM (and would be
7329 annoying if it did).
7331 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
7333 * bus/Makefile.am: rearrange to create two self-contained
7334 libraries, to avoid having libraries with overlapping symbols.
7335 that was resulting in weirdness, e.g. I'm pretty sure there
7336 were two copies of global static variables.
7338 * dbus/dbus-internals.c: move the malloc debug stuff to
7341 * dbus/dbus-list.c (free_link): free list mempool if it becomes
7344 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
7346 * dbus/dbus-address.c (dbus_parse_address): free list nodes
7349 * bus/dispatch.c (bus_dispatch_add_connection): free
7350 message_handler_slot when no longer using it, so
7351 memory leak checkers are happy for the test suite.
7353 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
7355 * bus/bus.c (new_connection_callback): disconnect in here if
7356 bus_connections_setup_connection fails.
7358 * bus/connection.c (bus_connections_unref): fix to free the
7360 (bus_connections_setup_connection): if this fails, don't
7361 disconnect the connection, just be sure there are no side
7364 * dbus/dbus-string.c (undo_alignment): unbreak this
7366 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
7368 (_dbus_auth_new): fix the order in which we free strings
7371 * bus/connection.c (bus_connection_disconnected): fix to
7372 not send ServiceDeleted multiple times in case of memory
7375 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
7376 get the base service name
7377 (dbus_bus_register_client): don't return base service name,
7378 instead store it on the DBusConnection and have an accessor
7380 (dbus_bus_register_client): rename dbus_bus_register()
7382 * bus/dispatch.c (check_hello_message): verify that other
7383 connections on the bus also got the correct results, not
7384 just the one sending hello
7386 2003-03-15 Havoc Pennington <hp@pobox.com>
7388 Make it pass the Hello handling test including all OOM codepaths.
7389 Now to do other messages...
7391 * bus/services.c (bus_service_remove_owner): fix crash when
7392 removing owner from an empty list of owners
7393 (bus_registry_ensure): don't leave service in the list of
7394 a connection's owned services if we fail to put the service
7397 * bus/connection.c (bus_connection_preallocate_oom_error): set
7398 error flag on the OOM error.
7400 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7401 handle _dbus_transport_set_connection failure
7403 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
7404 to create watches up front and simply enable/disable them as
7406 (unix_connection_set): this can now fail on OOM
7408 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
7409 of enabling/disabling a watch or timeout.
7411 * bus/loop.c (bus_loop_iterate): don't touch disabled
7414 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
7416 2003-03-15 Havoc Pennington <hp@pobox.com>
7418 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
7419 write useful test code, after all that futzing around ;-)
7421 Test does not yet pass because we can't handle OOM in
7422 _dbus_transport_messages_pending (basically,
7423 dbus_connection_preallocate_send() does not prealloc the write
7424 watch). To fix this, I think we need to add new stuff to
7425 set_watch_functions, namely a SetEnabled function so we can alloc
7426 the watch earlier, then enable it later.
7428 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
7429 dbus-memory.c to the convenience lib
7431 * bus/test.c: rename some static functions to keep them clearly
7432 distinct from stuff in connection.c. Handle client disconnection.
7434 2003-03-14 Havoc Pennington <hp@pobox.com>
7436 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
7437 transport, tests more of the real codepath. Set up clients
7438 with bus_setup_debug_client.
7440 * bus/test.c (bus_setup_debug_client): function to set up debug
7441 "clients" on the main loop
7443 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
7446 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
7449 * dbus/dbus-server-debug.c: support a debug server based on pipes
7451 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
7452 (_dbus_close): new function
7454 * configure.in: check for socketpair
7456 2003-03-14 Havoc Pennington <hp@redhat.com>
7458 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
7461 * dbus/dbus-transport-debug.c: rework this a good bit to be
7462 less complicated. hopefully still works.
7464 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
7467 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
7470 * dbus/dbus-message.c (dbus_message_copy): rename from
7471 dbus_message_new_from_message, fix it up to copy
7472 all the message fields, add test case
7474 * bus/dispatch.c (bus_dispatch_test): add some more test code,
7475 not quite passing yet
7477 2003-03-14 Havoc Pennington <hp@pobox.com>
7479 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
7480 until no work remains" in test code. (the large diff here
7481 is just code movement, no actual changes)
7483 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
7484 1, no point waiting around for test code.
7485 (_dbus_server_debug_accept_transport): unref the timeout
7486 after adding it (right?)
7488 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
7490 2003-03-13 Havoc Pennington <hp@redhat.com>
7492 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
7495 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
7498 * dbus/dbus-connection.h: Make AddWatchFunction and
7499 AddTimeoutFunction return a bool so they can fail on out-of-memory
7501 * bus/bus.c (bus_context_new): set up timeout handlers
7503 * bus/connection.c (bus_connections_setup_connection): set up
7506 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
7509 * bus/bus.c (bus_context_new): adapt to changes
7511 * bus/connection.c: adapt to changes
7513 * test/watch.c: adapt to DBusWatch changes
7515 * bus/dispatch.c (bus_dispatch_test): started adding this but
7518 2003-03-14 Anders Carlsson <andersca@codefactory.se>
7520 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
7522 2003-03-13 Havoc Pennington <hp@pobox.com>
7524 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
7525 set up a test framework as for the library
7527 2003-03-12 Havoc Pennington <hp@pobox.com>
7529 Throughout: purge global variables, introduce BusActivation,
7530 BusConnections, BusRegistry, etc. objects instead.
7532 * bus/bus.h, bus/bus.c: introduce BusContext as a global
7535 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
7536 going to redo this a bit differently I think
7538 2003-03-12 Havoc Pennington <hp@redhat.com>
7540 Mega-patch that gets the message bus daemon initially handling
7541 out-of-memory. Work still needed. Also lots of random
7542 moving stuff to DBusError instead of ResultCode.
7544 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
7546 * dbus/dbus-connection.c
7547 (dbus_connection_send_with_reply_and_block): use DBusError
7549 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
7552 * dbus/dbus-connection.c (dbus_connection_send): drop the result
7553 code here, as the only failure possible is OOM.
7555 * bus/connection.c (bus_connection_disconnect):
7556 rename bus_connection_disconnected as it's a notification only
7558 * bus/driver.c (bus_driver_handle_acquire_service): don't free
7559 "name" on get_args failure, should be done by get_args;
7560 don't disconnect client for bad args, just return an error.
7561 (bus_driver_handle_service_exists): ditto
7563 * bus/services.c (bus_services_list): NULL-terminate returned array
7565 * bus/driver.c (bus_driver_send_service_lost)
7566 (bus_driver_send_service_acquired): send messages from driver to a
7567 specific client to the client's unique name, not to the broadcast
7570 * dbus/dbus-message.c (decode_header_data): reject messages that
7571 contain no name field
7572 (_dbus_message_get_client_serial): rename to
7573 dbus_message_get_serial and make public
7574 (_dbus_message_set_serial): rename from set_client_serial
7575 (_dbus_message_set_reply_serial): make public
7576 (_dbus_message_get_reply_serial): make public
7578 * bus/connection.c (bus_connection_foreach): allow stopping
7579 iteration by returning FALSE from foreach function.
7581 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
7582 (dbus_connection_free_preallocated_send)
7583 (dbus_connection_preallocate_send): new API for sending a message
7584 without possibility of malloc failure.
7585 (dbus_connection_send_message): rename to just
7586 dbus_connection_send (and same for whole function family)
7588 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
7590 * dbus/dbus-sysdeps.c (_dbus_exit): new function
7592 * bus/activation.c: handle/return errors
7594 * dbus/dbus-errors.h: add more DBUS_ERROR #define
7596 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
7597 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
7598 (_dbus_result_from_errno): move to this file
7600 2003-03-10 Anders Carlsson <andersca@codefactory.se>
7602 * dbus/dbus-marshal.c:
7603 (_dbus_marshal_set_string):
7604 Take a length argument so we can marshal the correct string
7607 (_dbus_marshal_dict), (_dbus_demarshal_dict),
7608 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
7609 (_dbus_marshal_test):
7610 * dbus/dbus-marshal.h:
7611 Add support for marshalling and demarshalling dicts.
7613 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7614 Add support for TYPE DICT.
7616 * dbus/dbus-message.c: (set_string_field):
7617 Adjust header padding.
7619 (dbus_message_append_args_valist), (dbus_message_append_dict),
7620 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
7621 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
7622 (check_message_handling), (check_have_valid_message):
7623 * dbus/dbus-message.h:
7624 Add functions for setting and getting dicts.
7626 * dbus/dbus-protocol.h:
7632 * doc/dbus-specification.sgml:
7633 Add information about how dicts are marshalled.
7635 * test/data/invalid-messages/dict-with-nil-value.message:
7636 * test/data/invalid-messages/too-short-dict.message:
7637 * test/data/valid-messages/dict-simple.message:
7638 * test/data/valid-messages/dict.message:
7639 Add sample messages containing dicts.
7641 2003-03-08 Anders Carlsson <andersca@codefactory.se>
7643 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
7645 2003-03-07 Anders Carlsson <andersca@codefactory.se>
7648 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
7649 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
7650 (dbus_dict_set_int32), (dbus_dict_set_uint32),
7651 (dbus_dict_set_double), (dbus_dict_set_string),
7652 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
7653 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
7654 (dbus_dict_set_string_array), (_dbus_dict_test):
7656 Fix according to comments from Havoc.
7658 2003-03-06 Michael Meeks <michael@server.home>
7660 * configure.in: if we don't have kde-config, disable have_qt.
7662 2003-03-07 Anders Carlsson <andersca@codefactory.se>
7667 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
7668 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
7669 (dbus_dict_remove), (dbus_dict_get_value_type),
7670 (dbus_dict_get_keys), (dbus_dict_put_boolean),
7671 (dbus_dict_put_int32), (dbus_dict_put_uint32),
7672 (dbus_dict_put_double), (dbus_dict_put_string),
7673 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
7674 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
7675 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
7676 (dbus_dict_get_int32), (dbus_dict_get_uint32),
7677 (dbus_dict_get_double), (dbus_dict_get_string),
7678 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
7679 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
7680 (dbus_dict_get_string_array), (_dbus_dict_test):
7682 Add DBusDict implementation
7684 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
7688 2003-03-04 Havoc Pennington <hp@pobox.com>
7690 * test/data/auth/*: adapt to changes
7692 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
7693 USERID_BASE64 and change USERNAME_BASE64 to put in username not
7696 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
7697 more stuff from being in a context name, to make the protocol
7698 simpler to deal with
7700 * dbus/dbus-errors.c (dbus_error_has_name): new function
7701 (dbus_error_is_set): new function
7703 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
7704 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
7706 * dbus/dbus-connection.c (dbus_connection_flush): also read
7707 messages during a flush operation
7709 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
7711 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7713 * configure.in: Check for gethostbyname on Solaris.
7715 * dbus/dbus-transport.c: (_dbus_transport_open):
7716 Remove duplicate "tcp" entry.
7718 * doc/dbus-specification.sgml:
7719 Clarify some things.
7721 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7723 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
7724 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
7725 (_dbus_keyring_test):
7726 * dbus/dbus-md5.c: (_dbus_md5_compute):
7727 * dbus/dbus-sha.c: (_dbus_sha_compute):
7730 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7732 * README: Add some things.
7734 2003-03-04 Anders Carlsson <andersca@codefactory.se>
7736 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
7737 after case DBUS_TYPE_BOOELAN.
7739 2003-03-02 Havoc Pennington <hp@pobox.com>
7741 * test/break-loader.c (randomly_set_extreme_ints): add test that
7742 sets really huge and small integers
7744 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
7745 that length of boolean array fits in the string, and that
7746 string has room for boolean value in single-bool case.
7748 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
7749 optional value to "ALIGN" command which is what to fill the
7752 * test/data/valid-messages/no-padding.message: add regression
7753 test for the message padding problem
7755 2003-03-02 Havoc Pennington <hp@pobox.com>
7757 * dbus/dbus-message.c (decode_header_data): fix to always init
7758 message_padding, from Benjamin Dauvergne
7760 2003-03-02 Havoc Pennington <hp@pobox.com>
7766 2003-03-01 Joe Shaw <joe@assbarn.com>
7768 * configure.in: Check for "struct cmsgcred" and try to access its
7769 members for BSD-like unices.
7771 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
7772 _dbus_read_credentials_unix_socket().
7773 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
7774 read() for reading the credential byte off the unix socket. Use
7775 struct cmsgcred on systems that support it.
7777 2003-02-27 Alexander Larsson <alexl@redhat.com>
7781 Make gthreads-2.0 dependency optional. Don't build thread test if
7784 2003-02-27 Havoc Pennington <hp@pobox.com>
7786 * dbus/dbus-connection.c
7787 (dbus_connection_send_message_with_reply_and_block): fix doh!
7788 doh! doh! bug that resulted in never removing a reply from the
7789 queue, no wonder we called get_reply_serial so much ;-)
7791 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
7792 and client serial instead of demarshaling them every time
7794 2003-02-27 Havoc Pennington <hp@pobox.com>
7796 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
7797 more inlined, using dbus-string-private.h, speeds things up
7800 * dbus/dbus-string.c (_dbus_string_free): apply align offset
7801 when freeing the string
7802 (_dbus_string_steal_data): fix for align offset
7803 (undo_alignment): new function
7805 2003-02-26 Havoc Pennington <hp@redhat.com>
7807 All kinds of audit fixes from Owen, plus initial attempt to
7808 handle unaligned memory returned from malloc.
7810 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
7811 leave room for align_offset and nul byte
7812 (fixup_alignment): function to track an align_offset and
7813 ensure real->str is aligned
7814 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
7815 to allow a nul byte plus align offset
7816 (_dbus_string_lock): fix overflow issue
7817 (_dbus_string_init_const_len): add assertions on sanity of len,
7818 assign allocated to be ALLOCATION_PADDING larger than len
7819 (set_length): fixup the overflow handling
7820 (_dbus_string_get_data_len): fix overflow in assertion
7821 (open_gap): detect overflow in size of gap to be opened
7822 (_dbus_string_lengthen): add overflow check
7823 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
7824 (_dbus_string_append): add overflow check
7825 (_dbus_string_append_unichar): overflow
7826 (_dbus_string_delete): fix overflow in assertion
7827 (_dbus_string_copy_len): overflow in assertion
7828 (_dbus_string_replace_len): overflows in assertions
7829 (_dbus_string_find): change to implement in terms of
7830 _dbus_string_find_to
7831 (_dbus_string_find_to): assorted fixage
7832 (_dbus_string_equal_c_str): assert c_str != NULL,
7833 fix logic so the function works
7834 (_dbus_string_ends_with_c_str): fix overflow thingy
7835 (_dbus_string_base64_encode): overflow fix
7836 (_dbus_string_validate_ascii): overflow
7837 (_dbus_string_validate_nul): overflow
7839 2003-02-26 Havoc Pennington <hp@redhat.com>
7841 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
7843 2003-02-26 Alexander Larsson <alexl@redhat.com>
7846 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
7848 * dbus/dbus-connection.c:
7849 * dbus/dbus-connection.h:
7850 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
7851 Add dbus_connection_set_wakeup_main_function and use it when queueing
7852 incoming and outgoing messages.
7855 * dbus/dbus-dataslot.c:
7856 Threadsafe usage of DBusDataSlotAllocator
7858 * dbus/dbus-message.c: (dbus_message_get_args_iter):
7861 * dbus/dbus-server-unix.c:
7864 * glib/dbus-gmain.c:
7865 Implement the new wakeup functions for glib.
7868 * glib/test-thread-client.c:
7869 * glib/test-thread-server.c:
7870 * glib/test-thread.h:
7871 Initial cut at some thread test code. Not really done yet.
7873 2003-02-26 Havoc Pennington <hp@pobox.com>
7875 * dbus/dbus-connection.c
7876 (dbus_connection_send_message_with_reply_and_block): fix crash
7877 where we ref'd the outgoing message instead of the returned reply
7879 * dbus/dbus-transport-unix.c (do_authentication): check read watch
7880 at the end of this function, so if we didn't need to read for
7881 authentication, we reinstall it for receiving messages
7883 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
7884 a NULL sender for peer-to-peer case
7886 * dbus/dbus-transport-unix.c (check_read_watch): handle
7887 !authenticated case correctly
7889 * glib/dbus-gmain.c: add support for DBusServer
7891 * dbus/dbus-server.c: add data slot support
7893 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
7894 return values and handle errors
7896 * dbus/dbus-dataslot.c: factor out the data slot stuff from
7899 * Doxyfile.in (INPUT): add glib subdir
7901 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
7902 setup_with_g_main instead of hookup_with_g_main; write docs
7904 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7906 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
7907 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7908 * dbus/dbus-message.c: (dbus_message_append_boolean),
7909 (dbus_message_append_boolean_array),
7910 (dbus_message_get_args_valist), (_dbus_message_test):
7911 * dbus/dbus-message.h:
7912 * doc/dbus-specification.sgml:
7913 Various fixes as pointed out by Havoc.
7915 * test/data/invalid-messages/bad-boolean-array.message:
7916 * test/data/invalid-messages/bad-boolean.message:
7917 Add invalid boolean value test cases.
7919 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7921 * dbus/dbus-internals.c: (_dbus_type_to_string):
7922 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7923 (_dbus_marshal_validate_arg):
7924 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7925 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7926 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
7927 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
7928 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
7929 (dbus_message_iter_get_double),
7930 (dbus_message_iter_get_boolean_array), (message_iter_test):
7931 * dbus/dbus-message.h:
7932 * dbus/dbus-protocol.h:
7933 * doc/dbus-specification.sgml:
7934 * test/data/valid-messages/lots-of-arguments.message:
7935 Add support for boolean and boolean array types.
7937 2003-02-23 Havoc Pennington <hp@pobox.com>
7939 * dbus/dbus-keyring.c: finish most of this implementation and
7942 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7943 these barf if the error isn't cleared to NULL
7945 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
7946 (_dbus_create_directory): new function
7948 * dbus/dbus-errors.c (dbus_set_error): fix warning
7950 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
7951 (_dbus_string_hex_decode): new function
7952 (test_hex_roundtrip): test code
7954 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
7956 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
7958 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
7959 the save-to-temp/rename trick to atomically write the new file
7960 (_dbus_string_parse_uint): new function
7962 2003-02-22 Havoc Pennington <hp@pobox.com>
7964 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
7966 2003-02-22 Havoc Pennington <hp@pobox.com>
7968 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
7969 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
7971 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7973 * dbus/test/data/sha-1: add US government test suite for SHA-1
7975 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7977 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7978 Make string arrays NULL-terminated.
7980 * dbus/dbus-memory.c: (dbus_free_string_array):
7981 * dbus/dbus-memory.h:
7982 New function for freeing NULL-terminated string arrays.
7984 * dbus/dbus-message-builder.c: (append_quoted_string),
7985 (_dbus_message_data_load):
7986 Add support for array types.
7988 * dbus/dbus-message.c: (check_message_handling):
7989 Add more types as test cases.
7991 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
7992 (_dbus_string_parse_double):
7993 Add the start offset to the end offset.
7995 * test/data/valid-messages/lots-of-arguments.message:
7996 New test message with lots of arguments.
7998 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8000 * dbus/dbus-message.c: (dbus_message_append_nil),
8001 (dbus_message_append_int32), (dbus_message_append_uint32),
8002 (dbus_message_append_double), (dbus_message_append_string),
8003 (dbus_message_append_int32_array),
8004 (dbus_message_append_uint32_array),
8005 (dbus_message_append_double_array),
8006 (dbus_message_append_byte_array),
8007 (dbus_message_append_string_array):
8008 Fix all out-of-memory handling in these functions.
8010 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8012 * dbus/dbus-message.c: (dbus_message_append_nil):
8015 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8017 * dbus/dbus-message.c: (dbus_message_append_args_valist),
8018 (dbus_message_append_nil), (dbus_message_append_int32_array),
8019 (dbus_message_append_uint32_array),
8020 (dbus_message_append_double_array),
8021 (dbus_message_append_byte_array),
8022 (dbus_message_append_string_array), (dbus_message_get_args_valist),
8023 (dbus_message_iter_get_int32_array),
8024 (dbus_message_iter_get_uint32_array),
8025 (dbus_message_iter_get_double_array),
8026 (dbus_message_iter_get_byte_array),
8027 (dbus_message_iter_get_string_array):
8029 * dbus/dbus-message.h:
8030 Add functions for appending and getting arrays.
8032 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8034 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
8035 element size at least 8 bytes, fixes mempool tests on
8038 2003-02-20 Alexander Larsson <alexl@redhat.com>
8040 * dbus/dbus-transport-unix.c (unix_do_iteration):
8041 Unlock the connection mutex during a blocking select call.
8042 Add todo about how we need a way to wake up the select.
8044 * dbus/dbus-connection-internal.h:
8045 * dbus/dbus-connection.c:
8046 Add _dbus_connection_lock and _dbus_connection_unlock.
8048 2003-02-19 Havoc Pennington <hp@pobox.com>
8050 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
8051 Doxyfile.in, not Doxyfile
8053 * dbus/dbus-keyring.c: do some hacking on this
8055 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
8057 * dbus/dbus-errors.c (dbus_set_error_const): do not call
8059 (dbus_set_error): remove dbus_error_init, check for message ==
8060 NULL *before* we sprintf into it, and add @todo about including
8061 system headers in this file
8063 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
8065 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
8067 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
8068 get various bits of user information based on either username
8070 (_dbus_homedir_from_username): new function
8072 2003-02-19 Anders Carlsson <andersca@codefactory.se>
8075 Add check for nonposix getpwnam_r
8077 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
8078 Align the pool element size to a sizeof (void *) boundary.
8080 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
8081 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
8082 General Solaris fixes.
8084 * test/data/valid-messages/simplest-manual.message:
8085 Explicitly state that we want little-endian packing.
8087 2003-02-19 Mikael Hallendal <micke@codefactory.se>
8089 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
8091 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
8092 Added to create a transport connecting using a tcp/ip socket.
8094 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
8095 to a tcp socket at given host and port.
8096 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
8099 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
8101 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
8102 Added to create a server listening on a TCP/IP socket.
8104 2003-02-19 Havoc Pennington <hp@pobox.com>
8106 Throughout: mop up all the Doxygen warnings and undocumented
8109 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
8110 to search any paths.
8112 * dbus/dbus-threads.c: move global mutex initializers to
8113 dbus-internals.h, multiple prototypes was confusing doxygen
8114 besides being kind of ugly
8116 * Doxyfile (PREDEFINED): have Doxygen define
8117 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
8118 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
8119 (do not abuse the feature! it's for stuff like the autogenerated
8120 macros in dbus-md5.c, not just for things you don't feel like
8123 2003-02-18 Havoc Pennington <hp@pobox.com>
8125 * dbus/dbus-string.c (_dbus_string_zero): new function
8127 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
8128 wrap it in some dbus-friendly API
8130 * dbus/dbus-types.h: add 16-bit types
8132 2003-02-18 Joe Shaw <joe@assbarn.com>
8134 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
8135 credentials from our currently running process.
8136 (get_word): Fix a buglet where we were copying the entire length
8137 instead of relative to our position.
8139 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
8140 keys on the stack... it's 640k of data.
8142 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
8143 read the credentials byte off the socket, even if we don't have
8145 (_dbus_poll): Implement poll() using select() for systems which
8148 * glib/test-dbus-glib.c (main): Print out an error if no
8149 parameters are given.
8151 * test/data/auth/fallback.auth-script: Added. Tests that a client
8152 can fallback to a secondary auth mechanism if the first fails.
8154 2003-02-18 Havoc Pennington <hp@pobox.com>
8158 2003-02-17 Havoc Pennington <hp@pobox.com>
8160 * doc/dbus-specification.sgml: lots of cosmetic
8161 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
8162 env variable to DBUS_BUS_ADDRESS, s/client/application/,
8163 s/server/bus/ (except in authentication section). Add a section
8164 "Message Bus Message Routing"
8166 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
8172 2003-02-17 Anders Carlsson <andersca@codefactory.se>
8174 * doc/dbus-specification.sgml:
8175 Specification updates.
8177 2003-02-17 Anders Carlsson <andersca@codefactory.se>
8179 * bus/activation.c: (bus_activation_init), (child_setup),
8180 (bus_activation_activate_service):
8182 * bus/main.c: (main):
8183 Set DBUS_ADDRESS environment variable.
8185 * dbus/dbus-errors.c: (dbus_set_error):
8186 Don't use va_copy since that's a C99 feature.
8188 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
8189 (_dbus_spawn_async):
8190 * dbus/dbus-sysdeps.h:
8191 Add child_setup_func to _dbus_spawn_async.
8193 * doc/dbus-specification.sgml:
8194 Update specification.
8196 * test/spawn-test.c: (setup_func), (main):
8199 2003-02-17 Alexander Larsson <alexl@redhat.com>
8201 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
8204 2003-02-17 Anders Carlsson <andersca@codefactory.se>
8208 * doc/dbus-test-plan.sgml:
8209 Add test plan document.
8214 2003-02-17 Anders Carlsson <andersca@codefactory.se>
8216 * dbus/dbus-message.c: (decode_header_data),
8217 (_dbus_message_loader_return_buffer):
8218 Set the header padding amount when loading a message.
8220 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8222 * bus/dispatch.c: (send_one_message):
8223 Only send broadcast messages to registered connections.
8225 * dbus/dbus-message.c: (dbus_message_name_is):
8226 * dbus/dbus-message.h:
8227 New convenience function.
8229 * dbus/dbus-transport-debug.c: (do_reading):
8230 Only dispatch one message per run.
8233 * test/bus-test.c: (new_connection_callback), (die),
8234 (test_hello_client1_handler), (test_hello_client2_handler),
8235 (test_hello_replies), (main):
8237 * test/bus-test-loop.[ch]:
8240 2003-02-16 Havoc Pennington <hp@pobox.com>
8242 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
8243 backward conditional
8245 2003-02-16 Alexander Larsson <alexl@redhat.com>
8247 * dbus/dbus-connection.c:
8248 Implement sent_message_with_reply. (with_reply_and block is still
8250 Made dispatch_message not lose message if OOM.
8252 * dbus/dbus-errors.h:
8253 Add NoReply error (for reply timeouts).
8255 2003-02-16 Alexander Larsson <alexl@redhat.com>
8257 * dbus/dbus-hash.c (_dbus_hash_table_unref):
8258 Actually free keys and values when destroying hashtable.
8260 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8262 * dbus/dbus-auth.c: (client_try_next_mechanism):
8265 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
8266 Return TRUE if there's no thread implementation around.
8268 * glib/dbus-gmain.c: (free_source),
8269 (dbus_connection_hookup_with_g_main):
8270 Make sure to remove the GSource when the connection is finalized.
8272 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8274 * bus/dispatch.c: (bus_dispatch_message_handler):
8275 * dbus/dbus-errors.h:
8276 Return an error if someone tries to send a message to a service
8279 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8281 * bus/activation.c: (load_directory), (bus_activation_init),
8282 (bus_activation_activate_service):
8285 (bus_driver_handle_activate_service), (bus_driver_handle_message):
8286 More work on the activation handling.
8288 * dbus/dbus-errors.h:
8289 Add some error messages
8291 * dbus/dbus-message.c: (dbus_message_new_error_reply):
8292 * dbus/dbus-message.h:
8293 New function that creates an error message.
8295 * dbus/dbus-protocol.h:
8296 Add ACTIVATE_SERVER message.
8298 * dbus/dbus-server-unix.c: (unix_handle_watch),
8299 (_dbus_server_new_for_domain_socket):
8300 Call _dbus_fd_set_close_on_exec.
8302 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
8303 (_dbus_spawn_async), (_dbus_disable_sigpipe),
8304 (_dbus_fd_set_close_on_exec):
8305 * dbus/dbus-sysdeps.h:
8306 Add _dbus_fd_set_close_on exec function. Also add function that checks
8307 that all open fds are set to close-on-exec and warns otherwise.
8309 * dbus/dbus-transport-unix.c:
8310 (_dbus_transport_new_for_domain_socket):
8311 Call _dbus_fd_set_close_on_exec.
8313 2003-02-16 Havoc Pennington <hp@pobox.com>
8315 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
8316 allow people to avoid setting SIGPIPE to SIG_IGN
8317 (_dbus_connection_new_for_transport): disable SIGPIPE unless
8318 we've been asked not to
8320 2003-02-15 Anders Carlsson <andersca@codefactory.se>
8322 * dbus/dbus-list.c: (_dbus_list_append_link),
8323 (_dbus_list_prepend_link):
8324 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
8328 2003-02-15 Anders Carlsson <andersca@codefactory.se>
8331 * bus/activation.c: (bus_activation_entry_free),
8332 (add_desktop_file_entry), (load_directory), (bus_activation_init):
8334 * bus/main.c: (main):
8335 Add simple activation support, doesn't work yet though.
8337 2003-02-15 Zack Rusin <zack@kde.org>
8339 * qt/dbus-qthread.cpp: small casting fix
8341 2003-02-15 Anders Carlsson <andersca@codefactory.se>
8343 * dbus/dbus-errors.c: (dbus_set_error):
8344 * dbus/dbus-errors.h:
8345 Add a few errors and make dbus_set_error void.
8347 * dbus/dbus-sysdeps.c:
8348 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
8349 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
8350 * dbus/dbus-sysdeps.h:
8351 Add _dbus_spawn_async.
8353 * test/spawn-test.c: (main):
8354 Test for _dbus_spawn_async.
8356 2003-02-15 Anders Carlsson <andersca@codefactory.se>
8358 * dbus/dbus-internals.h:
8359 Fix build without tests.
8361 * dbus/dbus-list.c: (alloc_link):
8362 Fix a segfault when a malloc fails.
8364 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
8365 (dbus_malloc0), (dbus_realloc):
8366 Add support for malloc debugging.
8368 2003-02-15 Alexander Larsson <alexl@redhat.com>
8370 * dbus/dbus-threads.c:
8371 * dbus/dbus-threads.h:
8372 Add condvars. Remove static mutext from API.
8373 Implement static mutexes by initializing them from threads_init.
8375 * glib/dbus-gthread.c:
8376 * qt/dbus-qthread.cpp:
8377 Update with the thread api changes.
8382 Turn StaticMutex into normal mutex + init function.
8383 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
8384 _dbus_list_append_link, _dbus_list_prepend_link
8387 * dbus/dbus-sysdeps.c:
8388 * dbus/dbus-sysdeps.h:
8389 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
8390 _dbus_atomic_dec. Only slow fallback implementation at the moment.
8392 * dbus/dbus-protocol.h:
8393 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
8395 * dbus/dbus-message.c:
8396 Make ref/unref atomic.
8399 * dbus/dbus-connection-internal.h:
8400 * dbus/dbus-connection.c:
8401 * dbus/dbus-connection.h:
8403 Change _peek to _borrow,_return & _steal_borrowed.
8404 Change disconnect callback to event.
8405 Make dbus_connection_dispatch_messages reentrant.
8407 * dbus/dbus-transport.c:
8408 Don't ref the connection on calls to the transport
8411 * dbus/dbus-message-handler.c:
8414 * glib/dbus-gmain.c:
8415 Don't use peek_message anymore
8418 * test/debug-thread.c:
8419 * test/debug-thread.h:
8420 Simple thread implementation that asserts() on deadlocks in
8421 single-threaded code.
8424 (main) Call debug_threads_init.
8427 Use disconnect message instead of disconnect callback.
8431 Don't call dbus_connection_set_disconnect_function. Instead export
8432 bus_connection_disconnect.
8435 Call bus_connection_disconnect when we get a disconnected message.
8437 2003-02-15 Havoc Pennington <hp@pobox.com>
8439 * dbus/dbus-message.c (dbus_message_new): fool around with the
8442 2003-02-14 Havoc Pennington <hp@pobox.com>
8444 * dbus/dbus-mempool.c: fail if the debug functions so indicate
8446 * dbus/dbus-memory.c: fail if the debug functions indicate we
8449 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
8450 (_dbus_decrement_fail_alloc_counter): debug functions to
8451 simulate memory allocation failures
8453 2003-02-14 Havoc Pennington <hp@pobox.com>
8455 * dbus/dbus-errors.h (struct DBusError): add a word of padding
8458 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8460 * bus/driver.c: (bus_driver_handle_hello):
8462 * bus/services.c: (bus_service_lookup):
8463 Reorder message sending so we get a more sane order.
8465 * test/bus-test.c: (message_handler):
8468 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8470 * bus/driver.c: (bus_driver_send_service_deleted),
8471 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8472 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
8473 (bus_driver_send_welcome_message),
8474 (bus_driver_handle_list_services),
8475 (bus_driver_handle_acquire_service),
8476 (bus_driver_handle_service_exists):
8477 * dbus/dbus-bus.c: (dbus_bus_register_client),
8478 (dbus_bus_acquire_service), (dbus_bus_service_exists):
8479 * dbus/dbus-errors.c: (dbus_result_to_string):
8480 * dbus/dbus-errors.h:
8481 * dbus/dbus-message.c: (dbus_message_append_args),
8482 (dbus_message_append_args_valist), (dbus_message_get_args),
8483 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
8484 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
8485 (dbus_message_iter_get_byte_array),
8486 (dbus_message_iter_get_string_array), (message_iter_test),
8487 (check_message_handling), (_dbus_message_test):
8488 * dbus/dbus-message.h:
8489 * test/bus-test.c: (main):
8490 Change fields to arguments in messages, so that they won't be
8491 confused with header fields.
8493 * glib/test-dbus-glib.c: (main):
8494 Remove append_fields from hello message.
8496 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8498 * dbus/dbus-errors.c:
8499 * dbus/dbus-message.c:
8500 * dbus/dbus-string.c:
8501 Documentation fixes.
8503 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8505 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
8507 Implement support for timeouts in dbus-glib.
8509 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8511 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8512 * dbus/dbus-message.c: (process_test_subdir):
8513 * test/break-loader.c: (find_breaks_based_on):
8514 Plug some memory leaks.
8516 2003-02-13 Richard Hult <rhult@codefactory.se>
8518 * bus/main.c: Fix build.
8520 * dbus/dbus-errors.h:
8521 * dbus/dbus-errors.c: Fix copyright for Anders.
8523 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8528 * bus/connection.c: (bus_connection_foreach):
8531 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
8532 (unescape_string), (new_section), (parse_section_start),
8533 (parse_key_value), (report_error), (bus_desktop_file_load),
8534 (bus_desktop_file_get_string):
8535 * bus/desktop-file.h:
8536 Use DBusError for error reporting.
8538 * bus/dispatch.c: (send_one_message),
8539 (bus_dispatch_message_handler):
8540 * bus/driver.c: (bus_driver_send_service_deleted),
8541 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8542 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
8543 (bus_driver_send_welcome_message),
8544 (bus_driver_handle_list_services),
8545 (bus_driver_handle_acquire_service),
8546 (bus_driver_handle_service_exists):
8547 * bus/loop.c: (bus_loop_run):
8549 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
8551 * bus/utils.c: (bus_wait_for_memory):
8553 New files with general utility functions.
8555 * dbus/dbus-internals.h:
8556 Remove _DBUS_HANDLE_OOM.
8558 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8560 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
8561 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
8562 * dbus/dbus-errors.h:
8563 Add DBusError structure.
8565 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8567 * test/data/valid-messages/standard-acquire-service.message:
8568 * test/data/valid-messages/standard-hello.message:
8569 * test/data/valid-messages/standard-list-services.message:
8570 * test/data/valid-messages/standard-service-exists.message:
8571 Add some standard messages.
8573 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8575 * bus/driver.c: (bus_driver_send_welcome_message),
8576 (bus_driver_handle_list_services),
8577 (bus_driver_handle_acquire_service),
8578 (bus_driver_handle_service_exists), (bus_driver_handle_message):
8579 Update for API changes in libdbus.
8581 * dbus/dbus-message.c: (dbus_message_new_reply):
8582 * dbus/dbus-message.h:
8583 Remove the name argument. The spec states that replies shouldn't
8586 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8588 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
8589 (report_error), (bus_desktop_file_load), (lookup_section),
8590 (lookup_line), (bus_desktop_file_get_raw),
8591 (bus_desktop_file_get_string):
8592 * bus/desktop-file.h:
8593 Some fixes, and new functions for getting a key value from a section.
8595 2003-02-13 Havoc Pennington <hp@pobox.com>
8597 * test/data/auth/fail-after-n-attempts.auth-script: new test
8599 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
8602 2003-02-13 Havoc Pennington <hp@pobox.com>
8604 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
8605 dbus_credentials_match were backward
8607 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
8608 NO_CREDENTIALS and ROOT_CREDENTIALS
8610 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
8611 into here. Never process more commands after we've reached an
8612 end state; store further data as unused bytes.
8614 * test/data/auth/*: add more auth tests
8616 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
8617 command to match exact string and EXPECT_UNUSED to match unused
8620 * test/Makefile.am (dist-hook): fix to dist all the test stuff
8622 2003-02-12 Havoc Pennington <hp@pobox.com>
8624 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
8625 \r off of popped lines
8627 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
8630 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
8633 2003-02-12 Havoc Pennington <hp@pobox.com>
8635 * dbus/Makefile.am: remove break-loader from the build, since it
8638 * configure.in: add --enable-gcov to turn on coverage profiling
8639 flags and disable optimization
8641 2003-02-10 Havoc Pennington <hp@pobox.com>
8643 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
8644 initial cut at test framework for DBusAuth from laptop.
8645 Doesn't quite work yet but it compiles and I need to get
8646 it off the 266mhz laptop. ;-)
8648 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
8649 fix a memleak in error case
8651 2003-02-12 Anders Carlsson <andersca@codefactory.se>
8654 * bus/desktop-file.c:
8655 * bus/desktop-file.h:
8656 Add a desktop file parser.
8658 2003-02-11 Zack Rusin <zack@kde.org>
8660 * qt/message.[h|cpp]: sample implementation
8661 of the KDE wrapper for DBusMessage
8663 2003-02-09 Zack Rusin <zack@kde.org>
8665 * test/bus-test.c: make_it_compile
8666 * doc/dbus-specification.sgml: minimal semantic fix
8668 2003-02-06 Anders Carlsson <andersca@codefactory.se>
8674 2003-02-06 Anders Carlsson <andersca@codefactory.se>
8677 * dbus/dbus-break-loader.c:
8679 * test/break-loader.c:
8680 Move dbus-break-loader to test/ and rename it to break-loader.
8682 2003-02-02 Havoc Pennington <hp@pobox.com>
8684 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
8685 for code to manage cookies in your home directory
8687 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
8689 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
8690 to authenticate, then disconnect the client.
8692 2003-02-03 Alexander Larsson <alexl@redhat.com>
8694 * dbus/dbus-message.c (dbus_message_append_fields):
8697 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8699 * doc/dbus-specification.sgml:
8700 Update address format section.
8702 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8705 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
8706 (message_handler), (new_connection_callback), (loop_quit),
8710 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8712 * bus/driver.c: (bus_driver_handle_service_exists):
8713 Simplify the code a bit.
8715 * dbus/dbus-bus.c: (dbus_bus_service_exists):
8718 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8721 Add libdbus-daemon.la and link to it.
8723 2003-02-01 James Willcox <jwillcox@gnome.org>
8725 * bus/driver.c: (bus_driver_handle_own_service):
8726 Actually include the service reply code in the message.
8728 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8730 * bus/driver.c: (bus_driver_handle_service_exists):
8731 Don't unref the incoming message.
8733 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8735 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
8737 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8739 * dbus/dbus-server.c: (dbus_server_listen):
8740 * dbus/dbus-transport.c: (_dbus_transport_open):
8741 ifdef out the calls to the debug transport and server.
8743 2003-02-02 Alexander Larsson <alexl@redhat.com>
8745 * dbus/dbus-watch.c (dbus_watch_get_flags):
8746 Add note in the docs that ERROR or HANGUP won't be returned
8747 and are assumed always on.
8749 * glib/dbus-gmain.c (add_watch):
8750 Always add IO_ERR | IO_HUP
8752 * dbus/dbus-message.h:
8753 Add semicolon after dbus_message_iter_get_string_array().
8754 Makes qt code build again
8756 2003-02-01 Anders Carlsson <andersca@codefactory.se>
8758 * bus/driver.c: (create_unique_client_name),
8759 (bus_driver_handle_hello):
8760 Don't take a name, just use a numeric id to identify
8764 * dbus/dbus-bus.c: (dbus_bus_register_client),
8765 (dbus_bus_acquire_service), (dbus_bus_service_exists):
8767 Add new convenience functions for communicating with the bus.
8769 * dbus/dbus-message.h:
8771 * dbus/dbus-protocol.h:
8774 2003-02-01 Alexander Larsson <alexl@redhat.com>
8776 * dbus/dbus-message.c (dbus_message_append_fields):
8777 Add some more doc comments.
8779 2003-02-01 Havoc Pennington <hp@pobox.com>
8781 * dbus/dbus-break-loader.c (randomly_modify_length): change
8782 a 4-byte value in the message as if it were a length
8784 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
8785 execute bit on saved files
8787 2003-02-01 Havoc Pennington <hp@pobox.com>
8789 * dbus/dbus-break-loader.c (main): new program to find messages
8790 that break the loader.
8792 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
8793 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
8795 * dbus/dbus-string.c (_dbus_string_set_byte): new
8797 2003-01-31 Havoc Pennington <hp@pobox.com>
8799 * dbus/dbus-message.c: refactor the test code to be more general,
8800 in preparation for writing a "randomly permute test cases to
8801 try to break the loader" program.
8803 2003-01-31 Havoc Pennington <hp@pobox.com>
8805 * doc/dbus-specification.sgml: work on the specification
8807 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
8808 the protocol version of the message.
8810 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
8811 no longer specifies that.
8812 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
8815 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
8816 "break" for DBUS_TYPE_NIL, remove @todo
8818 2003-01-31 Havoc Pennington <hp@pobox.com>
8820 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
8821 just set_is_error/get_is_error as this is a commonly-used
8822 function, and write docs.
8824 2003-01-31 Anders Carlsson <andersca@codefactory.se>
8826 * dbus/dbus-address.c: (dbus_address_entry_free):
8827 Free key and value lists.
8829 * dbus/dbus-internals.c: (_dbus_type_to_string):
8830 Add the types we didn't have.
8832 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
8833 (_dbus_marshal_validate_arg):
8836 * dbus/dbus-message.c: (dbus_message_set_sender):
8837 Remove todo about being able to set sender to NULL.
8839 (dbus_message_set_is_error_reply),
8840 (dbus_message_get_is_error_reply):
8841 * dbus/dbus-message.h:
8844 * dbus/dbus-protocol.h:
8845 Add error reply flag.
8847 * test/data/valid-messages/opposite-endian.message:
8848 Add NIL type to test.
8850 2003-01-31 Havoc Pennington <hp@pobox.com>
8852 * doc/dbus-specification.sgml: fully specify the header. Add
8853 flags and major protocol version, and change header/body len to
8856 * dbus/dbus-message-builder.c (append_saved_length): append length
8859 * dbus/dbus-message.c (dbus_message_create_header): change header
8860 length and body length to unsigned. Add the new fields from the
8862 (_dbus_message_loader_return_buffer): unsigned header/body len
8864 2003-01-30 Havoc Pennington <hp@pobox.com>
8866 * dbus/dbus-auth.c: rework to use only REJECTED, no
8869 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
8870 use REJECTED, suggested by Mark McLoughlin
8872 2003-01-30 Havoc Pennington <hp@pobox.com>
8874 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
8875 a better way to report errors here. e.g. "unix address lacks
8876 path" or something. also "no such file" when the path doesn't
8879 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
8881 (dbus_parse_address): add @todo about documenting address format,
8882 and allowing , and ; to be escaped
8884 2003-01-30 Anders Carlsson <andersca@codefactory.se>
8887 Add dbus-address.[ch]
8889 * dbus/dbus-address.c: (dbus_address_entry_free),
8890 (dbus_address_entries_free), (create_entry),
8891 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
8892 (dbus_parse_address), (_dbus_address_test):
8893 * dbus/dbus-address.h:
8894 New files for dealing with address parsing.
8896 * dbus/dbus-connection.c:
8897 Document timeout functions.
8899 * dbus/dbus-message.c:
8900 Document dbus_message_new_from_message.
8902 * dbus/dbus-server-debug.c:
8905 * dbus/dbus-server.c: (dbus_server_listen):
8906 Parse address and use correct server implementation.
8908 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
8909 * dbus/dbus-string.h:
8910 New function with test.
8912 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
8916 * dbus/dbus-transport-debug.c:
8919 * dbus/dbus-transport.c: (_dbus_transport_open):
8920 Parse address and use correct transport implementation.
8922 2003-01-30 Havoc Pennington <hp@pobox.com>
8924 * dbus/dbus-message.c: use message->byte_order instead of
8925 DBUS_COMPILER_BYTE_ORDER throughout.
8926 (dbus_message_create_header): pad header to align the
8927 start of the body of the message to 8-byte boundary
8929 * dbus/dbus-marshal.h: make all the demarshalers take const
8930 DBusString arguments.
8932 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
8933 validate message args here, so we don't have to do slow validation
8934 later, and so we catch bad messages as they are incoming. Also add
8935 better checks on header_len and body_len. Also fill in
8938 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
8939 implemented properly)
8940 (_dbus_string_validate_nul): new function to check all-nul
8942 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
8943 get_arg_end_pos and remove all validation
8944 (_dbus_marshal_validate_arg): actually do validation here.
8946 2003-01-29 Havoc Pennington <hp@pobox.com>
8948 * dbus/dbus-message.c (check_message_handling): fix assertion
8949 failure on set_client_serial
8951 2003-01-28 Havoc Pennington <hp@pobox.com>
8953 * dbus/dbus-server-debug.c: Add doc section comments
8955 * dbus/dbus-transport-debug.c: add doc section comments
8957 2003-01-28 Havoc Pennington <hp@redhat.com>
8959 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
8960 the reverse order from how I had it
8961 (_dbus_string_base64_encode): reverse encoding order. I was
8962 basically byteswapping everything during encoding.
8964 2003-01-28 Anders Carlsson <andersca@codefactory.se>
8966 * dbus/dbus-connection-internal.h:
8967 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
8968 (_dbus_connection_remove_timeout):
8969 Add functions for adding and removing timeouts.
8971 * dbus/dbus-message.c: (dbus_message_new_from_message):
8972 Add new function that takes a message and creates an exact
8973 copy of it, but with the refcount set to 1.
8974 (check_message_handling):
8977 * dbus/dbus-server-protected.h:
8978 * dbus/dbus-server.c: (_dbus_server_init_base),
8979 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
8980 (dbus_server_set_timeout_functions):
8981 (_dbus_server_remove_timeout):
8982 New functions so that a server can add and remove timeouts.
8984 (dbus_server_listen):
8985 Add commented out call to dbus_server_debug_new.
8987 * dbus/dbus-timeout.c: (_dbus_timeout_new):
8988 Actually set the handler, doh.
8990 * dbus/dbus-transport.c: (_dbus_transport_open):
8991 Add commented out call to dbus_transport_debug_client_new.
8994 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
8996 2003-01-28 Havoc Pennington <hp@pobox.com>
8998 * dbus/dbus-message.c (check_message_handling): function to check
8999 on the loaded message, iterates over it etc.
9001 2003-01-28 Havoc Pennington <hp@pobox.com>
9003 * test/Makefile.am (dist-hook): fix make distdir
9005 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
9007 2003-01-27 Havoc Pennington <hp@pobox.com>
9009 * dbus/dbus-mempool.c (time_for_size): replace printf with
9012 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
9013 empty lines; fix the SAVE_LENGTH stuff to be
9014 START_LENGTH/END_LENGTH so it actually works; couple other
9017 * test/Makefile.am (dist-hook): add dist-hook for .message files
9019 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
9020 can be constant or locked.
9021 (_dbus_string_free): allow freeing a const string as
9024 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
9026 * dbus/dbus-test-main.c (main): take an argument which is the
9027 directory containing test data
9029 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
9030 argument to this and load all the messages in test/data/
9031 checking that they can be loaded or not loaded as appropriate.
9033 2003-01-27 Anders Carlsson <andersca@codefactory.se>
9035 * bus/dispatch.c: (bus_dispatch_message_handler):
9036 Dispatch messages sent to services.
9038 * bus/driver.c: (bus_driver_send_service_deleted),
9039 (bus_driver_send_service_created), (bus_driver_send_service_lost),
9040 (bus_driver_send_service_acquired):
9041 Add helper functions for sending service related messages.
9043 (bus_driver_send_welcome_message):
9044 Send HELLO_REPLY instead of WELCOME.
9046 (bus_driver_handle_list_services):
9047 Send LIST_SERVICES_REPLY instead of SERVICES.
9049 (bus_driver_handle_own_service),
9050 (bus_driver_handle_service_exists):
9051 New message handlers.
9053 (bus_driver_handle_message):
9054 Invoke new message handlers.
9056 (bus_driver_remove_connection):
9057 Don't remove any services here since that's done automatically
9058 by bus_service_remove_owner now.
9061 New function signatures.
9063 * bus/services.c: (bus_service_add_owner):
9064 Send ServiceAcquired message if we're the only primary owner.
9066 (bus_service_remove_owner):
9067 Send ServiceAcquired/ServiceLost messages.
9069 (bus_service_set_prohibit_replacement),
9070 (bus_service_get_prohibit_replacement):
9071 Functions for setting prohibit replacement.
9073 (bus_service_has_owner):
9074 New function that checks if a connection is in the owner queue of
9078 Add new function signatures.
9080 * dbus/dbus-list.c: (_dbus_list_test):
9081 Add tests for _dbus_list_remove_last and traversing the list backwards.
9084 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
9085 go any further, so return NULL then.
9087 * dbus/dbus-protocol.h:
9088 Add new messages, service flags and service replies.
9090 2003-01-26 Havoc Pennington <hp@pobox.com>
9092 * dbus/dbus-message-builder.c: implement, completely untested.
9094 * test/data/*: add data to be used in testing.
9095 ".message" files are our simple loadable text format.
9096 ".message-raw" will be binary dumps of messages.
9098 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
9100 2003-01-26 Havoc Pennington <hp@pobox.com>
9102 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
9104 * dbus/dbus-errors.c (dbus_result_to_string): add
9107 * dbus/dbus-message-builder.c: new file, will contain code to load
9108 up messages from files. Not implemented yet.
9110 2003-01-26 Havoc Pennington <hp@pobox.com>
9112 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
9113 the sender by setting to NULL
9115 2003-01-26 Havoc Pennington <hp@pobox.com>
9117 The unit tests pass, but otherwise untested. If it breaks, the
9118 tests should have been better. ;-)
9120 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
9123 * dbus/dbus-message.c: redo everything so we maintain
9124 message->header as the only copy of the various fields.
9125 This avoids the possibility of out-of-memory in some cases,
9126 for example dbus_message_lock() can't run out of memory anymore,
9127 and avoids extra copying. Figured I may as well go ahead and do
9128 this since it was busted for dbus_message_lock to not return
9129 failure on OOM, and dbus_message_write_header was totally
9130 unchecked for OOM. Also fixed some random other bugs.
9132 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
9133 that strings are nul-terminated. Also, end_pos can be equal
9134 to string length just not greater than, I think.
9135 (_dbus_marshal_set_int32): new function
9136 (_dbus_marshal_set_uint32): new function
9137 (_dbus_marshal_set_string): new function
9139 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
9140 a warning, init timeout_list to NULL
9141 (dbus_connection_send_message): don't use uninitialized variable
9144 * dbus/dbus-string.c (_dbus_string_replace_len): new function
9146 2003-01-26 Anders Carlsson <andersca@codefactory.se>
9148 * bus/driver.c: (bus_driver_handle_hello),
9149 (bus_driver_send_welcome_message):
9152 2003-01-26 Anders Carlsson <andersca@codefactory.se>
9154 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
9155 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
9156 (dbus_connection_unref):
9157 * dbus/dbus-marshal.c: (_dbus_marshal_test):
9158 * dbus/dbus-message.c: (dbus_message_unref),
9161 (dbus_message_get_fields):
9162 Remove debugging printout.
9164 (_dbus_message_loader_return_buffer):
9165 Don't store the header string.
9167 (_dbus_message_test):
9170 2003-01-26 Richard Hult <rhult@codefactory.se>
9172 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
9173 the file descriptor list, since it can change under us.
9175 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9177 * glib/dbus-gmain.c: (dbus_connection_prepare),
9178 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
9179 (remove_watch), (dbus_connection_hookup_with_g_main):
9180 Rewrite the glib handling to use its own GSource instead of a
9181 GIOChannel so we can catch messages put in the queue while waiting
9184 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9187 * bus/connection.c: (connection_disconnect_handler),
9188 (connection_watch_callback), (bus_connection_setup):
9189 * bus/dispatch.c: (send_one_message),
9190 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
9191 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
9193 * bus/driver.c: (bus_driver_send_service_deleted),
9194 (bus_driver_send_service_created), (bus_driver_handle_hello),
9195 (bus_driver_send_welcome_message),
9196 (bus_driver_handle_list_services), (bus_driver_remove_connection),
9197 (bus_driver_handle_message):
9199 Refactor code, put the message dispatching in its own file. Use
9200 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
9203 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9205 * dbus/dbus-internals.h:
9206 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
9208 * dbus/dbus-message.c: (dbus_message_get_sender):
9209 * dbus/dbus-message.h:
9210 Implement dbus_message_get_sender.
9212 * dbus/dbus-protocol.h:
9213 Add message and service defines.
9215 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9217 * dbus/dbus-connection.c: (dbus_connection_send_message):
9218 * dbus/dbus-message-internal.h:
9219 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
9220 (dbus_message_write_header):
9221 Remove _dbus_messag_unlock and don't set the client serial on a
9222 message if one already exists.
9224 2003-01-24 Havoc Pennington <hp@pobox.com>
9226 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
9229 * bus/driver.c (bus_driver_handle_list_services): fix a leak
9232 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9234 * dbus/dbus-list.c: (alloc_link), (free_link):
9235 Use a memory pool for the links.
9237 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9239 * bus/connection.c: (bus_connection_foreach):
9241 Add new bus_connection_foreach function.
9243 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
9244 Add function that broadcasts a message to all clients.
9246 (bus_driver_send_service_created), (bus_driver_handle_hello),
9247 (bus_driver_send_welcome_message),
9248 (bus_driver_handle_list_services), (bus_driver_message_handler):
9249 Implement functions that take care of listing services, and notifying
9250 clients when new services are created.
9252 * bus/services.c: (bus_services_list):
9254 Add new function that returns an array of strings with the currently
9255 registered services.
9258 * glib/dbus-gmain.c:
9259 Update copyright year.
9261 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9263 * dbus/dbus-connection.c: (dbus_connection_send_message):
9264 Unlock the message in case it was sent earlier.
9266 (dbus_connection_send_message_with_reply_and_block):
9267 Remove the reply message from the list.
9269 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
9270 Set array_len and new_pos correctly.
9272 (_dbus_marshal_test):
9273 Remove debug output.
9275 * dbus/dbus-message-internal.h:
9276 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
9277 New function that returns the reply serial.
9279 (_dbus_message_unlock):
9280 New function that unlocks a message and resets its header.
9282 (dbus_message_append_string_array),
9283 (dbus_message_get_fields_valist),
9284 (dbus_message_iter_get_field_type),
9285 (dbus_message_iter_get_string_array),
9286 (dbus_message_get_fields),
9287 (dbus_message_append_fields_valist):
9288 Handle string arrays.
9290 (dbus_message_set_sender):
9291 Make this function public since the bus daemon needs it.
9293 (decode_header_data):
9294 Set the reply serial to -1 initially.
9296 * dbus/dbus-message.h:
9297 Add dbus_message_set_sender.
9299 2003-01-24 Havoc Pennington <hp@pobox.com>
9301 * doc/dbus-specification.sgml: add some stuff
9303 2003-01-22 Havoc Pennington <hp@pobox.com>
9305 * doc/dbus-specification.sgml: Start to document the protocol.
9307 2003-01-22 Havoc Pennington <hp@pobox.com>
9309 * dbus/dbus-connection.c
9310 (dbus_connection_send_message_with_reply_and_block): add some @todo
9312 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
9314 2003-01-21 Havoc Pennington <hp@pobox.com>
9316 (patch untested because can't compile)
9318 * bus/driver.c (create_unique_client_name): make this function
9319 never recycle client names. Also, caller should initialize
9322 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
9324 2003-01-21 Anders Carlsson <andersca@codefactory.se>
9326 * dbus/dbus-marshal.c: (_dbus_marshal_double),
9327 (_dbus_marshal_int32), (_dbus_marshal_uint32),
9328 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
9329 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
9330 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9331 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9332 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
9333 * dbus/dbus-marshal.h:
9334 * dbus/dbus-protocol.h:
9335 Add support for marshalling and demarshalling integer, double
9338 2003-01-21 Anders Carlsson <andersca@codefactory.se>
9343 * bus/connection.c: (connection_disconnect_handler):
9344 Remove the connection from the bus driver's list.
9346 (connection_watch_callback): Dispatch messages.
9348 (free_connection_data): Free connection name.
9350 (bus_connection_setup): Add connection to the bus driver's list.
9351 (bus_connection_remove_owned_service):
9352 (bus_connection_set_name), (bus_connection_get_name):
9353 Add functions for setting and getting the connection's name.
9356 Add function headers.
9358 * bus/driver.c: (create_unique_client_name),
9359 (bus_driver_handle_hello_message),
9360 (bus_driver_send_welcome_message), (bus_driver_message_handler),
9361 (bus_driver_add_connection), (bus_driver_remove_connection):
9364 * bus/services.c: (bus_service_free):
9366 New file that handles communication and registreation with the bus
9369 2003-01-21 Anders Carlsson <andersca@codefactory.se>
9371 * dbus/dbus-connection.c: (dbus_connection_send_message):
9372 Add a new client_serial parameter.
9374 (dbus_connection_send_message_with_reply):
9375 Remove a @todo since we've implemented the blocking function.
9377 (dbus_connection_send_message_with_reply_and_block):
9378 New function that sends a message and waits for a reply and
9379 then returns the reply.
9381 * dbus/dbus-connection.h:
9384 * dbus/dbus-errors.c: (dbus_result_to_string):
9385 * dbus/dbus-errors.h:
9386 Add new DBUS_RESULT.
9388 * dbus/dbus-message-internal.h:
9389 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
9390 (_dbus_message_set_sender), (dbus_message_write_header),
9391 (dbus_message_new_reply), (decode_header_data),
9392 (_dbus_message_loader_return_buffer), (_dbus_message_test):
9393 * dbus/dbus-message.h:
9394 Add new functions that set the reply serial and sender.
9395 Also marshal and demarshal them correctly and add test.
9397 * dbus/dbus-protocol.h:
9398 Add new DBUS_MESSAGE_TYPE_SENDER.
9401 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
9402 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
9403 (dbus_connection_hookup_with_g_main):
9404 * glib/test-dbus-glib.c: (main):
9405 Rewrite to use GIOChannel and remove the GSource crack.
9407 * test/echo-client.c: (main):
9408 * test/watch.c: (check_messages):
9409 Update for changed APIs
9411 2003-01-19 Anders Carlsson <andersca@codefactory.se>
9413 * dbus/Makefile.am: Add dbus-timeout.[cħ]
9415 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
9416 Create a DBusTimeoutList.
9417 (dbus_connection_set_timeout_functions): Add new function to
9418 set timeout callbacks
9420 * dbus/dbus-connection.h: Add public DBusTimeout API.
9422 * dbus/dbus-message.c: (dbus_message_get_service):
9423 * dbus/dbus-message.h: New function.
9425 * dbus/dbus-server.c: Fix small doc typo.
9427 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
9429 2003-01-19 Anders Carlsson <andersca@codefactory.se>
9431 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
9432 of the string, just as long as specified.
9434 2003-01-19 Havoc Pennington <hp@pobox.com>
9436 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
9439 * dbus/dbus-server.c (dbus_server_set_max_connections)
9440 (dbus_server_get_max_connections, dbus_server_get_n_connections):
9441 keep track of current number of connections, and add API for
9442 setting a max (but haven't implemented enforcing the max yet)
9444 2003-01-18 Havoc Pennington <hp@pobox.com>
9446 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
9447 reading/writing if read_watch != NULL or write_watch != NULL.
9449 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
9450 the message loader code to actually load message->header and
9451 message->body into the newly-created message.
9453 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
9456 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
9457 (dbus_connection_get_max_message_size)
9458 (dbus_connection_set_max_live_messages_size)
9459 (dbus_connection_get_max_live_messages_size): implement some
9460 resource limitation functions
9462 * dbus/dbus-resources.c: new file implementing some of the
9463 resource limits stuff
9465 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
9466 missing docs, add @todo to handle OOM etc.
9468 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
9471 2003-01-18 Havoc Pennington <hp@pobox.com>
9473 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
9474 connection if it hasn't been already.
9476 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
9477 replace with DisconnectFunction.
9479 2003-01-18 Havoc Pennington <hp@pobox.com>
9481 Building --disable-verbose-mode --disable-asserts --disable-tests
9482 cuts the library from 112K to 45K or so
9484 * configure.in: check for varargs macro support,
9485 add --enable-verbose-mode, --enable-asserts.
9487 * dbus/dbus-internals.h (_dbus_assert): support
9489 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
9491 2003-01-18 Havoc Pennington <hp@pobox.com>
9493 * dbus/dbus-test.c: include config.h so that tests actually run
9495 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
9496 so the failure mode when that assumption fails will be plenty
9499 2003-01-18 Havoc Pennington <hp@pobox.com>
9501 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
9503 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
9506 * test/Makefile.am: don't use special variable "TESTS" for echo-*
9507 since we don't want to use those in make check
9509 2003-01-15 Havoc Pennington <hp@redhat.com>
9515 2003-01-15 Havoc Pennington <hp@redhat.com>
9517 * test/Makefile.am: fix so that test source code ends up in the
9518 distribution on make distcheck
9520 2003-01-15 Havoc Pennington <hp@redhat.com>
9526 2003-01-15 Havoc Pennington <hp@redhat.com>
9528 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
9529 fix build when --disable-tests
9531 * Makefile.am (EXTRA_DIST): put HACKING in here
9533 * HACKING: document procedure for making a tarball release.
9535 2003-01-14 Anders Carlsson <andersca@codefactory.se>
9537 * bus/connection.c: (connection_error_handler),
9538 (bus_connection_setup):
9539 * bus/main.c: (main):
9540 Make sure that the DBusConnectionData struct is NULLed
9541 out to prevent a segfault.
9543 * dbus/dbus-errors.c: (dbus_result_to_string):
9544 * dbus/dbus-errors.h:
9545 * dbus/dbus-message.c: (dbus_message_get_fields),
9546 (dbus_message_get_fields_valist), (_dbus_message_test):
9547 * dbus/dbus-message.h:
9548 Make dbus_message_get_fields return a result code so we can
9549 track invalid fields as well as oom.
9551 2003-01-11 Havoc Pennington <hp@pobox.com>
9553 * configure.in: change --enable-test/--enable-ansi action-if-given
9554 to enable_foo=$enableval instead of enable_foo=yes
9556 2003-01-08 Havoc Pennington <hp@pobox.com>
9558 * dbus/dbus-string.c (_dbus_string_align_length): new function
9560 * dbus/dbus-test-main.c: move main() for test app here
9562 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
9563 symbol to run tests, because dbus-test isn't in the main
9566 Code review nitpicks.
9568 * dbus/dbus-message.c (dbus_message_write_header): add newlines
9569 for people with narrow emacs ;-). Assert client_serial was filled
9570 in. Assert message->name != NULL.
9571 (dbus_message_append_fields): have "first_field_type" arg separate
9572 from va list, needed for C++ binding that also uses varargs IIRC
9573 and helps with type safety
9574 (dbus_message_new): add @todo about using DBusString to store
9575 service/name internally
9576 (dbus_message_new): don't leak ->service and ->name on OOM later
9578 (dbus_message_unref): free the service name
9579 (dbus_message_get_fields): same change to varargs
9580 i.e. first_field_type
9581 (_dbus_message_loader_return_buffer): assert that the message data
9582 is aligned (if not it's a bug in our code). Put in verbose griping
9583 about why we set corrupted = TRUE.
9584 (decode_header_data): add FIXME that char* is evil. Was going to
9585 add FIXME about evil locale-specific string.h strncmp, but just
9586 switched to wacky string-as-uint32 optimization. Move check for
9587 "no room for field name" above get_const_data_len() to avoid
9588 assertion failure in get_const_data_len if we have trailing 2
9589 bytes or the like. Check for service and name fields being
9590 provided twice. Don't leak service/name on error. Require field
9591 names to be aligned to 4 bytes.
9593 * dbus/dbus-marshal.c: move byte swap stuff to header
9594 (_dbus_pack_int32): uscore-prefix
9595 (_dbus_unpack_int32): uscore-prefix
9596 (_dbus_unpack_uint32): export
9597 (_dbus_demarshal_string): add @todo complaining about use of
9599 (_dbus_marshal_get_field_end_pos): add @todo about bad error
9600 handling allowing corrupt data to go unchecked
9602 2003-01-08 Havoc Pennington <hp@redhat.com>
9604 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
9605 to the select() as needed for authentication. (should be using
9606 _dbus_poll() not select, but for another day)
9608 * dbus/dbus.h: include dbus/dbus-protocol.h
9610 2003-01-08 Anders Carlsson <andersca@codefactory.se>
9612 * dbus/Makefile.am (dbusinclude_HEADERS): Install
9615 2003-01-08 Anders Carlsson <andersca@codefactory.se>
9617 * dbus/dbus-internals.c: (_dbus_type_to_string):
9618 New function that returns a string describing a type.
9620 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
9621 * dbus/dbus-marshal.h:
9622 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
9623 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
9624 (dbus_message_iter_get_byte_array):
9625 * dbus/dbus-message.h:
9626 Add new convenience functions for appending and getting message fields.
9627 Also add demarshalling routines for byte arrays.
9629 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9631 * dbus/dbus-connection-internal.h:
9632 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
9633 (_dbus_connection_get_next_client_serial),
9634 (dbus_connection_send_message):
9635 * dbus/dbus-internals.h:
9636 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
9637 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
9638 (_dbus_marshal_uint32), (_dbus_demarshal_double),
9639 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
9640 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
9641 (_dbus_verbose_bytes), (_dbus_marshal_test):
9642 * dbus/dbus-marshal.h:
9643 * dbus/dbus-message-internal.h:
9644 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
9645 (dbus_message_write_header), (_dbus_message_lock),
9646 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
9647 (dbus_message_get_name), (dbus_message_append_int32),
9648 (dbus_message_append_uint32), (dbus_message_append_double),
9649 (dbus_message_append_string), (dbus_message_append_byte_array),
9650 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
9651 (dbus_message_iter_unref), (dbus_message_iter_has_next),
9652 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
9653 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
9654 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
9655 (decode_header_data), (_dbus_message_loader_return_buffer),
9656 (message_iter_test), (_dbus_message_test):
9657 * dbus/dbus-message.h:
9658 * dbus/dbus-protocol.h:
9659 * dbus/dbus-test.c: (main):
9661 * glib/test-dbus-glib.c: (message_handler), (main):
9662 * test/echo-client.c: (main):
9663 * test/watch.c: (check_messages):
9664 Make messages sendable and receivable for real.
9666 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9668 * dbus/dbus-marshal.c: (_dbus_marshal_double),
9669 (_dbus_marshal_string), (_dbus_marshal_byte_array):
9670 * dbus/dbus-message.c: (dbus_message_append_int32),
9671 (dbus_message_append_uint32), (dbus_message_append_double),
9672 (dbus_message_append_string), (dbus_message_append_byte_array):
9673 Handle OOM restoration.
9675 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9677 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9678 (_dbus_demarshal_string), (_dbus_marshal_test):
9679 * dbus/dbus-marshal.h:
9680 * dbus/dbus-message.c: (dbus_message_get_name),
9681 Document these functions.
9683 (dbus_message_append_int32), (dbus_message_append_uint32),
9684 (dbus_message_append_double), (dbus_message_append_string),
9685 (dbus_message_append_byte_array):
9686 * dbus/dbus-message.h:
9687 Add functions for adding message fields of different types.
9689 * dbus/dbus-protocol.h:
9690 Add the different types.
9692 2003-01-05 Havoc Pennington <hp@pobox.com>
9694 * bus/connection.c: implement routines for handling connections,
9695 first thing is keeping a list of owned services on each connection
9696 and setting up watches etc.
9698 * bus/services.c: implement a mapping from service names to lists
9701 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
9703 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
9704 to use static mutexes for global data
9706 * dbus/dbus-connection.c (dbus_connection_set_data): add new
9707 collection of functions to set/get application-specific data
9708 on the DBusConnection.
9710 2003-01-04 Havoc Pennington <hp@pobox.com>
9712 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
9713 (_dbus_poll): new function
9715 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
9718 * bus/loop.c: initial code for the daemon main loop
9720 2003-01-04 Havoc Pennington <hp@pobox.com>
9722 * test/watch.c (error_handler): make it safe if the error handler
9723 is called multiple times (if we s/error handler/disconnect
9724 handler/ we should just guarantee it's called only once)
9726 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
9727 error handler on disconnect (it's quite possible we should
9728 just change the error handler to a "disconnect handler," I'm
9729 not sure we have any other meaningful errors)
9731 * configure.in: check for getpwnam_r
9733 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
9734 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
9735 mechanism as in SASL spec, using socket credentials
9737 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
9738 (_dbus_send_credentials_unix_socket): new function
9740 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
9742 (_dbus_write): only check errno if <0 returned
9743 (_dbus_write_two): ditto
9745 2003-01-02 Anders Carlsson <andersca@codefactory.se>
9747 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
9748 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
9749 (_dbus_marshal_test):
9750 * dbus/dbus-marshal.h:
9751 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
9752 to _dbus_marshal_utf8_string. Also fix some tests.
9754 2002-12-28 Harri Porten <porten@kde.org>
9756 * configure.in: added check for C++ compiler and a very cheesy
9757 check for the Qt integration
9759 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
9761 * qt/Makefile.am: added
9763 * qt/.cvsignore: added
9765 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
9766 latter, added #ifdef QT_THREAD_SUPPORT guard.
9768 * dbus/Makefile.am: added missing headers for make dist
9770 2002-12-28 Kristian Rietveld <kris@gtk.org>
9772 * dbus/Makefile.am: fixup export-symbols-regex.
9774 2002-12-27 Anders Carlsson <andersca@codefactory.se>
9776 * acinclude.m4: Add this file and put the
9777 PKG_CHECK_MODULE macro in it.
9779 2002-12-27 Anders Carlsson <andersca@codefactory.se>
9781 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9782 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9783 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9784 (_dbus_marshal_test):
9785 Make the demarshalling routines align the pos argument.
9786 Add string marshalling tests and fix the obvious bugs
9789 2002-12-26 Havoc Pennington <hp@pobox.com>
9791 * dbus/dbus-auth.c: fixes fixes fixes
9793 * dbus/dbus-transport-unix.c: wire up support for
9794 encoding/decoding data on the wire
9796 * dbus/dbus-auth.c (_dbus_auth_encode_data)
9797 (_dbus_auth_decode_data): append to target string
9798 instead of nuking it.
9800 2002-12-26 Havoc Pennington <hp@pobox.com>
9802 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
9803 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
9806 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
9807 avoid swap_bytes() overhead (ignoring possible assembly stuff for
9808 now). Main point is because I wanted unpack_uint32 to implement
9810 (_dbus_verbose_bytes): new function
9812 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
9814 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
9815 mechanism to handle a corrupt message stream
9816 (_dbus_message_loader_new): fix preallocation to only prealloc,
9819 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
9820 (_dbus_string_test): enhance tests for copy/move and fix the
9823 * dbus/dbus-transport-unix.c: Hold references in more places to
9824 avoid reentrancy problems
9826 * dbus/dbus-transport.c: ditto
9828 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
9829 leak reference count in no-message case
9831 * test/watch.c (do_mainloop): handle adding/removing watches
9832 during iteration over the watches. Also, ref the connection/server
9833 stored on a watch, so we don't try to mangle a destroyed one.
9835 * dbus/dbus-transport-unix.c (do_authentication): perform
9838 * dbus/dbus-auth.c (get_state): add a state
9839 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
9840 (_dbus_auth_get_unused_bytes): append the unused bytes
9841 to the passed in string, rather than prepend
9843 * dbus/dbus-transport.c (_dbus_transport_init_base): create
9844 the auth conversation DBusAuth
9846 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
9847 (_dbus_transport_new_for_domain_socket): when creating a
9848 transport, pass in whether it's a client-side or server-side
9849 transport so we know which DBusAuth to create
9851 2002-12-03 Havoc Pennington <hp@pobox.com>
9853 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
9854 _after_ finalizing the derived members
9855 (unix_connection_set): unref watch if we fail to add it
9857 * dbus/dbus-connection.c (dbus_connection_unref): delete the
9858 transport first, so that the connection owned by the
9859 transport will be valid as the transport finalizes.
9861 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
9862 if necessary, and remove watches from the connection.
9864 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
9866 2002-12-26 Anders Carlsson <andersca@codefactory.se>
9868 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9869 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9870 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9871 (_dbus_marshal_test):
9872 * dbus/dbus-marshal.h:
9873 Add string marshal functions and have the demarshal functions
9874 return the new position.
9876 2002-12-25 Havoc Pennington <hp@pobox.com>
9878 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
9879 it is a simple protocol that just maps directly to SASL.
9881 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
9882 initial implementation, not actually used yet.
9884 * dbus/dbus-string.c (_dbus_string_find): new function
9885 (_dbus_string_equal): new function
9886 (_dbus_string_base64_encode): new function
9887 (_dbus_string_base64_decode): new function
9889 2002-12-25 Anders Carlsson <andersca@codefactory.se>
9892 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
9893 (_dbus_marshal_int32), (_dbus_marshal_uint32),
9894 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9895 (_dbus_demarshal_uint32), (_dbus_marshal_test):
9896 * dbus/dbus-marshal.h:
9897 * dbus/dbus-protocol.h:
9898 * dbus/dbus-test.c: (main):
9900 Add un-optimized marshalling/demarshalling routines.
9902 2002-12-25 Harri Porten <porten@kde.org>
9904 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
9906 2002-12-24 Zack Rusin <zack@kde.org>
9908 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
9909 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
9912 2002-12-24 Havoc Pennington <hp@pobox.com>
9914 * glib/dbus-gthread.c: fix include
9916 * glib/dbus-glib.h: rename DBusMessageHandler for now.
9917 I think glib API needs to change, though, as you don't
9918 want to use DBusMessageFunction, you want to use the
9919 DBusMessageHandler object. Probably
9920 dbus_connection_open_with_g_main_loop()
9921 and dbus_connection_setup_g_main_loop() or something like that
9922 (but think of better names...) that just create a connection
9923 that has watch/timeout functions etc. already set up.
9925 * dbus/dbus-connection.c
9926 (dbus_connection_send_message_with_reply): new function just to
9927 show how the message handler helps us deal with replies.
9929 * dbus/dbus-list.c (_dbus_list_remove_last): new function
9931 * dbus/dbus-string.c (_dbus_string_test): free a string that
9934 * dbus/dbus-hash.c: use memory pools for the hash entries
9935 (rebuild_table): be more paranoid about overflow, and
9936 shrink table when we can
9937 (_dbus_hash_test): reduce number of sprintfs and write
9938 valid C89. Add tests for case where we grow and then
9939 shrink the hash table.
9941 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
9943 * dbus/dbus-connection.c (dbus_connection_register_handler)
9944 (dbus_connection_unregister_handler): new functions
9946 * dbus/dbus-message.c (dbus_message_get_name): new
9948 * dbus/dbus-list.c: fix docs typo
9950 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
9951 an object representing a handler for messages.
9953 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9956 * glib/dbus-gthread.c: (dbus_gthread_init):
9957 Don't use the gdbus prefix for public functions.
9959 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9963 Add GLib checks and fixup .pc files
9967 * glib/dbus-gmain.c: (gdbus_connection_prepare),
9968 (gdbus_connection_check), (gdbus_connection_dispatch),
9969 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
9970 (dbus_connection_gsource_new):
9971 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
9972 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
9973 * glib/test-dbus-glib.c: (message_handler), (main):
9976 2002-12-15 Harri Porten <porten@kde.org>
9978 * autogen.sh: check for libtoolize before attempting to use it
9980 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
9983 * .cvsignore: ignore more stamp files
9985 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
9987 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
9988 without make install.
9990 2002-12-15 Havoc Pennington <hp@pobox.com>
9992 * dbus/dbus-threads.c: add thread stubs that a higher library
9993 layer can fill in. e.g. the GLib wrapper might fill them in with
9994 GThread stuff. We still need to use this thread API to
9995 thread-safe-ize the library.
9997 2002-12-12 Havoc Pennington <hp@pobox.com>
9999 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
10000 below new interfaces and include fewer system headers.
10002 * dbus/dbus-sysdeps.c (_dbus_read): new function
10003 (_dbus_write): new function
10004 (_dbus_write_two): new function
10005 (_dbus_connect_unix_socket): new function
10006 (_dbus_listen_unix_socket): new function
10008 * dbus/dbus-message-internal.h: change interfaces to use
10011 2002-12-11 Havoc Pennington <hp@pobox.com>
10013 * dbus/dbus-types.h: add dbus_unichar
10015 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
10017 * dbus/dbus-connection.c (dbus_connection_send_message): return
10020 * dbus/dbus-transport.c: include dbus-watch.h
10022 * dbus/dbus-connection.c: include dbus-message-internal.h
10024 * HACKING: add file with coding guidelines stuff.
10026 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
10027 handling here, for security purposes (as in vsftpd). Not actually
10028 using this class yet.
10030 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
10031 system/libc usage here, as in vsftpd, for ease of auditing (and
10032 should also simplify portability). Haven't actually moved all the
10033 system/libc usage into here yet.
10035 2002-11-25 Havoc Pennington <hp@pobox.com>
10037 * dbus/dbus-internals.c (_dbus_verbose): fix to not
10038 always print the first verbose message.
10040 2002-11-24 Havoc Pennington <hp@pobox.com>
10042 * test/echo-client.c, test/echo-server.c: cheesy test
10045 * configure.in (AC_CHECK_FUNCS): check for writev
10047 * dbus/dbus-message.c (_dbus_message_get_network_data): new
10050 * dbus/dbus-list.c (_dbus_list_foreach): new function
10052 * dbus/dbus-internals.c (_dbus_verbose): new function
10054 * dbus/dbus-server.c, dbus/dbus-server.h: public object
10055 representing a server that listens for connections.
10057 * dbus/.cvsignore: create
10059 * dbus/dbus-errors.h, dbus/dbus-errors.c:
10060 public API for reporting errors
10062 * dbus/dbus-connection.h, dbus/dbus-connection.c:
10063 public object representing a connection that
10064 sends/receives messages. (Same object used for
10065 both client and server.)
10067 * dbus/dbus-transport.h, dbus/dbus-transport.c:
10068 Basic abstraction for different kinds of stream
10069 that we might read/write messages from.
10071 2002-11-23 Havoc Pennington <hp@pobox.com>
10073 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
10076 * dbus/dbus-test.c (main): add list test, and include
10077 dbus-test.h as intended
10079 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
10080 (_dbus_hash_table_remove_int): return value indicates
10081 whether the entry existed to remove
10083 * dbus/dbus-list.c: add linked list utility class,
10084 with docs and tests
10086 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
10089 2002-11-23 Havoc Pennington <hp@pobox.com>
10091 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
10092 DBUS_END_DECLS to nothing, that should fix this once and for all
10094 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
10096 * dbus/dbus-message.c, dbus/dbus-hash.c:
10097 add some missing @brief
10099 2002-11-23 Havoc Pennington <hp@pobox.com>
10101 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
10102 to avoid confusing Doxygen
10104 * dbus/dbus-hash.c: @} not }@
10106 * dbus/dbus-message.c (struct DBusMessage): split out
10109 2002-11-23 Havoc Pennington <hp@pobox.com>
10111 * configure.in: pile on more warning flags if using gcc
10113 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
10114 to document static functions
10116 * configure.in: add summary to end of configure so it
10117 looks nice and attractive
10119 * dbus/dbus-hash.c: finish implementation and write unit
10122 * configure.in: add --enable-tests to enable unit tests
10124 * dbus/dbus-test.c: test program to run unit tests
10125 for all files in dbus/*, initially runs a test for
10128 * dbus/dbus-internals.h: file to hold some internal utility stuff
10130 2002-11-22 Havoc Pennington <hp@redhat.com>
10132 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
10133 "ported" away from Tcl
10135 * dbus/dbus-types.h: header for types such as dbus_bool_t
10137 2002-11-22 Havoc Pennington <hp@redhat.com>
10139 * dbus/dbus.h: fixups for doc warnings
10141 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
10143 (QUIET): make it quiet so we can see warnings
10145 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
10147 2002-11-22 Havoc Pennington <hp@redhat.com>
10149 * Makefile.am: include "Doxyfile" target in all-local
10151 * configure.in: generate the Doxyfile
10153 * Doxyfile.in: move Doxyfile here, so we can use
10154 configure to generate a Doxyfile with the right
10155 version number etc.
10157 2002-11-22 Havoc Pennington <hp@redhat.com>
10159 * dbus/dbus-message.c: move inline docs into .c file
10161 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
10162 so all docs are under doc/
10163 (MAN_EXTENSION): generate man pages. Use extension
10164 ".3dbus" which matches ".3qt" on my system,
10165 I guess this is OK, I don't know really.
10166 (FILE_PATTERNS): look for .c files not .h, makes sense
10167 for plain C I think
10169 2002-11-22 Havoc Pennington <hp@pobox.com>
10171 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
10172 because any app can be a server, and any app can be a client,
10173 the bus is a special kind of server.
10175 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
10177 * Doxyfile : adding. Still needs Makefile rules to be generated
10178 automatically (just run "doxygen" in the toplevel dir for now to
10181 * dbus/dbus-message.h : Adding sample docs (javadoc since
10182 resembles gtk-doc a little more)
10184 * dbus/dbus.h : Adding sample docs
10186 2002-11-21 Havoc Pennington <hp@redhat.com>
10188 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
10189 so we can allow ourselves to include files directly,
10190 instead of having to use dbus.h
10192 * dbus/dbus.h: fill in
10194 * dbus/dbus-message.h: sketch out a sample header file.
10195 Include griping if you include it directly instead of
10198 * dbus/dbus-macros.h: new file with macros for extern "C",
10199 TRUE/FALSE, NULL, etc.
10201 * doc/file-boilerplate.c: put include guards in here
10203 2002-11-21 Havoc Pennington <hp@redhat.com>
10205 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
10207 * COPYING: include the GPL as well, and license code
10208 under both AFL and GPL.
10210 2002-11-21 Havoc Pennington <hp@redhat.com>
10212 * acconfig.h: get rid of this
10214 * autogen.sh (run_configure): add --no-configure option
10216 * configure.in: remove AC_ARG_PROGRAM to make
10217 autoconf complain less. add AC_PREREQ.
10218 add AC_DEFINE third arg.
10220 2002-11-21 Anders Carlsson <andersca@codefactory.se>
10223 Fix references so we can distcheck.
10225 2002-11-21 Havoc Pennington <hp@redhat.com>
10227 * Initial module creation