1 2004-05-27 Seth Nickell <seth@gnome.org>
4 * python/dbus_bindings.pyx.in:
6 Fix failure to notify that a signal was not handled,
7 resulted in hung functions.
9 2004-05-25 Colin Walters <walters@redhat.com>
11 * tools/dbus-monitor.c (main): Monitor all types of messages.
13 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
15 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
16 which unregisters the object path and disposes the handler.
18 2004-05-23 Kristian Høgsberg <krh@redhat.com>
20 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
22 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
23 operands to && so we call dbus_message_iter_next () for the last
26 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
28 * dbus/dbus-object-tree.c
29 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
30 children even if the requested path isn't registered.
31 (object_tree_test_iteration): test object_tree_list_registered.
33 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
36 2004-05-20 Kristian Høgsberg <krh@redhat.com>
38 * doc/TODO: Remove resolved items.
40 * bus/expirelist.h (struct BusExpireList): remove unused n_items
43 * bus/connection.c (bus_connections_expect_reply): Enforce the
44 per-connection limit on pending replies.
46 Patch from Jon Trowbridge <trow@ximian.com>:
48 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
49 up a watch that triggers a config reload when one end of the pipe
51 (signal_handler): Instead of doing the config reload in our SIGHUP
52 handler, just write to the reload pipe and let the associated
53 watch handle the reload when control returns to the main loop.
55 * bus/driver.c (bus_driver_handle_reload_config): Added.
56 Implements a ReloadConfig method for requesting a configuration
57 file reload via the bus driver.
59 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
61 * HACKING: Updated release instructions concerning the wiki page.
63 2004-05-18 Kristian Høgsberg <krh@redhat.com>
65 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
66 filter against auth->allowed_mechs; we only add allowed mechs in
69 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
70 ALLOWED_MECHS to auth-script format so we can set the list of
73 * data/auth/client-out-of-mechanisms.auth-script: New test to
74 check client disconnects when it is out of mechanisms to try.
76 * dbus/dbus-auth.c (process_command): Remove check for lines
77 longer that 1 MB; we only buffer up maximum 16 kB.
79 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
80 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
81 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
82 assume there might be unused bytes.
84 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
85 client-out-of-mechs, it is handled in process_reject(). Move check
86 for max failures to send_rejected(), as it's a server-only thing.
88 * dbus/dbus-auth.c: Factor out protocol reply code into functions
89 send_auth(), send_data(), send_rejected(), send_error(),
90 send_ok(), send_begin() and send_cancel().
92 2004-05-17 Kristian Høgsberg <krh@redhat.com>
94 Remove base64 encoding, replace with hex encoding. Original patch
95 from trow@ximian.com, added error handling.
97 * dbus/dbus-string.c (_dbus_string_base64_encode)
98 (_dbus_string_base64_decode): Remove.
99 (_dbus_string_hex_decode): Add end_return argument so we can
100 distinguish between OOM and invalid hex encoding.
101 (_dbus_string_test): Remove base64 tests and add test case for
104 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
105 Replace base64 with hex.
107 * test/data/auth/invalid-hex-encoding.auth-script: New test case
108 for invalid hex encoded data in auth protocol.
110 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
112 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
115 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
117 * mono/dbus-sharp.dll.config.in: Added for GAC
118 * mono/dbus-sharp.snk: Added for GAC
119 * mono/Assembly.cs.in: Added for GAC
120 * mono/Makefile.am: Changes for GAC installation
121 * configure.in: Added refs for dbus-sharp.dll.config.in and
122 Assembly.cs.in. More fixes for mono testing
123 * mono/example/Makefile.am: Changed var to CSC
124 * Makefile.am: Changed flag name to DBUS_USE_CSC
126 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
128 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
129 * mono/doc/*: Added documentation framework
130 * configure.in: Added monodoc check
131 * README: Added description of mono configure flags
133 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
135 * doc/dbus-specification.xml: Added a "Required" column to the
136 header fields table and changed the "zero or more" verbage in
137 the above paragraph to read "The header must contain the required
138 named header fields and zero or more of the optional named header
140 * test/data/invalid-messages/*.message: Added the required PATH
141 named header field to the tests so that they don't fail on
144 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
146 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
147 the stack by implicitly defining variable and parameter types and
148 removing the hack of defining C pointers as python objects and later
151 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
153 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
155 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
157 * mono/DBusType/Dict.cs: Handle empty dicts
158 * mono/DBusType/Array.cs: Handle empty arrays
159 * mono/Arguments.cs: Handle empty arguments
162 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
164 * dbus-sharp.pc.in: Modified to include include Libs and Requires
167 2004-04-25 Kristian Høgsberg <krh@redhat.com>
169 * test/data/valid-messages/standard-*.message: Update message
170 test scripts to new header field names.
172 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
174 * test/break-loader.c (randomly_do_n_things): tracked down buffer
175 overflow to times_we_did_each_thing array which would chop off the
176 first character of the failure_dir string. Increased the size of
177 the array to 7 to reflect the number of random mutation functions
180 2004-04-21 Kristian Høgsberg <krh@redhat.com>
182 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
183 unix_server->watch here, it is unreffed in disconnect.
184 (_dbus_server_new_for_tcp_socket): convert NULL host to
185 "localhost" here so we don't append NULL to address.
187 * dbus/dbus-server.c (_dbus_server_test): Add test case for
188 various addresses, including tcp with no explicit host.
190 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
192 * dbus/dbus-message.c (decode_header_data, decode_string_field):
193 fix incorrect setting of .name_offset in the HeaderField (it was
194 off by two bytes, positioned right after the name and typecode)
196 * bus/bus.c (bus_context_new, bus_context_unref): test before
197 calling dbus_server_free_data_slot and _dbus_user_database_unref
200 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
203 2004-04-19 Kristian Høgsberg <krh@redhat.com>
205 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
206 _dbus_poll() instead of select().
208 2004-04-15 Jon Trowbridge <trow@ximian.com>
210 * bus/main.c (signal_handler): Reload the configuration files
212 (main): Set up our SIGHUP handler.
214 * bus/bus.c (struct BusContext): Store the config file, user and
215 fork flag in the BusContext.
216 (process_config_first_time_only): Added. Contains the code
217 (previously in bus_context_new) for setting up the BusContext from
218 the BusConfigParser that should only be run the first time the
219 config files are read.
220 (process_config_every_time): Added. Contains the code (previously
221 in bus_context_new) for setting up the BusContext from the
222 BusConfigParser that should be run every time the config files are
224 (load_config): Added. Builds a BusConfigParser from the config
225 files and passes the resulting structure off to
226 process_config_first_time_only (assuming this is the first time)
227 and process_config_every_time.
228 (bus_context_new): All of the config-related code has been moved
229 to process_config_first_time_only and process_config_every_time.
230 Now this function just does the non-config-related initializations
231 and calls load_config.
232 (bus_context_reload_config): Added.
234 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
236 * bus/driver.c (bus_driver_handle_get_service_owner):
237 implement a GetServiceOwner method.
238 * doc/dbus-specification.xml: document it.
239 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
241 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
242 implement, using the bus GetServiceOwner method.
244 * test/glib/test-dbus-glib.c:
245 use dbus_gproxy_new_for_service_owner so that we can receive the
248 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
250 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
251 dbus/dbus-message.c, dbus/dbus-protocol.h
252 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
254 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
255 dbus/dbus-message.c, dbus/dbus-protocol.h
256 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
258 * dbus/dbus-internals.c (_dbus_header_field_to_string):
259 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
260 DBUS_HEADER_FIELD_SENDER resolves to "sender"
262 * doc/dbus-specification.xml (Header Fields Table):
263 s/SERVICE/DESTINATION
264 s/SENDER_SERVICE/SENDER
267 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
269 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
272 2004-04-13 Michael Meeks <michael@ximian.com>
274 * glib/dbus-gobject.c (handle_introspect): split out
275 (introspect_properties): this.
276 (handle_introspect): implement this.
278 * test/glib/Makefile.am: use the absolute path so the bus
279 daemon's chdir ("/") doesn't kill us dead.
281 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
283 2004-04-12 Jon Trowbridge <trow@ximian.com>
285 * bus/config-parser.c (struct BusConfigParser): Added
286 included_files field.
287 (seen_include): Added. Checks whether or not a file has already
288 been included by any parent BusConfigParser.
289 (bus_config_parser_new): Copy the parent's included_files.
290 (include_file): Track which files have been included, and fail on
292 (process_test_valid_subdir): Changed printf to report if we are
293 testing valid or invalid conf files.
294 (all_are_equiv): Changed printf to be a bit clearer about
295 what we are actually doing.
296 (bus_config_parser_test): Test invalid configuration files.
298 2004-04-09 Jon Trowbridge <trow@ximian.com>
300 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
301 argument. If non-null, the newly-constructed BusConfigParser will
302 be initialized with the parent's BusLimits instead of the default
304 (include_file): When including a config file, pass in
305 the current parser as the parent and then copy the BusLimits
306 from the included BusConfigParser pack to the current parser.
307 (process_test_valid_subdir): Renamed from process_test_subdir.
308 (process_test_equiv_subdir): Added. Walks through a directory,
309 descending into each subdirectory and loading the config files
310 it finds there. If any subdirectory contains two config files
311 that don't produce identical BusConfigParser structs, fail.
312 For now, the BusConfigParser's BusPolicies are not compared.
313 (bus_config_parser_test): Call both process_test_valid_subdir and
314 process_test_equiv_subdir.
316 * bus/config-loader-libxml.c (bus_config_load): Take a parent
317 argument and pass it along to the call to bus_config_parser_new.
318 Also made a few small changes to allow this code to compile.
320 * bus/config-loader-expat.c (bus_config_load): Take a parent
321 argument and pass it along to the call to bus_config_parser_new.
323 * bus/bus.c (bus_context_new): Load the config file
324 with a NULL parent argument.
326 2004-03-29 Michael Meeks <michael@ximian.com>
328 * glib/dbus-gobject.c (introspect_properties): split
329 out, fix mangled 'while' flow control.
330 (introspect_signals): implement.
331 (handle_introspect): update.
333 2004-03-29 Michael Meeks <michael@ximian.com>
335 * glib/dbus-gobject.c (set_object_property): split out /
336 re-work, use the property type, and not the message type(!)
337 (get_object_property): ditto.
339 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
340 (dbus_gvalue_marshal): make this code re-usable, needed
341 for signals too, also on both proxy and server side.
342 Re-write for more efficiency / readability.
344 2004-03-29 Michael Meeks <michael@ximian.com>
346 * dbus/dbus-message.c
347 (dbus_message_new_error_printf): impl.
349 * dbus/dbus-connection.c
350 (dbus_connection_unregister_object_path): fix warning.
352 * configure.in: fix no-mono-installed situation.
354 2004-03-27 Havoc Pennington <hp@redhat.com>
356 Patch from Timo Teräs:
358 * tools/dbus-send.c (main): if --print-reply, assume type is
359 method call; support boolean type args
361 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
362 bunch of memleak and logic bugs
364 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
367 * mono/Introspector.cs:
369 * mono/InterfaceProxy.cs:
371 * mono/ProxyBuilder.cs:
373 Added InterfaceProxy class to avoid building proxies for every
377 * dbus-message.c (dbus_message_append_args_valist)
378 (dbus_message_iter_get_object_path)
379 (dbus_message_iter_get_object_path_array)
380 (dbus_message_iter_append_object_path)
381 (dbus_message_iter_append_object_path_array):
382 Added object_path iter functions to handle OBJECT_PATH arguments
384 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
386 First checkin of mono bindings.
389 Build stuff for the bindings
390 * dbus-sharp.pc.in: Added for pkgconfig
392 2004-03-21 Havoc Pennington <hp@redhat.com>
394 * test/test-service.c (main): remove debug spew
396 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
398 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
401 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
402 (dbus_message_iter_init_array_iterator)
403 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
404 indicate whether the iterator is empty
406 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
409 2004-03-19 Havoc Pennington <hp@redhat.com>
415 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
417 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
418 you don't need pyrex to make dist
420 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
423 2004-03-18 Richard Hult <richard@imendio.com>
425 * dbus/dbus-message.c (dbus_message_get_auto_activation)
426 (dbus_message_set_auto_activation): Add doxygen docs.
428 2004-03-16 Richard Hult <richard@imendio.com>
430 * bus/activation.c: (bus_activation_service_created),
431 (bus_activation_send_pending_auto_activation_messages),
432 (bus_activation_activate_service):
434 * bus/dispatch.c: (bus_dispatch),
435 (check_nonexistent_service_auto_activation),
436 (check_service_auto_activated),
437 (check_segfault_service_auto_activation),
438 (check_existent_service_auto_activation), (bus_dispatch_test):
439 * bus/driver.c: (bus_driver_handle_activate_service):
440 * bus/services.c: (bus_registry_acquire_service):
441 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
442 (dbus_message_get_auto_activation):
443 * dbus/dbus-message.h:
444 * dbus/dbus-protocol.h: Implement auto-activation.
446 * doc/dbus-specification.xml: Add auto-activation to the spec.
448 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
450 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
451 fix a bug with CUSTOM types.
453 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
454 a unit test for this bug (used to fail).
456 2004-03-12 Mikael Hallendal <micke@imendio.com>
459 (babysitter_watch_callback): notify all pending activations waiting for
460 the same exec that the activation failed.
461 (bus_activation_activate_service): shortcut the activation if we
462 already waiting for the same executable to start up.
464 2004-03-12 Mikael Hallendal <micke@imendio.com>
467 - Added service file reloading.
468 Each service files directory is kept in an hash table in
469 BusActivation and each BusActivationEntry knows what .service-file it
470 was read from. So when you try to activate a service the bus will
471 check if it's been updated, removed or if new .service-files has
473 - Test code at the bottom for the service file reloading.
474 * bus/test-main.c: (main):
476 - added service reloading test.
477 * dbus/dbus-sysdeps.c:
478 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
480 2004-03-08 Michael Meeks <michael@ximian.com>
482 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
483 bail immediately if disconnected, to avoid busy loop.
485 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
486 cleanup cut/paste/inefficiency.
488 2004-03-01 David Zeuthen <david@fubar.dk>
490 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
491 bug where args were used twice. This bug resulted in a segfault
492 on a Debian/PPC system when starting the messagebus daemon. Include
493 dbus-sysdeps.h for DBUS_VA_COPY
495 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
497 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
498 appropriate va_copy implementation. From GLib
500 2004-02-24 Joe Shaw <joe@ximian.com>
502 * bus/services.c (bus_registry_acquire_service): We need to pass
503 in the service name to dbus_set_error() to prevent a crash.
505 2003-12-26 Anders Carlsson <andersca@gnome.org>
507 * AUTHORS: Reveal my True identity.
509 2003-12-17 Mikael Hallendal <micke@imendio.com>
511 * dbus/dbus-message.c: (dbus_message_append_args_valist):
512 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
514 2003-12-13 Mikael Hallendal <micke@imendio.com>
516 * doc/TODO: Added not about better error check of configuration files.
518 2003-12-02 Richard Hult <richard@imendio.com>
520 * Update AFL version to 2.0 throughout the source files to reflect
521 the update that was done a while ago.
523 2003-12-02 Richard Hult <richard@imendio.com>
525 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
526 wrote_dict_key to FALSE on the iter that the dict is appended to,
527 just like when appending other types. Fixes a bug where a dict
528 couldn't be put inside a dict.
529 (dbus_message_iter_append_dict_key): Fix typo in warning message.
530 (message_iter_test, _dbus_message_test): Add test case for dict
533 2003-12-01 David Zeuthen <david@fubar.dk>
535 * python/dbus.py: Add the actual message when calling the reciever
536 of a signal such that parameters can be inspected. Add the method
537 remove_signal_receiver
539 2003-11-26 Mikael Hallendal <micke@imendio.com>
543 * glib/*.[ch]: Made ref functions return the pointer
545 2003-11-25 Zack Rusin <zack@kde.org>
547 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
549 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
552 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
553 the Integrator and to better fit with the server,
555 2003-11-24 Zack Rusin <zack@kde.org>
557 * qt/connection.h, qt/connection.cpp: removing initDbus method since
558 the integrator handles it now
560 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
561 since QTimer wasn't really meant to be used the way DBusTimeout is
563 2003-11-24 Zack Rusin <zack@kde.org>
565 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
566 Integrator class which integrates D-BUS with the Qt event loop,
568 * qt/connection.h, qt/connection.cpp: Move all the code which
569 was dealing with D-BUS integration to the Integrator class,
570 and start using Integrator,
572 2003-11-23 Zack Rusin <zack@kde.org>
574 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
577 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
578 switching namespaces to DBusQt, reworking the class,
580 * Makefile.cvs: switching dependencies so that it matches KDE
583 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
586 2003-11-19 Havoc Pennington <hp@redhat.com>
590 * configure.in: bump version to 0.20
592 * configure.in (have_qt): add yet another place to look for qt
593 (someone hand trolltech a .pc file...)
595 2003-11-01 Havoc Pennington <hp@redhat.com>
597 * doc/dbus-specification.xml: add state machine docs on the auth
598 protocol; just a first draft, I'm sure it's wrong.
600 2003-10-28 David Zeuthen <david@fubar.dk>
602 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
603 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
605 2003-10-28 Havoc Pennington <hp@redhat.com>
607 * dbus/dbus-message.c (get_next_field): delete unused function
609 2003-10-28 Havoc Pennington <hp@redhat.com>
611 * bus/expirelist.c (do_expiration_with_current_time): detect
612 failure of the expire_func due to OOM
614 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
616 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
617 NoReply error that's now created by the bus when the service exits
619 2003-10-28 Havoc Pennington <hp@redhat.com>
621 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
622 tests for set_path, set_interface, set_member, etc.
624 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
626 * dbus/dbus-message.c (set_string_field): always just delete and
627 re-append the field; accept NULL for deletion
628 (re_align_fields_recurse): reimplement
630 2003-10-26 Havoc Pennington <hp@redhat.com>
632 * dbus/dbus-connection.c: fix docs to properly describe the
634 (_dbus_connection_notify_disconnected): remove this function;
635 we can't synchronously add the disconnected message, we have to
636 do it after we've queued any remaining real messages
637 (_dbus_connection_get_dispatch_status_unlocked): queue the
638 disconnect message only if the transport has finished queueing all
639 its real messages and is disconnected.
640 (dbus_connection_disconnect): update the dispatch status here
642 2003-10-22 Havoc Pennington <hp@redhat.com>
644 * bus/bus.c (bus_context_check_security_policy): fix up assertion
646 * bus/connection.c (bus_transaction_send_from_driver): set the
647 destination to the connection's base service
649 2003-10-20 Havoc Pennington <hp@redhat.com>
651 hmm, make check is currently not passing.
653 * doc/dbus-specification.xml: add requirement that custom type
654 names follow the same rules as interface names.
656 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
657 duplication and allow 'c' to be 'custom'; dict is now 'm' for
660 * doc/dbus-specification.xml: update type codes to match
661 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
662 CUSTOM. Add type OBJECT_PATH to the spec.
664 2003-10-17 Havoc Pennington <hp@redhat.com>
666 * bus/driver.c (create_unique_client_name): use "." as separator
667 in base service names instead of '-'
669 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
670 byte at the end of the string
672 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
673 optimization macros since string validation seems to be a slow
676 * doc/dbus-specification.xml: restrict valid
677 service/interface/member/error names. Add test suite code for the
680 * dbus/dbus-string.c: limit service/interface/member/error names
683 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
684 format arg to verbose spew
686 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
687 memory, return instead of g_error
689 * test/test-service.c (path_message_func): support emitting a
692 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
693 activation bus type if DBUS_BUS_ACTIVATION was set; default to
694 assuming the activation bus was the session bus so that services
695 started manually will still register.
696 (init_connections_unlocked): fix so that in OOM situation we get
697 the same semantics when retrying the function
699 * test/test-service.c (main): change to use path registration, to
700 test those codepaths; register with DBUS_BUS_ACTIVATION rather
701 than DBUS_BUS_SESSION
703 2003-10-16 Havoc Pennington <hp@redhat.com>
705 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
707 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
708 coverage of the tests
709 (coverage-report.txt): don't move the .da and .bbg files around
711 2003-10-16 Havoc Pennington <hp@redhat.com>
713 * bus/bus.c (struct BusContext): remove struct field I didn't mean
716 2003-10-16 Havoc Pennington <hp@redhat.com>
718 * bus/connection.c (bus_pending_reply_expired): either cancel or
720 (bus_connections_check_reply): use unlink, not remove_link, as we
721 don't want to free the link; fixes double free mess
723 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
724 where no reply was received
726 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
729 * bus/signals.c (match_rule_matches): add special cases for the
730 bus driver, so you can match on sender/destination for it.
732 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
733 DBUS_PRINT_BACKTRACE is set
735 * dbus/dbus-internals.c: add pid to assertion failure messages
737 * dbus/dbus-connection.c: add message type code to the debug spew
739 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
740 sender=foo not service=foo
742 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
743 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
744 DBUS_ACTIVATION_ADDRESS instead
746 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
747 DBUS_SYSTEM_BUS_ADDRESS if appropriate
749 * bus/bus.c (bus_context_new): handle OOM copying bus type into
752 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
753 (dbus_message_iter_get_object_path_array): new function (half
754 finished, disabled for the moment)
756 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
757 DBUS_MESSAGE_TYPE_ERROR
759 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
760 avoid redirecting stderr to /dev/null
761 (babysit): close stdin if not doing the "exit_with_session" thing
763 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
764 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
765 stdout/stdin, so things don't get confused
767 * bus/system.conf.in: fix to allow replies, I modified .conf
768 instead of .conf.in again.
770 2003-10-14 David Zeuthen <david@fubar.dk>
772 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
773 argtype to arg_type when raising unknown arg type exception.
774 Changed type list to reflect the changes in dbus-protocol.h so
775 the bindings actually work.
777 2003-10-14 Havoc Pennington <hp@redhat.com>
779 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
780 to have a bug keeping it from outputting the .da files sometimes
781 (string_get_string): don't append garbage nul bytes to the string.
783 2003-10-15 Seth Nickell <seth@gnome.org>
785 * python/Makefile.am:
787 Include dbus_h_wrapper.h in the dist tarball.
789 2003-10-14 Havoc Pennington <hp@redhat.com>
791 * bus/bus.c (bus_context_check_security_policy): revamp this to
792 work more sanely with new policy-based requested reply setup
794 * bus/connection.c (bus_transaction_send_from_driver): set bus
795 driver messages as no reply
797 * bus/policy.c (bus_client_policy_check_can_receive): handle a
798 requested_reply attribute on allow/deny rules
800 * bus/system.conf: add <allow requested_reply="true"/>
802 * bus/driver.c (bus_driver_handle_message): fix check for replies
803 sent to the bus driver, which was backward. How did this ever work
804 at all though? I think I'm missing something.
806 * dbus/dbus-message.c (decode_header_data): require error and
807 method return messages to have a reply serial field to be valid
808 (_dbus_message_loader_queue_messages): break up this function;
809 validate that reply serial and plain serial are nonzero;
810 clean up the OOM/error handling.
811 (get_uint_field): don't return -1 from this
812 (dbus_message_create_header): fix signed/unsigned bug
814 * bus/connection.c (bus_connections_expect_reply): save serial of
815 the incoming message, not reply serial
817 2003-10-14 Havoc Pennington <hp@redhat.com>
819 * bus/connection.c: implement pending reply tracking using
822 * bus/bus.c (bus_context_check_security_policy): verify that a
823 reply is pending in order to allow a reply to be sent. Deny
824 messages of unknown type.
826 * bus/dbus-daemon-1.1.in: update to mention new resource limits
828 * bus/bus.c (bus_context_get_max_replies_per_connection): new
829 (bus_context_get_reply_timeout): new
831 2003-10-13 Seth Nickell <seth@gnome.org>
833 * python/Makefile.am:
835 Pass "make distcheck": remove a couple files from DIST_FILES
836 that weren't included in the final version.
838 2003-10-12 Havoc Pennington <hp@pobox.com>
840 Added test code that 1) starts an actual bus daemon and 2) uses
841 DBusGProxy; fixed bugs that were revealed by the test. Lots
842 more testing possible, but this is the basic framework.
844 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
845 empty proxy lists from the proxy list hash
847 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
848 couple of return_if_fail checks
850 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
851 to allocate, so everything is cleared to NULL as it should be.
853 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
854 source as data to dbus_connection_set_timeout_functions() as the
855 timeout functions expected
857 * test/glib/run-test.sh: add a little script to start up a message
858 bus and run tests using it
860 * tools/dbus-launch.1: updates
862 * tools/dbus-launch.c (main): add --config-file option
864 * tools/dbus-launch.c (main): remove confusing else if (runprog)
865 that could never be reached.
867 * dbus/dbus-message.c (dbus_message_new_method_return)
868 (dbus_message_new_error, dbus_message_new_signal): set the
869 no-reply-expected flag on all these. Redundant, but may
870 as well be consistent.
872 2003-10-11 Havoc Pennington <hp@pobox.com>
874 * test/decode-gcov.c (function_solve_graph): make broken block
875 graph a nonfatal error since it seems to be broken. Need to debug
878 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
879 can't just check type > INVALID < LAST anymore
881 * dbus/dbus-message.c (dbus_message_get_signature): new function
882 (dbus_message_has_signature): new function
883 (struct DBusMessage): add signature field (right now it isn't sent
884 over the wire, just generated on the fly)
885 (dbus_message_copy): copy the signature, and init strings to
886 proper length to avoid some reallocs
887 (dbus_message_iter_init_array_iterator): return void, since it
889 (dbus_message_iter_init_dict_iterator): return void since it can't fail
890 (_dbus_message_loader_queue_messages): add silly temporary hack to
891 fill in message->signature on load
893 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
894 characters, so they are relatively human-readable.
896 2003-10-11 Havoc Pennington <hp@pobox.com>
898 * dbus/dbus-message.c (_dbus_message_test): add more test
899 coverage, but #if 0 for now since they uncover a bug
900 not fixed yet; I think in re_align_field_recurse()
901 (re_align_field_recurse): add FIXME about broken assertion
903 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
905 * bus/connection.c: share a couple code bits with expirelist.c
907 * bus/expirelist.h, bus/expirelist.c: implement a generic
908 expire-items-after-N-seconds facility, was going to share between
909 expiring connections and replies, decided not to use for expiring
912 * COPYING: include AFL 2.0 (still need to change all the file headers)
914 2003-10-09 Havoc Pennington <hp@redhat.com>
916 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
917 gcc 3.3. Not that we do anything about it yet.
919 * bus/signals.c (bus_match_rule_parse): impose max length on the
922 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
924 2003-10-09 Havoc Pennington <hp@redhat.com>
926 Make matching rules theoretically work (add parser).
928 * bus/bus.c (bus_context_check_security_policy): fix up to handle
929 the case where destination is explicitly specified as bus driver
930 and someone else is eavesdropping.
932 * bus/policy.c (bus_client_policy_check_can_receive): fix up
933 definition of eavesdropping and assertion
935 * tools/dbus-send.c (main): use dbus_message_type_from_string
937 * bus/signals.c (bus_match_rule_parse): implement
939 * dbus/dbus-message.c (dbus_message_type_from_string): new
941 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
943 2003-10-02 Havoc Pennington <hp@pobox.com>
945 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
946 dbus_gproxy_oneway_call
948 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
949 (dbus_server_setup_with_g_main): fix to allow calling them more
950 than once on the same args
951 (dbus_bus_get_with_g_main): new function
953 2003-10-02 Havoc Pennington <hp@redhat.com>
955 * doc/dbus-tutorial.xml: write some stuff
957 2003-09-29 Havoc Pennington <hp@pobox.com>
959 * configure.in: split checks for Doxygen from XML docs, check for
962 * doc/Makefile.am: XML-ify all the docs, and add a blank
965 2003-09-29 Havoc Pennington <hp@pobox.com>
967 * Merge dbus-object-names branch. To see the entire patch
968 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
970 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
972 2003-09-28 Havoc Pennington <hp@pobox.com>
974 * HACKING: update to reflect new server
976 2003-09-26 Seth Nickell <seth@gnome.org>
979 * python/examples/example-signals.py:
981 Start implementing some notions of signals. The API
982 is really terrible, but they sort of work (with the
983 exception of being able to filter by service, and to
984 transmit signals *as* a particular service). Need to
985 figure out how to make messages come from the service
988 * python/dbus_bindings.pyx.in:
990 Removed duplicate message_handler callbacks.
992 2003-09-25 Havoc Pennington <hp@redhat.com>
994 * bus/session.conf.in: fix my mess
996 2003-09-25 Havoc Pennington <hp@pobox.com>
998 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1000 2003-09-25 Seth Nickell <seth@gnome.org>
1002 * python/examples/example-service.py:
1004 Johan notices complete wrong code in example-service, but
1005 completely wrong in a way that works exactly the same (!).
1006 Johan is confused, how could this possibly work? Example
1007 code fails to serve purpose of making things clear.
1010 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1012 * doc/dbus-specification.sgml: don't require header fields
1013 to be 4-byte aligned and specify that fields should be
1014 distinguished from padding by the fact that zero is not
1017 * doc/TODO: remove re-alignment item and add item to doc
1018 the OBJECT_PATH type.
1020 * dbus/dbus-message.c:
1021 (HeaderField): rename the original member to value_offset
1022 and introduce a name_offset member to keep track of where
1023 the field actually begins.
1024 (adjust_field_offsets): remove.
1025 (append_int_field), (append_uint_field),
1026 (append_string_field): don't align the start of the header
1027 field to a 4-byte boundary.
1028 (get_next_field): impl finding the next marhsalled field
1029 after a given field.
1030 (re_align_field_recurse): impl re-aligning a number of
1031 already marshalled fields.
1032 (delete_field): impl deleting a field of any type and
1033 re-aligning any following fields.
1034 (delete_int_or_uint_field), (delete_string_field): remove.
1035 (set_int_field), (set_uint_field): no need to re-check
1036 that we have the correct type for the field.
1037 (set_string_field): ditto and impl re-aligning any
1039 (decode_header_data): update to take into account that
1040 the fields aren't 4-byte aligned any more and the new
1041 way to distinguish padding from header fields. Also,
1042 don't exit when there is too much header padding.
1043 (process_test_subdir): print the directory.
1044 (_dbus_message_test): add test to make sure a following
1045 field is re-aligned correctly after field deletion.
1047 * dbus/dbus-string.[ch]:
1048 (_dbus_string_insert_bytes): rename from insert_byte and
1049 allow the insert of multiple bytes.
1050 (_dbus_string_test): test inserting multiple bytes.
1052 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1053 warning note to docs about having to re-align any
1054 marshalled values following the string.
1056 * dbus/dbus-message-builder.c:
1057 (append_string_field), (_dbus_message_data_load):
1058 don't align the header field.
1060 * dbus/dbus-auth.c: (process_test_subdir): print the
1063 * test/break-loader.c: (randomly_add_one_byte): upd. for
1066 * test/data/invalid-messages/bad-header-field-alignment.message:
1069 * test/data/valid-messages/unknown-header-field.message: shove
1070 a dict in the unknown field.
1072 2003-09-25 Seth Nickell <seth@gnome.org>
1075 * python/dbus_bindings.pyx.in:
1077 Handle return values.
1079 * python/examples/example-client.py:
1080 * python/examples/example-service.py:
1082 Pass back return values from the service to the client.
1084 2003-09-24 Seth Nickell <seth@gnome.org>
1088 Connect Object methods (when you are sharing an object) up... pass
1089 in a list of methods to be shared. Sharing all the methods just
1090 worked out too weird. You can now create nice Services over the
1093 * python/dbus_bindings.pyx.in:
1095 Keep references to user_data tuples passed into C functions so
1096 Python doesn't garbage collect on us.
1098 Implement MethodReturn and Error subclasses of Message for creating
1099 DBusMessage's of those types.
1101 * python/examples/example-client.py:
1102 * python/examples/example-service.py:
1104 Simple example code showing both how create DBus services and objects,
1105 and how to use them.
1107 2003-09-23 Havoc Pennington <hp@pobox.com>
1109 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1111 2003-09-23 Havoc Pennington <hp@redhat.com>
1113 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1114 (dbus_gproxy_disconnect_signal): implement
1115 (dbus_gproxy_manager_remove_signal_match): implement
1116 (dbus_gproxy_manager_add_signal_match): implement
1117 (dbus_gproxy_oneway_call): implement
1119 2003-09-23 Havoc Pennington <hp@pobox.com>
1121 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1122 subclass. This means dropping the transparent thread safety of the
1123 proxy; you now need a separate proxy per-thread, or your own
1124 locking on the proxy. Probably right anyway.
1125 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1127 2003-09-22 Havoc Pennington <hp@redhat.com>
1129 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1131 2003-09-21 Seth Nickell <seth@gnome.org>
1133 First checkin of the Python bindings.
1135 * python/.cvsignore:
1136 * python/Makefile.am:
1137 * python/dbus_bindings.pyx.in:
1138 * python/dbus_h_wrapper.h:
1140 Pieces for Pyrex to operate on, building a dbus_bindings.so
1141 python module for low-level access to the DBus APIs.
1145 High-level Python module for accessing DBus objects.
1150 Build stuff for the python bindings.
1154 Extra macro needed for finding the Python C header files.
1156 2003-09-21 Havoc Pennington <hp@pobox.com>
1158 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1159 implementing the proxy manager, didn't get very far.
1161 * dbus/dbus-bus.c (dbus_bus_add_match): new
1162 (dbus_bus_remove_match): new
1164 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1165 path_name argument; adjust the other not-yet-implemented
1166 gproxy constructors to be what I think they should be.
1168 2003-09-21 Havoc Pennington <hp@pobox.com>
1170 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1171 by default for message bus connections.
1173 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1174 exit_on_disconnect flag is set and we process the disconnected
1176 (dbus_connection_set_exit_on_disconnect): new function
1178 2003-09-21 Havoc Pennington <hp@pobox.com>
1180 Get matching rules mostly working in the bus; only actually
1181 parsing the rule text remains. However, the client side of
1182 "signal connections" hasn't been started, this patch is only the
1185 * dbus/dispatch.c: fix for the matching rules changes
1187 * bus/driver.c (bus_driver_handle_remove_match)
1188 (bus_driver_handle_add_match): send an ack reply from these
1191 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
1192 arguments, reported by Seth Nickell
1194 * bus/config-parser.c (append_rule_from_element): support
1195 eavesdrop=true|false attribute on policies so match rules
1196 can be prevented from snooping on the system bus.
1198 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
1199 and "destination" in attribute names; fix some docs bugs;
1200 add eavesdrop=true|false attribute
1202 * bus/driver.c (bus_driver_handle_add_match)
1203 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
1206 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
1207 rid of broadcast service concept, signals are just always broadcast
1209 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
1210 mostly implement matching rules stuff (currently only exposed as signal
1213 2003-09-21 Mark McLoughlin <mark@skynet.ie>
1215 * doc/dbus-specification.sgml: Change the header field name
1216 to be an enum and update the rest of the spec to reference
1217 the fields using the conventinal name.
1219 * dbus/dbus-protocol.h: update to reflect the spec.
1221 * doc/TODO: add item to remove the 4 byte alignment requirement.
1223 * dbus/dbus-message.c: Remove the code to generalise the
1224 header/body length and serial number header fields as named
1225 header fields so we can reference field names using the
1227 (append_int_field), (append_uint_field), (append_string_field):
1228 Append the field name as a byte rather than four chars.
1229 (delete_int_or_uint_field), (delete_string_field): reflect the
1230 fact that the field name and typecode now occupy 4 bytes instead
1232 (decode_string_field), (decode_header_data): update to reflect
1233 protocol changes and move the field specific encoding from
1234 decode_string_field() back into decode_header_data().
1236 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
1237 Add utility to aid debugging.
1239 * dbus/dbus-message-builder.c:
1240 (append_string_field), (_dbus_message_data_load): Update to
1241 reflect protocol changes; Change the FIELD_NAME directive
1242 to HEADER_FIELD and allow it to take the field's conventional
1243 name rather than the actual value.
1245 * test/data/*/*.message: Update to use HEADER_FIELD instead
1246 of FIELD_NAME; Always align the header on an 8 byte boundary
1247 *before* updating the header length.
1249 2003-09-15 Havoc Pennington <hp@pobox.com>
1251 * dbus/dbus-pending-call.c: add the get/set object data
1252 boilerplate as for DBusConnection, etc. Use generic object data
1253 for the notify callback.
1255 * glib/dbus-gparser.c (parse_node): parse child nodes
1257 * tools/dbus-viewer.c: more hacking on the dbus-viewer
1259 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
1260 contain functions shared between the convenience lib and the
1263 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
1264 -export-symbols-regex to the GLib library
1266 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
1267 fix the locking in here, and add a default handler for
1268 Introspect() that just returns sub-nodes.
1270 2003-09-14 Havoc Pennington <hp@pobox.com>
1272 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
1273 rather than gfoo consistent
1275 * glib/dbus-gproxy.h: delete for now, move contents to
1276 dbus-glib.h, because the include files don't work right since we
1277 aren't in the dbus/ subdir.
1279 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
1280 (dbus_gproxy_end_call): finish
1281 (dbus_gproxy_begin_call): finish
1283 * glib/dbus-gmain.c (dbus_set_g_error): new
1285 * glib/dbus-gobject.c (handle_introspect): include information
1286 about child nodes in the introspection
1288 * dbus/dbus-connection.c (dbus_connection_list_registered): new
1289 function to help in implementation of introspection
1291 * dbus/dbus-object-tree.c
1292 (_dbus_object_tree_list_registered_and_unlock): new function
1294 2003-09-12 Havoc Pennington <hp@pobox.com>
1296 * glib/dbus-gidl.h: add common base class for all the foo_info
1299 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
1302 * test/Makefile.am: try test srcdir -ef . in addition to test
1303 srcdir = ., one of them should work (yeah lame)
1305 * glib/Makefile.am: build the "idl" parser stuff as a convenience
1308 * glib/dbus-gparser.h: make description_load routines return
1309 NodeInfo* not Parser*
1311 * Makefile.am (SUBDIRS): build test dir after all library dirs
1313 * configure.in: add GTK+ detection
1315 2003-09-07 Havoc Pennington <hp@pobox.com>
1317 * Make Doxygen contented.
1319 2003-09-07 Havoc Pennington <hp@pobox.com>
1321 * doc/dbus-specification.sgml: more updates
1323 2003-09-06 Havoc Pennington <hp@pobox.com>
1325 * doc/dbus-specification.sgml: partial updates
1327 * bus/dbus-daemon-1.1.in: fix the config file docs for the
1328 zillionth time; hopefully I edited the right file this time.
1330 * bus/config-parser.c (append_rule_from_element): support
1331 send_type, send_path, receive_type, receive_path
1333 * bus/policy.c: add message type and path to the list of things
1334 that can be "firewalled"
1336 2003-09-06 Havoc Pennington <hp@pobox.com>
1338 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
1339 (dbus_connection_register_object_path): make this not handle
1340 messages to paths below the given path
1342 2003-09-03 Havoc Pennington <hp@pobox.com>
1344 * test/glib/Makefile.am: add this with random glib-linked test
1347 * glib/Makefile.am: remove the random test programs from here,
1348 leave only the unit tests
1350 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
1351 uscore/javacaps conversion, and fix
1352 (get_object_property, set_object_property): change to .NET
1353 convention for mapping props to methods, set_FooBar/get_FooBar,
1354 since one language has such a convention we may as well copy it.
1355 Plus real methods in either getFooBar or get_foo_bar style won't
1356 collide with this convention.
1358 2003-09-01 Havoc Pennington <hp@pobox.com>
1360 * glib/dbus-gparser.c: implement
1362 * glib/dbus-gobject.c: start implementing skeletons support
1364 * configure.in: when disabling checks/assert, also define
1365 G_DISABLE_ASSERT and G_DISABLE_CHECKS
1367 2003-09-01 Havoc Pennington <hp@pobox.com>
1369 * glib/Makefile.am: rearrange a bunch of files and get "make
1370 check" framework set up
1372 2003-08-31 Havoc Pennington <hp@pobox.com>
1374 * fix build with --disable-tests
1376 2003-08-30 Havoc Pennington <hp@pobox.com>
1378 * dbus/dbus-connection.c: purge DBusMessageHandler
1380 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
1381 use callbacks everywhere
1383 2003-08-30 Havoc Pennington <hp@pobox.com>
1385 * test/data/valid-config-files/system.d/test.conf: change to
1386 root for the user so warnings don't get printed
1388 * dbus/dbus-message.c: add dbus_message_get_path,
1389 dbus_message_set_path
1391 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
1392 dispatching to a path
1394 * dbus/dbus-string.c (_dbus_string_validate_path): add
1396 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
1397 (_dbus_marshal_object_path): implement
1399 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
1400 to contain the path to the target object
1401 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
1402 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
1404 2003-08-30 Havoc Pennington <hp@pobox.com>
1406 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
1408 2003-08-29 Havoc Pennington <hp@pobox.com>
1410 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
1412 (struct DBusObjectSubtree): shrink this
1413 a lot, since we may have a lot of them
1414 (_dbus_object_tree_free_all_unlocked): implement
1415 (_dbus_object_tree_dispatch_and_unlock): implement
1417 2003-08-29 Havoc Pennington <hp@pobox.com>
1419 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
1421 2003-08-28 Havoc Pennington <hp@pobox.com>
1425 * dbus/dbus-connection.c: port to no ObjectID, create a
1426 DBusObjectTree, rename ObjectTree to ObjectPath in public API
1428 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
1429 everything except UnregisterFunction and MessageFunction
1431 * dbus/dbus-marshal.c: port away from DBusObjectID,
1432 add DBUS_TYPE_OBJECT_PATH
1434 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
1435 dbus/dbus-objectid.[hc]: remove these, we are moving to
1436 path-based object IDs
1438 2003-08-25 Havoc Pennington <hp@pobox.com>
1440 Just noticed that dbus_message_test is hosed, I wonder when I
1441 broke that. I thought make check was passing earlier...
1443 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
1444 container tree, will replace most of dbus-object-registry
1446 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1449 2003-08-19 Havoc Pennington <hp@pobox.com>
1451 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1452 (dbus_message_is_error): fix this function
1454 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1457 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1458 reflect clarified man page
1459 (bus_client_policy_check_can_send): ditto
1461 * bus/session.conf.in: fixup
1463 * bus/system.conf.in: fixup
1465 2003-08-18 Havoc Pennington <hp@redhat.com>
1467 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1469 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1470 dumb bug created earlier (wrong order of args to
1471 decode_header_data())
1473 * tools/dbus-send.c: port
1475 * tools/dbus-print-message.c (print_message): port
1477 * test/data/*messages: port all messages over
1479 * dbus/dbus-message-builder.c: support including
1482 * bus/driver.c: port over
1484 * bus/dispatch.c: port over to new stuff
1486 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1487 rename disconnect signal to "Disconnected"
1489 2003-08-17 Havoc Pennington <hp@pobox.com>
1491 This doesn't compile yet, but syncing up so I can hack on it from
1492 work. What are branches for if not broken code? ;-)
1494 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1495 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1496 DBUS_HEADER_FIELD_ERROR_NAME
1498 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1499 for the interface+member pairs
1500 (string_hash): change to use g_str_hash algorithm
1501 (find_direct_function, find_string_function): refactor these to
1504 * dbus/dbus-message.c: port all of this over to support
1505 interface/member fields instead of name field
1507 * dbus/dbus-object-registry.c: port over
1509 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1510 from _dbus_string_validate_name
1512 * bus/dbus-daemon-1.1: change file format for the
1513 <deny>/<allow> stuff to match new message naming scheme
1515 * bus/policy.c: port over
1517 * bus/config-parser.c: parse new format
1519 2003-08-16 Havoc Pennington <hp@pobox.com>
1521 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1524 * glib/dbus-gproxy.c: some hacking
1526 2003-08-15 Havoc Pennington <hp@redhat.com>
1528 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1530 * dbus/dbus-connection.c
1531 (dbus_connection_send_with_reply_and_block): factor out internals;
1532 change to convert any error replies to DBusError instead of
1533 returning them as a message
1535 2003-08-15 Havoc Pennington <hp@pobox.com>
1537 * dbus/dbus-connection.c,
1538 dbus/dbus-pending-call.c: Finish the pending call stuff
1540 2003-08-14 Havoc Pennington <hp@redhat.com>
1542 * dbus/dbus-pending-call.c: start on new object that will replace
1543 DBusMessageHandler and ReplyHandlerData for tracking outstanding
1546 * dbus/dbus-gproxy.c: start on proxy object used to communicate
1547 with remote interfaces
1549 * dbus/dbus-gidl.c: do the boring boilerplate in here
1551 2003-08-12 Havoc Pennington <hp@pobox.com>
1553 * bus/dispatch.c (bus_dispatch): make this return proper
1554 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1556 * dbus/dbus-errors.c (dbus_set_error): use
1557 _dbus_string_append_printf_valist
1559 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1560 (_dbus_string_append_printf): new
1562 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1565 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1566 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1567 message is unhandled.
1569 2003-08-11 Havoc Pennington <hp@pobox.com>
1571 * bus/test.c (client_disconnect_handler): change to return
1572 HANDLED (would have been REMOVE_MESSAGE)
1574 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1575 HANDLED/NOT_YET_HANDLED instead of
1576 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
1579 2003-08-10 Havoc Pennington <hp@pobox.com>
1581 * tools/dbus-send.c (main): add --type argument, for now
1582 supporting only method_call and signal types.
1584 * tools/dbus-print-message.c: print message type
1586 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1587 init connection->objects
1589 * doc/dbus-specification.sgml: fix sgml
1591 * bus/*.c: port over to object-instance API changes
1593 * test/test-service.c: ditto
1595 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1596 name, we will have to fix up the rest of the code to also handle
1598 (dbus_message_new): generic message-creation call
1599 (set_string_field): allow appending name field
1601 2003-08-06 Havoc Pennington <hp@pobox.com>
1603 * dbus/dbus-object-registry.c: implement signal connection
1606 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1608 * dbus/dbus-internals.c (_dbus_memdup): new function
1610 2003-08-02 Havoc Pennington <hp@pobox.com>
1612 * dbus/dbus-message.c (dbus_message_get_no_reply)
1613 (dbus_message_set_no_reply): add these and remove
1614 set_is_error/get_is_error
1616 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
1617 remove the ERROR flag, since there's now an ERROR type
1619 2003-08-01 Havoc Pennington <hp@pobox.com>
1621 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1624 * dbus/dbus-message.c (dbus_message_get_type): new function
1626 * doc/dbus-specification.sgml: add "type" byte to messages
1628 2003-08-01 Havoc Pennington <hp@pobox.com>
1630 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1631 a message type enum to distinguish kinds of message
1632 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
1633 that need not be replied to
1635 2003-08-01 Havoc Pennington <hp@pobox.com>
1637 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1638 (unpack_8_octets): fix no-64-bit-int bug
1640 * dbus/dbus-object-registry.c (validate_id): validate the
1641 connection ID bits, not just the instance ID.
1643 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1644 the connection-global 33 bits of the object ID
1646 * dbus/dbus-object-registry.c (info_from_entry): fill in
1647 object ID in the new way
1649 * dbus/dbus-objectid.h: rather than high/low bits, specifically
1650 define server/client/instance bits.
1652 2003-07-30 Havoc Pennington <hp@pobox.com>
1654 * dbus/dbus-connection.c (dbus_connection_register_object): fix
1657 2003-07-13 Havoc Pennington <hp@pobox.com>
1659 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1660 fields to DBusObjectVTable and DBusObjectInfo
1662 2003-07-12 Havoc Pennington <hp@pobox.com>
1664 * dbus/dbus-object-registry.c: implement unit test,
1665 fix bugs discovered in process
1667 * dbus/dbus-connection.c: remove handler_table and
1668 register_handler(), add DBusObjectRegistry usage
1670 * dbus/dbus-objectid.c (dbus_object_id_is_null)
1671 (dbus_object_id_set_null): new functions
1673 2003-07-08 Havoc Pennington <hp@pobox.com>
1675 * dbus/dbus-object.c: implement some of this
1677 * dbus/dbus-object-registry.c
1678 (_dbus_object_registry_add_and_unlock): fill in the object_id out
1680 (_dbus_object_registry_new): handle OOM
1682 2003-07-08 Havoc Pennington <hp@pobox.com>
1684 * dbus/dbus-object.h: sketch out an API for registering objects
1685 with a connection, that allows us to use as little as 24 bytes
1686 per object and lets application code represent an object in
1687 any conceivable way.
1689 * dbus/dbus-object-registry.c: implement the hard bits of the
1690 DBusConnection aspect of object API. Not yet wired up.
1692 2003-07-06 Havoc Pennington <hp@pobox.com>
1694 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1695 (_dbus_marshal_object_id): new
1696 (_dbus_demarshal_object_id): new
1697 (_dbus_marshal_get_arg_end_pos): support object ID type, and
1698 consolidate identical switch cases. Don't conditionalize handling
1699 of DBUS_TYPE_UINT64, need to handle the type always.
1700 (_dbus_marshal_validate_arg): consolidate identical cases, and
1701 handle DBUS_TYPE_OBJECT_ID
1703 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1705 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1707 2003-09-28 Havoc Pennington <hp@pobox.com>
1711 2003-09-28 Havoc Pennington <hp@pobox.com>
1713 * doc/Makefile.am (dbus-specification.html): testing a funky hack
1714 to work with Debian db2html
1716 2003-09-28 Havoc Pennington <hp@pobox.com>
1718 * configure.in: 0.13
1720 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
1721 stylesheet-images for benefit of Debian
1723 Change back to using filesystem-linked sockets for the system
1724 bus, so only root can create the default system bus address.
1726 * bus/system.conf.in: change to use
1727 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1729 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
1732 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1733 here, and AC_DEFINE DBUS_SYSTEM_PATH
1735 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1738 * doc/busconfig.dtd:
1741 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1743 * doc/dbus-specification.sgml:
1744 Add activation reply values.
1746 2003-08-05 Havoc Pennington <hp@redhat.com>
1748 * configure.in: 0.12
1750 2003-08-05 Anders Carlsson <andersca@codefactory.se>
1752 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
1753 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
1754 (add_watch), (remove_watch), (create_source):
1755 Refcount fds, fixes some reentrancy issues.
1757 2003-07-30 Havoc Pennington <hp@redhat.com>
1759 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
1760 bus address to be abstract if we have abstract sockets
1764 2003-07-28 Havoc Pennington <hp@redhat.com>
1766 * bus/messagebus.in: fix to avoid processname/servicename
1767 confusion, from Michael Kearey
1768 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
1770 2003-07-23 Havoc Pennington <hp@pobox.com>
1772 * dbus/dbus-message.c (dbus_message_iter_get_named):
1773 fix from Andy Hanton to remove broken "+1"
1775 2003-07-16 Havoc Pennington <hp@pobox.com>
1777 * tools/dbus-launch.c (babysit): close stdout/stderr in the
1778 babysitter process, as suggested by Thomas Leonard, so
1779 an "eval `dbus-launch --exit-with-session`" will actually
1782 2003-07-16 Havoc Pennington <hp@pobox.com>
1784 * configure.in: print out EXPANDED_* variables in the summary at
1785 the end; clean up the code that computes EXPANDED_ variables and
1786 get the ones using exec_prefix right. Should make things work
1787 when you build without --prefix
1789 2003-06-29 Havoc Pennington <hp@pobox.com>
1791 * mono/Test.cs (class Test): fire up a main loop and run it
1793 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
1794 done once, the app has to do it
1796 2003-06-26 Havoc Pennington <hp@pobox.com>
1798 * mono/Connection.cs: set up connection with the glib main loop
1800 2003-07-01 Havoc Pennington <hp@redhat.com>
1802 * doc/dbus-specification.sgml: clarify the format of a type code,
1803 change suggested by Jim Blandy
1805 2003-06-29 Miloslav Trmac <mitr@volny.cz>
1808 * tools/Makefile.am: Don't assume srcdir == builddir.
1810 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
1811 the allocated block.
1812 (_dbus_memory_test): New function.
1813 * dbus/dbus-test.h: Add _dbus_memory_test ().
1814 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
1816 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
1818 (dbus_message_new): Remove obsolete @todo.
1820 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
1821 (_dbus_marshal_set_uint64): Fix comment.
1823 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
1824 hardcode FIELD_REPLY_SERIAL.
1826 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
1827 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
1829 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
1830 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
1832 2003-06-24 Havoc Pennington <hp@pobox.com>
1834 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
1836 2003-06-23 Anders Carlsson <andersca@codefactory.se>
1842 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
1843 * gcj/org/.cvsignore:
1844 * gcj/org/Makefile.am:
1845 * gcj/org/freedesktop/.cvsignore:
1846 * gcj/org/freedesktop/Makefile.am:
1847 * gcj/org/freedesktop/dbus/.cvsignore:
1848 * gcj/org/freedesktop/dbus/Makefile.am:
1849 * gcj/org/freedesktop/dbus/Message.java: (Message),
1851 * gcj/org/freedesktop/dbus/natMessage.cc:
1852 Fix the build system.
1854 2003-06-22 Havoc Pennington <hp@pobox.com>
1856 * mono/Connection.cs: add more bindings
1858 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
1861 2003-06-22 Havoc Pennington <hp@pobox.com>
1863 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
1864 Start wrapping more stuff.
1866 2003-06-22 Havoc Pennington <hp@pobox.com>
1868 * mono/Message.cs: implement Message.Wrap() that ensures we only
1869 have a single C# wrapper per DBusMessage, assuming it works which
1870 it probably doesn't.
1872 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
1873 (dbus_message_free_data_slot): new
1874 (dbus_message_set_data): new
1875 (dbus_message_get_data): new
1877 2003-06-22 Havoc Pennington <hp@pobox.com>
1879 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
1880 (_dbus_data_slot_allocator_alloc): rework these to keep a
1881 reference count on each slot and automatically manage a global
1882 slot ID variable passed in by address
1884 * bus/bus.c: convert to new dataslot API
1886 * dbus/dbus-bus.c: convert to new dataslot API
1888 * dbus/dbus-connection.c: convert to new dataslot API
1890 * dbus/dbus-server.c: convert to new dataslot API
1892 * glib/dbus-gmain.c: ditto
1896 * bus/connection.c: ditto
1898 2003-06-22 Anders Carlsson <andersca@codefactory.se>
1900 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
1901 after the gcj checks so that the correct configuration tags
1902 will be added to libtool.
1904 * dbus-glib-1.pc.in: No need to specify any includes since
1905 dbus-1.pc.in has those.
1907 2003-06-22 Havoc Pennington <hp@pobox.com>
1909 * mono/*, gcj/*, configure.in, Makefile.am:
1910 Check in makefiles and subdirs for mono and gcj bindings.
1911 Neither binding actually exists, just trying to get through
1912 all the build and other boring bits.
1914 2003-06-21 Philip Blundell <philb@gnu.org>
1916 * tools/dbus-monitor.1: Updated.
1918 * tools/dbus-send.1: Likewise.
1920 2003-06-20 Anders Carlsson <andersca@codefactory.se>
1922 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
1923 for hangup and error after checking read so we won't discard
1924 pending data if both hangup and read are set.
1926 2003-06-19 Philip Blundell <philb@gnu.org>
1928 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
1930 * tools/dbus-send.c: Accept both --system and --session.
1932 * tools/dbus-monitor.c: Same here.
1934 2003-06-19 Anders Carlsson <andersca@codefactory.se>
1936 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
1937 from C++ (Patch by Miloslav Trmac).
1939 2003-06-15 Joe Shaw <joe@assbarn.com>
1941 * configure.in: Check for socklen_t.
1943 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
1945 * test/test-segfault.c: Add #include <sys/time.h>
1947 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
1948 dbus-launch needs it.
1950 2003-06-09 Havoc Pennington <hp@redhat.com>
1952 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
1953 SUN_LEN, it breaks abstract socket usage
1955 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
1958 2003-06-04 Havoc Pennington <hp@pobox.com>
1960 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
1961 using unix:abstract=/foo, and when listening in a tmpdir
1962 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
1964 * dbus/dbus-transport.c (_dbus_transport_open): support
1967 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1968 support abstract sockets
1970 * dbus/dbus-transport-unix.c
1971 (_dbus_transport_new_for_domain_socket): support abstract sockets
1973 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
1974 toggle as an argument, implement abstract namespace support
1975 (_dbus_listen_unix_socket): ditto
1977 * configure.in: add --enable-abstract-sockets and implement
1978 a configure check for autodetection of the right value.
1980 2003-06-01 Havoc Pennington <hp@pobox.com>
1982 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
1983 in /tmp (though on Linux this will end up being useless,
1984 when we add abstract namespace support)
1986 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
1989 2003-05-28 Colin Walters <walters@verbum.org>
1991 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
1993 2003-05-18 Anders Carlsson <andersca@codefactory.se>
1995 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
1997 2003-05-17 Colin Walters <walters@gnu.org>
1999 * tools/dbus-send.c: Don't exit with an error code if --help was
2000 passed. Default to using the session bus instead of the system
2003 * tools/dbus-launch.c: Ditto.
2005 * tools/dbus-monitor.c: Ditto.
2007 * tools/dbus-send.1: Update with new arguments.
2009 * tools/dbus-launch.c: Emit code to export variables. New
2010 arguments -s and -c to specify shell syntax, and a bit of code to
2011 autodetect syntax. Also, allow specifying a program to run.
2013 * tools/dbus-launch.1: Update with new arguments.
2015 * tools/dbus-send.1: Ditto.
2017 * tools/dbus-monitor.1: Ditto.
2019 2003-05-17 Havoc Pennington <hp@pobox.com>
2021 * bus/config-parser.c (merge_included): merge in policies from
2022 child configuration file.
2024 * bus/policy.c (bus_policy_merge): function to merge two policies
2027 2003-05-16 Havoc Pennington <hp@redhat.com>
2029 * dbus/dbus-connection.c: disable verbose lock spew
2031 * tools/dbus-send.c: add --print-reply command line option
2033 * tools/dbus-print-message.h (print_message): new util function
2034 shared by dbus-send and dbus-monitor
2036 * tools/dbus-monitor.c (handler_func): exit on disconnect
2038 * dbus/dbus-transport-unix.c (do_reading): if the transport is
2039 disconnected, don't try to use the read_watch
2041 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
2042 so we can find this bug more easily
2044 2003-05-16 Havoc Pennington <hp@redhat.com>
2046 * bus/policy.c (free_rule_list_func): avoid a crash when passed
2047 NULL as DBusHashTable is annoyingly likely to do.
2049 2003-05-16 Colin Walters <walters@verbum.org>
2051 * tools/dbus-monitor.c: Add --session argument and usage()
2054 * tools/dbus-monitor.1: Update with new --session arg.
2056 * bus/Makefile.am (install-data-hook): Create
2057 $(libdir)/dbus-1.0/services so that the session bus is happy.
2059 2003-05-15 Havoc Pennington <hp@redhat.com>
2061 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2062 on non-x86. ifdef's are evil.
2064 2003-05-15 Havoc Pennington <hp@redhat.com>
2066 * configure.in: 0.11
2070 * bus/Makefile.am (initddir): apparently we are supposed to put
2071 init scripts in /etc/rc.d/init.d not /etc/init.d
2073 * bus/Makefile.am: remove the "you must --enable-tests to make
2074 check" as it broke distcheck
2076 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2078 2003-05-13 James Willcox <jwillcox@gnome.org>
2081 * bus/activation.c: (bus_activation_service_created),
2082 (bus_activation_activate_service):
2083 * bus/driver.c: (bus_driver_send_service_deleted),
2084 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2085 (bus_driver_send_service_acquired),
2086 (bus_driver_send_welcome_message),
2087 (bus_driver_handle_list_services):
2088 * bus/session.conf.in:
2089 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2090 (dbus_bus_service_exists), (dbus_bus_activate_service):
2093 Add some convenience API which lets you activate a service, and did a
2094 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2095 and dbus_message_get_args()
2097 2003-05-11 Havoc Pennington <hp@pobox.com>
2099 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2100 calling _dbus_marshal_validate_arg() for every byte in a byte
2103 * dbus/dbus-message-handler.c: use atomic reference counting to
2104 reduce number of locks slightly; the global lock in here sucks
2106 * dbus/dbus-connection.c
2107 (_dbus_connection_update_dispatch_status_and_unlock): variant of
2108 update_dispatch_status that can be called with lock held; then use
2109 in a couple places to reduce locking/unlocking
2110 (dbus_connection_send): hold the lock over the whole function
2111 instead of acquiring it twice.
2113 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2115 * bus/connection.c (bus_connections_setup_connection): fix access
2116 to already-freed memory.
2118 * dbus/dbus-connection.c: keep a little cache of linked list
2119 nodes, to avoid using the global linked list alloc lock in the
2120 normal send-message case. Instead we just use the connection lock
2121 that we already have to take.
2123 * dbus/dbus-list.c (_dbus_list_find_last): new function
2125 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2126 change to use a struct for the atomic type; fix docs,
2127 they return value before increment, not after increment.
2129 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2130 (_dbus_string_append_8_aligned): new functions to try to
2131 microoptimize this operation.
2132 (reallocate_for_length): break this out of set_length(), to
2133 improve profile info, and also so we can consider inlining the
2136 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2137 strings with some preallocation, cuts down on our calls to realloc
2138 a fair bit. Though if we can get the "move entire string to empty
2139 string" optimization below to kick in here, it would be better.
2141 * dbus/dbus-string.c (_dbus_string_move): just call
2142 _dbus_string_move_len
2143 (_dbus_string_move_len): add a special case for moving
2144 an entire string into an empty string; we can just
2145 swap the string data instead of doing any reallocs.
2146 (_dbus_string_init_preallocated): new function
2148 2003-05-11 Havoc Pennington <hp@pobox.com>
2150 Write a "test-profile" that does echo client-server with threads;
2151 profile reveals lock contention, memcpy/realloc of buffers, and
2152 UTF-8 validation as hot spots. 20% of lock contention eliminated
2153 with dbus_atomic_inc/dec implementation on x86. Much remaining
2154 contention is global mempool locks for GList and DBusList.
2156 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2159 * dbus/dbus-connection.c (struct DBusConnection): use
2160 dbus_atomic_t for the reference count
2162 * dbus/dbus-message.c (struct DBusMessage): declare
2163 dbus_atomic_t values as volatile
2165 * configure.in: code to detect ability to use atomic integer
2166 operations in assembly, from GLib patch
2168 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2169 time, tired of it being wrong in threads and forked processes
2171 * glib/test-profile.c: a little program to bounce messages back
2172 and forth between threads and eat CPU
2174 * dbus/dbus-connection.c: add debug spew macros for debugging
2175 thread locks; include config.h at top; fix deadlock in
2176 dbus_connection_flush()
2178 2003-05-08 Havoc Pennington <hp@pobox.com>
2180 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2181 data from getting written, and there wasn't a good reason to
2184 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2185 dbus_verbose lines in test coverage
2186 (main): add list of functions sorted by # of untested blocks
2187 to the coverage report
2189 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
2191 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
2193 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
2194 extend test coverage
2196 * test/data/auth/cancel.auth-script: test canceling an
2199 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
2200 aren't used. in CVS history if we end up needing them.
2202 2003-05-04 Havoc Pennington <hp@pobox.com>
2204 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
2207 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
2208 function, which assumed length was in # of strings, not bytes
2210 * dbus/dbus-message.c (_dbus_message_test): add tests for some
2213 * dbus/dbus-connection.c
2214 (_dbus_connection_queue_received_message): disable function for
2215 now, we are only using it in test mode
2217 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2218 remove a mistaken FIXME
2220 2003-05-04 Havoc Pennington <hp@pobox.com>
2222 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
2223 unlock mutex on successful return, patch from Anders Gustafsson
2225 2003-05-04 Havoc Pennington <hp@pobox.com>
2227 * dbus-glib-1.pc.in (Requires): fix dependencies, from
2230 2003-05-04 Havoc Pennington <hp@pobox.com>
2232 * tools/dbus-launch.c: implement
2234 * bus/main.c (main), bus/bus.c (bus_context_new):
2235 implement --print-pid and --fork
2237 2003-05-03 Havoc Pennington <hp@redhat.com>
2239 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
2240 the address had no value, and add to test suite. Fix and
2241 regression test from Miloslav Trmac
2243 2003-05-03 Havoc Pennington <hp@pobox.com>
2245 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
2246 watch is invalid when handled
2248 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
2249 dbus-launch utility to launch the bus from a shell script. Didn't
2250 actually implement dbus-launch yet, it's just a placeholder still.
2252 2003-05-03 Havoc Pennington <hp@pobox.com>
2254 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
2255 daemon; also documents daemon config file, so replaces
2256 doc/config-file.txt. Corrected some stuff from config-file.txt in
2257 the process of moving it.
2259 2003-05-03 Havoc Pennington <hp@pobox.com>
2261 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
2264 2003-05-03 Colin Walters <walters@verbum.org>
2266 * dbus/dbus-sysdeps.c (fill_user_info): Test against
2267 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
2269 * Makefile.am: Update to use new .pc versioning scheme.
2271 2003-05-02 Havoc Pennington <hp@redhat.com>
2273 * bus/system.conf.in: allow send/receive to/from message bus
2276 2003-04-30 Havoc Pennington <hp@redhat.com>
2278 * configure.in: print a note when building with unit tests and
2281 2003-04-30 Havoc Pennington <hp@redhat.com>
2283 * Makefile.am: add a check-local that complains if you didn't
2284 configure with --enable-tests
2286 2003-04-29 Havoc Pennington <hp@redhat.com>
2288 * glib/dbus-gmain.c: docs cleanups
2290 * dbus/dbus-types.h: add docs on int64 types
2292 * dbus/dbus-memory.c: fix docs to avoid putting private API in
2293 public API docs section
2295 2003-04-29 Havoc Pennington <hp@redhat.com>
2297 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
2298 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
2299 parallel install API version, not with the D-BUS package version.
2301 * HACKING: move some of README over here
2303 * README: updates, and document API/ABI policy
2305 * configure.in: reindentation
2307 2003-04-29 Havoc Pennington <hp@redhat.com>
2309 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
2310 to use this library" to be sure people have the right
2313 2003-04-28 Havoc Pennington <hp@redhat.com>
2315 * configure.in: add --enable-docs which by default is auto yes if
2316 doxygen and db2html found, no otherwise; but can be forced on/off
2318 * doc/Makefile.am: conditionalize whether to build docs on
2321 2003-04-28 Havoc Pennington <hp@redhat.com>
2323 * configure.in: 0.10
2327 * bus/system.conf.in: add <includedir>system.d</includedir>
2329 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
2330 username was provided but not uid
2332 * bus/config-parser.c (struct BusConfigParser): keep track of
2333 whether the parser is toplevel or was included; change some
2334 of the error handling if it's included.
2336 2003-04-27 Havoc Pennington <hp@pobox.com>
2340 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2341 report correct status if we finish processing authentication
2342 inside this function.
2344 * bus/activation.c (try_send_activation_failure): use
2345 bus_transaction_send_error_reply
2347 * bus/connection.c (bus_connection_get_groups): return an error
2348 explaining the problem
2350 * bus/bus.c (bus_context_check_security_policy): implement
2351 restriction here that inactive connections can only send the
2352 hello message. Also, allow bus driver to send anything to
2355 * bus/connection.c (bus_connection_complete): create the
2356 BusClientPolicy here instead of on-demand.
2357 (bus_connection_get_policy): don't return an error
2359 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
2360 sender field in message being replied to
2362 * bus/bus.c (bus_context_check_security_policy): fix silly typo
2363 causing it to return FALSE always
2365 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
2366 we checked sender rather than destination
2368 2003-04-25 Havoc Pennington <hp@redhat.com>
2370 test suite is slightly hosed at the moment, will fix soon
2372 * bus/connection.c (bus_connections_expire_incomplete): fix to
2373 properly disable the timeout when required
2374 (bus_connection_set_name): check whether we can remove incomplete
2375 connections timeout after we complete each connection.
2377 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
2378 probably still broken.
2380 * bus/services.c (bus_registry_acquire_service): implement max
2381 number of services owned, and honor allow/deny rules on which
2382 services a connection can own.
2384 * bus/connection.c (bus_connection_get_policy): report errors here
2386 * bus/activation.c: implement limit on number of pending
2389 2003-04-25 Havoc Pennington <hp@redhat.com>
2391 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
2392 where we used >= 0 instead of != DBUS_UID_UNSET.
2394 2003-04-25 Havoc Pennington <hp@redhat.com>
2396 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
2397 were toggled without add/remove, fix from Anders Gustafsson
2399 2003-04-24 Havoc Pennington <hp@redhat.com>
2401 * test/data/valid-config-files/basic.conf: add <limit> tags to
2404 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
2405 <limit> tag in configuration file.
2407 2003-04-24 Havoc Pennington <hp@redhat.com>
2409 * bus/dispatch.c: somehow missed some name_is
2411 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
2412 (_dbus_timeout_set_interval): new
2414 * bus/connection.c (bus_connections_setup_connection): record time
2415 when each connection is first set up, and expire them after the
2416 auth timeout passes.
2418 2003-04-24 Havoc Pennington <hp@redhat.com>
2420 * dbus/dbus-message.c (dbus_message_name_is): rename
2421 (dbus_message_service_is): rename
2422 (dbus_message_sender_is): rename
2423 (dbus_message_get_service): rename
2425 2003-04-24 Havoc Pennington <hp@redhat.com>
2427 * configure.in: add --enable-checks
2429 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2431 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2432 to use thread locks.
2433 (_dbus_connection_handler_destroyed_locked): move some private
2434 functions into proper docs group
2436 * dbus/dbus-internals.h: add _dbus_return_if_fail,
2437 _dbus_return_val_if_fail
2439 Throughout: use dbus_return_if_fail
2441 2003-04-23 James Willcox <jwillcox@gnome.org>
2444 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2445 (dbus_connection_setup_with_g_main),
2446 (dbus_server_setup_with_g_main):
2447 * glib/test-dbus-glib.c: (main):
2448 * glib/test-thread-client.c: (main):
2449 * glib/test-thread-server.c: (new_connection_callback), (main):
2450 * tools/dbus-monitor.c: (main):
2452 Added a GMainContext argument to dbus_connection_setup_with_g_main()
2453 and dbus_server_setup_with_g_main().
2455 2003-04-20 Havoc Pennington <hp@pobox.com>
2457 * doc/dbus-specification.sgml: document the restrictions on
2458 message and service names
2460 2003-04-22 Havoc Pennington <hp@redhat.com>
2462 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2463 support, and do some code cleanups to share more code and
2464 speed up array marshal/demarshal.
2466 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2468 * configure.in: generate dbus-arch-deps.h
2470 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2473 2003-04-22 Havoc Pennington <hp@redhat.com>
2475 * test/data/valid-messages/opposite-endian.message: fix test
2476 to use proper type for rply field
2478 * test/data/invalid-messages: add tests for below validation
2480 * dbus/dbus-message.c (decode_header_data): validate field types,
2481 and validate that named fields are valid names
2482 (decode_name_field): consider messages in the
2483 org.freedesktop.Local. namespace to be invalid.
2485 * dbus/dbus-string.c (_dbus_string_validate_name): new
2487 2003-04-19 Havoc Pennington <hp@pobox.com>
2489 * bus/driver.c (bus_driver_handle_hello): check limits and
2490 return an error if they are exceeded.
2492 * bus/connection.c: maintain separate lists of active and inactive
2493 connections, and a count of each. Maintain count of completed
2494 connections per user. Implement code to check connection limits.
2496 * dbus/dbus-list.c (_dbus_list_unlink): export
2498 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2499 number of bytes in the message queue for a connection
2501 2003-04-18 Havoc Pennington <hp@pobox.com>
2503 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2505 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2508 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2509 on realloc be sure to update the pointer in the keyring
2511 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2512 offset to avoid writing to unallocated memory
2514 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2515 try the next mechanism, so we properly handle OOM
2517 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2519 (_dbus_keyring_new): fix OOM bug
2520 (_dbus_keyring_new_homedir): always set error; impose a maximum
2521 number of keys we'll load from the file, mostly to speed up the
2522 test suite and make its OOM checks more useful, but also for
2525 * dbus/dbus-auth.c (process_error_server): reject authentication
2526 if we get an error from the client
2527 (process_cancel): on cancel, send REJECTED, per the spec
2528 (process_error_client): send CANCEL if we get an error from the
2531 2003-04-18 Havoc Pennington <hp@pobox.com>
2533 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2536 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2539 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2540 about DBUS_TEST_HOMEDIR once
2542 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2545 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2546 config file so we test the right thing
2548 Throughout: assorted docs improvements
2550 2003-04-18 Havoc Pennington <hp@pobox.com>
2552 * glib/dbus-gmain.c: adapt to watch changes
2554 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2556 * dbus/dbus-server.h: remove dbus_server_handle_watch
2558 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2560 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2561 like DBusTimeout, so we don't need dbus_connection_handle_watch
2564 2003-04-17 Havoc Pennington <hp@redhat.com>
2566 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2567 database usage so it all goes via the DBusUserDatabase cache.
2569 2003-04-17 Havoc Pennington <hp@redhat.com>
2571 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2572 there was an OOM watch we skipped, we always return TRUE so we
2573 iterate again to have a look at it again. Fixes test suite hang.
2574 Code rearrangement also lets us lose some memset and only iterate
2575 over callbacks once.
2577 * bus/driver.c (bus_driver_handle_message): sense of test for
2580 2003-04-16 Havoc Pennington <hp@pobox.com>
2582 * doc/dbus-specification.sgml: make spec say serials are unsigned
2584 * dbus/dbus-message.h: change message serials to unsigned
2586 * dbus/dbus-connection.c: adapt to message serials being unsigned
2588 2003-04-15 Havoc Pennington <hp@pobox.com>
2590 * bus/bus.c: create and keep around a shared DBusUserDatabase
2593 * bus/connection.c (bus_connection_get_groups): don't cache
2594 groups for user in the connection object, since user database
2595 object now does that.
2597 2003-04-16 Havoc Pennington <hp@redhat.com>
2599 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2600 list of size counters
2601 (_dbus_message_loader_putback_message_link): put back a popped link
2603 * dbus/dbus-connection.c
2604 (dbus_connection_set_max_live_messages_size): rename
2606 (dbus_connection_get_outgoing_size): get size of outgoing
2608 (_dbus_connection_set_connection_counter): remove this cruft
2610 2003-04-14 Havoc Pennington <hp@redhat.com>
2612 * dbus/dbus-userdb.c: user database abstraction, mostly to get
2613 caching, but at some point we might want to be able to use a
2616 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2617 SHA1 conf file to test the sha1 auth mechanism, since the regular
2618 test always uses EXTERNAL when available.
2621 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2622 add conf file that requires use of sha1 auth
2624 2003-04-13 Havoc Pennington <hp@pobox.com>
2626 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2627 from Philip Blundell to send messages and monitor them.
2629 2003-04-13 Havoc Pennington <hp@pobox.com>
2631 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2634 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2637 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2638 fix to only recover unused bytes if we're already authenticated
2639 (_dbus_transport_get_is_authenticated): fix to still mark us
2640 authenticated if there are unused bytes.
2642 * bus/dispatch.c: implement security policy checking
2644 * bus/connection.c (bus_transaction_send_from_driver): new
2646 * bus/bus.c (bus_context_check_security_policy): new
2648 * bus/dispatch.c (send_service_nonexistent_error): delete this,
2649 now we just set the DBusError and it gets converted to an error
2652 * bus/connection.c (allow_user_function): enable code using actual
2653 data from the config file
2655 * bus/policy.c (list_allows_user): handle wildcard rules for
2656 user/group connection perms
2658 2003-04-13 Havoc Pennington <hp@pobox.com>
2660 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2662 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2664 * bus/policy.c (bus_policy_append_mandatory_rule)
2665 (bus_policy_append_default_rule, bus_policy_append_user_rule)
2666 (bus_policy_append_group_rule): new functions
2668 2003-04-12 Havoc Pennington <hp@pobox.com>
2670 * bus/config-parser.c (bus_config_parser_new): fix a memleak
2672 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2673 the pid/gid/uid, just for paranoia.
2675 * test/break-loader.c (randomly_do_n_things): find a byte
2676 containing a type code, and randomly change it to a different
2679 2003-04-12 Havoc Pennington <hp@pobox.com>
2681 * bus/policy.h: change BusPolicy to be the thing from the config
2682 file, and rename old BusPolicy to BusClientPolicy
2684 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2685 match change in how policy works
2687 * dbus/dbus-internals.h: mark assert_not_reached as
2688 __attribute((noreturn))__
2690 2003-04-11 Havoc Pennington <hp@redhat.com>
2692 * doc/dbus-specification.sgml: fix a spot with the wrong name for
2693 the broadcast service. Use boolean return for ServiceExists.
2695 2003-04-11 Havoc Pennington <hp@redhat.com>
2697 * configure.in: add another directory to look for qt in.
2699 2003-04-11 Havoc Pennington <hp@redhat.com>
2701 * AUTHORS: add Colin Walters
2703 2003-04-11 Havoc Pennington <hp@redhat.com>
2709 2003-04-11 Havoc Pennington <hp@redhat.com>
2711 * bus/messagebus.in: remove pid file when stopping the
2712 message bus, since the bus won't have privileges to remove it
2715 2003-04-11 Havoc Pennington <hp@redhat.com>
2717 * bus/bus.c (bus_context_new): move credentials change after
2720 2003-04-11 Havoc Pennington <hp@pobox.com>
2722 * test/decode-gcov.c: add "below average functions" to the
2723 coverage report, and change how some of the code works.
2725 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
2726 not in the coverage stats.
2728 * test/test-service.c (main): use _dbus_verbose not fprintf in a
2729 couple places so running the test suite doesn't result in megaspam.
2731 2003-04-11 Havoc Pennington <hp@pobox.com>
2733 * bus/dispatch.c (check_existent_service_activation): accept a no
2734 memory error in a place we didn't before
2736 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
2737 in case the first one failed," since the test suite is less
2740 2003-04-10 Havoc Pennington <hp@pobox.com>
2742 * bus/dispatch.c (check_segfault_service_activation): add test
2743 for launching an executable that just crashes.
2745 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
2746 don't leave a million cores. We'll see how portable this is.
2748 2003-04-10 Havoc Pennington <hp@pobox.com>
2750 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
2751 the possible parent failures before we fork, so that we don't
2752 fail to create a babysitter after creating the child.
2754 * bus/activation.c (bus_activation_activate_service): kill child
2755 if we don't successfully complete the activation.
2757 2003-04-10 Havoc Pennington <hp@redhat.com>
2759 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
2760 the connection if it's disconnected
2762 * bus/activation.c (bus_activation_service_created): use new
2763 transaction features to roll back removal of pending activation if
2764 we don't successfully create the service after all. Don't remove
2765 pending activation if the function fails.
2767 * dbus/dbus-list.c (_dbus_list_insert_before_link)
2768 (_dbus_list_insert_after_link): new code to facilitate
2771 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
2772 new functionality, so we can preallocate the ability to insert
2775 * bus/connection.c (bus_transaction_add_cancel_hook): new function
2776 allowing us to put custom hooks in a transaction to be used for
2777 cancelling said transaction
2779 * doc/dbus-specification.sgml: add some discussion of secondary
2780 service owners, and disallow zero-length service names
2782 * bus/services.c (bus_registry_acquire_service): new function,
2783 splits out part of bus_driver_handle_acquire_service() and fixes
2784 a bug where we didn't remove the service doing the acquiring
2785 from the secondary queue if we failed to remove the current owner
2786 from the front of the queue.
2788 2003-04-10 Alexander Larsson <alexl@redhat.com>
2790 * doc/dbus-specification.sgml:
2791 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
2793 2003-04-10 Alexander Larsson <alexl@redhat.com>
2798 Added files to cvsignore
2800 * dbus/dbus-message.h:
2801 * dbus/dbus-message.c: (dbus_message_iter_get_named):
2802 Make get_named() take two out argument and return a boolean.
2803 (dbus_message_iter_get_args_valist):
2804 Update usage of get_named().
2805 (dbus_message_iter_append_byte):
2807 (dbus_message_iter_append_named)
2809 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
2812 2003-04-10 Alexander Larsson <alexl@redhat.com>
2814 * dbus/dbus-marshal.[ch]:
2815 Add array_type_pos argument to _dbus_marshal_validate_arg.
2816 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
2818 * dbus/dbus-message.[ch]:
2819 Multi-dimensional arrays have full type specification in the
2820 outermost array. Iter code re-arranged to handle this.
2821 Added some more iter tests.
2823 * doc/dbus-specification.sgml:
2826 Update new array encoding description.
2827 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
2829 * test/data/invalid-messages/array-with-mixed-types.message:
2830 * test/data/valid-messages/array-of-array-of-uint32.message:
2831 Change to the new array format.
2833 * test/data/invalid-messages/too-short-dict.message:
2836 * test/data/valid-messages/recursive-types.message:
2837 Fix up and extend test.
2839 2003-04-10 Havoc Pennington <hp@pobox.com>
2841 * bus/dispatch.c: lots of fixes
2843 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
2844 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
2845 that was crack, broke the test service.
2847 * dbus/dbus-transport.c (_dbus_transport_open): fix error
2848 handling to avoid piling up errors if we get a failure on the
2851 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
2852 pid in assertion failures.
2854 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
2855 to some fixed size of file descriptor array. Don't return TRUE
2856 anytime a timeout exists, that led to lots of busy loop silliness
2859 2003-04-09 Havoc Pennington <hp@redhat.com>
2861 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
2862 I'd checked this in earlier but hadn't.
2864 2003-04-09 Havoc Pennington <hp@redhat.com>
2866 * bus/dispatch.c (bus_dispatch_test): get a bit further through
2867 the activation test (man this is getting old!)
2869 2003-04-09 Havoc Pennington <hp@redhat.com>
2871 * test/test-utils.c: use dispatch status function to fix this up
2873 * bus/connection.c (connection_watch_callback): don't dispatch
2875 (connection_timeout_callback): don't dispatch from here
2876 (bus_connections_setup_connection): set the dispatch status function
2877 (bus_connection_disconnected): unset it
2879 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
2880 used to add a connection to be dispatched
2881 (_dbus_loop_iterate): do the dispatching at the end of each
2884 * dbus/dbus-connection.c
2885 (dbus_connection_set_dispatch_status_function): new function
2886 allowing us to fix up main loop usage
2887 (_dbus_connection_last_unref): free all the various function
2889 (dbus_connection_dispatch): call the DispatchStatusFunction
2890 whenever this function returns
2891 (dbus_connection_handle_watch): call DispatchStatusFunction
2892 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
2893 (reply_handler_timeout): call DispatchStatusFunction
2894 (dbus_connection_flush): call DispatchStatusFunction
2896 2003-04-09 Havoc Pennington <hp@redhat.com>
2898 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
2901 * bus/dispatch.c (check_service_activated): fix bug in test
2903 * dbus/dbus-mainloop.c (check_timeout): fix this up
2905 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
2906 verbose output so we can sort out output from different processes,
2907 e.g. in the activation case.
2909 2003-04-08 Colin Walters <walters@gnu.org>
2911 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
2913 (bus_context_new): Set it.
2914 (bus_context_unref): Use it to delete the pid file.
2916 2003-04-08 Havoc Pennington <hp@redhat.com>
2918 * test/data/invalid-messages/array-with-mixed-types.message:
2919 regression test that fails for the moment
2921 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
2922 tests for convenience
2924 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
2925 array of nil, it broke things.
2927 * test/data/invalid-messages/array-of-nil.message: regression test
2929 * test/data/valid-messages/array-of-array-of-uint32.message:
2930 happened to write this so added it to suite
2932 2003-04-08 Havoc Pennington <hp@redhat.com>
2934 * bus/driver.c (bus_driver_handle_acquire_service): init
2935 retval/reply before checking name
2937 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
2938 recursion depth argument
2940 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
2941 in the public struct for future extension
2943 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
2946 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
2949 * doc/dbus-specification.sgml: fix typo
2951 2003-04-08 Alexander Larsson <alexl@redhat.com>
2953 Implemented recursive types, named types and new-style iters
2956 * glib/test-thread-client.c: (thread_func):
2957 * glib/test-thread-server.c: (handle_test_message):
2958 * test/test-service.c: (handle_echo):
2967 * dbus/dbus-internals.c: (_dbus_type_to_string):
2968 Update for new types.
2970 * dbus/dbus-marshal.[ch]:
2971 Implement recursive types and the new marshalling format.
2972 Remove hardcoded dict marshalling.
2973 Marshal named types.
2975 * dbus/dbus-message-builder.c:
2977 Remove references to old types
2979 * dbus/dbus-message.[ch]:
2980 New non-refcounted iter API that supports recursive iters.
2981 Use iters for appending, including support for recursive
2983 Add byte and named type support.
2984 Update everything to new marshalling formats.
2985 Add tests for new API.
2987 * dbus/dbus-protocol.h:
2988 Remove old array types.
2989 Add types: BYTE, ARRAY, DICT, NAMED
2991 * dbus/dbus-string.c:
2992 * dbus/dbus-sysdeps.c:
2993 Make parse_double locale safe.
2995 * dbus/dbus-test-main.c:
3001 * doc/dbus-specification.sgml:
3004 * test/data/incomplete-messages/missing-body.message:
3005 * test/data/invalid-messages/bad-boolean.message:
3006 * test/data/invalid-messages/bad-boolean-array.message:
3007 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3008 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3009 * test/data/invalid-messages/too-short-dict.message:
3010 * test/data/valid-messages/dict-simple.message:
3011 * test/data/valid-messages/dict.message:
3012 * test/data/valid-messages/emptiness.message:
3013 * test/data/valid-messages/lots-of-arguments.message:
3014 * test/data/valid-messages/no-padding.message:
3015 * test/data/valid-messages/recursive-types.message:
3016 Add missing NAME fields
3017 Fix up dicts & arrays
3019 * test/data/invalid-messages/dict-with-nil-value.message:
3020 Removed, this is not invalid anymore.
3022 * test/data/valid-messages/recursive-types.message:
3023 Add new test for deeply recursive types.
3025 2003-04-07 Havoc Pennington <hp@pobox.com>
3027 * bus/driver.c (bus_driver_handle_acquire_service): return an
3028 error if you try to acquire a service that starts with ':'
3030 2003-04-07 Havoc Pennington <hp@redhat.com>
3032 * doc/dbus-specification.sgml: require that base service names
3033 start with ':' and that the base service is created/deleted
3034 as first and last things a connection does on the bus
3036 * bus/dispatch.c (check_existent_service_activation): lots more
3037 work on the activation test; it doesn't fully pass yet...
3039 * test/test-service.c (main): fix so we don't memleak the
3040 connection to the message bus
3041 (filter_func): accept a message asking us to exit
3043 2003-04-06 Havoc Pennington <hp@pobox.com>
3045 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3048 * configure.in: fixes to Qt detection from Colin Walters
3050 * doc/Makefile.am: Only remove generated docbook dirs if they
3051 exist, from Colin Walters
3053 * dbus/dbus-bus.c: change how we set well-known connections to
3054 NULL, so that it works if a single connection is stored in
3055 two well-known array slots.
3057 * test/Makefile.am: remove a lot of stuff that isn't immediately
3058 useful, it's in CVS history if we want it.
3060 * test/test-service.c: use dbus-mainloop instead of that
3063 2003-04-06 Havoc Pennington <hp@pobox.com>
3065 * dbus/Makefile.am: split lists of sources into stuff that goes in
3066 the library, util functions that go in the lib and are also used
3067 elsewhere, and util functions that are used in tests/daemon but
3068 don't go in the lib.
3070 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3071 here so it can be used in test binaries also
3073 2003-04-06 Havoc Pennington <hp@pobox.com>
3075 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3076 here in the parent process, so we can return an error if it
3077 fails. Also, move some of the code into the child so the parent
3078 is less hosed if we fail midway through.
3080 * bus/bus.c (bus_context_new): move pidfile detection further up
3081 in the function, before we start overwriting sockets and such.
3083 * bus/messagebus.in: adjust this a bit, not sure if it will work.
3085 * configure.in: add --with-system-pid-file and --with-system-socket
3087 2003-04-06 Colin Walters <walters@verbum.org>
3089 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3091 * bus/system.conf.in: Declare a pidfile.
3093 * bus/bus.c (bus_context_new): Test for an existing pid file, and
3094 create one (if appropriate).
3096 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3097 (struct BusConfigParser) [pidfile]: New.
3098 (element_type_to_name, merge_included, start_busconfig_child)
3099 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3100 (bus_config_parser_unref): Free it.
3101 (bus_config_parser_get_pidfile): New function.
3103 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3105 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3107 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3109 * dbus/dbus-sysdeps.h: Prototype it.
3111 2003-04-06 Havoc Pennington <hp@pobox.com>
3113 * bus/bus.c (bus_context_new): print the address in here, rather
3114 than in main(), because we need to do it before forking the daemon
3116 * bus/dispatch.c (send_service_nonexistent_error): set the sender
3117 on the service nonexistent error
3119 * bus/driver.c (bus_driver_handle_acquire_service): set the
3120 sender on the AcquireService reply
3122 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3123 server also listen on a UNIX socket so services can connect to it.
3125 2003-04-06 Havoc Pennington <hp@pobox.com>
3127 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3128 so it detects deadlocks and also we actually init threads when
3131 2003-04-06 Havoc Pennington <hp@pobox.com>
3133 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3134 save the domain socket name, and unlink it when we disconnect the
3135 server. Means that at least when we exit normally, we won't leave
3136 a bunch of junk in /tmp
3138 * dbus/dbus-transport-unix.c
3139 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3140 memory management). (I was making a real change here but then
3143 2003-04-06 Havoc Pennington <hp@pobox.com>
3145 * bus/bus.c (bus_context_new): fix wrong handling of
3146 server_data_slot_unref() in the error case.
3148 * dbus/dbus-internals.h (_dbus_assert): change so it passes
3149 "(condition) != 0" to _dbus_real_assert so that
3150 "_dbus_assert (pointer)" doesn't cause a warning
3152 * bus/main.c (main): accept --print-address option to print out
3153 the message bus address
3155 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3157 * dbus/dbus-transport.c (_dbus_transport_open): special error for
3158 "tmpdir" option to unix: address on client side
3160 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3163 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3164 we can use to create sockets in the test suite.
3166 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3167 cleanly. To be used for testing.
3169 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3171 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3173 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3174 handle trying to call this when there's no servers active
3176 2003-04-05 Havoc Pennington <hp@pobox.com>
3182 2003-04-05 Havoc Pennington <hp@pobox.com>
3184 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3185 crash on startup. Need to get "try starting the daemon"
3186 in the test suite I guess. ;-)
3188 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
3189 tracked the number of open connections; it's better done in
3190 application-specific code as you want it to span all servers etc.
3192 2003-04-05 Havoc Pennington <hp@pobox.com>
3194 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
3195 patch from Colin Walters
3197 2003-04-05 Havoc Pennington <hp@pobox.com>
3199 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
3200 reality; in fact multiple mechanisms are allowed.
3202 * dbus/dbus-internals.c (_dbus_real_assert)
3203 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
3204 _dbus_assert_not_reached() into functions, so that they don't show
3205 up in basic block counts for test coverage, and don't use up as
3206 much disk space. Does mean slower execution speed though, so
3207 assumes --disable-asserts is the normal production case.
3209 2003-04-05 Havoc Pennington <hp@pobox.com>
3211 * test/Makefile.am (dist-hook): also dist *.in files
3217 2003-04-05 Havoc Pennington <hp@pobox.com>
3219 * dbus/dbus-string.c: docs warning
3221 * dbus/dbus-spawn.c: missing docs
3223 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
3225 2003-04-05 Havoc Pennington <hp@pobox.com>
3227 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
3230 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
3231 to -1 once we've reaped the babysitter
3232 (_dbus_babysitter_handle_watch): do as much work as we can, not
3235 * bus/activation.c: add code using DBusBabysitter so that we
3236 handle it when a service fails to start up properly.
3237 (bus_activation_service_created): don't remove the activation
3238 entries as we go, just let them get removed when we free the pending
3239 activation. Unref reply messages after sending them.
3241 2003-04-05 Havoc Pennington <hp@pobox.com>
3243 * test/decode-gcov.c (main): print per-directory stats in the report
3245 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
3247 2003-04-05 Havoc Pennington <hp@pobox.com>
3249 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
3251 * test/decode-gcov.c: hack up a little program to suck data
3252 out of gcov files. Yes this is sort of silly.
3254 * configure.in: define something in config.h and do an
3255 AM_CONDITIONAL when gcov is enabled
3257 2003-04-04 Havoc Pennington <hp@redhat.com>
3259 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
3260 return a "babysitter" object that is used to monitor the status of
3261 the spawned process and reap it when required.
3263 * test/test-segfault.c, test/test-exit.c,
3264 test/test-sleep-forever.c: binaries that do various lame things,
3265 used in the test suite.
3267 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
3269 2003-04-03 Havoc Pennington <hp@pobox.com>
3271 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
3272 in preparation for modifying it, dbus-sysdeps is getting
3275 2003-04-03 Havoc Pennington <hp@redhat.com>
3277 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
3280 * bus/*.[hc]: adapt to mainloop change
3282 2003-04-03 Havoc Pennington <hp@redhat.com>
3284 * bus/activation.c (load_directory): fix up memleaks
3285 (bus_activation_entry_free): free the entry
3287 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
3288 we get one from the message bus; fix memleaks.
3290 * dbus/dbus-message.c (dbus_set_error_from_message): new function
3292 2003-04-03 Havoc Pennington <hp@pobox.com>
3294 * bus/config-parser.c (bus_config_parser_unref): free
3295 list of mechanisms, bug discovered by test suite enhancements
3296 (putting system.conf and session.conf into suite)
3298 * test/Makefile.am, test/test-service.c: add placeholder for a
3299 test service that we'll activate as part of test suite. Doesn't
3302 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
3303 setting NULL value, and use system malloc not dbus_malloc()
3304 when we have unavoidable memleakage.
3306 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
3307 didn't work, and support DBUS_BUS_ACTIVATION.
3309 * bus/activation.c (child_setup): pass our well-known bus type to
3312 * bus/config-parser.c: support <type> to specify well-known type
3314 * doc/dbus-specification.sgml: document the env variables to
3315 locate well-known buses and find service activator
3317 2003-04-02 Havoc Pennington <hp@redhat.com>
3319 * test/Makefile.am (all-local): add a rule to copy tests to
3320 builddir, so we can have generated tests. Use this to remove the
3321 silly hack for testing system.conf and session.conf. Will use this
3322 shortly to generate .service files pointing to test binaries.
3324 2003-04-02 Havoc Pennington <hp@redhat.com>
3326 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
3327 current alloc and needed new length, not max of the doubled
3328 allocation and needed new length. Also, when building tests,
3329 don't do the double-allocation stuff, just realloc every time.
3331 2003-04-02 Havoc Pennington <hp@redhat.com>
3333 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
3335 (_dbus_string_get_dirname): new
3336 (_dbus_sysdeps_test): new
3337 (_dbus_directory_open): include dirnames in error messages
3339 * bus/config-parser.c: interpret <include> and <includedir> and
3340 <servicedir> relative to config file location if the given
3341 filename is not absolute.
3343 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
3345 2003-04-02 Havoc Pennington <hp@redhat.com>
3347 * bus/connection.c (bus_transaction_send_error_reply): set sender
3348 service for the error, and unref the reply on success
3350 * bus/activation.c: convert to use BusTransaction so OOM can be
3352 (bus_activation_service_created): set sender of the message
3354 2003-04-01 Havoc Pennington <hp@redhat.com>
3356 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
3357 <includedir> (at least mostly)
3359 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
3360 first, then the user ID
3362 2003-04-01 Havoc Pennington <hp@pobox.com>
3364 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
3367 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
3369 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
3371 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
3372 socket 0777, and unlink any existing socket.
3374 * bus/bus.c (bus_context_new): change our UID/GID and fork if
3375 the configuration file so specifies; set up auth mechanism
3378 * bus/config-parser.c (bus_config_parser_content): add support
3379 for <fork> option and fill in code for <auth>
3381 * bus/system.conf.in: add <fork/> to default configuration,
3382 and limit auth mechanisms to EXTERNAL
3384 * doc/config-file.txt (Elements): add <fork>
3386 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
3387 (_dbus_change_identity): new function
3389 2003-03-31 Havoc Pennington <hp@redhat.com>
3391 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
3392 (_dbus_listen_unix_socket): fix off-by-one error in null
3393 termination spotted by Nalin
3395 2003-03-31 Havoc Pennington <hp@redhat.com>
3397 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
3398 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
3399 having a real home directory available.
3401 2003-03-31 Havoc Pennington <hp@redhat.com>
3403 * bus/Makefile.am (install-data-hook): create /var/run/dbus
3405 * bus/messagebus.in: add init script for Red Hat /etc/init.d
3407 * configure.in: add support for specifying a style of init script
3410 2003-03-31 Havoc Pennington <hp@redhat.com>
3412 Fix some annoying DBusString API and fix all affected code.
3414 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
3416 (_dbus_string_get_data): change to return string instead of using
3418 (_dbus_string_get_const_data): ditto
3419 (_dbus_string_get_data_len): ditto
3420 (_dbus_string_get_const_data_len): ditto
3422 2003-03-31 Havoc Pennington <hp@redhat.com>
3424 * bus/main.c (main): fix up the command line arguments to be nicer
3426 2003-03-31 Havoc Pennington <hp@redhat.com>
3428 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3429 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3430 final location that lands in the config file
3432 * bus/config-loader-expat.c (bus_config_load): fix type of
3435 * doc/TODO: remove TODO item for dbus_bus_get()
3437 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3439 2003-03-31 Havoc Pennington <hp@pobox.com>
3441 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3442 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3443 argument since they are always client side
3445 * dbus/dbus-server.c (dbus_server_get_address): new function
3447 * bus/main.c (main): take the configuration file as an argument.
3449 * test/data/valid-config-files/debug-allow-all.conf: new file to
3450 use with dispatch.c tests for example
3452 * bus/test-main.c (main): require test data dir
3454 * bus/bus.c (bus_context_new): change this to take a
3455 configuration file name as argument
3457 * doc/config-file.txt (Elements): add <servicedir>
3459 * bus/system.conf, bus/session.conf: new files
3461 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3462 well-known socket if none set
3464 * configure.in: create system.conf and session.conf
3466 2003-03-30 Havoc Pennington <hp@pobox.com>
3468 * bus/config-parser.c: hacking
3470 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3471 to shut down, since it could cause weirdness with the DBusList
3474 * dbus/dbus-list.c (_dbus_list_test): add tests for the
3475 link-oriented stack routines
3476 (alloc_link): free the mempool if the first alloc from it fails
3478 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3480 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3482 (_dbus_string_skip_white): new
3484 * doc/config-file.txt (Elements): add <includedir>
3486 2003-03-28 Havoc Pennington <hp@pobox.com>
3488 * dbus/dbus-string.c (_dbus_string_copy_data_len)
3489 (_dbus_string_copy_data): new functions
3491 2003-03-28 Anders Carlsson <andersca@codefactory.se>
3493 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3497 * dbus/dbus-memory.c:
3500 2003-03-28 Havoc Pennington <hp@pobox.com>
3502 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3503 I think it may have just been superstition. Not sure.
3505 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3506 failures that were not being handled.
3508 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3510 * dbus/dbus-memory.c: add ability to set number of mallocs in a
3511 row that will fail on out-of-memory.
3513 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3514 function for testing out-of-memory handling.
3516 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3517 allocation functions, they do map exactly to the expat ones.
3519 2003-03-27 Havoc Pennington <hp@redhat.com>
3521 * bus/config-loader-libxml.c (bus_config_load): add another error
3524 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3527 Add note about automatic service activation.
3529 * doc/dbus-specification.sgml:
3530 Rename the specification and clarify a few things.
3532 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3535 * dbus/dbus-address.c:
3537 * dbus/dbus-marshal.c:
3538 * dbus/dbus-server-debug-pipe.c:
3539 * dbus/dbus-transport-unix.c:
3540 Fix documentation warnings.
3542 2003-03-26 Havoc Pennington <hp@pobox.com>
3544 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3545 after every test so it's quick and easy to see which leaked, and
3546 so we test multiple dbus_shutdown() calls
3548 * configure.in: change configure.in XML stuff to also support
3551 * config-loader-libxml.c: some hacking
3553 * config-loader-expat.c: some hacking
3555 * config-parser.c: some hacking, plus tests
3557 2003-03-25 Havoc Pennington <hp@redhat.com>
3559 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3561 * configure.in: add --with-xml option to specify XML library,
3562 right now only libxml is supported.
3564 * bus/config-loader-libxml.c, config-parser.c: sync some minor
3565 nonworking code between home and work, still just stubs
3567 2003-03-24 Havoc Pennington <hp@redhat.com>
3569 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3572 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3573 NULL argument for "message" if the error is a well-known one,
3574 fill in a generic message in this case.
3576 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3579 * bus/test.c (bus_test_flush_bus): add
3581 * bus/policy.c (bus_policy_test): test code stub
3583 2003-03-24 Havoc Pennington <hp@pobox.com>
3585 * bus/connection.c (bus_connections_setup_connection): set up
3586 the "can this user connect" function, but it always returns
3587 TRUE until we have a config file parser so we can have a config
3588 file that allows connections.
3590 2003-03-23 Havoc Pennington <hp@pobox.com>
3592 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3593 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3594 the mutex, so we can check for proper memory management
3597 * dbus/dbus-dataslot.c: remove the mutex from
3598 DBusDataSlotAllocator and lock it manually when using it,
3599 to simplify fitting it into the global slots framework.
3601 * dbus/dbus-threads.c (init_static_locks): rework how we're
3602 handling global locks so they are easily shut down.
3604 * bus/policy.c (bus_policy_append_rule): fix
3606 * bus/test-main.c (main): check for memleaks
3608 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3609 test suite check for memleaks
3611 * dbus/dbus-memory.c: add support in test mode for tracking
3612 number of outstanding blocks
3614 2003-03-23 Havoc Pennington <hp@pobox.com>
3616 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3619 * dbus/dbus-hash.h: add ULONG hash keys
3621 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3622 (_dbus_get_group_id): new function
3624 2003-03-20 Havoc Pennington <hp@redhat.com>
3626 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3628 (dbus_connection_get_unix_user): new function
3630 2003-03-20 Havoc Pennington <hp@pobox.com>
3632 * bus/connection.c (bus_connection_send_oom_error): assert that
3633 message has a sender
3634 (connection_execute_transaction): ditto
3635 (bus_connection_preallocate_oom_error): fix to set the sender, and
3636 set recipient to the destination service, not the bus driver
3638 * bus/policy.c: hacking
3640 * dbus/dbus-message.c (dbus_message_service_is): new function
3641 (dbus_message_sender_is): new
3643 2003-03-19 Havoc Pennington <hp@redhat.com>
3645 * bus/policy.c: start sketching code for policy restrictions on
3646 what connections can do.
3648 2003-03-18 Havoc Pennington <hp@redhat.com>
3650 * doc/TODO: some notes on high-level todo items. Little nitpick
3651 stuff is all in @todo, so no need to add it here.
3653 * doc/config-file.txt: some notes on how config file might look
3655 2003-03-18 Anders Carlsson <andersca@codefactory.se>
3661 2003-03-17 Havoc Pennington <hp@redhat.com>
3663 * dbus/dbus-internals.h: add gcc attributes so that
3664 our printf-style functions warn on bad arguments to
3667 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3670 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3673 2003-03-17 Havoc Pennington <hp@redhat.com>
3675 * bus/test-main.c (main): make it print something as it runs
3676 so make check doesn't look stuck
3678 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3679 from CVS, now obsolete
3681 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3683 * bus/dispatch.c: (bus_dispatch):
3684 Refetch the service name since it may have been reallocated
3685 when dbus_message_set_sender was called.
3687 * dbus/dbus-sysdeps.c: (_dbus_accept):
3688 Add address and address length variables and use them to stop
3689 valgrind from complaining.
3691 2003-03-17 Havoc Pennington <hp@pobox.com>
3693 All tests pass, no memleaks, no valgrind complaints.
3695 * bus/test.c: refcount handler_slot
3697 * bus/connection.c (bus_connections_new): refcount
3698 connection_data_slot
3700 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3701 bytes so that auth scripts pass.
3703 * bus/dispatch.c: init message_handler_slot so it gets allocated
3706 * bus/dispatch.c (message_handler_slot_ref): fix memleak
3708 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3709 dealloc server_pipe_hash when no longer used for benefit of
3712 * dbus/dbus-auth.c (process_command): memleak fix
3714 * bus/dispatch.c (check_hello_message): memleak fix
3716 2003-03-16 Havoc Pennington <hp@pobox.com>
3718 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
3720 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3722 * bus/activation.c (bus_activation_activate_service): Append
3723 the pending activation entry to the list of pending activations.
3725 2003-03-16 Havoc Pennington <hp@pobox.com>
3727 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
3730 * dbus/dbus-address.c (create_entry): fix OOM handling when
3731 failing to alloc entry->method
3733 2003-03-16 Havoc Pennington <hp@pobox.com>
3735 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
3738 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3739 add some missing dbus_set_result
3741 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
3742 alloc the DBusMessageHandler
3744 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
3745 the transport here, since we call this from the finalizer; it
3746 resulted in a double-finalize.
3748 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
3749 where we tried to use transport->connection that was NULL,
3750 happened when transport was disconnected early on due to OOM
3752 * bus/*.c: adapt to handle OOM for watches/timeouts
3754 * dbus/dbus-transport-unix.c: port to handle OOM during
3757 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
3758 reference to unused bytes instead of a copy
3760 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
3763 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
3766 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
3769 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3771 * doc/dbus-specification.sgml:
3772 Document reply message for ActivateService.
3774 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3776 * bus/activation.c: (bus_pending_activation_entry_free),
3777 (bus_pending_activation_free), (bus_activation_new),
3778 (bus_activation_unref), (bus_activation_service_created),
3779 (bus_activation_activate_service):
3781 * bus/bus.c: (bus_context_new):
3782 * bus/desktop-file.c: (new_section):
3783 * bus/driver.c: (bus_driver_send_service_deleted),
3784 (bus_driver_handle_activate_service):
3785 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
3787 * dbus/dbus-connection.c:
3788 (dbus_connection_send_with_reply_and_block):
3789 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3790 * dbus/dbus-protocol.h:
3791 Make activation work better. Now pending activations will be queued
3792 and the daemon won't try to activate services that are already registered.
3794 2003-03-16 Havoc Pennington <hp@pobox.com>
3796 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
3799 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
3800 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
3802 2003-03-16 Havoc Pennington <hp@pobox.com>
3804 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
3805 this. always run the test suite before commit...
3807 * bus/*: adapt to DBusConnection API changes
3809 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
3810 requires renaming stuff to avoid dbus_connection_dispatch name
3813 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
3816 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3817 separate from _dbus_message_loader_return_buffer()
3819 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
3820 this, because it's now always broken to use; the number of
3821 messages in queue vs. the number still buffered by the message
3822 loader is undefined/meaningless. Should use
3823 dbus_connection_get_dispatch_state().
3824 (dbus_connection_dispatch): rename from
3825 dbus_connection_dispatch_message
3827 2003-03-16 Havoc Pennington <hp@pobox.com>
3829 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
3832 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3834 * dbus/dbus-connection.c:
3835 (dbus_connection_send_with_reply_and_block):
3836 Decrease connection->n_incoming when removing an entry
3838 * dbus/dbus-dict.c: (dbus_dict_entry_free),
3839 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3840 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3841 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
3842 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
3843 (dbus_dict_get_byte_array):
3844 Handle NULL arrays and strings. Also add support for byte arrays.
3846 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
3847 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
3848 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3849 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3850 (_dbus_demarshal_dict), (demarshal_and_validate_len),
3851 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
3852 * dbus/dbus-marshal.h:
3853 Add support for marshalling and demarshalling empty arrays and strings.
3855 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3856 (dbus_message_append_string_array),
3857 (dbus_message_iter_get_boolean),
3858 (dbus_message_iter_get_boolean_array),
3859 (dbus_message_iter_get_int32_array),
3860 (dbus_message_iter_get_uint32_array),
3861 (dbus_message_iter_get_double_array),
3862 (dbus_message_iter_get_byte_array),
3863 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
3864 (check_message_handling):
3865 Add support for getting empty arrays and dicts.
3867 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
3868 Don't do any validation at all for now, that's better than just checking
3871 * test/data/valid-messages/emptiness.message:
3872 New test message with lots of empty arrays.
3874 2003-03-16 Havoc Pennington <hp@pobox.com>
3876 * dbus/dbus-connection.c
3877 (_dbus_connection_queue_received_message_link): new function that
3878 can't fail due to OOM
3880 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
3881 new function pops a message together with a list link
3884 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
3885 message queuing functions to avoid needing to alloc memory
3887 2003-03-16 Havoc Pennington <hp@pobox.com>
3889 Oops - test code was only testing failure of around 30 of the
3890 mallocs in the test path, but it turns out there are 500+
3891 mallocs. I believe this was due to misguided linking setup such
3892 that there was one copy of dbus_malloc etc. in the daemon and one
3893 in the shared lib, and only daemon mallocs were tested. In any
3894 case, the test case now tests all 500+ mallocs, and doesn't pass
3895 yet, though there are lots of fixes in this patch.
3897 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
3898 this so that it doesn't need to allocate memory, since it
3899 has no way of indicating failure due to OOM (and would be
3900 annoying if it did).
3902 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
3904 * bus/Makefile.am: rearrange to create two self-contained
3905 libraries, to avoid having libraries with overlapping symbols.
3906 that was resulting in weirdness, e.g. I'm pretty sure there
3907 were two copies of global static variables.
3909 * dbus/dbus-internals.c: move the malloc debug stuff to
3912 * dbus/dbus-list.c (free_link): free list mempool if it becomes
3915 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
3917 * dbus/dbus-address.c (dbus_parse_address): free list nodes
3920 * bus/dispatch.c (bus_dispatch_add_connection): free
3921 message_handler_slot when no longer using it, so
3922 memory leak checkers are happy for the test suite.
3924 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
3926 * bus/bus.c (new_connection_callback): disconnect in here if
3927 bus_connections_setup_connection fails.
3929 * bus/connection.c (bus_connections_unref): fix to free the
3931 (bus_connections_setup_connection): if this fails, don't
3932 disconnect the connection, just be sure there are no side
3935 * dbus/dbus-string.c (undo_alignment): unbreak this
3937 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
3939 (_dbus_auth_new): fix the order in which we free strings
3942 * bus/connection.c (bus_connection_disconnected): fix to
3943 not send ServiceDeleted multiple times in case of memory
3946 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
3947 get the base service name
3948 (dbus_bus_register_client): don't return base service name,
3949 instead store it on the DBusConnection and have an accessor
3951 (dbus_bus_register_client): rename dbus_bus_register()
3953 * bus/dispatch.c (check_hello_message): verify that other
3954 connections on the bus also got the correct results, not
3955 just the one sending hello
3957 2003-03-15 Havoc Pennington <hp@pobox.com>
3959 Make it pass the Hello handling test including all OOM codepaths.
3960 Now to do other messages...
3962 * bus/services.c (bus_service_remove_owner): fix crash when
3963 removing owner from an empty list of owners
3964 (bus_registry_ensure): don't leave service in the list of
3965 a connection's owned services if we fail to put the service
3968 * bus/connection.c (bus_connection_preallocate_oom_error): set
3969 error flag on the OOM error.
3971 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3972 handle _dbus_transport_set_connection failure
3974 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
3975 to create watches up front and simply enable/disable them as
3977 (unix_connection_set): this can now fail on OOM
3979 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
3980 of enabling/disabling a watch or timeout.
3982 * bus/loop.c (bus_loop_iterate): don't touch disabled
3985 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
3987 2003-03-15 Havoc Pennington <hp@pobox.com>
3989 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
3990 write useful test code, after all that futzing around ;-)
3992 Test does not yet pass because we can't handle OOM in
3993 _dbus_transport_messages_pending (basically,
3994 dbus_connection_preallocate_send() does not prealloc the write
3995 watch). To fix this, I think we need to add new stuff to
3996 set_watch_functions, namely a SetEnabled function so we can alloc
3997 the watch earlier, then enable it later.
3999 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4000 dbus-memory.c to the convenience lib
4002 * bus/test.c: rename some static functions to keep them clearly
4003 distinct from stuff in connection.c. Handle client disconnection.
4005 2003-03-14 Havoc Pennington <hp@pobox.com>
4007 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4008 transport, tests more of the real codepath. Set up clients
4009 with bus_setup_debug_client.
4011 * bus/test.c (bus_setup_debug_client): function to set up debug
4012 "clients" on the main loop
4014 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4017 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4020 * dbus/dbus-server-debug.c: support a debug server based on pipes
4022 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4023 (_dbus_close): new function
4025 * configure.in: check for socketpair
4027 2003-03-14 Havoc Pennington <hp@redhat.com>
4029 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4032 * dbus/dbus-transport-debug.c: rework this a good bit to be
4033 less complicated. hopefully still works.
4035 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
4038 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
4041 * dbus/dbus-message.c (dbus_message_copy): rename from
4042 dbus_message_new_from_message, fix it up to copy
4043 all the message fields, add test case
4045 * bus/dispatch.c (bus_dispatch_test): add some more test code,
4046 not quite passing yet
4048 2003-03-14 Havoc Pennington <hp@pobox.com>
4050 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4051 until no work remains" in test code. (the large diff here
4052 is just code movement, no actual changes)
4054 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4055 1, no point waiting around for test code.
4056 (_dbus_server_debug_accept_transport): unref the timeout
4057 after adding it (right?)
4059 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4061 2003-03-13 Havoc Pennington <hp@redhat.com>
4063 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4066 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4069 * dbus/dbus-connection.h: Make AddWatchFunction and
4070 AddTimeoutFunction return a bool so they can fail on out-of-memory
4072 * bus/bus.c (bus_context_new): set up timeout handlers
4074 * bus/connection.c (bus_connections_setup_connection): set up
4077 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4080 * bus/bus.c (bus_context_new): adapt to changes
4082 * bus/connection.c: adapt to changes
4084 * test/watch.c: adapt to DBusWatch changes
4086 * bus/dispatch.c (bus_dispatch_test): started adding this but
4089 2003-03-14 Anders Carlsson <andersca@codefactory.se>
4091 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4093 2003-03-13 Havoc Pennington <hp@pobox.com>
4095 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4096 set up a test framework as for the library
4098 2003-03-12 Havoc Pennington <hp@pobox.com>
4100 Throughout: purge global variables, introduce BusActivation,
4101 BusConnections, BusRegistry, etc. objects instead.
4103 * bus/bus.h, bus/bus.c: introduce BusContext as a global
4106 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4107 going to redo this a bit differently I think
4109 2003-03-12 Havoc Pennington <hp@redhat.com>
4111 Mega-patch that gets the message bus daemon initially handling
4112 out-of-memory. Work still needed. Also lots of random
4113 moving stuff to DBusError instead of ResultCode.
4115 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4117 * dbus/dbus-connection.c
4118 (dbus_connection_send_with_reply_and_block): use DBusError
4120 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4123 * dbus/dbus-connection.c (dbus_connection_send): drop the result
4124 code here, as the only failure possible is OOM.
4126 * bus/connection.c (bus_connection_disconnect):
4127 rename bus_connection_disconnected as it's a notification only
4129 * bus/driver.c (bus_driver_handle_acquire_service): don't free
4130 "name" on get_args failure, should be done by get_args;
4131 don't disconnect client for bad args, just return an error.
4132 (bus_driver_handle_service_exists): ditto
4134 * bus/services.c (bus_services_list): NULL-terminate returned array
4136 * bus/driver.c (bus_driver_send_service_lost)
4137 (bus_driver_send_service_acquired): send messages from driver to a
4138 specific client to the client's unique name, not to the broadcast
4141 * dbus/dbus-message.c (decode_header_data): reject messages that
4142 contain no name field
4143 (_dbus_message_get_client_serial): rename to
4144 dbus_message_get_serial and make public
4145 (_dbus_message_set_serial): rename from set_client_serial
4146 (_dbus_message_set_reply_serial): make public
4147 (_dbus_message_get_reply_serial): make public
4149 * bus/connection.c (bus_connection_foreach): allow stopping
4150 iteration by returning FALSE from foreach function.
4152 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4153 (dbus_connection_free_preallocated_send)
4154 (dbus_connection_preallocate_send): new API for sending a message
4155 without possibility of malloc failure.
4156 (dbus_connection_send_message): rename to just
4157 dbus_connection_send (and same for whole function family)
4159 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4161 * dbus/dbus-sysdeps.c (_dbus_exit): new function
4163 * bus/activation.c: handle/return errors
4165 * dbus/dbus-errors.h: add more DBUS_ERROR #define
4167 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4168 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4169 (_dbus_result_from_errno): move to this file
4171 2003-03-10 Anders Carlsson <andersca@codefactory.se>
4173 * dbus/dbus-marshal.c:
4174 (_dbus_marshal_set_string):
4175 Take a length argument so we can marshal the correct string
4178 (_dbus_marshal_dict), (_dbus_demarshal_dict),
4179 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4180 (_dbus_marshal_test):
4181 * dbus/dbus-marshal.h:
4182 Add support for marshalling and demarshalling dicts.
4184 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4185 Add support for TYPE DICT.
4187 * dbus/dbus-message.c: (set_string_field):
4188 Adjust header padding.
4190 (dbus_message_append_args_valist), (dbus_message_append_dict),
4191 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
4192 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
4193 (check_message_handling), (check_have_valid_message):
4194 * dbus/dbus-message.h:
4195 Add functions for setting and getting dicts.
4197 * dbus/dbus-protocol.h:
4203 * doc/dbus-specification.sgml:
4204 Add information about how dicts are marshalled.
4206 * test/data/invalid-messages/dict-with-nil-value.message:
4207 * test/data/invalid-messages/too-short-dict.message:
4208 * test/data/valid-messages/dict-simple.message:
4209 * test/data/valid-messages/dict.message:
4210 Add sample messages containing dicts.
4212 2003-03-08 Anders Carlsson <andersca@codefactory.se>
4214 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
4216 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4219 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4220 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
4221 (dbus_dict_set_int32), (dbus_dict_set_uint32),
4222 (dbus_dict_set_double), (dbus_dict_set_string),
4223 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4224 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4225 (dbus_dict_set_string_array), (_dbus_dict_test):
4227 Fix according to comments from Havoc.
4229 2003-03-06 Michael Meeks <michael@server.home>
4231 * configure.in: if we don't have kde-config, disable have_qt.
4233 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4238 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4239 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
4240 (dbus_dict_remove), (dbus_dict_get_value_type),
4241 (dbus_dict_get_keys), (dbus_dict_put_boolean),
4242 (dbus_dict_put_int32), (dbus_dict_put_uint32),
4243 (dbus_dict_put_double), (dbus_dict_put_string),
4244 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
4245 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
4246 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
4247 (dbus_dict_get_int32), (dbus_dict_get_uint32),
4248 (dbus_dict_get_double), (dbus_dict_get_string),
4249 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
4250 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
4251 (dbus_dict_get_string_array), (_dbus_dict_test):
4253 Add DBusDict implementation
4255 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
4259 2003-03-04 Havoc Pennington <hp@pobox.com>
4261 * test/data/auth/*: adapt to changes
4263 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
4264 USERID_BASE64 and change USERNAME_BASE64 to put in username not
4267 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
4268 more stuff from being in a context name, to make the protocol
4269 simpler to deal with
4271 * dbus/dbus-errors.c (dbus_error_has_name): new function
4272 (dbus_error_is_set): new function
4274 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
4275 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
4277 * dbus/dbus-connection.c (dbus_connection_flush): also read
4278 messages during a flush operation
4280 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
4282 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4284 * configure.in: Check for gethostbyname on Solaris.
4286 * dbus/dbus-transport.c: (_dbus_transport_open):
4287 Remove duplicate "tcp" entry.
4289 * doc/dbus-specification.sgml:
4290 Clarify some things.
4292 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4294 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
4295 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
4296 (_dbus_keyring_test):
4297 * dbus/dbus-md5.c: (_dbus_md5_compute):
4298 * dbus/dbus-sha.c: (_dbus_sha_compute):
4301 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4303 * README: Add some things.
4305 2003-03-04 Anders Carlsson <andersca@codefactory.se>
4307 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
4308 after case DBUS_TYPE_BOOELAN.
4310 2003-03-02 Havoc Pennington <hp@pobox.com>
4312 * test/break-loader.c (randomly_set_extreme_ints): add test that
4313 sets really huge and small integers
4315 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
4316 that length of boolean array fits in the string, and that
4317 string has room for boolean value in single-bool case.
4319 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
4320 optional value to "ALIGN" command which is what to fill the
4323 * test/data/valid-messages/no-padding.message: add regression
4324 test for the message padding problem
4326 2003-03-02 Havoc Pennington <hp@pobox.com>
4328 * dbus/dbus-message.c (decode_header_data): fix to always init
4329 message_padding, from Benjamin Dauvergne
4331 2003-03-02 Havoc Pennington <hp@pobox.com>
4337 2003-03-01 Joe Shaw <joe@assbarn.com>
4339 * configure.in: Check for "struct cmsgcred" and try to access its
4340 members for BSD-like unices.
4342 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
4343 _dbus_read_credentials_unix_socket().
4344 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
4345 read() for reading the credential byte off the unix socket. Use
4346 struct cmsgcred on systems that support it.
4348 2003-02-27 Alexander Larsson <alexl@redhat.com>
4352 Make gthreads-2.0 dependency optional. Don't build thread test if
4355 2003-02-27 Havoc Pennington <hp@pobox.com>
4357 * dbus/dbus-connection.c
4358 (dbus_connection_send_message_with_reply_and_block): fix doh!
4359 doh! doh! bug that resulted in never removing a reply from the
4360 queue, no wonder we called get_reply_serial so much ;-)
4362 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
4363 and client serial instead of demarshaling them every time
4365 2003-02-27 Havoc Pennington <hp@pobox.com>
4367 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
4368 more inlined, using dbus-string-private.h, speeds things up
4371 * dbus/dbus-string.c (_dbus_string_free): apply align offset
4372 when freeing the string
4373 (_dbus_string_steal_data): fix for align offset
4374 (undo_alignment): new function
4376 2003-02-26 Havoc Pennington <hp@redhat.com>
4378 All kinds of audit fixes from Owen, plus initial attempt to
4379 handle unaligned memory returned from malloc.
4381 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
4382 leave room for align_offset and nul byte
4383 (fixup_alignment): function to track an align_offset and
4384 ensure real->str is aligned
4385 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
4386 to allow a nul byte plus align offset
4387 (_dbus_string_lock): fix overflow issue
4388 (_dbus_string_init_const_len): add assertions on sanity of len,
4389 assign allocated to be ALLOCATION_PADDING larger than len
4390 (set_length): fixup the overflow handling
4391 (_dbus_string_get_data_len): fix overflow in assertion
4392 (open_gap): detect overflow in size of gap to be opened
4393 (_dbus_string_lengthen): add overflow check
4394 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
4395 (_dbus_string_append): add overflow check
4396 (_dbus_string_append_unichar): overflow
4397 (_dbus_string_delete): fix overflow in assertion
4398 (_dbus_string_copy_len): overflow in assertion
4399 (_dbus_string_replace_len): overflows in assertions
4400 (_dbus_string_find): change to implement in terms of
4401 _dbus_string_find_to
4402 (_dbus_string_find_to): assorted fixage
4403 (_dbus_string_equal_c_str): assert c_str != NULL,
4404 fix logic so the function works
4405 (_dbus_string_ends_with_c_str): fix overflow thingy
4406 (_dbus_string_base64_encode): overflow fix
4407 (_dbus_string_validate_ascii): overflow
4408 (_dbus_string_validate_nul): overflow
4410 2003-02-26 Havoc Pennington <hp@redhat.com>
4412 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
4414 2003-02-26 Alexander Larsson <alexl@redhat.com>
4417 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
4419 * dbus/dbus-connection.c:
4420 * dbus/dbus-connection.h:
4421 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4422 Add dbus_connection_set_wakeup_main_function and use it when queueing
4423 incoming and outgoing messages.
4426 * dbus/dbus-dataslot.c:
4427 Threadsafe usage of DBusDataSlotAllocator
4429 * dbus/dbus-message.c: (dbus_message_get_args_iter):
4432 * dbus/dbus-server-unix.c:
4435 * glib/dbus-gmain.c:
4436 Implement the new wakeup functions for glib.
4439 * glib/test-thread-client.c:
4440 * glib/test-thread-server.c:
4441 * glib/test-thread.h:
4442 Initial cut at some thread test code. Not really done yet.
4444 2003-02-26 Havoc Pennington <hp@pobox.com>
4446 * dbus/dbus-connection.c
4447 (dbus_connection_send_message_with_reply_and_block): fix crash
4448 where we ref'd the outgoing message instead of the returned reply
4450 * dbus/dbus-transport-unix.c (do_authentication): check read watch
4451 at the end of this function, so if we didn't need to read for
4452 authentication, we reinstall it for receiving messages
4454 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4455 a NULL sender for peer-to-peer case
4457 * dbus/dbus-transport-unix.c (check_read_watch): handle
4458 !authenticated case correctly
4460 * glib/dbus-gmain.c: add support for DBusServer
4462 * dbus/dbus-server.c: add data slot support
4464 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4465 return values and handle errors
4467 * dbus/dbus-dataslot.c: factor out the data slot stuff from
4470 * Doxyfile.in (INPUT): add glib subdir
4472 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4473 setup_with_g_main instead of hookup_with_g_main; write docs
4475 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4477 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4478 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4479 * dbus/dbus-message.c: (dbus_message_append_boolean),
4480 (dbus_message_append_boolean_array),
4481 (dbus_message_get_args_valist), (_dbus_message_test):
4482 * dbus/dbus-message.h:
4483 * doc/dbus-specification.sgml:
4484 Various fixes as pointed out by Havoc.
4486 * test/data/invalid-messages/bad-boolean-array.message:
4487 * test/data/invalid-messages/bad-boolean.message:
4488 Add invalid boolean value test cases.
4490 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4492 * dbus/dbus-internals.c: (_dbus_type_to_string):
4493 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4494 (_dbus_marshal_validate_arg):
4495 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4496 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4497 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4498 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4499 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4500 (dbus_message_iter_get_double),
4501 (dbus_message_iter_get_boolean_array), (message_iter_test):
4502 * dbus/dbus-message.h:
4503 * dbus/dbus-protocol.h:
4504 * doc/dbus-specification.sgml:
4505 * test/data/valid-messages/lots-of-arguments.message:
4506 Add support for boolean and boolean array types.
4508 2003-02-23 Havoc Pennington <hp@pobox.com>
4510 * dbus/dbus-keyring.c: finish most of this implementation and
4513 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4514 these barf if the error isn't cleared to NULL
4516 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4517 (_dbus_create_directory): new function
4519 * dbus/dbus-errors.c (dbus_set_error): fix warning
4521 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4522 (_dbus_string_hex_decode): new function
4523 (test_hex_roundtrip): test code
4525 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4527 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4529 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4530 the save-to-temp/rename trick to atomically write the new file
4531 (_dbus_string_parse_uint): new function
4533 2003-02-22 Havoc Pennington <hp@pobox.com>
4535 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4537 2003-02-22 Havoc Pennington <hp@pobox.com>
4539 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4540 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4542 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4544 * dbus/test/data/sha-1: add US government test suite for SHA-1
4546 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4548 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4549 Make string arrays NULL-terminated.
4551 * dbus/dbus-memory.c: (dbus_free_string_array):
4552 * dbus/dbus-memory.h:
4553 New function for freeing NULL-terminated string arrays.
4555 * dbus/dbus-message-builder.c: (append_quoted_string),
4556 (_dbus_message_data_load):
4557 Add support for array types.
4559 * dbus/dbus-message.c: (check_message_handling):
4560 Add more types as test cases.
4562 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4563 (_dbus_string_parse_double):
4564 Add the start offset to the end offset.
4566 * test/data/valid-messages/lots-of-arguments.message:
4567 New test message with lots of arguments.
4569 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4571 * dbus/dbus-message.c: (dbus_message_append_nil),
4572 (dbus_message_append_int32), (dbus_message_append_uint32),
4573 (dbus_message_append_double), (dbus_message_append_string),
4574 (dbus_message_append_int32_array),
4575 (dbus_message_append_uint32_array),
4576 (dbus_message_append_double_array),
4577 (dbus_message_append_byte_array),
4578 (dbus_message_append_string_array):
4579 Fix all out-of-memory handling in these functions.
4581 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4583 * dbus/dbus-message.c: (dbus_message_append_nil):
4586 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4588 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4589 (dbus_message_append_nil), (dbus_message_append_int32_array),
4590 (dbus_message_append_uint32_array),
4591 (dbus_message_append_double_array),
4592 (dbus_message_append_byte_array),
4593 (dbus_message_append_string_array), (dbus_message_get_args_valist),
4594 (dbus_message_iter_get_int32_array),
4595 (dbus_message_iter_get_uint32_array),
4596 (dbus_message_iter_get_double_array),
4597 (dbus_message_iter_get_byte_array),
4598 (dbus_message_iter_get_string_array):
4600 * dbus/dbus-message.h:
4601 Add functions for appending and getting arrays.
4603 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4605 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4606 element size at least 8 bytes, fixes mempool tests on
4609 2003-02-20 Alexander Larsson <alexl@redhat.com>
4611 * dbus/dbus-transport-unix.c (unix_do_iteration):
4612 Unlock the connection mutex during a blocking select call.
4613 Add todo about how we need a way to wake up the select.
4615 * dbus/dbus-connection-internal.h:
4616 * dbus/dbus-connection.c:
4617 Add _dbus_connection_lock and _dbus_connection_unlock.
4619 2003-02-19 Havoc Pennington <hp@pobox.com>
4621 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4622 Doxyfile.in, not Doxyfile
4624 * dbus/dbus-keyring.c: do some hacking on this
4626 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4628 * dbus/dbus-errors.c (dbus_set_error_const): do not call
4630 (dbus_set_error): remove dbus_error_init, check for message ==
4631 NULL *before* we sprintf into it, and add @todo about including
4632 system headers in this file
4634 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4636 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4638 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4639 get various bits of user information based on either username
4641 (_dbus_homedir_from_username): new function
4643 2003-02-19 Anders Carlsson <andersca@codefactory.se>
4646 Add check for nonposix getpwnam_r
4648 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4649 Align the pool element size to a sizeof (void *) boundary.
4651 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4652 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4653 General Solaris fixes.
4655 * test/data/valid-messages/simplest-manual.message:
4656 Explicitly state that we want little-endian packing.
4658 2003-02-19 Mikael Hallendal <micke@codefactory.se>
4660 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4662 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4663 Added to create a transport connecting using a tcp/ip socket.
4665 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4666 to a tcp socket at given host and port.
4667 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4670 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4672 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4673 Added to create a server listening on a TCP/IP socket.
4675 2003-02-19 Havoc Pennington <hp@pobox.com>
4677 Throughout: mop up all the Doxygen warnings and undocumented
4680 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4681 to search any paths.
4683 * dbus/dbus-threads.c: move global mutex initializers to
4684 dbus-internals.h, multiple prototypes was confusing doxygen
4685 besides being kind of ugly
4687 * Doxyfile (PREDEFINED): have Doxygen define
4688 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4689 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4690 (do not abuse the feature! it's for stuff like the autogenerated
4691 macros in dbus-md5.c, not just for things you don't feel like
4694 2003-02-18 Havoc Pennington <hp@pobox.com>
4696 * dbus/dbus-string.c (_dbus_string_zero): new function
4698 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4699 wrap it in some dbus-friendly API
4701 * dbus/dbus-types.h: add 16-bit types
4703 2003-02-18 Joe Shaw <joe@assbarn.com>
4705 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4706 credentials from our currently running process.
4707 (get_word): Fix a buglet where we were copying the entire length
4708 instead of relative to our position.
4710 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4711 keys on the stack... it's 640k of data.
4713 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4714 read the credentials byte off the socket, even if we don't have
4716 (_dbus_poll): Implement poll() using select() for systems which
4719 * glib/test-dbus-glib.c (main): Print out an error if no
4720 parameters are given.
4722 * test/data/auth/fallback.auth-script: Added. Tests that a client
4723 can fallback to a secondary auth mechanism if the first fails.
4725 2003-02-18 Havoc Pennington <hp@pobox.com>
4729 2003-02-17 Havoc Pennington <hp@pobox.com>
4731 * doc/dbus-specification.sgml: lots of cosmetic
4732 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
4733 env variable to DBUS_BUS_ADDRESS, s/client/application/,
4734 s/server/bus/ (except in authentication section). Add a section
4735 "Message Bus Message Routing"
4737 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
4743 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4745 * doc/dbus-specification.sgml:
4746 Specification updates.
4748 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4750 * bus/activation.c: (bus_activation_init), (child_setup),
4751 (bus_activation_activate_service):
4753 * bus/main.c: (main):
4754 Set DBUS_ADDRESS environment variable.
4756 * dbus/dbus-errors.c: (dbus_set_error):
4757 Don't use va_copy since that's a C99 feature.
4759 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
4760 (_dbus_spawn_async):
4761 * dbus/dbus-sysdeps.h:
4762 Add child_setup_func to _dbus_spawn_async.
4764 * doc/dbus-specification.sgml:
4765 Update specification.
4767 * test/spawn-test.c: (setup_func), (main):
4770 2003-02-17 Alexander Larsson <alexl@redhat.com>
4772 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
4775 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4779 * doc/dbus-test-plan.sgml:
4780 Add test plan document.
4785 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4787 * dbus/dbus-message.c: (decode_header_data),
4788 (_dbus_message_loader_return_buffer):
4789 Set the header padding amount when loading a message.
4791 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4793 * bus/dispatch.c: (send_one_message):
4794 Only send broadcast messages to registered connections.
4796 * dbus/dbus-message.c: (dbus_message_name_is):
4797 * dbus/dbus-message.h:
4798 New convenience function.
4800 * dbus/dbus-transport-debug.c: (do_reading):
4801 Only dispatch one message per run.
4804 * test/bus-test.c: (new_connection_callback), (die),
4805 (test_hello_client1_handler), (test_hello_client2_handler),
4806 (test_hello_replies), (main):
4808 * test/bus-test-loop.[ch]:
4811 2003-02-16 Havoc Pennington <hp@pobox.com>
4813 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4814 backward conditional
4816 2003-02-16 Alexander Larsson <alexl@redhat.com>
4818 * dbus/dbus-connection.c:
4819 Implement sent_message_with_reply. (with_reply_and block is still
4821 Made dispatch_message not lose message if OOM.
4823 * dbus/dbus-errors.h:
4824 Add NoReply error (for reply timeouts).
4826 2003-02-16 Alexander Larsson <alexl@redhat.com>
4828 * dbus/dbus-hash.c (_dbus_hash_table_unref):
4829 Actually free keys and values when destroying hashtable.
4831 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4833 * dbus/dbus-auth.c: (client_try_next_mechanism):
4836 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
4837 Return TRUE if there's no thread implementation around.
4839 * glib/dbus-gmain.c: (free_source),
4840 (dbus_connection_hookup_with_g_main):
4841 Make sure to remove the GSource when the connection is finalized.
4843 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4845 * bus/dispatch.c: (bus_dispatch_message_handler):
4846 * dbus/dbus-errors.h:
4847 Return an error if someone tries to send a message to a service
4850 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4852 * bus/activation.c: (load_directory), (bus_activation_init),
4853 (bus_activation_activate_service):
4856 (bus_driver_handle_activate_service), (bus_driver_handle_message):
4857 More work on the activation handling.
4859 * dbus/dbus-errors.h:
4860 Add some error messages
4862 * dbus/dbus-message.c: (dbus_message_new_error_reply):
4863 * dbus/dbus-message.h:
4864 New function that creates an error message.
4866 * dbus/dbus-protocol.h:
4867 Add ACTIVATE_SERVER message.
4869 * dbus/dbus-server-unix.c: (unix_handle_watch),
4870 (_dbus_server_new_for_domain_socket):
4871 Call _dbus_fd_set_close_on_exec.
4873 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
4874 (_dbus_spawn_async), (_dbus_disable_sigpipe),
4875 (_dbus_fd_set_close_on_exec):
4876 * dbus/dbus-sysdeps.h:
4877 Add _dbus_fd_set_close_on exec function. Also add function that checks
4878 that all open fds are set to close-on-exec and warns otherwise.
4880 * dbus/dbus-transport-unix.c:
4881 (_dbus_transport_new_for_domain_socket):
4882 Call _dbus_fd_set_close_on_exec.
4884 2003-02-16 Havoc Pennington <hp@pobox.com>
4886 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
4887 allow people to avoid setting SIGPIPE to SIG_IGN
4888 (_dbus_connection_new_for_transport): disable SIGPIPE unless
4889 we've been asked not to
4891 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4893 * dbus/dbus-list.c: (_dbus_list_append_link),
4894 (_dbus_list_prepend_link):
4895 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
4899 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4902 * bus/activation.c: (bus_activation_entry_free),
4903 (add_desktop_file_entry), (load_directory), (bus_activation_init):
4905 * bus/main.c: (main):
4906 Add simple activation support, doesn't work yet though.
4908 2003-02-15 Zack Rusin <zack@kde.org>
4910 * qt/dbus-qthread.cpp: small casting fix
4912 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4914 * dbus/dbus-errors.c: (dbus_set_error):
4915 * dbus/dbus-errors.h:
4916 Add a few errors and make dbus_set_error void.
4918 * dbus/dbus-sysdeps.c:
4919 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
4920 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
4921 * dbus/dbus-sysdeps.h:
4922 Add _dbus_spawn_async.
4924 * test/spawn-test.c: (main):
4925 Test for _dbus_spawn_async.
4927 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4929 * dbus/dbus-internals.h:
4930 Fix build without tests.
4932 * dbus/dbus-list.c: (alloc_link):
4933 Fix a segfault when a malloc fails.
4935 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
4936 (dbus_malloc0), (dbus_realloc):
4937 Add support for malloc debugging.
4939 2003-02-15 Alexander Larsson <alexl@redhat.com>
4941 * dbus/dbus-threads.c:
4942 * dbus/dbus-threads.h:
4943 Add condvars. Remove static mutext from API.
4944 Implement static mutexes by initializing them from threads_init.
4946 * glib/dbus-gthread.c:
4947 * qt/dbus-qthread.cpp:
4948 Update with the thread api changes.
4953 Turn StaticMutex into normal mutex + init function.
4954 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
4955 _dbus_list_append_link, _dbus_list_prepend_link
4958 * dbus/dbus-sysdeps.c:
4959 * dbus/dbus-sysdeps.h:
4960 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
4961 _dbus_atomic_dec. Only slow fallback implementation at the moment.
4963 * dbus/dbus-protocol.h:
4964 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
4966 * dbus/dbus-message.c:
4967 Make ref/unref atomic.
4970 * dbus/dbus-connection-internal.h:
4971 * dbus/dbus-connection.c:
4972 * dbus/dbus-connection.h:
4974 Change _peek to _borrow,_return & _steal_borrowed.
4975 Change disconnect callback to event.
4976 Make dbus_connection_dispatch_messages reentrant.
4978 * dbus/dbus-transport.c:
4979 Don't ref the connection on calls to the transport
4982 * dbus/dbus-message-handler.c:
4985 * glib/dbus-gmain.c:
4986 Don't use peek_message anymore
4989 * test/debug-thread.c:
4990 * test/debug-thread.h:
4991 Simple thread implementation that asserts() on deadlocks in
4992 single-threaded code.
4995 (main) Call debug_threads_init.
4998 Use disconnect message instead of disconnect callback.
5002 Don't call dbus_connection_set_disconnect_function. Instead export
5003 bus_connection_disconnect.
5006 Call bus_connection_disconnect when we get a disconnected message.
5008 2003-02-15 Havoc Pennington <hp@pobox.com>
5010 * dbus/dbus-message.c (dbus_message_new): fool around with the
5013 2003-02-14 Havoc Pennington <hp@pobox.com>
5015 * dbus/dbus-mempool.c: fail if the debug functions so indicate
5017 * dbus/dbus-memory.c: fail if the debug functions indicate we
5020 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5021 (_dbus_decrement_fail_alloc_counter): debug functions to
5022 simulate memory allocation failures
5024 2003-02-14 Havoc Pennington <hp@pobox.com>
5026 * dbus/dbus-errors.h (struct DBusError): add a word of padding
5029 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5031 * bus/driver.c: (bus_driver_handle_hello):
5033 * bus/services.c: (bus_service_lookup):
5034 Reorder message sending so we get a more sane order.
5036 * test/bus-test.c: (message_handler):
5039 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5041 * bus/driver.c: (bus_driver_send_service_deleted),
5042 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5043 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5044 (bus_driver_send_welcome_message),
5045 (bus_driver_handle_list_services),
5046 (bus_driver_handle_acquire_service),
5047 (bus_driver_handle_service_exists):
5048 * dbus/dbus-bus.c: (dbus_bus_register_client),
5049 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5050 * dbus/dbus-errors.c: (dbus_result_to_string):
5051 * dbus/dbus-errors.h:
5052 * dbus/dbus-message.c: (dbus_message_append_args),
5053 (dbus_message_append_args_valist), (dbus_message_get_args),
5054 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5055 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5056 (dbus_message_iter_get_byte_array),
5057 (dbus_message_iter_get_string_array), (message_iter_test),
5058 (check_message_handling), (_dbus_message_test):
5059 * dbus/dbus-message.h:
5060 * test/bus-test.c: (main):
5061 Change fields to arguments in messages, so that they won't be
5062 confused with header fields.
5064 * glib/test-dbus-glib.c: (main):
5065 Remove append_fields from hello message.
5067 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5069 * dbus/dbus-errors.c:
5070 * dbus/dbus-message.c:
5071 * dbus/dbus-string.c:
5072 Documentation fixes.
5074 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5076 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5078 Implement support for timeouts in dbus-glib.
5080 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5082 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5083 * dbus/dbus-message.c: (process_test_subdir):
5084 * test/break-loader.c: (find_breaks_based_on):
5085 Plug some memory leaks.
5087 2003-02-13 Richard Hult <rhult@codefactory.se>
5089 * bus/main.c: Fix build.
5091 * dbus/dbus-errors.h:
5092 * dbus/dbus-errors.c: Fix copyright for Anders.
5094 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5099 * bus/connection.c: (bus_connection_foreach):
5102 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5103 (unescape_string), (new_section), (parse_section_start),
5104 (parse_key_value), (report_error), (bus_desktop_file_load),
5105 (bus_desktop_file_get_string):
5106 * bus/desktop-file.h:
5107 Use DBusError for error reporting.
5109 * bus/dispatch.c: (send_one_message),
5110 (bus_dispatch_message_handler):
5111 * bus/driver.c: (bus_driver_send_service_deleted),
5112 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5113 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5114 (bus_driver_send_welcome_message),
5115 (bus_driver_handle_list_services),
5116 (bus_driver_handle_acquire_service),
5117 (bus_driver_handle_service_exists):
5118 * bus/loop.c: (bus_loop_run):
5120 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5122 * bus/utils.c: (bus_wait_for_memory):
5124 New files with general utility functions.
5126 * dbus/dbus-internals.h:
5127 Remove _DBUS_HANDLE_OOM.
5129 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5131 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5132 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5133 * dbus/dbus-errors.h:
5134 Add DBusError structure.
5136 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5138 * test/data/valid-messages/standard-acquire-service.message:
5139 * test/data/valid-messages/standard-hello.message:
5140 * test/data/valid-messages/standard-list-services.message:
5141 * test/data/valid-messages/standard-service-exists.message:
5142 Add some standard messages.
5144 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5146 * bus/driver.c: (bus_driver_send_welcome_message),
5147 (bus_driver_handle_list_services),
5148 (bus_driver_handle_acquire_service),
5149 (bus_driver_handle_service_exists), (bus_driver_handle_message):
5150 Update for API changes in libdbus.
5152 * dbus/dbus-message.c: (dbus_message_new_reply):
5153 * dbus/dbus-message.h:
5154 Remove the name argument. The spec states that replies shouldn't
5157 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5159 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5160 (report_error), (bus_desktop_file_load), (lookup_section),
5161 (lookup_line), (bus_desktop_file_get_raw),
5162 (bus_desktop_file_get_string):
5163 * bus/desktop-file.h:
5164 Some fixes, and new functions for getting a key value from a section.
5166 2003-02-13 Havoc Pennington <hp@pobox.com>
5168 * test/data/auth/fail-after-n-attempts.auth-script: new test
5170 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5173 2003-02-13 Havoc Pennington <hp@pobox.com>
5175 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5176 dbus_credentials_match were backward
5178 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5179 NO_CREDENTIALS and ROOT_CREDENTIALS
5181 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5182 into here. Never process more commands after we've reached an
5183 end state; store further data as unused bytes.
5185 * test/data/auth/*: add more auth tests
5187 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
5188 command to match exact string and EXPECT_UNUSED to match unused
5191 * test/Makefile.am (dist-hook): fix to dist all the test stuff
5193 2003-02-12 Havoc Pennington <hp@pobox.com>
5195 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
5196 \r off of popped lines
5198 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
5201 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
5204 2003-02-12 Havoc Pennington <hp@pobox.com>
5206 * dbus/Makefile.am: remove break-loader from the build, since it
5209 * configure.in: add --enable-gcov to turn on coverage profiling
5210 flags and disable optimization
5212 2003-02-10 Havoc Pennington <hp@pobox.com>
5214 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
5215 initial cut at test framework for DBusAuth from laptop.
5216 Doesn't quite work yet but it compiles and I need to get
5217 it off the 266mhz laptop. ;-)
5219 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
5220 fix a memleak in error case
5222 2003-02-12 Anders Carlsson <andersca@codefactory.se>
5225 * bus/desktop-file.c:
5226 * bus/desktop-file.h:
5227 Add a desktop file parser.
5229 2003-02-11 Zack Rusin <zack@kde.org>
5231 * qt/message.[h|cpp]: sample implementation
5232 of the KDE wrapper for DBusMessage
5234 2003-02-09 Zack Rusin <zack@kde.org>
5236 * test/bus-test.c: make_it_compile
5237 * doc/dbus-specification.sgml: minimal semantic fix
5239 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5245 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5248 * dbus/dbus-break-loader.c:
5250 * test/break-loader.c:
5251 Move dbus-break-loader to test/ and rename it to break-loader.
5253 2003-02-02 Havoc Pennington <hp@pobox.com>
5255 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
5256 for code to manage cookies in your home directory
5258 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
5260 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
5261 to authenticate, then disconnect the client.
5263 2003-02-03 Alexander Larsson <alexl@redhat.com>
5265 * dbus/dbus-message.c (dbus_message_append_fields):
5268 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5270 * doc/dbus-specification.sgml:
5271 Update address format section.
5273 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5276 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
5277 (message_handler), (new_connection_callback), (loop_quit),
5281 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5283 * bus/driver.c: (bus_driver_handle_service_exists):
5284 Simplify the code a bit.
5286 * dbus/dbus-bus.c: (dbus_bus_service_exists):
5289 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5292 Add libdbus-daemon.la and link to it.
5294 2003-02-01 James Willcox <jwillcox@gnome.org>
5296 * bus/driver.c: (bus_driver_handle_own_service):
5297 Actually include the service reply code in the message.
5299 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5301 * bus/driver.c: (bus_driver_handle_service_exists):
5302 Don't unref the incoming message.
5304 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5306 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
5308 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5310 * dbus/dbus-server.c: (dbus_server_listen):
5311 * dbus/dbus-transport.c: (_dbus_transport_open):
5312 ifdef out the calls to the debug transport and server.
5314 2003-02-02 Alexander Larsson <alexl@redhat.com>
5316 * dbus/dbus-watch.c (dbus_watch_get_flags):
5317 Add note in the docs that ERROR or HANGUP won't be returned
5318 and are assumed always on.
5320 * glib/dbus-gmain.c (add_watch):
5321 Always add IO_ERR | IO_HUP
5323 * dbus/dbus-message.h:
5324 Add semicolon after dbus_message_iter_get_string_array().
5325 Makes qt code build again
5327 2003-02-01 Anders Carlsson <andersca@codefactory.se>
5329 * bus/driver.c: (create_unique_client_name),
5330 (bus_driver_handle_hello):
5331 Don't take a name, just use a numeric id to identify
5335 * dbus/dbus-bus.c: (dbus_bus_register_client),
5336 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5338 Add new convenience functions for communicating with the bus.
5340 * dbus/dbus-message.h:
5342 * dbus/dbus-protocol.h:
5345 2003-02-01 Alexander Larsson <alexl@redhat.com>
5347 * dbus/dbus-message.c (dbus_message_append_fields):
5348 Add some more doc comments.
5350 2003-02-01 Havoc Pennington <hp@pobox.com>
5352 * dbus/dbus-break-loader.c (randomly_modify_length): change
5353 a 4-byte value in the message as if it were a length
5355 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
5356 execute bit on saved files
5358 2003-02-01 Havoc Pennington <hp@pobox.com>
5360 * dbus/dbus-break-loader.c (main): new program to find messages
5361 that break the loader.
5363 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
5364 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
5366 * dbus/dbus-string.c (_dbus_string_set_byte): new
5368 2003-01-31 Havoc Pennington <hp@pobox.com>
5370 * dbus/dbus-message.c: refactor the test code to be more general,
5371 in preparation for writing a "randomly permute test cases to
5372 try to break the loader" program.
5374 2003-01-31 Havoc Pennington <hp@pobox.com>
5376 * doc/dbus-specification.sgml: work on the specification
5378 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
5379 the protocol version of the message.
5381 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
5382 no longer specifies that.
5383 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
5386 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
5387 "break" for DBUS_TYPE_NIL, remove @todo
5389 2003-01-31 Havoc Pennington <hp@pobox.com>
5391 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
5392 just set_is_error/get_is_error as this is a commonly-used
5393 function, and write docs.
5395 2003-01-31 Anders Carlsson <andersca@codefactory.se>
5397 * dbus/dbus-address.c: (dbus_address_entry_free):
5398 Free key and value lists.
5400 * dbus/dbus-internals.c: (_dbus_type_to_string):
5401 Add the types we didn't have.
5403 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5404 (_dbus_marshal_validate_arg):
5407 * dbus/dbus-message.c: (dbus_message_set_sender):
5408 Remove todo about being able to set sender to NULL.
5410 (dbus_message_set_is_error_reply),
5411 (dbus_message_get_is_error_reply):
5412 * dbus/dbus-message.h:
5415 * dbus/dbus-protocol.h:
5416 Add error reply flag.
5418 * test/data/valid-messages/opposite-endian.message:
5419 Add NIL type to test.
5421 2003-01-31 Havoc Pennington <hp@pobox.com>
5423 * doc/dbus-specification.sgml: fully specify the header. Add
5424 flags and major protocol version, and change header/body len to
5427 * dbus/dbus-message-builder.c (append_saved_length): append length
5430 * dbus/dbus-message.c (dbus_message_create_header): change header
5431 length and body length to unsigned. Add the new fields from the
5433 (_dbus_message_loader_return_buffer): unsigned header/body len
5435 2003-01-30 Havoc Pennington <hp@pobox.com>
5437 * dbus/dbus-auth.c: rework to use only REJECTED, no
5440 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5441 use REJECTED, suggested by Mark McLoughlin
5443 2003-01-30 Havoc Pennington <hp@pobox.com>
5445 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5446 a better way to report errors here. e.g. "unix address lacks
5447 path" or something. also "no such file" when the path doesn't
5450 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5452 (dbus_parse_address): add @todo about documenting address format,
5453 and allowing , and ; to be escaped
5455 2003-01-30 Anders Carlsson <andersca@codefactory.se>
5458 Add dbus-address.[ch]
5460 * dbus/dbus-address.c: (dbus_address_entry_free),
5461 (dbus_address_entries_free), (create_entry),
5462 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5463 (dbus_parse_address), (_dbus_address_test):
5464 * dbus/dbus-address.h:
5465 New files for dealing with address parsing.
5467 * dbus/dbus-connection.c:
5468 Document timeout functions.
5470 * dbus/dbus-message.c:
5471 Document dbus_message_new_from_message.
5473 * dbus/dbus-server-debug.c:
5476 * dbus/dbus-server.c: (dbus_server_listen):
5477 Parse address and use correct server implementation.
5479 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5480 * dbus/dbus-string.h:
5481 New function with test.
5483 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5487 * dbus/dbus-transport-debug.c:
5490 * dbus/dbus-transport.c: (_dbus_transport_open):
5491 Parse address and use correct transport implementation.
5493 2003-01-30 Havoc Pennington <hp@pobox.com>
5495 * dbus/dbus-message.c: use message->byte_order instead of
5496 DBUS_COMPILER_BYTE_ORDER throughout.
5497 (dbus_message_create_header): pad header to align the
5498 start of the body of the message to 8-byte boundary
5500 * dbus/dbus-marshal.h: make all the demarshalers take const
5501 DBusString arguments.
5503 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5504 validate message args here, so we don't have to do slow validation
5505 later, and so we catch bad messages as they are incoming. Also add
5506 better checks on header_len and body_len. Also fill in
5509 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5510 implemented properly)
5511 (_dbus_string_validate_nul): new function to check all-nul
5513 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5514 get_arg_end_pos and remove all validation
5515 (_dbus_marshal_validate_arg): actually do validation here.
5517 2003-01-29 Havoc Pennington <hp@pobox.com>
5519 * dbus/dbus-message.c (check_message_handling): fix assertion
5520 failure on set_client_serial
5522 2003-01-28 Havoc Pennington <hp@pobox.com>
5524 * dbus/dbus-server-debug.c: Add doc section comments
5526 * dbus/dbus-transport-debug.c: add doc section comments
5528 2003-01-28 Havoc Pennington <hp@redhat.com>
5530 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5531 the reverse order from how I had it
5532 (_dbus_string_base64_encode): reverse encoding order. I was
5533 basically byteswapping everything during encoding.
5535 2003-01-28 Anders Carlsson <andersca@codefactory.se>
5537 * dbus/dbus-connection-internal.h:
5538 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5539 (_dbus_connection_remove_timeout):
5540 Add functions for adding and removing timeouts.
5542 * dbus/dbus-message.c: (dbus_message_new_from_message):
5543 Add new function that takes a message and creates an exact
5544 copy of it, but with the refcount set to 1.
5545 (check_message_handling):
5548 * dbus/dbus-server-protected.h:
5549 * dbus/dbus-server.c: (_dbus_server_init_base),
5550 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5551 (dbus_server_set_timeout_functions):
5552 (_dbus_server_remove_timeout):
5553 New functions so that a server can add and remove timeouts.
5555 (dbus_server_listen):
5556 Add commented out call to dbus_server_debug_new.
5558 * dbus/dbus-timeout.c: (_dbus_timeout_new):
5559 Actually set the handler, doh.
5561 * dbus/dbus-transport.c: (_dbus_transport_open):
5562 Add commented out call to dbus_transport_debug_client_new.
5565 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5567 2003-01-28 Havoc Pennington <hp@pobox.com>
5569 * dbus/dbus-message.c (check_message_handling): function to check
5570 on the loaded message, iterates over it etc.
5572 2003-01-28 Havoc Pennington <hp@pobox.com>
5574 * test/Makefile.am (dist-hook): fix make distdir
5576 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5578 2003-01-27 Havoc Pennington <hp@pobox.com>
5580 * dbus/dbus-mempool.c (time_for_size): replace printf with
5583 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5584 empty lines; fix the SAVE_LENGTH stuff to be
5585 START_LENGTH/END_LENGTH so it actually works; couple other
5588 * test/Makefile.am (dist-hook): add dist-hook for .message files
5590 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5591 can be constant or locked.
5592 (_dbus_string_free): allow freeing a const string as
5595 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5597 * dbus/dbus-test-main.c (main): take an argument which is the
5598 directory containing test data
5600 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5601 argument to this and load all the messages in test/data/
5602 checking that they can be loaded or not loaded as appropriate.
5604 2003-01-27 Anders Carlsson <andersca@codefactory.se>
5606 * bus/dispatch.c: (bus_dispatch_message_handler):
5607 Dispatch messages sent to services.
5609 * bus/driver.c: (bus_driver_send_service_deleted),
5610 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5611 (bus_driver_send_service_acquired):
5612 Add helper functions for sending service related messages.
5614 (bus_driver_send_welcome_message):
5615 Send HELLO_REPLY instead of WELCOME.
5617 (bus_driver_handle_list_services):
5618 Send LIST_SERVICES_REPLY instead of SERVICES.
5620 (bus_driver_handle_own_service),
5621 (bus_driver_handle_service_exists):
5622 New message handlers.
5624 (bus_driver_handle_message):
5625 Invoke new message handlers.
5627 (bus_driver_remove_connection):
5628 Don't remove any services here since that's done automatically
5629 by bus_service_remove_owner now.
5632 New function signatures.
5634 * bus/services.c: (bus_service_add_owner):
5635 Send ServiceAcquired message if we're the only primary owner.
5637 (bus_service_remove_owner):
5638 Send ServiceAcquired/ServiceLost messages.
5640 (bus_service_set_prohibit_replacement),
5641 (bus_service_get_prohibit_replacement):
5642 Functions for setting prohibit replacement.
5644 (bus_service_has_owner):
5645 New function that checks if a connection is in the owner queue of
5649 Add new function signatures.
5651 * dbus/dbus-list.c: (_dbus_list_test):
5652 Add tests for _dbus_list_remove_last and traversing the list backwards.
5655 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5656 go any further, so return NULL then.
5658 * dbus/dbus-protocol.h:
5659 Add new messages, service flags and service replies.
5661 2003-01-26 Havoc Pennington <hp@pobox.com>
5663 * dbus/dbus-message-builder.c: implement, completely untested.
5665 * test/data/*: add data to be used in testing.
5666 ".message" files are our simple loadable text format.
5667 ".message-raw" will be binary dumps of messages.
5669 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5671 2003-01-26 Havoc Pennington <hp@pobox.com>
5673 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5675 * dbus/dbus-errors.c (dbus_result_to_string): add
5678 * dbus/dbus-message-builder.c: new file, will contain code to load
5679 up messages from files. Not implemented yet.
5681 2003-01-26 Havoc Pennington <hp@pobox.com>
5683 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5684 the sender by setting to NULL
5686 2003-01-26 Havoc Pennington <hp@pobox.com>
5688 The unit tests pass, but otherwise untested. If it breaks, the
5689 tests should have been better. ;-)
5691 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5694 * dbus/dbus-message.c: redo everything so we maintain
5695 message->header as the only copy of the various fields.
5696 This avoids the possibility of out-of-memory in some cases,
5697 for example dbus_message_lock() can't run out of memory anymore,
5698 and avoids extra copying. Figured I may as well go ahead and do
5699 this since it was busted for dbus_message_lock to not return
5700 failure on OOM, and dbus_message_write_header was totally
5701 unchecked for OOM. Also fixed some random other bugs.
5703 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5704 that strings are nul-terminated. Also, end_pos can be equal
5705 to string length just not greater than, I think.
5706 (_dbus_marshal_set_int32): new function
5707 (_dbus_marshal_set_uint32): new function
5708 (_dbus_marshal_set_string): new function
5710 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5711 a warning, init timeout_list to NULL
5712 (dbus_connection_send_message): don't use uninitialized variable
5715 * dbus/dbus-string.c (_dbus_string_replace_len): new function
5717 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5719 * bus/driver.c: (bus_driver_handle_hello),
5720 (bus_driver_send_welcome_message):
5723 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5725 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
5726 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5727 (dbus_connection_unref):
5728 * dbus/dbus-marshal.c: (_dbus_marshal_test):
5729 * dbus/dbus-message.c: (dbus_message_unref),
5732 (dbus_message_get_fields):
5733 Remove debugging printout.
5735 (_dbus_message_loader_return_buffer):
5736 Don't store the header string.
5738 (_dbus_message_test):
5741 2003-01-26 Richard Hult <rhult@codefactory.se>
5743 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
5744 the file descriptor list, since it can change under us.
5746 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5748 * glib/dbus-gmain.c: (dbus_connection_prepare),
5749 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
5750 (remove_watch), (dbus_connection_hookup_with_g_main):
5751 Rewrite the glib handling to use its own GSource instead of a
5752 GIOChannel so we can catch messages put in the queue while waiting
5755 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5758 * bus/connection.c: (connection_disconnect_handler),
5759 (connection_watch_callback), (bus_connection_setup):
5760 * bus/dispatch.c: (send_one_message),
5761 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
5762 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
5764 * bus/driver.c: (bus_driver_send_service_deleted),
5765 (bus_driver_send_service_created), (bus_driver_handle_hello),
5766 (bus_driver_send_welcome_message),
5767 (bus_driver_handle_list_services), (bus_driver_remove_connection),
5768 (bus_driver_handle_message):
5770 Refactor code, put the message dispatching in its own file. Use
5771 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
5774 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5776 * dbus/dbus-internals.h:
5777 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
5779 * dbus/dbus-message.c: (dbus_message_get_sender):
5780 * dbus/dbus-message.h:
5781 Implement dbus_message_get_sender.
5783 * dbus/dbus-protocol.h:
5784 Add message and service defines.
5786 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5788 * dbus/dbus-connection.c: (dbus_connection_send_message):
5789 * dbus/dbus-message-internal.h:
5790 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
5791 (dbus_message_write_header):
5792 Remove _dbus_messag_unlock and don't set the client serial on a
5793 message if one already exists.
5795 2003-01-24 Havoc Pennington <hp@pobox.com>
5797 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
5800 * bus/driver.c (bus_driver_handle_list_services): fix a leak
5803 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5805 * dbus/dbus-list.c: (alloc_link), (free_link):
5806 Use a memory pool for the links.
5808 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5810 * bus/connection.c: (bus_connection_foreach):
5812 Add new bus_connection_foreach function.
5814 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
5815 Add function that broadcasts a message to all clients.
5817 (bus_driver_send_service_created), (bus_driver_handle_hello),
5818 (bus_driver_send_welcome_message),
5819 (bus_driver_handle_list_services), (bus_driver_message_handler):
5820 Implement functions that take care of listing services, and notifying
5821 clients when new services are created.
5823 * bus/services.c: (bus_services_list):
5825 Add new function that returns an array of strings with the currently
5826 registered services.
5829 * glib/dbus-gmain.c:
5830 Update copyright year.
5832 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5834 * dbus/dbus-connection.c: (dbus_connection_send_message):
5835 Unlock the message in case it was sent earlier.
5837 (dbus_connection_send_message_with_reply_and_block):
5838 Remove the reply message from the list.
5840 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5841 Set array_len and new_pos correctly.
5843 (_dbus_marshal_test):
5844 Remove debug output.
5846 * dbus/dbus-message-internal.h:
5847 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
5848 New function that returns the reply serial.
5850 (_dbus_message_unlock):
5851 New function that unlocks a message and resets its header.
5853 (dbus_message_append_string_array),
5854 (dbus_message_get_fields_valist),
5855 (dbus_message_iter_get_field_type),
5856 (dbus_message_iter_get_string_array),
5857 (dbus_message_get_fields),
5858 (dbus_message_append_fields_valist):
5859 Handle string arrays.
5861 (dbus_message_set_sender):
5862 Make this function public since the bus daemon needs it.
5864 (decode_header_data):
5865 Set the reply serial to -1 initially.
5867 * dbus/dbus-message.h:
5868 Add dbus_message_set_sender.
5870 2003-01-24 Havoc Pennington <hp@pobox.com>
5872 * doc/dbus-specification.sgml: add some stuff
5874 2003-01-22 Havoc Pennington <hp@pobox.com>
5876 * doc/dbus-specification.sgml: Start to document the protocol.
5878 2003-01-22 Havoc Pennington <hp@pobox.com>
5880 * dbus/dbus-connection.c
5881 (dbus_connection_send_message_with_reply_and_block): add some @todo
5883 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
5885 2003-01-21 Havoc Pennington <hp@pobox.com>
5887 (patch untested because can't compile)
5889 * bus/driver.c (create_unique_client_name): make this function
5890 never recycle client names. Also, caller should initialize
5893 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
5895 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5897 * dbus/dbus-marshal.c: (_dbus_marshal_double),
5898 (_dbus_marshal_int32), (_dbus_marshal_uint32),
5899 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
5900 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
5901 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5902 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5903 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
5904 * dbus/dbus-marshal.h:
5905 * dbus/dbus-protocol.h:
5906 Add support for marshalling and demarshalling integer, double
5909 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5914 * bus/connection.c: (connection_disconnect_handler):
5915 Remove the connection from the bus driver's list.
5917 (connection_watch_callback): Dispatch messages.
5919 (free_connection_data): Free connection name.
5921 (bus_connection_setup): Add connection to the bus driver's list.
5922 (bus_connection_remove_owned_service):
5923 (bus_connection_set_name), (bus_connection_get_name):
5924 Add functions for setting and getting the connection's name.
5927 Add function headers.
5929 * bus/driver.c: (create_unique_client_name),
5930 (bus_driver_handle_hello_message),
5931 (bus_driver_send_welcome_message), (bus_driver_message_handler),
5932 (bus_driver_add_connection), (bus_driver_remove_connection):
5935 * bus/services.c: (bus_service_free):
5937 New file that handles communication and registreation with the bus
5940 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5942 * dbus/dbus-connection.c: (dbus_connection_send_message):
5943 Add a new client_serial parameter.
5945 (dbus_connection_send_message_with_reply):
5946 Remove a @todo since we've implemented the blocking function.
5948 (dbus_connection_send_message_with_reply_and_block):
5949 New function that sends a message and waits for a reply and
5950 then returns the reply.
5952 * dbus/dbus-connection.h:
5955 * dbus/dbus-errors.c: (dbus_result_to_string):
5956 * dbus/dbus-errors.h:
5957 Add new DBUS_RESULT.
5959 * dbus/dbus-message-internal.h:
5960 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
5961 (_dbus_message_set_sender), (dbus_message_write_header),
5962 (dbus_message_new_reply), (decode_header_data),
5963 (_dbus_message_loader_return_buffer), (_dbus_message_test):
5964 * dbus/dbus-message.h:
5965 Add new functions that set the reply serial and sender.
5966 Also marshal and demarshal them correctly and add test.
5968 * dbus/dbus-protocol.h:
5969 Add new DBUS_MESSAGE_TYPE_SENDER.
5972 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
5973 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
5974 (dbus_connection_hookup_with_g_main):
5975 * glib/test-dbus-glib.c: (main):
5976 Rewrite to use GIOChannel and remove the GSource crack.
5978 * test/echo-client.c: (main):
5979 * test/watch.c: (check_messages):
5980 Update for changed APIs
5982 2003-01-19 Anders Carlsson <andersca@codefactory.se>
5984 * dbus/Makefile.am: Add dbus-timeout.[cħ]
5986 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
5987 Create a DBusTimeoutList.
5988 (dbus_connection_set_timeout_functions): Add new function to
5989 set timeout callbacks
5991 * dbus/dbus-connection.h: Add public DBusTimeout API.
5993 * dbus/dbus-message.c: (dbus_message_get_service):
5994 * dbus/dbus-message.h: New function.
5996 * dbus/dbus-server.c: Fix small doc typo.
5998 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6000 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6002 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6003 of the string, just as long as specified.
6005 2003-01-19 Havoc Pennington <hp@pobox.com>
6007 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6010 * dbus/dbus-server.c (dbus_server_set_max_connections)
6011 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6012 keep track of current number of connections, and add API for
6013 setting a max (but haven't implemented enforcing the max yet)
6015 2003-01-18 Havoc Pennington <hp@pobox.com>
6017 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6018 reading/writing if read_watch != NULL or write_watch != NULL.
6020 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6021 the message loader code to actually load message->header and
6022 message->body into the newly-created message.
6024 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6027 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6028 (dbus_connection_get_max_message_size)
6029 (dbus_connection_set_max_live_messages_size)
6030 (dbus_connection_get_max_live_messages_size): implement some
6031 resource limitation functions
6033 * dbus/dbus-resources.c: new file implementing some of the
6034 resource limits stuff
6036 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
6037 missing docs, add @todo to handle OOM etc.
6039 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
6042 2003-01-18 Havoc Pennington <hp@pobox.com>
6044 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6045 connection if it hasn't been already.
6047 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6048 replace with DisconnectFunction.
6050 2003-01-18 Havoc Pennington <hp@pobox.com>
6052 Building --disable-verbose-mode --disable-asserts --disable-tests
6053 cuts the library from 112K to 45K or so
6055 * configure.in: check for varargs macro support,
6056 add --enable-verbose-mode, --enable-asserts.
6058 * dbus/dbus-internals.h (_dbus_assert): support
6060 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6062 2003-01-18 Havoc Pennington <hp@pobox.com>
6064 * dbus/dbus-test.c: include config.h so that tests actually run
6066 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6067 so the failure mode when that assumption fails will be plenty
6070 2003-01-18 Havoc Pennington <hp@pobox.com>
6072 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6074 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6077 * test/Makefile.am: don't use special variable "TESTS" for echo-*
6078 since we don't want to use those in make check
6080 2003-01-15 Havoc Pennington <hp@redhat.com>
6086 2003-01-15 Havoc Pennington <hp@redhat.com>
6088 * test/Makefile.am: fix so that test source code ends up in the
6089 distribution on make distcheck
6091 2003-01-15 Havoc Pennington <hp@redhat.com>
6097 2003-01-15 Havoc Pennington <hp@redhat.com>
6099 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6100 fix build when --disable-tests
6102 * Makefile.am (EXTRA_DIST): put HACKING in here
6104 * HACKING: document procedure for making a tarball release.
6106 2003-01-14 Anders Carlsson <andersca@codefactory.se>
6108 * bus/connection.c: (connection_error_handler),
6109 (bus_connection_setup):
6110 * bus/main.c: (main):
6111 Make sure that the DBusConnectionData struct is NULLed
6112 out to prevent a segfault.
6114 * dbus/dbus-errors.c: (dbus_result_to_string):
6115 * dbus/dbus-errors.h:
6116 * dbus/dbus-message.c: (dbus_message_get_fields),
6117 (dbus_message_get_fields_valist), (_dbus_message_test):
6118 * dbus/dbus-message.h:
6119 Make dbus_message_get_fields return a result code so we can
6120 track invalid fields as well as oom.
6122 2003-01-11 Havoc Pennington <hp@pobox.com>
6124 * configure.in: change --enable-test/--enable-ansi action-if-given
6125 to enable_foo=$enableval instead of enable_foo=yes
6127 2003-01-08 Havoc Pennington <hp@pobox.com>
6129 * dbus/dbus-string.c (_dbus_string_align_length): new function
6131 * dbus/dbus-test-main.c: move main() for test app here
6133 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6134 symbol to run tests, because dbus-test isn't in the main
6137 Code review nitpicks.
6139 * dbus/dbus-message.c (dbus_message_write_header): add newlines
6140 for people with narrow emacs ;-). Assert client_serial was filled
6141 in. Assert message->name != NULL.
6142 (dbus_message_append_fields): have "first_field_type" arg separate
6143 from va list, needed for C++ binding that also uses varargs IIRC
6144 and helps with type safety
6145 (dbus_message_new): add @todo about using DBusString to store
6146 service/name internally
6147 (dbus_message_new): don't leak ->service and ->name on OOM later
6149 (dbus_message_unref): free the service name
6150 (dbus_message_get_fields): same change to varargs
6151 i.e. first_field_type
6152 (_dbus_message_loader_return_buffer): assert that the message data
6153 is aligned (if not it's a bug in our code). Put in verbose griping
6154 about why we set corrupted = TRUE.
6155 (decode_header_data): add FIXME that char* is evil. Was going to
6156 add FIXME about evil locale-specific string.h strncmp, but just
6157 switched to wacky string-as-uint32 optimization. Move check for
6158 "no room for field name" above get_const_data_len() to avoid
6159 assertion failure in get_const_data_len if we have trailing 2
6160 bytes or the like. Check for service and name fields being
6161 provided twice. Don't leak service/name on error. Require field
6162 names to be aligned to 4 bytes.
6164 * dbus/dbus-marshal.c: move byte swap stuff to header
6165 (_dbus_pack_int32): uscore-prefix
6166 (_dbus_unpack_int32): uscore-prefix
6167 (_dbus_unpack_uint32): export
6168 (_dbus_demarshal_string): add @todo complaining about use of
6170 (_dbus_marshal_get_field_end_pos): add @todo about bad error
6171 handling allowing corrupt data to go unchecked
6173 2003-01-08 Havoc Pennington <hp@redhat.com>
6175 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6176 to the select() as needed for authentication. (should be using
6177 _dbus_poll() not select, but for another day)
6179 * dbus/dbus.h: include dbus/dbus-protocol.h
6181 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6183 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6186 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6188 * dbus/dbus-internals.c: (_dbus_type_to_string):
6189 New function that returns a string describing a type.
6191 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
6192 * dbus/dbus-marshal.h:
6193 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
6194 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
6195 (dbus_message_iter_get_byte_array):
6196 * dbus/dbus-message.h:
6197 Add new convenience functions for appending and getting message fields.
6198 Also add demarshalling routines for byte arrays.
6200 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6202 * dbus/dbus-connection-internal.h:
6203 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6204 (_dbus_connection_get_next_client_serial),
6205 (dbus_connection_send_message):
6206 * dbus/dbus-internals.h:
6207 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
6208 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
6209 (_dbus_marshal_uint32), (_dbus_demarshal_double),
6210 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
6211 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
6212 (_dbus_verbose_bytes), (_dbus_marshal_test):
6213 * dbus/dbus-marshal.h:
6214 * dbus/dbus-message-internal.h:
6215 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
6216 (dbus_message_write_header), (_dbus_message_lock),
6217 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
6218 (dbus_message_get_name), (dbus_message_append_int32),
6219 (dbus_message_append_uint32), (dbus_message_append_double),
6220 (dbus_message_append_string), (dbus_message_append_byte_array),
6221 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
6222 (dbus_message_iter_unref), (dbus_message_iter_has_next),
6223 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
6224 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
6225 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
6226 (decode_header_data), (_dbus_message_loader_return_buffer),
6227 (message_iter_test), (_dbus_message_test):
6228 * dbus/dbus-message.h:
6229 * dbus/dbus-protocol.h:
6230 * dbus/dbus-test.c: (main):
6232 * glib/test-dbus-glib.c: (message_handler), (main):
6233 * test/echo-client.c: (main):
6234 * test/watch.c: (check_messages):
6235 Make messages sendable and receivable for real.
6237 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6239 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6240 (_dbus_marshal_string), (_dbus_marshal_byte_array):
6241 * dbus/dbus-message.c: (dbus_message_append_int32),
6242 (dbus_message_append_uint32), (dbus_message_append_double),
6243 (dbus_message_append_string), (dbus_message_append_byte_array):
6244 Handle OOM restoration.
6246 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6248 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6249 (_dbus_demarshal_string), (_dbus_marshal_test):
6250 * dbus/dbus-marshal.h:
6251 * dbus/dbus-message.c: (dbus_message_get_name),
6252 Document these functions.
6254 (dbus_message_append_int32), (dbus_message_append_uint32),
6255 (dbus_message_append_double), (dbus_message_append_string),
6256 (dbus_message_append_byte_array):
6257 * dbus/dbus-message.h:
6258 Add functions for adding message fields of different types.
6260 * dbus/dbus-protocol.h:
6261 Add the different types.
6263 2003-01-05 Havoc Pennington <hp@pobox.com>
6265 * bus/connection.c: implement routines for handling connections,
6266 first thing is keeping a list of owned services on each connection
6267 and setting up watches etc.
6269 * bus/services.c: implement a mapping from service names to lists
6272 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
6274 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
6275 to use static mutexes for global data
6277 * dbus/dbus-connection.c (dbus_connection_set_data): add new
6278 collection of functions to set/get application-specific data
6279 on the DBusConnection.
6281 2003-01-04 Havoc Pennington <hp@pobox.com>
6283 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
6284 (_dbus_poll): new function
6286 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
6289 * bus/loop.c: initial code for the daemon main loop
6291 2003-01-04 Havoc Pennington <hp@pobox.com>
6293 * test/watch.c (error_handler): make it safe if the error handler
6294 is called multiple times (if we s/error handler/disconnect
6295 handler/ we should just guarantee it's called only once)
6297 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
6298 error handler on disconnect (it's quite possible we should
6299 just change the error handler to a "disconnect handler," I'm
6300 not sure we have any other meaningful errors)
6302 * configure.in: check for getpwnam_r
6304 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
6305 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
6306 mechanism as in SASL spec, using socket credentials
6308 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
6309 (_dbus_send_credentials_unix_socket): new function
6311 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
6313 (_dbus_write): only check errno if <0 returned
6314 (_dbus_write_two): ditto
6316 2003-01-02 Anders Carlsson <andersca@codefactory.se>
6318 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
6319 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
6320 (_dbus_marshal_test):
6321 * dbus/dbus-marshal.h:
6322 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
6323 to _dbus_marshal_utf8_string. Also fix some tests.
6325 2002-12-28 Harri Porten <porten@kde.org>
6327 * configure.in: added check for C++ compiler and a very cheesy
6328 check for the Qt integration
6330 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
6332 * qt/Makefile.am: added
6334 * qt/.cvsignore: added
6336 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
6337 latter, added #ifdef QT_THREAD_SUPPORT guard.
6339 * dbus/Makefile.am: added missing headers for make dist
6341 2002-12-28 Kristian Rietveld <kris@gtk.org>
6343 * dbus/Makefile.am: fixup export-symbols-regex.
6345 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6347 * acinclude.m4: Add this file and put the
6348 PKG_CHECK_MODULE macro in it.
6350 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6352 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6353 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6354 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6355 (_dbus_marshal_test):
6356 Make the demarshalling routines align the pos argument.
6357 Add string marshalling tests and fix the obvious bugs
6360 2002-12-26 Havoc Pennington <hp@pobox.com>
6362 * dbus/dbus-auth.c: fixes fixes fixes
6364 * dbus/dbus-transport-unix.c: wire up support for
6365 encoding/decoding data on the wire
6367 * dbus/dbus-auth.c (_dbus_auth_encode_data)
6368 (_dbus_auth_decode_data): append to target string
6369 instead of nuking it.
6371 2002-12-26 Havoc Pennington <hp@pobox.com>
6373 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
6374 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
6377 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
6378 avoid swap_bytes() overhead (ignoring possible assembly stuff for
6379 now). Main point is because I wanted unpack_uint32 to implement
6381 (_dbus_verbose_bytes): new function
6383 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
6385 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
6386 mechanism to handle a corrupt message stream
6387 (_dbus_message_loader_new): fix preallocation to only prealloc,
6390 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
6391 (_dbus_string_test): enhance tests for copy/move and fix the
6394 * dbus/dbus-transport-unix.c: Hold references in more places to
6395 avoid reentrancy problems
6397 * dbus/dbus-transport.c: ditto
6399 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
6400 leak reference count in no-message case
6402 * test/watch.c (do_mainloop): handle adding/removing watches
6403 during iteration over the watches. Also, ref the connection/server
6404 stored on a watch, so we don't try to mangle a destroyed one.
6406 * dbus/dbus-transport-unix.c (do_authentication): perform
6409 * dbus/dbus-auth.c (get_state): add a state
6410 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
6411 (_dbus_auth_get_unused_bytes): append the unused bytes
6412 to the passed in string, rather than prepend
6414 * dbus/dbus-transport.c (_dbus_transport_init_base): create
6415 the auth conversation DBusAuth
6417 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
6418 (_dbus_transport_new_for_domain_socket): when creating a
6419 transport, pass in whether it's a client-side or server-side
6420 transport so we know which DBusAuth to create
6422 2002-12-03 Havoc Pennington <hp@pobox.com>
6424 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6425 _after_ finalizing the derived members
6426 (unix_connection_set): unref watch if we fail to add it
6428 * dbus/dbus-connection.c (dbus_connection_unref): delete the
6429 transport first, so that the connection owned by the
6430 transport will be valid as the transport finalizes.
6432 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6433 if necessary, and remove watches from the connection.
6435 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6437 2002-12-26 Anders Carlsson <andersca@codefactory.se>
6439 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6440 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6441 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6442 (_dbus_marshal_test):
6443 * dbus/dbus-marshal.h:
6444 Add string marshal functions and have the demarshal functions
6445 return the new position.
6447 2002-12-25 Havoc Pennington <hp@pobox.com>
6449 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6450 it is a simple protocol that just maps directly to SASL.
6452 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6453 initial implementation, not actually used yet.
6455 * dbus/dbus-string.c (_dbus_string_find): new function
6456 (_dbus_string_equal): new function
6457 (_dbus_string_base64_encode): new function
6458 (_dbus_string_base64_decode): new function
6460 2002-12-25 Anders Carlsson <andersca@codefactory.se>
6463 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6464 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6465 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6466 (_dbus_demarshal_uint32), (_dbus_marshal_test):
6467 * dbus/dbus-marshal.h:
6468 * dbus/dbus-protocol.h:
6469 * dbus/dbus-test.c: (main):
6471 Add un-optimized marshalling/demarshalling routines.
6473 2002-12-25 Harri Porten <porten@kde.org>
6475 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6477 2002-12-24 Zack Rusin <zack@kde.org>
6479 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6480 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6483 2002-12-24 Havoc Pennington <hp@pobox.com>
6485 * glib/dbus-gthread.c: fix include
6487 * glib/dbus-glib.h: rename DBusMessageHandler for now.
6488 I think glib API needs to change, though, as you don't
6489 want to use DBusMessageFunction, you want to use the
6490 DBusMessageHandler object. Probably
6491 dbus_connection_open_with_g_main_loop()
6492 and dbus_connection_setup_g_main_loop() or something like that
6493 (but think of better names...) that just create a connection
6494 that has watch/timeout functions etc. already set up.
6496 * dbus/dbus-connection.c
6497 (dbus_connection_send_message_with_reply): new function just to
6498 show how the message handler helps us deal with replies.
6500 * dbus/dbus-list.c (_dbus_list_remove_last): new function
6502 * dbus/dbus-string.c (_dbus_string_test): free a string that
6505 * dbus/dbus-hash.c: use memory pools for the hash entries
6506 (rebuild_table): be more paranoid about overflow, and
6507 shrink table when we can
6508 (_dbus_hash_test): reduce number of sprintfs and write
6509 valid C89. Add tests for case where we grow and then
6510 shrink the hash table.
6512 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6514 * dbus/dbus-connection.c (dbus_connection_register_handler)
6515 (dbus_connection_unregister_handler): new functions
6517 * dbus/dbus-message.c (dbus_message_get_name): new
6519 * dbus/dbus-list.c: fix docs typo
6521 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6522 an object representing a handler for messages.
6524 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6527 * glib/dbus-gthread.c: (dbus_gthread_init):
6528 Don't use the gdbus prefix for public functions.
6530 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6534 Add GLib checks and fixup .pc files
6538 * glib/dbus-gmain.c: (gdbus_connection_prepare),
6539 (gdbus_connection_check), (gdbus_connection_dispatch),
6540 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6541 (dbus_connection_gsource_new):
6542 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6543 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6544 * glib/test-dbus-glib.c: (message_handler), (main):
6547 2002-12-15 Harri Porten <porten@kde.org>
6549 * autogen.sh: check for libtoolize before attempting to use it
6551 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6554 * .cvsignore: ignore more stamp files
6556 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6558 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6559 without make install.
6561 2002-12-15 Havoc Pennington <hp@pobox.com>
6563 * dbus/dbus-threads.c: add thread stubs that a higher library
6564 layer can fill in. e.g. the GLib wrapper might fill them in with
6565 GThread stuff. We still need to use this thread API to
6566 thread-safe-ize the library.
6568 2002-12-12 Havoc Pennington <hp@pobox.com>
6570 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6571 below new interfaces and include fewer system headers.
6573 * dbus/dbus-sysdeps.c (_dbus_read): new function
6574 (_dbus_write): new function
6575 (_dbus_write_two): new function
6576 (_dbus_connect_unix_socket): new function
6577 (_dbus_listen_unix_socket): new function
6579 * dbus/dbus-message-internal.h: change interfaces to use
6582 2002-12-11 Havoc Pennington <hp@pobox.com>
6584 * dbus/dbus-types.h: add dbus_unichar
6586 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6588 * dbus/dbus-connection.c (dbus_connection_send_message): return
6591 * dbus/dbus-transport.c: include dbus-watch.h
6593 * dbus/dbus-connection.c: include dbus-message-internal.h
6595 * HACKING: add file with coding guidelines stuff.
6597 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6598 handling here, for security purposes (as in vsftpd). Not actually
6599 using this class yet.
6601 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6602 system/libc usage here, as in vsftpd, for ease of auditing (and
6603 should also simplify portability). Haven't actually moved all the
6604 system/libc usage into here yet.
6606 2002-11-25 Havoc Pennington <hp@pobox.com>
6608 * dbus/dbus-internals.c (_dbus_verbose): fix to not
6609 always print the first verbose message.
6611 2002-11-24 Havoc Pennington <hp@pobox.com>
6613 * test/echo-client.c, test/echo-server.c: cheesy test
6616 * configure.in (AC_CHECK_FUNCS): check for writev
6618 * dbus/dbus-message.c (_dbus_message_get_network_data): new
6621 * dbus/dbus-list.c (_dbus_list_foreach): new function
6623 * dbus/dbus-internals.c (_dbus_verbose): new function
6625 * dbus/dbus-server.c, dbus/dbus-server.h: public object
6626 representing a server that listens for connections.
6628 * dbus/.cvsignore: create
6630 * dbus/dbus-errors.h, dbus/dbus-errors.c:
6631 public API for reporting errors
6633 * dbus/dbus-connection.h, dbus/dbus-connection.c:
6634 public object representing a connection that
6635 sends/receives messages. (Same object used for
6636 both client and server.)
6638 * dbus/dbus-transport.h, dbus/dbus-transport.c:
6639 Basic abstraction for different kinds of stream
6640 that we might read/write messages from.
6642 2002-11-23 Havoc Pennington <hp@pobox.com>
6644 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6647 * dbus/dbus-test.c (main): add list test, and include
6648 dbus-test.h as intended
6650 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6651 (_dbus_hash_table_remove_int): return value indicates
6652 whether the entry existed to remove
6654 * dbus/dbus-list.c: add linked list utility class,
6657 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6660 2002-11-23 Havoc Pennington <hp@pobox.com>
6662 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6663 DBUS_END_DECLS to nothing, that should fix this once and for all
6665 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6667 * dbus/dbus-message.c, dbus/dbus-hash.c:
6668 add some missing @brief
6670 2002-11-23 Havoc Pennington <hp@pobox.com>
6672 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6673 to avoid confusing Doxygen
6675 * dbus/dbus-hash.c: @} not }@
6677 * dbus/dbus-message.c (struct DBusMessage): split out
6680 2002-11-23 Havoc Pennington <hp@pobox.com>
6682 * configure.in: pile on more warning flags if using gcc
6684 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6685 to document static functions
6687 * configure.in: add summary to end of configure so it
6688 looks nice and attractive
6690 * dbus/dbus-hash.c: finish implementation and write unit
6693 * configure.in: add --enable-tests to enable unit tests
6695 * dbus/dbus-test.c: test program to run unit tests
6696 for all files in dbus/*, initially runs a test for
6699 * dbus/dbus-internals.h: file to hold some internal utility stuff
6701 2002-11-22 Havoc Pennington <hp@redhat.com>
6703 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6704 "ported" away from Tcl
6706 * dbus/dbus-types.h: header for types such as dbus_bool_t
6708 2002-11-22 Havoc Pennington <hp@redhat.com>
6710 * dbus/dbus.h: fixups for doc warnings
6712 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6714 (QUIET): make it quiet so we can see warnings
6716 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
6718 2002-11-22 Havoc Pennington <hp@redhat.com>
6720 * Makefile.am: include "Doxyfile" target in all-local
6722 * configure.in: generate the Doxyfile
6724 * Doxyfile.in: move Doxyfile here, so we can use
6725 configure to generate a Doxyfile with the right
6728 2002-11-22 Havoc Pennington <hp@redhat.com>
6730 * dbus/dbus-message.c: move inline docs into .c file
6732 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
6733 so all docs are under doc/
6734 (MAN_EXTENSION): generate man pages. Use extension
6735 ".3dbus" which matches ".3qt" on my system,
6736 I guess this is OK, I don't know really.
6737 (FILE_PATTERNS): look for .c files not .h, makes sense
6740 2002-11-22 Havoc Pennington <hp@pobox.com>
6742 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
6743 because any app can be a server, and any app can be a client,
6744 the bus is a special kind of server.
6746 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
6748 * Doxyfile : adding. Still needs Makefile rules to be generated
6749 automatically (just run "doxygen" in the toplevel dir for now to
6752 * dbus/dbus-message.h : Adding sample docs (javadoc since
6753 resembles gtk-doc a little more)
6755 * dbus/dbus.h : Adding sample docs
6757 2002-11-21 Havoc Pennington <hp@redhat.com>
6759 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
6760 so we can allow ourselves to include files directly,
6761 instead of having to use dbus.h
6763 * dbus/dbus.h: fill in
6765 * dbus/dbus-message.h: sketch out a sample header file.
6766 Include griping if you include it directly instead of
6769 * dbus/dbus-macros.h: new file with macros for extern "C",
6770 TRUE/FALSE, NULL, etc.
6772 * doc/file-boilerplate.c: put include guards in here
6774 2002-11-21 Havoc Pennington <hp@redhat.com>
6776 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
6778 * COPYING: include the GPL as well, and license code
6779 under both AFL and GPL.
6781 2002-11-21 Havoc Pennington <hp@redhat.com>
6783 * acconfig.h: get rid of this
6785 * autogen.sh (run_configure): add --no-configure option
6787 * configure.in: remove AC_ARG_PROGRAM to make
6788 autoconf complain less. add AC_PREREQ.
6789 add AC_DEFINE third arg.
6791 2002-11-21 Anders Carlsson <andersca@codefactory.se>
6794 Fix references so we can distcheck.
6796 2002-11-21 Havoc Pennington <hp@redhat.com>
6798 * Initial module creation