1 2004-05-28 Seth Nickell <seth@gnome.org>
3 * python/examples/Makefile.am:
5 Forget to add Makefile.am. Do not pass go.
7 2004-05-28 Michael Meeks <michael@ximian.com>
9 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
12 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
14 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
15 (_dbus_message_iter_get_basic_type_array): impl.
16 drastically simplify ~all relevant _get methods to use these.
17 (_dbus_message_iter_append_basic_array),
18 (dbus_message_iter_append_basic): impl
19 drastically simplify ~all relevant _append methods to use these.
21 * dbus/dbus-message-builder.c (parse_basic_type)
22 (parse_basic_array, lookup_basic_type): impl.
23 (_dbus_message_data_load): prune scads of duplicate /
26 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
27 (_dbus_demarshal_basic_type): implement,
28 (demarshal_and_validate_len/arg): beef up debug.
29 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
31 2004-05-27 Seth Nickell <seth@gnome.org>
36 Include the example python apps in the tarball.
38 * python/examples/list-system-services.py
40 Add a python new example that fetches the list of services
43 2004-05-27 Seth Nickell <seth@gnome.org>
46 * python/dbus_bindings.pyx.in:
48 Fix failure to notify that a signal was not handled,
49 resulted in hung functions.
51 2004-05-25 Colin Walters <walters@redhat.com>
53 * tools/dbus-monitor.c (main): Monitor all types of messages.
55 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
57 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
58 which unregisters the object path and disposes the handler.
60 2004-05-23 Kristian Høgsberg <krh@redhat.com>
62 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
64 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
65 operands to && so we call dbus_message_iter_next () for the last
68 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
70 * dbus/dbus-object-tree.c
71 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
72 children even if the requested path isn't registered.
73 (object_tree_test_iteration): test object_tree_list_registered.
75 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
78 2004-05-20 Kristian Høgsberg <krh@redhat.com>
80 * doc/TODO: Remove resolved items.
82 * bus/expirelist.h (struct BusExpireList): remove unused n_items
85 * bus/connection.c (bus_connections_expect_reply): Enforce the
86 per-connection limit on pending replies.
88 Patch from Jon Trowbridge <trow@ximian.com>:
90 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
91 up a watch that triggers a config reload when one end of the pipe
93 (signal_handler): Instead of doing the config reload in our SIGHUP
94 handler, just write to the reload pipe and let the associated
95 watch handle the reload when control returns to the main loop.
97 * bus/driver.c (bus_driver_handle_reload_config): Added.
98 Implements a ReloadConfig method for requesting a configuration
99 file reload via the bus driver.
101 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
103 * HACKING: Updated release instructions concerning the wiki page.
105 2004-05-18 Kristian Høgsberg <krh@redhat.com>
107 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
108 filter against auth->allowed_mechs; we only add allowed mechs in
111 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
112 ALLOWED_MECHS to auth-script format so we can set the list of
115 * data/auth/client-out-of-mechanisms.auth-script: New test to
116 check client disconnects when it is out of mechanisms to try.
118 * dbus/dbus-auth.c (process_command): Remove check for lines
119 longer that 1 MB; we only buffer up maximum 16 kB.
121 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
122 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
123 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
124 assume there might be unused bytes.
126 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
127 client-out-of-mechs, it is handled in process_reject(). Move check
128 for max failures to send_rejected(), as it's a server-only thing.
130 * dbus/dbus-auth.c: Factor out protocol reply code into functions
131 send_auth(), send_data(), send_rejected(), send_error(),
132 send_ok(), send_begin() and send_cancel().
134 2004-05-17 Kristian Høgsberg <krh@redhat.com>
136 Remove base64 encoding, replace with hex encoding. Original patch
137 from trow@ximian.com, added error handling.
139 * dbus/dbus-string.c (_dbus_string_base64_encode)
140 (_dbus_string_base64_decode): Remove.
141 (_dbus_string_hex_decode): Add end_return argument so we can
142 distinguish between OOM and invalid hex encoding.
143 (_dbus_string_test): Remove base64 tests and add test case for
146 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
147 Replace base64 with hex.
149 * test/data/auth/invalid-hex-encoding.auth-script: New test case
150 for invalid hex encoded data in auth protocol.
152 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
154 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
157 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
159 * mono/dbus-sharp.dll.config.in: Added for GAC
160 * mono/dbus-sharp.snk: Added for GAC
161 * mono/Assembly.cs.in: Added for GAC
162 * mono/Makefile.am: Changes for GAC installation
163 * configure.in: Added refs for dbus-sharp.dll.config.in and
164 Assembly.cs.in. More fixes for mono testing
165 * mono/example/Makefile.am: Changed var to CSC
166 * Makefile.am: Changed flag name to DBUS_USE_CSC
168 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
170 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
171 * mono/doc/*: Added documentation framework
172 * configure.in: Added monodoc check
173 * README: Added description of mono configure flags
175 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
177 * doc/dbus-specification.xml: Added a "Required" column to the
178 header fields table and changed the "zero or more" verbage in
179 the above paragraph to read "The header must contain the required
180 named header fields and zero or more of the optional named header
182 * test/data/invalid-messages/*.message: Added the required PATH
183 named header field to the tests so that they don't fail on
186 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
188 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
189 the stack by implicitly defining variable and parameter types and
190 removing the hack of defining C pointers as python objects and later
193 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
195 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
197 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
199 * mono/DBusType/Dict.cs: Handle empty dicts
200 * mono/DBusType/Array.cs: Handle empty arrays
201 * mono/Arguments.cs: Handle empty arguments
204 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
206 * dbus-sharp.pc.in: Modified to include include Libs and Requires
209 2004-04-25 Kristian Høgsberg <krh@redhat.com>
211 * test/data/valid-messages/standard-*.message: Update message
212 test scripts to new header field names.
214 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
216 * test/break-loader.c (randomly_do_n_things): tracked down buffer
217 overflow to times_we_did_each_thing array which would chop off the
218 first character of the failure_dir string. Increased the size of
219 the array to 7 to reflect the number of random mutation functions
222 2004-04-21 Kristian Høgsberg <krh@redhat.com>
224 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
225 unix_server->watch here, it is unreffed in disconnect.
226 (_dbus_server_new_for_tcp_socket): convert NULL host to
227 "localhost" here so we don't append NULL to address.
229 * dbus/dbus-server.c (_dbus_server_test): Add test case for
230 various addresses, including tcp with no explicit host.
232 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
234 * dbus/dbus-message.c (decode_header_data, decode_string_field):
235 fix incorrect setting of .name_offset in the HeaderField (it was
236 off by two bytes, positioned right after the name and typecode)
238 * bus/bus.c (bus_context_new, bus_context_unref): test before
239 calling dbus_server_free_data_slot and _dbus_user_database_unref
242 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
245 2004-04-19 Kristian Høgsberg <krh@redhat.com>
247 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
248 _dbus_poll() instead of select().
250 2004-04-15 Jon Trowbridge <trow@ximian.com>
252 * bus/main.c (signal_handler): Reload the configuration files
254 (main): Set up our SIGHUP handler.
256 * bus/bus.c (struct BusContext): Store the config file, user and
257 fork flag in the BusContext.
258 (process_config_first_time_only): Added. Contains the code
259 (previously in bus_context_new) for setting up the BusContext from
260 the BusConfigParser that should only be run the first time the
261 config files are read.
262 (process_config_every_time): Added. Contains the code (previously
263 in bus_context_new) for setting up the BusContext from the
264 BusConfigParser that should be run every time the config files are
266 (load_config): Added. Builds a BusConfigParser from the config
267 files and passes the resulting structure off to
268 process_config_first_time_only (assuming this is the first time)
269 and process_config_every_time.
270 (bus_context_new): All of the config-related code has been moved
271 to process_config_first_time_only and process_config_every_time.
272 Now this function just does the non-config-related initializations
273 and calls load_config.
274 (bus_context_reload_config): Added.
276 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
278 * bus/driver.c (bus_driver_handle_get_service_owner):
279 implement a GetServiceOwner method.
280 * doc/dbus-specification.xml: document it.
281 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
283 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
284 implement, using the bus GetServiceOwner method.
286 * test/glib/test-dbus-glib.c:
287 use dbus_gproxy_new_for_service_owner so that we can receive the
290 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
292 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
293 dbus/dbus-message.c, dbus/dbus-protocol.h
294 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
296 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
297 dbus/dbus-message.c, dbus/dbus-protocol.h
298 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
300 * dbus/dbus-internals.c (_dbus_header_field_to_string):
301 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
302 DBUS_HEADER_FIELD_SENDER resolves to "sender"
304 * doc/dbus-specification.xml (Header Fields Table):
305 s/SERVICE/DESTINATION
306 s/SENDER_SERVICE/SENDER
309 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
311 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
314 2004-04-13 Michael Meeks <michael@ximian.com>
316 * glib/dbus-gobject.c (handle_introspect): split out
317 (introspect_properties): this.
318 (handle_introspect): implement this.
320 * test/glib/Makefile.am: use the absolute path so the bus
321 daemon's chdir ("/") doesn't kill us dead.
323 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
325 2004-04-12 Jon Trowbridge <trow@ximian.com>
327 * bus/config-parser.c (struct BusConfigParser): Added
328 included_files field.
329 (seen_include): Added. Checks whether or not a file has already
330 been included by any parent BusConfigParser.
331 (bus_config_parser_new): Copy the parent's included_files.
332 (include_file): Track which files have been included, and fail on
334 (process_test_valid_subdir): Changed printf to report if we are
335 testing valid or invalid conf files.
336 (all_are_equiv): Changed printf to be a bit clearer about
337 what we are actually doing.
338 (bus_config_parser_test): Test invalid configuration files.
340 2004-04-09 Jon Trowbridge <trow@ximian.com>
342 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
343 argument. If non-null, the newly-constructed BusConfigParser will
344 be initialized with the parent's BusLimits instead of the default
346 (include_file): When including a config file, pass in
347 the current parser as the parent and then copy the BusLimits
348 from the included BusConfigParser pack to the current parser.
349 (process_test_valid_subdir): Renamed from process_test_subdir.
350 (process_test_equiv_subdir): Added. Walks through a directory,
351 descending into each subdirectory and loading the config files
352 it finds there. If any subdirectory contains two config files
353 that don't produce identical BusConfigParser structs, fail.
354 For now, the BusConfigParser's BusPolicies are not compared.
355 (bus_config_parser_test): Call both process_test_valid_subdir and
356 process_test_equiv_subdir.
358 * bus/config-loader-libxml.c (bus_config_load): Take a parent
359 argument and pass it along to the call to bus_config_parser_new.
360 Also made a few small changes to allow this code to compile.
362 * bus/config-loader-expat.c (bus_config_load): Take a parent
363 argument and pass it along to the call to bus_config_parser_new.
365 * bus/bus.c (bus_context_new): Load the config file
366 with a NULL parent argument.
368 2004-03-29 Michael Meeks <michael@ximian.com>
370 * glib/dbus-gobject.c (introspect_properties): split
371 out, fix mangled 'while' flow control.
372 (introspect_signals): implement.
373 (handle_introspect): update.
375 2004-03-29 Michael Meeks <michael@ximian.com>
377 * glib/dbus-gobject.c (set_object_property): split out /
378 re-work, use the property type, and not the message type(!)
379 (get_object_property): ditto.
381 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
382 (dbus_gvalue_marshal): make this code re-usable, needed
383 for signals too, also on both proxy and server side.
384 Re-write for more efficiency / readability.
386 2004-03-29 Michael Meeks <michael@ximian.com>
388 * dbus/dbus-message.c
389 (dbus_message_new_error_printf): impl.
391 * dbus/dbus-connection.c
392 (dbus_connection_unregister_object_path): fix warning.
394 * configure.in: fix no-mono-installed situation.
396 2004-03-27 Havoc Pennington <hp@redhat.com>
398 Patch from Timo Teräs:
400 * tools/dbus-send.c (main): if --print-reply, assume type is
401 method call; support boolean type args
403 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
404 bunch of memleak and logic bugs
406 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
409 * mono/Introspector.cs:
411 * mono/InterfaceProxy.cs:
413 * mono/ProxyBuilder.cs:
415 Added InterfaceProxy class to avoid building proxies for every
419 * dbus-message.c (dbus_message_append_args_valist)
420 (dbus_message_iter_get_object_path)
421 (dbus_message_iter_get_object_path_array)
422 (dbus_message_iter_append_object_path)
423 (dbus_message_iter_append_object_path_array):
424 Added object_path iter functions to handle OBJECT_PATH arguments
426 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
428 First checkin of mono bindings.
431 Build stuff for the bindings
432 * dbus-sharp.pc.in: Added for pkgconfig
434 2004-03-21 Havoc Pennington <hp@redhat.com>
436 * test/test-service.c (main): remove debug spew
438 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
440 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
443 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
444 (dbus_message_iter_init_array_iterator)
445 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
446 indicate whether the iterator is empty
448 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
451 2004-03-19 Havoc Pennington <hp@redhat.com>
457 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
459 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
460 you don't need pyrex to make dist
462 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
465 2004-03-18 Richard Hult <richard@imendio.com>
467 * dbus/dbus-message.c (dbus_message_get_auto_activation)
468 (dbus_message_set_auto_activation): Add doxygen docs.
470 2004-03-16 Richard Hult <richard@imendio.com>
472 * bus/activation.c: (bus_activation_service_created),
473 (bus_activation_send_pending_auto_activation_messages),
474 (bus_activation_activate_service):
476 * bus/dispatch.c: (bus_dispatch),
477 (check_nonexistent_service_auto_activation),
478 (check_service_auto_activated),
479 (check_segfault_service_auto_activation),
480 (check_existent_service_auto_activation), (bus_dispatch_test):
481 * bus/driver.c: (bus_driver_handle_activate_service):
482 * bus/services.c: (bus_registry_acquire_service):
483 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
484 (dbus_message_get_auto_activation):
485 * dbus/dbus-message.h:
486 * dbus/dbus-protocol.h: Implement auto-activation.
488 * doc/dbus-specification.xml: Add auto-activation to the spec.
490 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
492 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
493 fix a bug with CUSTOM types.
495 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
496 a unit test for this bug (used to fail).
498 2004-03-12 Mikael Hallendal <micke@imendio.com>
501 (babysitter_watch_callback): notify all pending activations waiting for
502 the same exec that the activation failed.
503 (bus_activation_activate_service): shortcut the activation if we
504 already waiting for the same executable to start up.
506 2004-03-12 Mikael Hallendal <micke@imendio.com>
509 - Added service file reloading.
510 Each service files directory is kept in an hash table in
511 BusActivation and each BusActivationEntry knows what .service-file it
512 was read from. So when you try to activate a service the bus will
513 check if it's been updated, removed or if new .service-files has
515 - Test code at the bottom for the service file reloading.
516 * bus/test-main.c: (main):
518 - added service reloading test.
519 * dbus/dbus-sysdeps.c:
520 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
522 2004-03-08 Michael Meeks <michael@ximian.com>
524 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
525 bail immediately if disconnected, to avoid busy loop.
527 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
528 cleanup cut/paste/inefficiency.
530 2004-03-01 David Zeuthen <david@fubar.dk>
532 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
533 bug where args were used twice. This bug resulted in a segfault
534 on a Debian/PPC system when starting the messagebus daemon. Include
535 dbus-sysdeps.h for DBUS_VA_COPY
537 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
539 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
540 appropriate va_copy implementation. From GLib
542 2004-02-24 Joe Shaw <joe@ximian.com>
544 * bus/services.c (bus_registry_acquire_service): We need to pass
545 in the service name to dbus_set_error() to prevent a crash.
547 2003-12-26 Anders Carlsson <andersca@gnome.org>
549 * AUTHORS: Reveal my True identity.
551 2003-12-17 Mikael Hallendal <micke@imendio.com>
553 * dbus/dbus-message.c: (dbus_message_append_args_valist):
554 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
556 2003-12-13 Mikael Hallendal <micke@imendio.com>
558 * doc/TODO: Added not about better error check of configuration files.
560 2003-12-02 Richard Hult <richard@imendio.com>
562 * Update AFL version to 2.0 throughout the source files to reflect
563 the update that was done a while ago.
565 2003-12-02 Richard Hult <richard@imendio.com>
567 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
568 wrote_dict_key to FALSE on the iter that the dict is appended to,
569 just like when appending other types. Fixes a bug where a dict
570 couldn't be put inside a dict.
571 (dbus_message_iter_append_dict_key): Fix typo in warning message.
572 (message_iter_test, _dbus_message_test): Add test case for dict
575 2003-12-01 David Zeuthen <david@fubar.dk>
577 * python/dbus.py: Add the actual message when calling the reciever
578 of a signal such that parameters can be inspected. Add the method
579 remove_signal_receiver
581 2003-11-26 Mikael Hallendal <micke@imendio.com>
585 * glib/*.[ch]: Made ref functions return the pointer
587 2003-11-25 Zack Rusin <zack@kde.org>
589 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
591 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
594 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
595 the Integrator and to better fit with the server,
597 2003-11-24 Zack Rusin <zack@kde.org>
599 * qt/connection.h, qt/connection.cpp: removing initDbus method since
600 the integrator handles it now
602 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
603 since QTimer wasn't really meant to be used the way DBusTimeout is
605 2003-11-24 Zack Rusin <zack@kde.org>
607 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
608 Integrator class which integrates D-BUS with the Qt event loop,
610 * qt/connection.h, qt/connection.cpp: Move all the code which
611 was dealing with D-BUS integration to the Integrator class,
612 and start using Integrator,
614 2003-11-23 Zack Rusin <zack@kde.org>
616 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
619 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
620 switching namespaces to DBusQt, reworking the class,
622 * Makefile.cvs: switching dependencies so that it matches KDE
625 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
628 2003-11-19 Havoc Pennington <hp@redhat.com>
632 * configure.in: bump version to 0.20
634 * configure.in (have_qt): add yet another place to look for qt
635 (someone hand trolltech a .pc file...)
637 2003-11-01 Havoc Pennington <hp@redhat.com>
639 * doc/dbus-specification.xml: add state machine docs on the auth
640 protocol; just a first draft, I'm sure it's wrong.
642 2003-10-28 David Zeuthen <david@fubar.dk>
644 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
645 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
647 2003-10-28 Havoc Pennington <hp@redhat.com>
649 * dbus/dbus-message.c (get_next_field): delete unused function
651 2003-10-28 Havoc Pennington <hp@redhat.com>
653 * bus/expirelist.c (do_expiration_with_current_time): detect
654 failure of the expire_func due to OOM
656 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
658 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
659 NoReply error that's now created by the bus when the service exits
661 2003-10-28 Havoc Pennington <hp@redhat.com>
663 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
664 tests for set_path, set_interface, set_member, etc.
666 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
668 * dbus/dbus-message.c (set_string_field): always just delete and
669 re-append the field; accept NULL for deletion
670 (re_align_fields_recurse): reimplement
672 2003-10-26 Havoc Pennington <hp@redhat.com>
674 * dbus/dbus-connection.c: fix docs to properly describe the
676 (_dbus_connection_notify_disconnected): remove this function;
677 we can't synchronously add the disconnected message, we have to
678 do it after we've queued any remaining real messages
679 (_dbus_connection_get_dispatch_status_unlocked): queue the
680 disconnect message only if the transport has finished queueing all
681 its real messages and is disconnected.
682 (dbus_connection_disconnect): update the dispatch status here
684 2003-10-22 Havoc Pennington <hp@redhat.com>
686 * bus/bus.c (bus_context_check_security_policy): fix up assertion
688 * bus/connection.c (bus_transaction_send_from_driver): set the
689 destination to the connection's base service
691 2003-10-20 Havoc Pennington <hp@redhat.com>
693 hmm, make check is currently not passing.
695 * doc/dbus-specification.xml: add requirement that custom type
696 names follow the same rules as interface names.
698 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
699 duplication and allow 'c' to be 'custom'; dict is now 'm' for
702 * doc/dbus-specification.xml: update type codes to match
703 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
704 CUSTOM. Add type OBJECT_PATH to the spec.
706 2003-10-17 Havoc Pennington <hp@redhat.com>
708 * bus/driver.c (create_unique_client_name): use "." as separator
709 in base service names instead of '-'
711 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
712 byte at the end of the string
714 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
715 optimization macros since string validation seems to be a slow
718 * doc/dbus-specification.xml: restrict valid
719 service/interface/member/error names. Add test suite code for the
722 * dbus/dbus-string.c: limit service/interface/member/error names
725 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
726 format arg to verbose spew
728 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
729 memory, return instead of g_error
731 * test/test-service.c (path_message_func): support emitting a
734 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
735 activation bus type if DBUS_BUS_ACTIVATION was set; default to
736 assuming the activation bus was the session bus so that services
737 started manually will still register.
738 (init_connections_unlocked): fix so that in OOM situation we get
739 the same semantics when retrying the function
741 * test/test-service.c (main): change to use path registration, to
742 test those codepaths; register with DBUS_BUS_ACTIVATION rather
743 than DBUS_BUS_SESSION
745 2003-10-16 Havoc Pennington <hp@redhat.com>
747 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
749 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
750 coverage of the tests
751 (coverage-report.txt): don't move the .da and .bbg files around
753 2003-10-16 Havoc Pennington <hp@redhat.com>
755 * bus/bus.c (struct BusContext): remove struct field I didn't mean
758 2003-10-16 Havoc Pennington <hp@redhat.com>
760 * bus/connection.c (bus_pending_reply_expired): either cancel or
762 (bus_connections_check_reply): use unlink, not remove_link, as we
763 don't want to free the link; fixes double free mess
765 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
766 where no reply was received
768 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
771 * bus/signals.c (match_rule_matches): add special cases for the
772 bus driver, so you can match on sender/destination for it.
774 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
775 DBUS_PRINT_BACKTRACE is set
777 * dbus/dbus-internals.c: add pid to assertion failure messages
779 * dbus/dbus-connection.c: add message type code to the debug spew
781 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
782 sender=foo not service=foo
784 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
785 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
786 DBUS_ACTIVATION_ADDRESS instead
788 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
789 DBUS_SYSTEM_BUS_ADDRESS if appropriate
791 * bus/bus.c (bus_context_new): handle OOM copying bus type into
794 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
795 (dbus_message_iter_get_object_path_array): new function (half
796 finished, disabled for the moment)
798 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
799 DBUS_MESSAGE_TYPE_ERROR
801 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
802 avoid redirecting stderr to /dev/null
803 (babysit): close stdin if not doing the "exit_with_session" thing
805 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
806 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
807 stdout/stdin, so things don't get confused
809 * bus/system.conf.in: fix to allow replies, I modified .conf
810 instead of .conf.in again.
812 2003-10-14 David Zeuthen <david@fubar.dk>
814 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
815 argtype to arg_type when raising unknown arg type exception.
816 Changed type list to reflect the changes in dbus-protocol.h so
817 the bindings actually work.
819 2003-10-14 Havoc Pennington <hp@redhat.com>
821 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
822 to have a bug keeping it from outputting the .da files sometimes
823 (string_get_string): don't append garbage nul bytes to the string.
825 2003-10-15 Seth Nickell <seth@gnome.org>
827 * python/Makefile.am:
829 Include dbus_h_wrapper.h in the dist tarball.
831 2003-10-14 Havoc Pennington <hp@redhat.com>
833 * bus/bus.c (bus_context_check_security_policy): revamp this to
834 work more sanely with new policy-based requested reply setup
836 * bus/connection.c (bus_transaction_send_from_driver): set bus
837 driver messages as no reply
839 * bus/policy.c (bus_client_policy_check_can_receive): handle a
840 requested_reply attribute on allow/deny rules
842 * bus/system.conf: add <allow requested_reply="true"/>
844 * bus/driver.c (bus_driver_handle_message): fix check for replies
845 sent to the bus driver, which was backward. How did this ever work
846 at all though? I think I'm missing something.
848 * dbus/dbus-message.c (decode_header_data): require error and
849 method return messages to have a reply serial field to be valid
850 (_dbus_message_loader_queue_messages): break up this function;
851 validate that reply serial and plain serial are nonzero;
852 clean up the OOM/error handling.
853 (get_uint_field): don't return -1 from this
854 (dbus_message_create_header): fix signed/unsigned bug
856 * bus/connection.c (bus_connections_expect_reply): save serial of
857 the incoming message, not reply serial
859 2003-10-14 Havoc Pennington <hp@redhat.com>
861 * bus/connection.c: implement pending reply tracking using
864 * bus/bus.c (bus_context_check_security_policy): verify that a
865 reply is pending in order to allow a reply to be sent. Deny
866 messages of unknown type.
868 * bus/dbus-daemon-1.1.in: update to mention new resource limits
870 * bus/bus.c (bus_context_get_max_replies_per_connection): new
871 (bus_context_get_reply_timeout): new
873 2003-10-13 Seth Nickell <seth@gnome.org>
875 * python/Makefile.am:
877 Pass "make distcheck": remove a couple files from DIST_FILES
878 that weren't included in the final version.
880 2003-10-12 Havoc Pennington <hp@pobox.com>
882 Added test code that 1) starts an actual bus daemon and 2) uses
883 DBusGProxy; fixed bugs that were revealed by the test. Lots
884 more testing possible, but this is the basic framework.
886 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
887 empty proxy lists from the proxy list hash
889 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
890 couple of return_if_fail checks
892 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
893 to allocate, so everything is cleared to NULL as it should be.
895 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
896 source as data to dbus_connection_set_timeout_functions() as the
897 timeout functions expected
899 * test/glib/run-test.sh: add a little script to start up a message
900 bus and run tests using it
902 * tools/dbus-launch.1: updates
904 * tools/dbus-launch.c (main): add --config-file option
906 * tools/dbus-launch.c (main): remove confusing else if (runprog)
907 that could never be reached.
909 * dbus/dbus-message.c (dbus_message_new_method_return)
910 (dbus_message_new_error, dbus_message_new_signal): set the
911 no-reply-expected flag on all these. Redundant, but may
912 as well be consistent.
914 2003-10-11 Havoc Pennington <hp@pobox.com>
916 * test/decode-gcov.c (function_solve_graph): make broken block
917 graph a nonfatal error since it seems to be broken. Need to debug
920 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
921 can't just check type > INVALID < LAST anymore
923 * dbus/dbus-message.c (dbus_message_get_signature): new function
924 (dbus_message_has_signature): new function
925 (struct DBusMessage): add signature field (right now it isn't sent
926 over the wire, just generated on the fly)
927 (dbus_message_copy): copy the signature, and init strings to
928 proper length to avoid some reallocs
929 (dbus_message_iter_init_array_iterator): return void, since it
931 (dbus_message_iter_init_dict_iterator): return void since it can't fail
932 (_dbus_message_loader_queue_messages): add silly temporary hack to
933 fill in message->signature on load
935 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
936 characters, so they are relatively human-readable.
938 2003-10-11 Havoc Pennington <hp@pobox.com>
940 * dbus/dbus-message.c (_dbus_message_test): add more test
941 coverage, but #if 0 for now since they uncover a bug
942 not fixed yet; I think in re_align_field_recurse()
943 (re_align_field_recurse): add FIXME about broken assertion
945 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
947 * bus/connection.c: share a couple code bits with expirelist.c
949 * bus/expirelist.h, bus/expirelist.c: implement a generic
950 expire-items-after-N-seconds facility, was going to share between
951 expiring connections and replies, decided not to use for expiring
954 * COPYING: include AFL 2.0 (still need to change all the file headers)
956 2003-10-09 Havoc Pennington <hp@redhat.com>
958 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
959 gcc 3.3. Not that we do anything about it yet.
961 * bus/signals.c (bus_match_rule_parse): impose max length on the
964 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
966 2003-10-09 Havoc Pennington <hp@redhat.com>
968 Make matching rules theoretically work (add parser).
970 * bus/bus.c (bus_context_check_security_policy): fix up to handle
971 the case where destination is explicitly specified as bus driver
972 and someone else is eavesdropping.
974 * bus/policy.c (bus_client_policy_check_can_receive): fix up
975 definition of eavesdropping and assertion
977 * tools/dbus-send.c (main): use dbus_message_type_from_string
979 * bus/signals.c (bus_match_rule_parse): implement
981 * dbus/dbus-message.c (dbus_message_type_from_string): new
983 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
985 2003-10-02 Havoc Pennington <hp@pobox.com>
987 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
988 dbus_gproxy_oneway_call
990 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
991 (dbus_server_setup_with_g_main): fix to allow calling them more
992 than once on the same args
993 (dbus_bus_get_with_g_main): new function
995 2003-10-02 Havoc Pennington <hp@redhat.com>
997 * doc/dbus-tutorial.xml: write some stuff
999 2003-09-29 Havoc Pennington <hp@pobox.com>
1001 * configure.in: split checks for Doxygen from XML docs, check for
1004 * doc/Makefile.am: XML-ify all the docs, and add a blank
1007 2003-09-29 Havoc Pennington <hp@pobox.com>
1009 * Merge dbus-object-names branch. To see the entire patch
1010 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1011 it's huuuuge though.
1012 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1014 2003-09-28 Havoc Pennington <hp@pobox.com>
1016 * HACKING: update to reflect new server
1018 2003-09-26 Seth Nickell <seth@gnome.org>
1021 * python/examples/example-signals.py:
1023 Start implementing some notions of signals. The API
1024 is really terrible, but they sort of work (with the
1025 exception of being able to filter by service, and to
1026 transmit signals *as* a particular service). Need to
1027 figure out how to make messages come from the service
1030 * python/dbus_bindings.pyx.in:
1032 Removed duplicate message_handler callbacks.
1034 2003-09-25 Havoc Pennington <hp@redhat.com>
1036 * bus/session.conf.in: fix my mess
1038 2003-09-25 Havoc Pennington <hp@pobox.com>
1040 * bus/session.conf.in: fix security policy, reported by Seth Nickell
1042 2003-09-25 Seth Nickell <seth@gnome.org>
1044 * python/examples/example-service.py:
1046 Johan notices complete wrong code in example-service, but
1047 completely wrong in a way that works exactly the same (!).
1048 Johan is confused, how could this possibly work? Example
1049 code fails to serve purpose of making things clear.
1052 2003-09-25 Mark McLoughlin <mark@skynet.ie>
1054 * doc/dbus-specification.sgml: don't require header fields
1055 to be 4-byte aligned and specify that fields should be
1056 distinguished from padding by the fact that zero is not
1059 * doc/TODO: remove re-alignment item and add item to doc
1060 the OBJECT_PATH type.
1062 * dbus/dbus-message.c:
1063 (HeaderField): rename the original member to value_offset
1064 and introduce a name_offset member to keep track of where
1065 the field actually begins.
1066 (adjust_field_offsets): remove.
1067 (append_int_field), (append_uint_field),
1068 (append_string_field): don't align the start of the header
1069 field to a 4-byte boundary.
1070 (get_next_field): impl finding the next marhsalled field
1071 after a given field.
1072 (re_align_field_recurse): impl re-aligning a number of
1073 already marshalled fields.
1074 (delete_field): impl deleting a field of any type and
1075 re-aligning any following fields.
1076 (delete_int_or_uint_field), (delete_string_field): remove.
1077 (set_int_field), (set_uint_field): no need to re-check
1078 that we have the correct type for the field.
1079 (set_string_field): ditto and impl re-aligning any
1081 (decode_header_data): update to take into account that
1082 the fields aren't 4-byte aligned any more and the new
1083 way to distinguish padding from header fields. Also,
1084 don't exit when there is too much header padding.
1085 (process_test_subdir): print the directory.
1086 (_dbus_message_test): add test to make sure a following
1087 field is re-aligned correctly after field deletion.
1089 * dbus/dbus-string.[ch]:
1090 (_dbus_string_insert_bytes): rename from insert_byte and
1091 allow the insert of multiple bytes.
1092 (_dbus_string_test): test inserting multiple bytes.
1094 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1095 warning note to docs about having to re-align any
1096 marshalled values following the string.
1098 * dbus/dbus-message-builder.c:
1099 (append_string_field), (_dbus_message_data_load):
1100 don't align the header field.
1102 * dbus/dbus-auth.c: (process_test_subdir): print the
1105 * test/break-loader.c: (randomly_add_one_byte): upd. for
1108 * test/data/invalid-messages/bad-header-field-alignment.message:
1111 * test/data/valid-messages/unknown-header-field.message: shove
1112 a dict in the unknown field.
1114 2003-09-25 Seth Nickell <seth@gnome.org>
1117 * python/dbus_bindings.pyx.in:
1119 Handle return values.
1121 * python/examples/example-client.py:
1122 * python/examples/example-service.py:
1124 Pass back return values from the service to the client.
1126 2003-09-24 Seth Nickell <seth@gnome.org>
1130 Connect Object methods (when you are sharing an object) up... pass
1131 in a list of methods to be shared. Sharing all the methods just
1132 worked out too weird. You can now create nice Services over the
1135 * python/dbus_bindings.pyx.in:
1137 Keep references to user_data tuples passed into C functions so
1138 Python doesn't garbage collect on us.
1140 Implement MethodReturn and Error subclasses of Message for creating
1141 DBusMessage's of those types.
1143 * python/examples/example-client.py:
1144 * python/examples/example-service.py:
1146 Simple example code showing both how create DBus services and objects,
1147 and how to use them.
1149 2003-09-23 Havoc Pennington <hp@pobox.com>
1151 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1153 2003-09-23 Havoc Pennington <hp@redhat.com>
1155 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1156 (dbus_gproxy_disconnect_signal): implement
1157 (dbus_gproxy_manager_remove_signal_match): implement
1158 (dbus_gproxy_manager_add_signal_match): implement
1159 (dbus_gproxy_oneway_call): implement
1161 2003-09-23 Havoc Pennington <hp@pobox.com>
1163 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1164 subclass. This means dropping the transparent thread safety of the
1165 proxy; you now need a separate proxy per-thread, or your own
1166 locking on the proxy. Probably right anyway.
1167 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1169 2003-09-22 Havoc Pennington <hp@redhat.com>
1171 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1173 2003-09-21 Seth Nickell <seth@gnome.org>
1175 First checkin of the Python bindings.
1177 * python/.cvsignore:
1178 * python/Makefile.am:
1179 * python/dbus_bindings.pyx.in:
1180 * python/dbus_h_wrapper.h:
1182 Pieces for Pyrex to operate on, building a dbus_bindings.so
1183 python module for low-level access to the DBus APIs.
1187 High-level Python module for accessing DBus objects.
1192 Build stuff for the python bindings.
1196 Extra macro needed for finding the Python C header files.
1198 2003-09-21 Havoc Pennington <hp@pobox.com>
1200 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1201 implementing the proxy manager, didn't get very far.
1203 * dbus/dbus-bus.c (dbus_bus_add_match): new
1204 (dbus_bus_remove_match): new
1206 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1207 path_name argument; adjust the other not-yet-implemented
1208 gproxy constructors to be what I think they should be.
1210 2003-09-21 Havoc Pennington <hp@pobox.com>
1212 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1213 by default for message bus connections.
1215 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1216 exit_on_disconnect flag is set and we process the disconnected
1218 (dbus_connection_set_exit_on_disconnect): new function
1220 2003-09-21 Havoc Pennington <hp@pobox.com>
1222 Get matching rules mostly working in the bus; only actually
1223 parsing the rule text remains. However, the client side of
1224 "signal connections" hasn't been started, this patch is only the
1227 * dbus/dispatch.c: fix for the matching rules changes
1229 * bus/driver.c (bus_driver_handle_remove_match)
1230 (bus_driver_handle_add_match): send an ack reply from these
1233 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
1234 arguments, reported by Seth Nickell
1236 * bus/config-parser.c (append_rule_from_element): support
1237 eavesdrop=true|false attribute on policies so match rules
1238 can be prevented from snooping on the system bus.
1240 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
1241 and "destination" in attribute names; fix some docs bugs;
1242 add eavesdrop=true|false attribute
1244 * bus/driver.c (bus_driver_handle_add_match)
1245 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
1248 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
1249 rid of broadcast service concept, signals are just always broadcast
1251 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
1252 mostly implement matching rules stuff (currently only exposed as signal
1255 2003-09-21 Mark McLoughlin <mark@skynet.ie>
1257 * doc/dbus-specification.sgml: Change the header field name
1258 to be an enum and update the rest of the spec to reference
1259 the fields using the conventinal name.
1261 * dbus/dbus-protocol.h: update to reflect the spec.
1263 * doc/TODO: add item to remove the 4 byte alignment requirement.
1265 * dbus/dbus-message.c: Remove the code to generalise the
1266 header/body length and serial number header fields as named
1267 header fields so we can reference field names using the
1269 (append_int_field), (append_uint_field), (append_string_field):
1270 Append the field name as a byte rather than four chars.
1271 (delete_int_or_uint_field), (delete_string_field): reflect the
1272 fact that the field name and typecode now occupy 4 bytes instead
1274 (decode_string_field), (decode_header_data): update to reflect
1275 protocol changes and move the field specific encoding from
1276 decode_string_field() back into decode_header_data().
1278 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
1279 Add utility to aid debugging.
1281 * dbus/dbus-message-builder.c:
1282 (append_string_field), (_dbus_message_data_load): Update to
1283 reflect protocol changes; Change the FIELD_NAME directive
1284 to HEADER_FIELD and allow it to take the field's conventional
1285 name rather than the actual value.
1287 * test/data/*/*.message: Update to use HEADER_FIELD instead
1288 of FIELD_NAME; Always align the header on an 8 byte boundary
1289 *before* updating the header length.
1291 2003-09-15 Havoc Pennington <hp@pobox.com>
1293 * dbus/dbus-pending-call.c: add the get/set object data
1294 boilerplate as for DBusConnection, etc. Use generic object data
1295 for the notify callback.
1297 * glib/dbus-gparser.c (parse_node): parse child nodes
1299 * tools/dbus-viewer.c: more hacking on the dbus-viewer
1301 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
1302 contain functions shared between the convenience lib and the
1305 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
1306 -export-symbols-regex to the GLib library
1308 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
1309 fix the locking in here, and add a default handler for
1310 Introspect() that just returns sub-nodes.
1312 2003-09-14 Havoc Pennington <hp@pobox.com>
1314 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
1315 rather than gfoo consistent
1317 * glib/dbus-gproxy.h: delete for now, move contents to
1318 dbus-glib.h, because the include files don't work right since we
1319 aren't in the dbus/ subdir.
1321 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
1322 (dbus_gproxy_end_call): finish
1323 (dbus_gproxy_begin_call): finish
1325 * glib/dbus-gmain.c (dbus_set_g_error): new
1327 * glib/dbus-gobject.c (handle_introspect): include information
1328 about child nodes in the introspection
1330 * dbus/dbus-connection.c (dbus_connection_list_registered): new
1331 function to help in implementation of introspection
1333 * dbus/dbus-object-tree.c
1334 (_dbus_object_tree_list_registered_and_unlock): new function
1336 2003-09-12 Havoc Pennington <hp@pobox.com>
1338 * glib/dbus-gidl.h: add common base class for all the foo_info
1341 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
1344 * test/Makefile.am: try test srcdir -ef . in addition to test
1345 srcdir = ., one of them should work (yeah lame)
1347 * glib/Makefile.am: build the "idl" parser stuff as a convenience
1350 * glib/dbus-gparser.h: make description_load routines return
1351 NodeInfo* not Parser*
1353 * Makefile.am (SUBDIRS): build test dir after all library dirs
1355 * configure.in: add GTK+ detection
1357 2003-09-07 Havoc Pennington <hp@pobox.com>
1359 * Make Doxygen contented.
1361 2003-09-07 Havoc Pennington <hp@pobox.com>
1363 * doc/dbus-specification.sgml: more updates
1365 2003-09-06 Havoc Pennington <hp@pobox.com>
1367 * doc/dbus-specification.sgml: partial updates
1369 * bus/dbus-daemon-1.1.in: fix the config file docs for the
1370 zillionth time; hopefully I edited the right file this time.
1372 * bus/config-parser.c (append_rule_from_element): support
1373 send_type, send_path, receive_type, receive_path
1375 * bus/policy.c: add message type and path to the list of things
1376 that can be "firewalled"
1378 2003-09-06 Havoc Pennington <hp@pobox.com>
1380 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
1381 (dbus_connection_register_object_path): make this not handle
1382 messages to paths below the given path
1384 2003-09-03 Havoc Pennington <hp@pobox.com>
1386 * test/glib/Makefile.am: add this with random glib-linked test
1389 * glib/Makefile.am: remove the random test programs from here,
1390 leave only the unit tests
1392 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
1393 uscore/javacaps conversion, and fix
1394 (get_object_property, set_object_property): change to .NET
1395 convention for mapping props to methods, set_FooBar/get_FooBar,
1396 since one language has such a convention we may as well copy it.
1397 Plus real methods in either getFooBar or get_foo_bar style won't
1398 collide with this convention.
1400 2003-09-01 Havoc Pennington <hp@pobox.com>
1402 * glib/dbus-gparser.c: implement
1404 * glib/dbus-gobject.c: start implementing skeletons support
1406 * configure.in: when disabling checks/assert, also define
1407 G_DISABLE_ASSERT and G_DISABLE_CHECKS
1409 2003-09-01 Havoc Pennington <hp@pobox.com>
1411 * glib/Makefile.am: rearrange a bunch of files and get "make
1412 check" framework set up
1414 2003-08-31 Havoc Pennington <hp@pobox.com>
1416 * fix build with --disable-tests
1418 2003-08-30 Havoc Pennington <hp@pobox.com>
1420 * dbus/dbus-connection.c: purge DBusMessageHandler
1422 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
1423 use callbacks everywhere
1425 2003-08-30 Havoc Pennington <hp@pobox.com>
1427 * test/data/valid-config-files/system.d/test.conf: change to
1428 root for the user so warnings don't get printed
1430 * dbus/dbus-message.c: add dbus_message_get_path,
1431 dbus_message_set_path
1433 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
1434 dispatching to a path
1436 * dbus/dbus-string.c (_dbus_string_validate_path): add
1438 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
1439 (_dbus_marshal_object_path): implement
1441 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
1442 to contain the path to the target object
1443 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
1444 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
1446 2003-08-30 Havoc Pennington <hp@pobox.com>
1448 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
1450 2003-08-29 Havoc Pennington <hp@pobox.com>
1452 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
1454 (struct DBusObjectSubtree): shrink this
1455 a lot, since we may have a lot of them
1456 (_dbus_object_tree_free_all_unlocked): implement
1457 (_dbus_object_tree_dispatch_and_unlock): implement
1459 2003-08-29 Havoc Pennington <hp@pobox.com>
1461 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
1463 2003-08-28 Havoc Pennington <hp@pobox.com>
1467 * dbus/dbus-connection.c: port to no ObjectID, create a
1468 DBusObjectTree, rename ObjectTree to ObjectPath in public API
1470 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
1471 everything except UnregisterFunction and MessageFunction
1473 * dbus/dbus-marshal.c: port away from DBusObjectID,
1474 add DBUS_TYPE_OBJECT_PATH
1476 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
1477 dbus/dbus-objectid.[hc]: remove these, we are moving to
1478 path-based object IDs
1480 2003-08-25 Havoc Pennington <hp@pobox.com>
1482 Just noticed that dbus_message_test is hosed, I wonder when I
1483 broke that. I thought make check was passing earlier...
1485 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
1486 container tree, will replace most of dbus-object-registry
1488 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1491 2003-08-19 Havoc Pennington <hp@pobox.com>
1493 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1494 (dbus_message_is_error): fix this function
1496 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1499 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1500 reflect clarified man page
1501 (bus_client_policy_check_can_send): ditto
1503 * bus/session.conf.in: fixup
1505 * bus/system.conf.in: fixup
1507 2003-08-18 Havoc Pennington <hp@redhat.com>
1509 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1511 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1512 dumb bug created earlier (wrong order of args to
1513 decode_header_data())
1515 * tools/dbus-send.c: port
1517 * tools/dbus-print-message.c (print_message): port
1519 * test/data/*messages: port all messages over
1521 * dbus/dbus-message-builder.c: support including
1524 * bus/driver.c: port over
1526 * bus/dispatch.c: port over to new stuff
1528 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1529 rename disconnect signal to "Disconnected"
1531 2003-08-17 Havoc Pennington <hp@pobox.com>
1533 This doesn't compile yet, but syncing up so I can hack on it from
1534 work. What are branches for if not broken code? ;-)
1536 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1537 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1538 DBUS_HEADER_FIELD_ERROR_NAME
1540 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1541 for the interface+member pairs
1542 (string_hash): change to use g_str_hash algorithm
1543 (find_direct_function, find_string_function): refactor these to
1546 * dbus/dbus-message.c: port all of this over to support
1547 interface/member fields instead of name field
1549 * dbus/dbus-object-registry.c: port over
1551 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1552 from _dbus_string_validate_name
1554 * bus/dbus-daemon-1.1: change file format for the
1555 <deny>/<allow> stuff to match new message naming scheme
1557 * bus/policy.c: port over
1559 * bus/config-parser.c: parse new format
1561 2003-08-16 Havoc Pennington <hp@pobox.com>
1563 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1566 * glib/dbus-gproxy.c: some hacking
1568 2003-08-15 Havoc Pennington <hp@redhat.com>
1570 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1572 * dbus/dbus-connection.c
1573 (dbus_connection_send_with_reply_and_block): factor out internals;
1574 change to convert any error replies to DBusError instead of
1575 returning them as a message
1577 2003-08-15 Havoc Pennington <hp@pobox.com>
1579 * dbus/dbus-connection.c,
1580 dbus/dbus-pending-call.c: Finish the pending call stuff
1582 2003-08-14 Havoc Pennington <hp@redhat.com>
1584 * dbus/dbus-pending-call.c: start on new object that will replace
1585 DBusMessageHandler and ReplyHandlerData for tracking outstanding
1588 * dbus/dbus-gproxy.c: start on proxy object used to communicate
1589 with remote interfaces
1591 * dbus/dbus-gidl.c: do the boring boilerplate in here
1593 2003-08-12 Havoc Pennington <hp@pobox.com>
1595 * bus/dispatch.c (bus_dispatch): make this return proper
1596 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1598 * dbus/dbus-errors.c (dbus_set_error): use
1599 _dbus_string_append_printf_valist
1601 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1602 (_dbus_string_append_printf): new
1604 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1607 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1608 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1609 message is unhandled.
1611 2003-08-11 Havoc Pennington <hp@pobox.com>
1613 * bus/test.c (client_disconnect_handler): change to return
1614 HANDLED (would have been REMOVE_MESSAGE)
1616 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1617 HANDLED/NOT_YET_HANDLED instead of
1618 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
1621 2003-08-10 Havoc Pennington <hp@pobox.com>
1623 * tools/dbus-send.c (main): add --type argument, for now
1624 supporting only method_call and signal types.
1626 * tools/dbus-print-message.c: print message type
1628 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1629 init connection->objects
1631 * doc/dbus-specification.sgml: fix sgml
1633 * bus/*.c: port over to object-instance API changes
1635 * test/test-service.c: ditto
1637 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1638 name, we will have to fix up the rest of the code to also handle
1640 (dbus_message_new): generic message-creation call
1641 (set_string_field): allow appending name field
1643 2003-08-06 Havoc Pennington <hp@pobox.com>
1645 * dbus/dbus-object-registry.c: implement signal connection
1648 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1650 * dbus/dbus-internals.c (_dbus_memdup): new function
1652 2003-08-02 Havoc Pennington <hp@pobox.com>
1654 * dbus/dbus-message.c (dbus_message_get_no_reply)
1655 (dbus_message_set_no_reply): add these and remove
1656 set_is_error/get_is_error
1658 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
1659 remove the ERROR flag, since there's now an ERROR type
1661 2003-08-01 Havoc Pennington <hp@pobox.com>
1663 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1666 * dbus/dbus-message.c (dbus_message_get_type): new function
1668 * doc/dbus-specification.sgml: add "type" byte to messages
1670 2003-08-01 Havoc Pennington <hp@pobox.com>
1672 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1673 a message type enum to distinguish kinds of message
1674 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
1675 that need not be replied to
1677 2003-08-01 Havoc Pennington <hp@pobox.com>
1679 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1680 (unpack_8_octets): fix no-64-bit-int bug
1682 * dbus/dbus-object-registry.c (validate_id): validate the
1683 connection ID bits, not just the instance ID.
1685 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1686 the connection-global 33 bits of the object ID
1688 * dbus/dbus-object-registry.c (info_from_entry): fill in
1689 object ID in the new way
1691 * dbus/dbus-objectid.h: rather than high/low bits, specifically
1692 define server/client/instance bits.
1694 2003-07-30 Havoc Pennington <hp@pobox.com>
1696 * dbus/dbus-connection.c (dbus_connection_register_object): fix
1699 2003-07-13 Havoc Pennington <hp@pobox.com>
1701 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1702 fields to DBusObjectVTable and DBusObjectInfo
1704 2003-07-12 Havoc Pennington <hp@pobox.com>
1706 * dbus/dbus-object-registry.c: implement unit test,
1707 fix bugs discovered in process
1709 * dbus/dbus-connection.c: remove handler_table and
1710 register_handler(), add DBusObjectRegistry usage
1712 * dbus/dbus-objectid.c (dbus_object_id_is_null)
1713 (dbus_object_id_set_null): new functions
1715 2003-07-08 Havoc Pennington <hp@pobox.com>
1717 * dbus/dbus-object.c: implement some of this
1719 * dbus/dbus-object-registry.c
1720 (_dbus_object_registry_add_and_unlock): fill in the object_id out
1722 (_dbus_object_registry_new): handle OOM
1724 2003-07-08 Havoc Pennington <hp@pobox.com>
1726 * dbus/dbus-object.h: sketch out an API for registering objects
1727 with a connection, that allows us to use as little as 24 bytes
1728 per object and lets application code represent an object in
1729 any conceivable way.
1731 * dbus/dbus-object-registry.c: implement the hard bits of the
1732 DBusConnection aspect of object API. Not yet wired up.
1734 2003-07-06 Havoc Pennington <hp@pobox.com>
1736 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1737 (_dbus_marshal_object_id): new
1738 (_dbus_demarshal_object_id): new
1739 (_dbus_marshal_get_arg_end_pos): support object ID type, and
1740 consolidate identical switch cases. Don't conditionalize handling
1741 of DBUS_TYPE_UINT64, need to handle the type always.
1742 (_dbus_marshal_validate_arg): consolidate identical cases, and
1743 handle DBUS_TYPE_OBJECT_ID
1745 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1747 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1749 2003-09-28 Havoc Pennington <hp@pobox.com>
1753 2003-09-28 Havoc Pennington <hp@pobox.com>
1755 * doc/Makefile.am (dbus-specification.html): testing a funky hack
1756 to work with Debian db2html
1758 2003-09-28 Havoc Pennington <hp@pobox.com>
1760 * configure.in: 0.13
1762 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
1763 stylesheet-images for benefit of Debian
1765 Change back to using filesystem-linked sockets for the system
1766 bus, so only root can create the default system bus address.
1768 * bus/system.conf.in: change to use
1769 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1771 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
1774 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1775 here, and AC_DEFINE DBUS_SYSTEM_PATH
1777 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1780 * doc/busconfig.dtd:
1783 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1785 * doc/dbus-specification.sgml:
1786 Add activation reply values.
1788 2003-08-05 Havoc Pennington <hp@redhat.com>
1790 * configure.in: 0.12
1792 2003-08-05 Anders Carlsson <andersca@codefactory.se>
1794 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
1795 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
1796 (add_watch), (remove_watch), (create_source):
1797 Refcount fds, fixes some reentrancy issues.
1799 2003-07-30 Havoc Pennington <hp@redhat.com>
1801 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
1802 bus address to be abstract if we have abstract sockets
1806 2003-07-28 Havoc Pennington <hp@redhat.com>
1808 * bus/messagebus.in: fix to avoid processname/servicename
1809 confusion, from Michael Kearey
1810 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
1812 2003-07-23 Havoc Pennington <hp@pobox.com>
1814 * dbus/dbus-message.c (dbus_message_iter_get_named):
1815 fix from Andy Hanton to remove broken "+1"
1817 2003-07-16 Havoc Pennington <hp@pobox.com>
1819 * tools/dbus-launch.c (babysit): close stdout/stderr in the
1820 babysitter process, as suggested by Thomas Leonard, so
1821 an "eval `dbus-launch --exit-with-session`" will actually
1824 2003-07-16 Havoc Pennington <hp@pobox.com>
1826 * configure.in: print out EXPANDED_* variables in the summary at
1827 the end; clean up the code that computes EXPANDED_ variables and
1828 get the ones using exec_prefix right. Should make things work
1829 when you build without --prefix
1831 2003-06-29 Havoc Pennington <hp@pobox.com>
1833 * mono/Test.cs (class Test): fire up a main loop and run it
1835 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
1836 done once, the app has to do it
1838 2003-06-26 Havoc Pennington <hp@pobox.com>
1840 * mono/Connection.cs: set up connection with the glib main loop
1842 2003-07-01 Havoc Pennington <hp@redhat.com>
1844 * doc/dbus-specification.sgml: clarify the format of a type code,
1845 change suggested by Jim Blandy
1847 2003-06-29 Miloslav Trmac <mitr@volny.cz>
1850 * tools/Makefile.am: Don't assume srcdir == builddir.
1852 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
1853 the allocated block.
1854 (_dbus_memory_test): New function.
1855 * dbus/dbus-test.h: Add _dbus_memory_test ().
1856 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
1858 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
1860 (dbus_message_new): Remove obsolete @todo.
1862 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
1863 (_dbus_marshal_set_uint64): Fix comment.
1865 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
1866 hardcode FIELD_REPLY_SERIAL.
1868 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
1869 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
1871 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
1872 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
1874 2003-06-24 Havoc Pennington <hp@pobox.com>
1876 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
1878 2003-06-23 Anders Carlsson <andersca@codefactory.se>
1884 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
1885 * gcj/org/.cvsignore:
1886 * gcj/org/Makefile.am:
1887 * gcj/org/freedesktop/.cvsignore:
1888 * gcj/org/freedesktop/Makefile.am:
1889 * gcj/org/freedesktop/dbus/.cvsignore:
1890 * gcj/org/freedesktop/dbus/Makefile.am:
1891 * gcj/org/freedesktop/dbus/Message.java: (Message),
1893 * gcj/org/freedesktop/dbus/natMessage.cc:
1894 Fix the build system.
1896 2003-06-22 Havoc Pennington <hp@pobox.com>
1898 * mono/Connection.cs: add more bindings
1900 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
1903 2003-06-22 Havoc Pennington <hp@pobox.com>
1905 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
1906 Start wrapping more stuff.
1908 2003-06-22 Havoc Pennington <hp@pobox.com>
1910 * mono/Message.cs: implement Message.Wrap() that ensures we only
1911 have a single C# wrapper per DBusMessage, assuming it works which
1912 it probably doesn't.
1914 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
1915 (dbus_message_free_data_slot): new
1916 (dbus_message_set_data): new
1917 (dbus_message_get_data): new
1919 2003-06-22 Havoc Pennington <hp@pobox.com>
1921 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
1922 (_dbus_data_slot_allocator_alloc): rework these to keep a
1923 reference count on each slot and automatically manage a global
1924 slot ID variable passed in by address
1926 * bus/bus.c: convert to new dataslot API
1928 * dbus/dbus-bus.c: convert to new dataslot API
1930 * dbus/dbus-connection.c: convert to new dataslot API
1932 * dbus/dbus-server.c: convert to new dataslot API
1934 * glib/dbus-gmain.c: ditto
1938 * bus/connection.c: ditto
1940 2003-06-22 Anders Carlsson <andersca@codefactory.se>
1942 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
1943 after the gcj checks so that the correct configuration tags
1944 will be added to libtool.
1946 * dbus-glib-1.pc.in: No need to specify any includes since
1947 dbus-1.pc.in has those.
1949 2003-06-22 Havoc Pennington <hp@pobox.com>
1951 * mono/*, gcj/*, configure.in, Makefile.am:
1952 Check in makefiles and subdirs for mono and gcj bindings.
1953 Neither binding actually exists, just trying to get through
1954 all the build and other boring bits.
1956 2003-06-21 Philip Blundell <philb@gnu.org>
1958 * tools/dbus-monitor.1: Updated.
1960 * tools/dbus-send.1: Likewise.
1962 2003-06-20 Anders Carlsson <andersca@codefactory.se>
1964 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
1965 for hangup and error after checking read so we won't discard
1966 pending data if both hangup and read are set.
1968 2003-06-19 Philip Blundell <philb@gnu.org>
1970 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
1972 * tools/dbus-send.c: Accept both --system and --session.
1974 * tools/dbus-monitor.c: Same here.
1976 2003-06-19 Anders Carlsson <andersca@codefactory.se>
1978 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
1979 from C++ (Patch by Miloslav Trmac).
1981 2003-06-15 Joe Shaw <joe@assbarn.com>
1983 * configure.in: Check for socklen_t.
1985 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
1987 * test/test-segfault.c: Add #include <sys/time.h>
1989 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
1990 dbus-launch needs it.
1992 2003-06-09 Havoc Pennington <hp@redhat.com>
1994 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
1995 SUN_LEN, it breaks abstract socket usage
1997 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2000 2003-06-04 Havoc Pennington <hp@pobox.com>
2002 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2003 using unix:abstract=/foo, and when listening in a tmpdir
2004 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2006 * dbus/dbus-transport.c (_dbus_transport_open): support
2009 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2010 support abstract sockets
2012 * dbus/dbus-transport-unix.c
2013 (_dbus_transport_new_for_domain_socket): support abstract sockets
2015 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2016 toggle as an argument, implement abstract namespace support
2017 (_dbus_listen_unix_socket): ditto
2019 * configure.in: add --enable-abstract-sockets and implement
2020 a configure check for autodetection of the right value.
2022 2003-06-01 Havoc Pennington <hp@pobox.com>
2024 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2025 in /tmp (though on Linux this will end up being useless,
2026 when we add abstract namespace support)
2028 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2031 2003-05-28 Colin Walters <walters@verbum.org>
2033 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2035 2003-05-18 Anders Carlsson <andersca@codefactory.se>
2037 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2039 2003-05-17 Colin Walters <walters@gnu.org>
2041 * tools/dbus-send.c: Don't exit with an error code if --help was
2042 passed. Default to using the session bus instead of the system
2045 * tools/dbus-launch.c: Ditto.
2047 * tools/dbus-monitor.c: Ditto.
2049 * tools/dbus-send.1: Update with new arguments.
2051 * tools/dbus-launch.c: Emit code to export variables. New
2052 arguments -s and -c to specify shell syntax, and a bit of code to
2053 autodetect syntax. Also, allow specifying a program to run.
2055 * tools/dbus-launch.1: Update with new arguments.
2057 * tools/dbus-send.1: Ditto.
2059 * tools/dbus-monitor.1: Ditto.
2061 2003-05-17 Havoc Pennington <hp@pobox.com>
2063 * bus/config-parser.c (merge_included): merge in policies from
2064 child configuration file.
2066 * bus/policy.c (bus_policy_merge): function to merge two policies
2069 2003-05-16 Havoc Pennington <hp@redhat.com>
2071 * dbus/dbus-connection.c: disable verbose lock spew
2073 * tools/dbus-send.c: add --print-reply command line option
2075 * tools/dbus-print-message.h (print_message): new util function
2076 shared by dbus-send and dbus-monitor
2078 * tools/dbus-monitor.c (handler_func): exit on disconnect
2080 * dbus/dbus-transport-unix.c (do_reading): if the transport is
2081 disconnected, don't try to use the read_watch
2083 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
2084 so we can find this bug more easily
2086 2003-05-16 Havoc Pennington <hp@redhat.com>
2088 * bus/policy.c (free_rule_list_func): avoid a crash when passed
2089 NULL as DBusHashTable is annoyingly likely to do.
2091 2003-05-16 Colin Walters <walters@verbum.org>
2093 * tools/dbus-monitor.c: Add --session argument and usage()
2096 * tools/dbus-monitor.1: Update with new --session arg.
2098 * bus/Makefile.am (install-data-hook): Create
2099 $(libdir)/dbus-1.0/services so that the session bus is happy.
2101 2003-05-15 Havoc Pennington <hp@redhat.com>
2103 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2104 on non-x86. ifdef's are evil.
2106 2003-05-15 Havoc Pennington <hp@redhat.com>
2108 * configure.in: 0.11
2112 * bus/Makefile.am (initddir): apparently we are supposed to put
2113 init scripts in /etc/rc.d/init.d not /etc/init.d
2115 * bus/Makefile.am: remove the "you must --enable-tests to make
2116 check" as it broke distcheck
2118 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2120 2003-05-13 James Willcox <jwillcox@gnome.org>
2123 * bus/activation.c: (bus_activation_service_created),
2124 (bus_activation_activate_service):
2125 * bus/driver.c: (bus_driver_send_service_deleted),
2126 (bus_driver_send_service_created), (bus_driver_send_service_lost),
2127 (bus_driver_send_service_acquired),
2128 (bus_driver_send_welcome_message),
2129 (bus_driver_handle_list_services):
2130 * bus/session.conf.in:
2131 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2132 (dbus_bus_service_exists), (dbus_bus_activate_service):
2135 Add some convenience API which lets you activate a service, and did a
2136 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2137 and dbus_message_get_args()
2139 2003-05-11 Havoc Pennington <hp@pobox.com>
2141 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2142 calling _dbus_marshal_validate_arg() for every byte in a byte
2145 * dbus/dbus-message-handler.c: use atomic reference counting to
2146 reduce number of locks slightly; the global lock in here sucks
2148 * dbus/dbus-connection.c
2149 (_dbus_connection_update_dispatch_status_and_unlock): variant of
2150 update_dispatch_status that can be called with lock held; then use
2151 in a couple places to reduce locking/unlocking
2152 (dbus_connection_send): hold the lock over the whole function
2153 instead of acquiring it twice.
2155 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2157 * bus/connection.c (bus_connections_setup_connection): fix access
2158 to already-freed memory.
2160 * dbus/dbus-connection.c: keep a little cache of linked list
2161 nodes, to avoid using the global linked list alloc lock in the
2162 normal send-message case. Instead we just use the connection lock
2163 that we already have to take.
2165 * dbus/dbus-list.c (_dbus_list_find_last): new function
2167 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2168 change to use a struct for the atomic type; fix docs,
2169 they return value before increment, not after increment.
2171 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2172 (_dbus_string_append_8_aligned): new functions to try to
2173 microoptimize this operation.
2174 (reallocate_for_length): break this out of set_length(), to
2175 improve profile info, and also so we can consider inlining the
2178 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2179 strings with some preallocation, cuts down on our calls to realloc
2180 a fair bit. Though if we can get the "move entire string to empty
2181 string" optimization below to kick in here, it would be better.
2183 * dbus/dbus-string.c (_dbus_string_move): just call
2184 _dbus_string_move_len
2185 (_dbus_string_move_len): add a special case for moving
2186 an entire string into an empty string; we can just
2187 swap the string data instead of doing any reallocs.
2188 (_dbus_string_init_preallocated): new function
2190 2003-05-11 Havoc Pennington <hp@pobox.com>
2192 Write a "test-profile" that does echo client-server with threads;
2193 profile reveals lock contention, memcpy/realloc of buffers, and
2194 UTF-8 validation as hot spots. 20% of lock contention eliminated
2195 with dbus_atomic_inc/dec implementation on x86. Much remaining
2196 contention is global mempool locks for GList and DBusList.
2198 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2201 * dbus/dbus-connection.c (struct DBusConnection): use
2202 dbus_atomic_t for the reference count
2204 * dbus/dbus-message.c (struct DBusMessage): declare
2205 dbus_atomic_t values as volatile
2207 * configure.in: code to detect ability to use atomic integer
2208 operations in assembly, from GLib patch
2210 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2211 time, tired of it being wrong in threads and forked processes
2213 * glib/test-profile.c: a little program to bounce messages back
2214 and forth between threads and eat CPU
2216 * dbus/dbus-connection.c: add debug spew macros for debugging
2217 thread locks; include config.h at top; fix deadlock in
2218 dbus_connection_flush()
2220 2003-05-08 Havoc Pennington <hp@pobox.com>
2222 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2223 data from getting written, and there wasn't a good reason to
2226 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2227 dbus_verbose lines in test coverage
2228 (main): add list of functions sorted by # of untested blocks
2229 to the coverage report
2231 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
2233 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
2235 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
2236 extend test coverage
2238 * test/data/auth/cancel.auth-script: test canceling an
2241 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
2242 aren't used. in CVS history if we end up needing them.
2244 2003-05-04 Havoc Pennington <hp@pobox.com>
2246 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
2249 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
2250 function, which assumed length was in # of strings, not bytes
2252 * dbus/dbus-message.c (_dbus_message_test): add tests for some
2255 * dbus/dbus-connection.c
2256 (_dbus_connection_queue_received_message): disable function for
2257 now, we are only using it in test mode
2259 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2260 remove a mistaken FIXME
2262 2003-05-04 Havoc Pennington <hp@pobox.com>
2264 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
2265 unlock mutex on successful return, patch from Anders Gustafsson
2267 2003-05-04 Havoc Pennington <hp@pobox.com>
2269 * dbus-glib-1.pc.in (Requires): fix dependencies, from
2272 2003-05-04 Havoc Pennington <hp@pobox.com>
2274 * tools/dbus-launch.c: implement
2276 * bus/main.c (main), bus/bus.c (bus_context_new):
2277 implement --print-pid and --fork
2279 2003-05-03 Havoc Pennington <hp@redhat.com>
2281 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
2282 the address had no value, and add to test suite. Fix and
2283 regression test from Miloslav Trmac
2285 2003-05-03 Havoc Pennington <hp@pobox.com>
2287 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
2288 watch is invalid when handled
2290 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
2291 dbus-launch utility to launch the bus from a shell script. Didn't
2292 actually implement dbus-launch yet, it's just a placeholder still.
2294 2003-05-03 Havoc Pennington <hp@pobox.com>
2296 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
2297 daemon; also documents daemon config file, so replaces
2298 doc/config-file.txt. Corrected some stuff from config-file.txt in
2299 the process of moving it.
2301 2003-05-03 Havoc Pennington <hp@pobox.com>
2303 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
2306 2003-05-03 Colin Walters <walters@verbum.org>
2308 * dbus/dbus-sysdeps.c (fill_user_info): Test against
2309 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
2311 * Makefile.am: Update to use new .pc versioning scheme.
2313 2003-05-02 Havoc Pennington <hp@redhat.com>
2315 * bus/system.conf.in: allow send/receive to/from message bus
2318 2003-04-30 Havoc Pennington <hp@redhat.com>
2320 * configure.in: print a note when building with unit tests and
2323 2003-04-30 Havoc Pennington <hp@redhat.com>
2325 * Makefile.am: add a check-local that complains if you didn't
2326 configure with --enable-tests
2328 2003-04-29 Havoc Pennington <hp@redhat.com>
2330 * glib/dbus-gmain.c: docs cleanups
2332 * dbus/dbus-types.h: add docs on int64 types
2334 * dbus/dbus-memory.c: fix docs to avoid putting private API in
2335 public API docs section
2337 2003-04-29 Havoc Pennington <hp@redhat.com>
2339 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
2340 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
2341 parallel install API version, not with the D-BUS package version.
2343 * HACKING: move some of README over here
2345 * README: updates, and document API/ABI policy
2347 * configure.in: reindentation
2349 2003-04-29 Havoc Pennington <hp@redhat.com>
2351 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
2352 to use this library" to be sure people have the right
2355 2003-04-28 Havoc Pennington <hp@redhat.com>
2357 * configure.in: add --enable-docs which by default is auto yes if
2358 doxygen and db2html found, no otherwise; but can be forced on/off
2360 * doc/Makefile.am: conditionalize whether to build docs on
2363 2003-04-28 Havoc Pennington <hp@redhat.com>
2365 * configure.in: 0.10
2369 * bus/system.conf.in: add <includedir>system.d</includedir>
2371 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
2372 username was provided but not uid
2374 * bus/config-parser.c (struct BusConfigParser): keep track of
2375 whether the parser is toplevel or was included; change some
2376 of the error handling if it's included.
2378 2003-04-27 Havoc Pennington <hp@pobox.com>
2382 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2383 report correct status if we finish processing authentication
2384 inside this function.
2386 * bus/activation.c (try_send_activation_failure): use
2387 bus_transaction_send_error_reply
2389 * bus/connection.c (bus_connection_get_groups): return an error
2390 explaining the problem
2392 * bus/bus.c (bus_context_check_security_policy): implement
2393 restriction here that inactive connections can only send the
2394 hello message. Also, allow bus driver to send anything to
2397 * bus/connection.c (bus_connection_complete): create the
2398 BusClientPolicy here instead of on-demand.
2399 (bus_connection_get_policy): don't return an error
2401 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
2402 sender field in message being replied to
2404 * bus/bus.c (bus_context_check_security_policy): fix silly typo
2405 causing it to return FALSE always
2407 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
2408 we checked sender rather than destination
2410 2003-04-25 Havoc Pennington <hp@redhat.com>
2412 test suite is slightly hosed at the moment, will fix soon
2414 * bus/connection.c (bus_connections_expire_incomplete): fix to
2415 properly disable the timeout when required
2416 (bus_connection_set_name): check whether we can remove incomplete
2417 connections timeout after we complete each connection.
2419 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
2420 probably still broken.
2422 * bus/services.c (bus_registry_acquire_service): implement max
2423 number of services owned, and honor allow/deny rules on which
2424 services a connection can own.
2426 * bus/connection.c (bus_connection_get_policy): report errors here
2428 * bus/activation.c: implement limit on number of pending
2431 2003-04-25 Havoc Pennington <hp@redhat.com>
2433 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
2434 where we used >= 0 instead of != DBUS_UID_UNSET.
2436 2003-04-25 Havoc Pennington <hp@redhat.com>
2438 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
2439 were toggled without add/remove, fix from Anders Gustafsson
2441 2003-04-24 Havoc Pennington <hp@redhat.com>
2443 * test/data/valid-config-files/basic.conf: add <limit> tags to
2446 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
2447 <limit> tag in configuration file.
2449 2003-04-24 Havoc Pennington <hp@redhat.com>
2451 * bus/dispatch.c: somehow missed some name_is
2453 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
2454 (_dbus_timeout_set_interval): new
2456 * bus/connection.c (bus_connections_setup_connection): record time
2457 when each connection is first set up, and expire them after the
2458 auth timeout passes.
2460 2003-04-24 Havoc Pennington <hp@redhat.com>
2462 * dbus/dbus-message.c (dbus_message_name_is): rename
2463 (dbus_message_service_is): rename
2464 (dbus_message_sender_is): rename
2465 (dbus_message_get_service): rename
2467 2003-04-24 Havoc Pennington <hp@redhat.com>
2469 * configure.in: add --enable-checks
2471 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2473 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2474 to use thread locks.
2475 (_dbus_connection_handler_destroyed_locked): move some private
2476 functions into proper docs group
2478 * dbus/dbus-internals.h: add _dbus_return_if_fail,
2479 _dbus_return_val_if_fail
2481 Throughout: use dbus_return_if_fail
2483 2003-04-23 James Willcox <jwillcox@gnome.org>
2486 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2487 (dbus_connection_setup_with_g_main),
2488 (dbus_server_setup_with_g_main):
2489 * glib/test-dbus-glib.c: (main):
2490 * glib/test-thread-client.c: (main):
2491 * glib/test-thread-server.c: (new_connection_callback), (main):
2492 * tools/dbus-monitor.c: (main):
2494 Added a GMainContext argument to dbus_connection_setup_with_g_main()
2495 and dbus_server_setup_with_g_main().
2497 2003-04-20 Havoc Pennington <hp@pobox.com>
2499 * doc/dbus-specification.sgml: document the restrictions on
2500 message and service names
2502 2003-04-22 Havoc Pennington <hp@redhat.com>
2504 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2505 support, and do some code cleanups to share more code and
2506 speed up array marshal/demarshal.
2508 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2510 * configure.in: generate dbus-arch-deps.h
2512 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2515 2003-04-22 Havoc Pennington <hp@redhat.com>
2517 * test/data/valid-messages/opposite-endian.message: fix test
2518 to use proper type for rply field
2520 * test/data/invalid-messages: add tests for below validation
2522 * dbus/dbus-message.c (decode_header_data): validate field types,
2523 and validate that named fields are valid names
2524 (decode_name_field): consider messages in the
2525 org.freedesktop.Local. namespace to be invalid.
2527 * dbus/dbus-string.c (_dbus_string_validate_name): new
2529 2003-04-19 Havoc Pennington <hp@pobox.com>
2531 * bus/driver.c (bus_driver_handle_hello): check limits and
2532 return an error if they are exceeded.
2534 * bus/connection.c: maintain separate lists of active and inactive
2535 connections, and a count of each. Maintain count of completed
2536 connections per user. Implement code to check connection limits.
2538 * dbus/dbus-list.c (_dbus_list_unlink): export
2540 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2541 number of bytes in the message queue for a connection
2543 2003-04-18 Havoc Pennington <hp@pobox.com>
2545 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2547 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2550 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2551 on realloc be sure to update the pointer in the keyring
2553 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2554 offset to avoid writing to unallocated memory
2556 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2557 try the next mechanism, so we properly handle OOM
2559 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2561 (_dbus_keyring_new): fix OOM bug
2562 (_dbus_keyring_new_homedir): always set error; impose a maximum
2563 number of keys we'll load from the file, mostly to speed up the
2564 test suite and make its OOM checks more useful, but also for
2567 * dbus/dbus-auth.c (process_error_server): reject authentication
2568 if we get an error from the client
2569 (process_cancel): on cancel, send REJECTED, per the spec
2570 (process_error_client): send CANCEL if we get an error from the
2573 2003-04-18 Havoc Pennington <hp@pobox.com>
2575 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2578 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2581 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2582 about DBUS_TEST_HOMEDIR once
2584 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2587 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2588 config file so we test the right thing
2590 Throughout: assorted docs improvements
2592 2003-04-18 Havoc Pennington <hp@pobox.com>
2594 * glib/dbus-gmain.c: adapt to watch changes
2596 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2598 * dbus/dbus-server.h: remove dbus_server_handle_watch
2600 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2602 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2603 like DBusTimeout, so we don't need dbus_connection_handle_watch
2606 2003-04-17 Havoc Pennington <hp@redhat.com>
2608 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2609 database usage so it all goes via the DBusUserDatabase cache.
2611 2003-04-17 Havoc Pennington <hp@redhat.com>
2613 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2614 there was an OOM watch we skipped, we always return TRUE so we
2615 iterate again to have a look at it again. Fixes test suite hang.
2616 Code rearrangement also lets us lose some memset and only iterate
2617 over callbacks once.
2619 * bus/driver.c (bus_driver_handle_message): sense of test for
2622 2003-04-16 Havoc Pennington <hp@pobox.com>
2624 * doc/dbus-specification.sgml: make spec say serials are unsigned
2626 * dbus/dbus-message.h: change message serials to unsigned
2628 * dbus/dbus-connection.c: adapt to message serials being unsigned
2630 2003-04-15 Havoc Pennington <hp@pobox.com>
2632 * bus/bus.c: create and keep around a shared DBusUserDatabase
2635 * bus/connection.c (bus_connection_get_groups): don't cache
2636 groups for user in the connection object, since user database
2637 object now does that.
2639 2003-04-16 Havoc Pennington <hp@redhat.com>
2641 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2642 list of size counters
2643 (_dbus_message_loader_putback_message_link): put back a popped link
2645 * dbus/dbus-connection.c
2646 (dbus_connection_set_max_live_messages_size): rename
2648 (dbus_connection_get_outgoing_size): get size of outgoing
2650 (_dbus_connection_set_connection_counter): remove this cruft
2652 2003-04-14 Havoc Pennington <hp@redhat.com>
2654 * dbus/dbus-userdb.c: user database abstraction, mostly to get
2655 caching, but at some point we might want to be able to use a
2658 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2659 SHA1 conf file to test the sha1 auth mechanism, since the regular
2660 test always uses EXTERNAL when available.
2663 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2664 add conf file that requires use of sha1 auth
2666 2003-04-13 Havoc Pennington <hp@pobox.com>
2668 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2669 from Philip Blundell to send messages and monitor them.
2671 2003-04-13 Havoc Pennington <hp@pobox.com>
2673 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2676 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2679 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2680 fix to only recover unused bytes if we're already authenticated
2681 (_dbus_transport_get_is_authenticated): fix to still mark us
2682 authenticated if there are unused bytes.
2684 * bus/dispatch.c: implement security policy checking
2686 * bus/connection.c (bus_transaction_send_from_driver): new
2688 * bus/bus.c (bus_context_check_security_policy): new
2690 * bus/dispatch.c (send_service_nonexistent_error): delete this,
2691 now we just set the DBusError and it gets converted to an error
2694 * bus/connection.c (allow_user_function): enable code using actual
2695 data from the config file
2697 * bus/policy.c (list_allows_user): handle wildcard rules for
2698 user/group connection perms
2700 2003-04-13 Havoc Pennington <hp@pobox.com>
2702 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2704 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2706 * bus/policy.c (bus_policy_append_mandatory_rule)
2707 (bus_policy_append_default_rule, bus_policy_append_user_rule)
2708 (bus_policy_append_group_rule): new functions
2710 2003-04-12 Havoc Pennington <hp@pobox.com>
2712 * bus/config-parser.c (bus_config_parser_new): fix a memleak
2714 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2715 the pid/gid/uid, just for paranoia.
2717 * test/break-loader.c (randomly_do_n_things): find a byte
2718 containing a type code, and randomly change it to a different
2721 2003-04-12 Havoc Pennington <hp@pobox.com>
2723 * bus/policy.h: change BusPolicy to be the thing from the config
2724 file, and rename old BusPolicy to BusClientPolicy
2726 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2727 match change in how policy works
2729 * dbus/dbus-internals.h: mark assert_not_reached as
2730 __attribute((noreturn))__
2732 2003-04-11 Havoc Pennington <hp@redhat.com>
2734 * doc/dbus-specification.sgml: fix a spot with the wrong name for
2735 the broadcast service. Use boolean return for ServiceExists.
2737 2003-04-11 Havoc Pennington <hp@redhat.com>
2739 * configure.in: add another directory to look for qt in.
2741 2003-04-11 Havoc Pennington <hp@redhat.com>
2743 * AUTHORS: add Colin Walters
2745 2003-04-11 Havoc Pennington <hp@redhat.com>
2751 2003-04-11 Havoc Pennington <hp@redhat.com>
2753 * bus/messagebus.in: remove pid file when stopping the
2754 message bus, since the bus won't have privileges to remove it
2757 2003-04-11 Havoc Pennington <hp@redhat.com>
2759 * bus/bus.c (bus_context_new): move credentials change after
2762 2003-04-11 Havoc Pennington <hp@pobox.com>
2764 * test/decode-gcov.c: add "below average functions" to the
2765 coverage report, and change how some of the code works.
2767 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
2768 not in the coverage stats.
2770 * test/test-service.c (main): use _dbus_verbose not fprintf in a
2771 couple places so running the test suite doesn't result in megaspam.
2773 2003-04-11 Havoc Pennington <hp@pobox.com>
2775 * bus/dispatch.c (check_existent_service_activation): accept a no
2776 memory error in a place we didn't before
2778 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
2779 in case the first one failed," since the test suite is less
2782 2003-04-10 Havoc Pennington <hp@pobox.com>
2784 * bus/dispatch.c (check_segfault_service_activation): add test
2785 for launching an executable that just crashes.
2787 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
2788 don't leave a million cores. We'll see how portable this is.
2790 2003-04-10 Havoc Pennington <hp@pobox.com>
2792 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
2793 the possible parent failures before we fork, so that we don't
2794 fail to create a babysitter after creating the child.
2796 * bus/activation.c (bus_activation_activate_service): kill child
2797 if we don't successfully complete the activation.
2799 2003-04-10 Havoc Pennington <hp@redhat.com>
2801 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
2802 the connection if it's disconnected
2804 * bus/activation.c (bus_activation_service_created): use new
2805 transaction features to roll back removal of pending activation if
2806 we don't successfully create the service after all. Don't remove
2807 pending activation if the function fails.
2809 * dbus/dbus-list.c (_dbus_list_insert_before_link)
2810 (_dbus_list_insert_after_link): new code to facilitate
2813 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
2814 new functionality, so we can preallocate the ability to insert
2817 * bus/connection.c (bus_transaction_add_cancel_hook): new function
2818 allowing us to put custom hooks in a transaction to be used for
2819 cancelling said transaction
2821 * doc/dbus-specification.sgml: add some discussion of secondary
2822 service owners, and disallow zero-length service names
2824 * bus/services.c (bus_registry_acquire_service): new function,
2825 splits out part of bus_driver_handle_acquire_service() and fixes
2826 a bug where we didn't remove the service doing the acquiring
2827 from the secondary queue if we failed to remove the current owner
2828 from the front of the queue.
2830 2003-04-10 Alexander Larsson <alexl@redhat.com>
2832 * doc/dbus-specification.sgml:
2833 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
2835 2003-04-10 Alexander Larsson <alexl@redhat.com>
2840 Added files to cvsignore
2842 * dbus/dbus-message.h:
2843 * dbus/dbus-message.c: (dbus_message_iter_get_named):
2844 Make get_named() take two out argument and return a boolean.
2845 (dbus_message_iter_get_args_valist):
2846 Update usage of get_named().
2847 (dbus_message_iter_append_byte):
2849 (dbus_message_iter_append_named)
2851 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
2854 2003-04-10 Alexander Larsson <alexl@redhat.com>
2856 * dbus/dbus-marshal.[ch]:
2857 Add array_type_pos argument to _dbus_marshal_validate_arg.
2858 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
2860 * dbus/dbus-message.[ch]:
2861 Multi-dimensional arrays have full type specification in the
2862 outermost array. Iter code re-arranged to handle this.
2863 Added some more iter tests.
2865 * doc/dbus-specification.sgml:
2868 Update new array encoding description.
2869 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
2871 * test/data/invalid-messages/array-with-mixed-types.message:
2872 * test/data/valid-messages/array-of-array-of-uint32.message:
2873 Change to the new array format.
2875 * test/data/invalid-messages/too-short-dict.message:
2878 * test/data/valid-messages/recursive-types.message:
2879 Fix up and extend test.
2881 2003-04-10 Havoc Pennington <hp@pobox.com>
2883 * bus/dispatch.c: lots of fixes
2885 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
2886 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
2887 that was crack, broke the test service.
2889 * dbus/dbus-transport.c (_dbus_transport_open): fix error
2890 handling to avoid piling up errors if we get a failure on the
2893 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
2894 pid in assertion failures.
2896 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
2897 to some fixed size of file descriptor array. Don't return TRUE
2898 anytime a timeout exists, that led to lots of busy loop silliness
2901 2003-04-09 Havoc Pennington <hp@redhat.com>
2903 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
2904 I'd checked this in earlier but hadn't.
2906 2003-04-09 Havoc Pennington <hp@redhat.com>
2908 * bus/dispatch.c (bus_dispatch_test): get a bit further through
2909 the activation test (man this is getting old!)
2911 2003-04-09 Havoc Pennington <hp@redhat.com>
2913 * test/test-utils.c: use dispatch status function to fix this up
2915 * bus/connection.c (connection_watch_callback): don't dispatch
2917 (connection_timeout_callback): don't dispatch from here
2918 (bus_connections_setup_connection): set the dispatch status function
2919 (bus_connection_disconnected): unset it
2921 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
2922 used to add a connection to be dispatched
2923 (_dbus_loop_iterate): do the dispatching at the end of each
2926 * dbus/dbus-connection.c
2927 (dbus_connection_set_dispatch_status_function): new function
2928 allowing us to fix up main loop usage
2929 (_dbus_connection_last_unref): free all the various function
2931 (dbus_connection_dispatch): call the DispatchStatusFunction
2932 whenever this function returns
2933 (dbus_connection_handle_watch): call DispatchStatusFunction
2934 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
2935 (reply_handler_timeout): call DispatchStatusFunction
2936 (dbus_connection_flush): call DispatchStatusFunction
2938 2003-04-09 Havoc Pennington <hp@redhat.com>
2940 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
2943 * bus/dispatch.c (check_service_activated): fix bug in test
2945 * dbus/dbus-mainloop.c (check_timeout): fix this up
2947 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
2948 verbose output so we can sort out output from different processes,
2949 e.g. in the activation case.
2951 2003-04-08 Colin Walters <walters@gnu.org>
2953 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
2955 (bus_context_new): Set it.
2956 (bus_context_unref): Use it to delete the pid file.
2958 2003-04-08 Havoc Pennington <hp@redhat.com>
2960 * test/data/invalid-messages/array-with-mixed-types.message:
2961 regression test that fails for the moment
2963 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
2964 tests for convenience
2966 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
2967 array of nil, it broke things.
2969 * test/data/invalid-messages/array-of-nil.message: regression test
2971 * test/data/valid-messages/array-of-array-of-uint32.message:
2972 happened to write this so added it to suite
2974 2003-04-08 Havoc Pennington <hp@redhat.com>
2976 * bus/driver.c (bus_driver_handle_acquire_service): init
2977 retval/reply before checking name
2979 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
2980 recursion depth argument
2982 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
2983 in the public struct for future extension
2985 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
2988 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
2991 * doc/dbus-specification.sgml: fix typo
2993 2003-04-08 Alexander Larsson <alexl@redhat.com>
2995 Implemented recursive types, named types and new-style iters
2998 * glib/test-thread-client.c: (thread_func):
2999 * glib/test-thread-server.c: (handle_test_message):
3000 * test/test-service.c: (handle_echo):
3009 * dbus/dbus-internals.c: (_dbus_type_to_string):
3010 Update for new types.
3012 * dbus/dbus-marshal.[ch]:
3013 Implement recursive types and the new marshalling format.
3014 Remove hardcoded dict marshalling.
3015 Marshal named types.
3017 * dbus/dbus-message-builder.c:
3019 Remove references to old types
3021 * dbus/dbus-message.[ch]:
3022 New non-refcounted iter API that supports recursive iters.
3023 Use iters for appending, including support for recursive
3025 Add byte and named type support.
3026 Update everything to new marshalling formats.
3027 Add tests for new API.
3029 * dbus/dbus-protocol.h:
3030 Remove old array types.
3031 Add types: BYTE, ARRAY, DICT, NAMED
3033 * dbus/dbus-string.c:
3034 * dbus/dbus-sysdeps.c:
3035 Make parse_double locale safe.
3037 * dbus/dbus-test-main.c:
3043 * doc/dbus-specification.sgml:
3046 * test/data/incomplete-messages/missing-body.message:
3047 * test/data/invalid-messages/bad-boolean.message:
3048 * test/data/invalid-messages/bad-boolean-array.message:
3049 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3050 * test/data/invalid-messages/boolean-has-no-value.message-raw:
3051 * test/data/invalid-messages/too-short-dict.message:
3052 * test/data/valid-messages/dict-simple.message:
3053 * test/data/valid-messages/dict.message:
3054 * test/data/valid-messages/emptiness.message:
3055 * test/data/valid-messages/lots-of-arguments.message:
3056 * test/data/valid-messages/no-padding.message:
3057 * test/data/valid-messages/recursive-types.message:
3058 Add missing NAME fields
3059 Fix up dicts & arrays
3061 * test/data/invalid-messages/dict-with-nil-value.message:
3062 Removed, this is not invalid anymore.
3064 * test/data/valid-messages/recursive-types.message:
3065 Add new test for deeply recursive types.
3067 2003-04-07 Havoc Pennington <hp@pobox.com>
3069 * bus/driver.c (bus_driver_handle_acquire_service): return an
3070 error if you try to acquire a service that starts with ':'
3072 2003-04-07 Havoc Pennington <hp@redhat.com>
3074 * doc/dbus-specification.sgml: require that base service names
3075 start with ':' and that the base service is created/deleted
3076 as first and last things a connection does on the bus
3078 * bus/dispatch.c (check_existent_service_activation): lots more
3079 work on the activation test; it doesn't fully pass yet...
3081 * test/test-service.c (main): fix so we don't memleak the
3082 connection to the message bus
3083 (filter_func): accept a message asking us to exit
3085 2003-04-06 Havoc Pennington <hp@pobox.com>
3087 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3090 * configure.in: fixes to Qt detection from Colin Walters
3092 * doc/Makefile.am: Only remove generated docbook dirs if they
3093 exist, from Colin Walters
3095 * dbus/dbus-bus.c: change how we set well-known connections to
3096 NULL, so that it works if a single connection is stored in
3097 two well-known array slots.
3099 * test/Makefile.am: remove a lot of stuff that isn't immediately
3100 useful, it's in CVS history if we want it.
3102 * test/test-service.c: use dbus-mainloop instead of that
3105 2003-04-06 Havoc Pennington <hp@pobox.com>
3107 * dbus/Makefile.am: split lists of sources into stuff that goes in
3108 the library, util functions that go in the lib and are also used
3109 elsewhere, and util functions that are used in tests/daemon but
3110 don't go in the lib.
3112 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3113 here so it can be used in test binaries also
3115 2003-04-06 Havoc Pennington <hp@pobox.com>
3117 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3118 here in the parent process, so we can return an error if it
3119 fails. Also, move some of the code into the child so the parent
3120 is less hosed if we fail midway through.
3122 * bus/bus.c (bus_context_new): move pidfile detection further up
3123 in the function, before we start overwriting sockets and such.
3125 * bus/messagebus.in: adjust this a bit, not sure if it will work.
3127 * configure.in: add --with-system-pid-file and --with-system-socket
3129 2003-04-06 Colin Walters <walters@verbum.org>
3131 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3133 * bus/system.conf.in: Declare a pidfile.
3135 * bus/bus.c (bus_context_new): Test for an existing pid file, and
3136 create one (if appropriate).
3138 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3139 (struct BusConfigParser) [pidfile]: New.
3140 (element_type_to_name, merge_included, start_busconfig_child)
3141 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3142 (bus_config_parser_unref): Free it.
3143 (bus_config_parser_get_pidfile): New function.
3145 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3147 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3149 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3151 * dbus/dbus-sysdeps.h: Prototype it.
3153 2003-04-06 Havoc Pennington <hp@pobox.com>
3155 * bus/bus.c (bus_context_new): print the address in here, rather
3156 than in main(), because we need to do it before forking the daemon
3158 * bus/dispatch.c (send_service_nonexistent_error): set the sender
3159 on the service nonexistent error
3161 * bus/driver.c (bus_driver_handle_acquire_service): set the
3162 sender on the AcquireService reply
3164 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3165 server also listen on a UNIX socket so services can connect to it.
3167 2003-04-06 Havoc Pennington <hp@pobox.com>
3169 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3170 so it detects deadlocks and also we actually init threads when
3173 2003-04-06 Havoc Pennington <hp@pobox.com>
3175 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3176 save the domain socket name, and unlink it when we disconnect the
3177 server. Means that at least when we exit normally, we won't leave
3178 a bunch of junk in /tmp
3180 * dbus/dbus-transport-unix.c
3181 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3182 memory management). (I was making a real change here but then
3185 2003-04-06 Havoc Pennington <hp@pobox.com>
3187 * bus/bus.c (bus_context_new): fix wrong handling of
3188 server_data_slot_unref() in the error case.
3190 * dbus/dbus-internals.h (_dbus_assert): change so it passes
3191 "(condition) != 0" to _dbus_real_assert so that
3192 "_dbus_assert (pointer)" doesn't cause a warning
3194 * bus/main.c (main): accept --print-address option to print out
3195 the message bus address
3197 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3199 * dbus/dbus-transport.c (_dbus_transport_open): special error for
3200 "tmpdir" option to unix: address on client side
3202 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3205 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3206 we can use to create sockets in the test suite.
3208 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3209 cleanly. To be used for testing.
3211 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3213 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3215 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3216 handle trying to call this when there's no servers active
3218 2003-04-05 Havoc Pennington <hp@pobox.com>
3224 2003-04-05 Havoc Pennington <hp@pobox.com>
3226 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3227 crash on startup. Need to get "try starting the daemon"
3228 in the test suite I guess. ;-)
3230 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
3231 tracked the number of open connections; it's better done in
3232 application-specific code as you want it to span all servers etc.
3234 2003-04-05 Havoc Pennington <hp@pobox.com>
3236 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
3237 patch from Colin Walters
3239 2003-04-05 Havoc Pennington <hp@pobox.com>
3241 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
3242 reality; in fact multiple mechanisms are allowed.
3244 * dbus/dbus-internals.c (_dbus_real_assert)
3245 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
3246 _dbus_assert_not_reached() into functions, so that they don't show
3247 up in basic block counts for test coverage, and don't use up as
3248 much disk space. Does mean slower execution speed though, so
3249 assumes --disable-asserts is the normal production case.
3251 2003-04-05 Havoc Pennington <hp@pobox.com>
3253 * test/Makefile.am (dist-hook): also dist *.in files
3259 2003-04-05 Havoc Pennington <hp@pobox.com>
3261 * dbus/dbus-string.c: docs warning
3263 * dbus/dbus-spawn.c: missing docs
3265 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
3267 2003-04-05 Havoc Pennington <hp@pobox.com>
3269 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
3272 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
3273 to -1 once we've reaped the babysitter
3274 (_dbus_babysitter_handle_watch): do as much work as we can, not
3277 * bus/activation.c: add code using DBusBabysitter so that we
3278 handle it when a service fails to start up properly.
3279 (bus_activation_service_created): don't remove the activation
3280 entries as we go, just let them get removed when we free the pending
3281 activation. Unref reply messages after sending them.
3283 2003-04-05 Havoc Pennington <hp@pobox.com>
3285 * test/decode-gcov.c (main): print per-directory stats in the report
3287 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
3289 2003-04-05 Havoc Pennington <hp@pobox.com>
3291 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
3293 * test/decode-gcov.c: hack up a little program to suck data
3294 out of gcov files. Yes this is sort of silly.
3296 * configure.in: define something in config.h and do an
3297 AM_CONDITIONAL when gcov is enabled
3299 2003-04-04 Havoc Pennington <hp@redhat.com>
3301 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
3302 return a "babysitter" object that is used to monitor the status of
3303 the spawned process and reap it when required.
3305 * test/test-segfault.c, test/test-exit.c,
3306 test/test-sleep-forever.c: binaries that do various lame things,
3307 used in the test suite.
3309 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
3311 2003-04-03 Havoc Pennington <hp@pobox.com>
3313 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
3314 in preparation for modifying it, dbus-sysdeps is getting
3317 2003-04-03 Havoc Pennington <hp@redhat.com>
3319 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
3322 * bus/*.[hc]: adapt to mainloop change
3324 2003-04-03 Havoc Pennington <hp@redhat.com>
3326 * bus/activation.c (load_directory): fix up memleaks
3327 (bus_activation_entry_free): free the entry
3329 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
3330 we get one from the message bus; fix memleaks.
3332 * dbus/dbus-message.c (dbus_set_error_from_message): new function
3334 2003-04-03 Havoc Pennington <hp@pobox.com>
3336 * bus/config-parser.c (bus_config_parser_unref): free
3337 list of mechanisms, bug discovered by test suite enhancements
3338 (putting system.conf and session.conf into suite)
3340 * test/Makefile.am, test/test-service.c: add placeholder for a
3341 test service that we'll activate as part of test suite. Doesn't
3344 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
3345 setting NULL value, and use system malloc not dbus_malloc()
3346 when we have unavoidable memleakage.
3348 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
3349 didn't work, and support DBUS_BUS_ACTIVATION.
3351 * bus/activation.c (child_setup): pass our well-known bus type to
3354 * bus/config-parser.c: support <type> to specify well-known type
3356 * doc/dbus-specification.sgml: document the env variables to
3357 locate well-known buses and find service activator
3359 2003-04-02 Havoc Pennington <hp@redhat.com>
3361 * test/Makefile.am (all-local): add a rule to copy tests to
3362 builddir, so we can have generated tests. Use this to remove the
3363 silly hack for testing system.conf and session.conf. Will use this
3364 shortly to generate .service files pointing to test binaries.
3366 2003-04-02 Havoc Pennington <hp@redhat.com>
3368 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
3369 current alloc and needed new length, not max of the doubled
3370 allocation and needed new length. Also, when building tests,
3371 don't do the double-allocation stuff, just realloc every time.
3373 2003-04-02 Havoc Pennington <hp@redhat.com>
3375 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
3377 (_dbus_string_get_dirname): new
3378 (_dbus_sysdeps_test): new
3379 (_dbus_directory_open): include dirnames in error messages
3381 * bus/config-parser.c: interpret <include> and <includedir> and
3382 <servicedir> relative to config file location if the given
3383 filename is not absolute.
3385 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
3387 2003-04-02 Havoc Pennington <hp@redhat.com>
3389 * bus/connection.c (bus_transaction_send_error_reply): set sender
3390 service for the error, and unref the reply on success
3392 * bus/activation.c: convert to use BusTransaction so OOM can be
3394 (bus_activation_service_created): set sender of the message
3396 2003-04-01 Havoc Pennington <hp@redhat.com>
3398 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
3399 <includedir> (at least mostly)
3401 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
3402 first, then the user ID
3404 2003-04-01 Havoc Pennington <hp@pobox.com>
3406 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
3409 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
3411 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
3413 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
3414 socket 0777, and unlink any existing socket.
3416 * bus/bus.c (bus_context_new): change our UID/GID and fork if
3417 the configuration file so specifies; set up auth mechanism
3420 * bus/config-parser.c (bus_config_parser_content): add support
3421 for <fork> option and fill in code for <auth>
3423 * bus/system.conf.in: add <fork/> to default configuration,
3424 and limit auth mechanisms to EXTERNAL
3426 * doc/config-file.txt (Elements): add <fork>
3428 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
3429 (_dbus_change_identity): new function
3431 2003-03-31 Havoc Pennington <hp@redhat.com>
3433 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
3434 (_dbus_listen_unix_socket): fix off-by-one error in null
3435 termination spotted by Nalin
3437 2003-03-31 Havoc Pennington <hp@redhat.com>
3439 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
3440 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
3441 having a real home directory available.
3443 2003-03-31 Havoc Pennington <hp@redhat.com>
3445 * bus/Makefile.am (install-data-hook): create /var/run/dbus
3447 * bus/messagebus.in: add init script for Red Hat /etc/init.d
3449 * configure.in: add support for specifying a style of init script
3452 2003-03-31 Havoc Pennington <hp@redhat.com>
3454 Fix some annoying DBusString API and fix all affected code.
3456 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
3458 (_dbus_string_get_data): change to return string instead of using
3460 (_dbus_string_get_const_data): ditto
3461 (_dbus_string_get_data_len): ditto
3462 (_dbus_string_get_const_data_len): ditto
3464 2003-03-31 Havoc Pennington <hp@redhat.com>
3466 * bus/main.c (main): fix up the command line arguments to be nicer
3468 2003-03-31 Havoc Pennington <hp@redhat.com>
3470 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3471 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3472 final location that lands in the config file
3474 * bus/config-loader-expat.c (bus_config_load): fix type of
3477 * doc/TODO: remove TODO item for dbus_bus_get()
3479 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3481 2003-03-31 Havoc Pennington <hp@pobox.com>
3483 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3484 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3485 argument since they are always client side
3487 * dbus/dbus-server.c (dbus_server_get_address): new function
3489 * bus/main.c (main): take the configuration file as an argument.
3491 * test/data/valid-config-files/debug-allow-all.conf: new file to
3492 use with dispatch.c tests for example
3494 * bus/test-main.c (main): require test data dir
3496 * bus/bus.c (bus_context_new): change this to take a
3497 configuration file name as argument
3499 * doc/config-file.txt (Elements): add <servicedir>
3501 * bus/system.conf, bus/session.conf: new files
3503 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3504 well-known socket if none set
3506 * configure.in: create system.conf and session.conf
3508 2003-03-30 Havoc Pennington <hp@pobox.com>
3510 * bus/config-parser.c: hacking
3512 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3513 to shut down, since it could cause weirdness with the DBusList
3516 * dbus/dbus-list.c (_dbus_list_test): add tests for the
3517 link-oriented stack routines
3518 (alloc_link): free the mempool if the first alloc from it fails
3520 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3522 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3524 (_dbus_string_skip_white): new
3526 * doc/config-file.txt (Elements): add <includedir>
3528 2003-03-28 Havoc Pennington <hp@pobox.com>
3530 * dbus/dbus-string.c (_dbus_string_copy_data_len)
3531 (_dbus_string_copy_data): new functions
3533 2003-03-28 Anders Carlsson <andersca@codefactory.se>
3535 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3539 * dbus/dbus-memory.c:
3542 2003-03-28 Havoc Pennington <hp@pobox.com>
3544 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3545 I think it may have just been superstition. Not sure.
3547 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3548 failures that were not being handled.
3550 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3552 * dbus/dbus-memory.c: add ability to set number of mallocs in a
3553 row that will fail on out-of-memory.
3555 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3556 function for testing out-of-memory handling.
3558 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3559 allocation functions, they do map exactly to the expat ones.
3561 2003-03-27 Havoc Pennington <hp@redhat.com>
3563 * bus/config-loader-libxml.c (bus_config_load): add another error
3566 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3569 Add note about automatic service activation.
3571 * doc/dbus-specification.sgml:
3572 Rename the specification and clarify a few things.
3574 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3577 * dbus/dbus-address.c:
3579 * dbus/dbus-marshal.c:
3580 * dbus/dbus-server-debug-pipe.c:
3581 * dbus/dbus-transport-unix.c:
3582 Fix documentation warnings.
3584 2003-03-26 Havoc Pennington <hp@pobox.com>
3586 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3587 after every test so it's quick and easy to see which leaked, and
3588 so we test multiple dbus_shutdown() calls
3590 * configure.in: change configure.in XML stuff to also support
3593 * config-loader-libxml.c: some hacking
3595 * config-loader-expat.c: some hacking
3597 * config-parser.c: some hacking, plus tests
3599 2003-03-25 Havoc Pennington <hp@redhat.com>
3601 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3603 * configure.in: add --with-xml option to specify XML library,
3604 right now only libxml is supported.
3606 * bus/config-loader-libxml.c, config-parser.c: sync some minor
3607 nonworking code between home and work, still just stubs
3609 2003-03-24 Havoc Pennington <hp@redhat.com>
3611 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3614 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3615 NULL argument for "message" if the error is a well-known one,
3616 fill in a generic message in this case.
3618 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3621 * bus/test.c (bus_test_flush_bus): add
3623 * bus/policy.c (bus_policy_test): test code stub
3625 2003-03-24 Havoc Pennington <hp@pobox.com>
3627 * bus/connection.c (bus_connections_setup_connection): set up
3628 the "can this user connect" function, but it always returns
3629 TRUE until we have a config file parser so we can have a config
3630 file that allows connections.
3632 2003-03-23 Havoc Pennington <hp@pobox.com>
3634 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3635 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3636 the mutex, so we can check for proper memory management
3639 * dbus/dbus-dataslot.c: remove the mutex from
3640 DBusDataSlotAllocator and lock it manually when using it,
3641 to simplify fitting it into the global slots framework.
3643 * dbus/dbus-threads.c (init_static_locks): rework how we're
3644 handling global locks so they are easily shut down.
3646 * bus/policy.c (bus_policy_append_rule): fix
3648 * bus/test-main.c (main): check for memleaks
3650 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3651 test suite check for memleaks
3653 * dbus/dbus-memory.c: add support in test mode for tracking
3654 number of outstanding blocks
3656 2003-03-23 Havoc Pennington <hp@pobox.com>
3658 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3661 * dbus/dbus-hash.h: add ULONG hash keys
3663 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3664 (_dbus_get_group_id): new function
3666 2003-03-20 Havoc Pennington <hp@redhat.com>
3668 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3670 (dbus_connection_get_unix_user): new function
3672 2003-03-20 Havoc Pennington <hp@pobox.com>
3674 * bus/connection.c (bus_connection_send_oom_error): assert that
3675 message has a sender
3676 (connection_execute_transaction): ditto
3677 (bus_connection_preallocate_oom_error): fix to set the sender, and
3678 set recipient to the destination service, not the bus driver
3680 * bus/policy.c: hacking
3682 * dbus/dbus-message.c (dbus_message_service_is): new function
3683 (dbus_message_sender_is): new
3685 2003-03-19 Havoc Pennington <hp@redhat.com>
3687 * bus/policy.c: start sketching code for policy restrictions on
3688 what connections can do.
3690 2003-03-18 Havoc Pennington <hp@redhat.com>
3692 * doc/TODO: some notes on high-level todo items. Little nitpick
3693 stuff is all in @todo, so no need to add it here.
3695 * doc/config-file.txt: some notes on how config file might look
3697 2003-03-18 Anders Carlsson <andersca@codefactory.se>
3703 2003-03-17 Havoc Pennington <hp@redhat.com>
3705 * dbus/dbus-internals.h: add gcc attributes so that
3706 our printf-style functions warn on bad arguments to
3709 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3712 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3715 2003-03-17 Havoc Pennington <hp@redhat.com>
3717 * bus/test-main.c (main): make it print something as it runs
3718 so make check doesn't look stuck
3720 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3721 from CVS, now obsolete
3723 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3725 * bus/dispatch.c: (bus_dispatch):
3726 Refetch the service name since it may have been reallocated
3727 when dbus_message_set_sender was called.
3729 * dbus/dbus-sysdeps.c: (_dbus_accept):
3730 Add address and address length variables and use them to stop
3731 valgrind from complaining.
3733 2003-03-17 Havoc Pennington <hp@pobox.com>
3735 All tests pass, no memleaks, no valgrind complaints.
3737 * bus/test.c: refcount handler_slot
3739 * bus/connection.c (bus_connections_new): refcount
3740 connection_data_slot
3742 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3743 bytes so that auth scripts pass.
3745 * bus/dispatch.c: init message_handler_slot so it gets allocated
3748 * bus/dispatch.c (message_handler_slot_ref): fix memleak
3750 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3751 dealloc server_pipe_hash when no longer used for benefit of
3754 * dbus/dbus-auth.c (process_command): memleak fix
3756 * bus/dispatch.c (check_hello_message): memleak fix
3758 2003-03-16 Havoc Pennington <hp@pobox.com>
3760 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
3762 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3764 * bus/activation.c (bus_activation_activate_service): Append
3765 the pending activation entry to the list of pending activations.
3767 2003-03-16 Havoc Pennington <hp@pobox.com>
3769 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
3772 * dbus/dbus-address.c (create_entry): fix OOM handling when
3773 failing to alloc entry->method
3775 2003-03-16 Havoc Pennington <hp@pobox.com>
3777 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
3780 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3781 add some missing dbus_set_result
3783 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
3784 alloc the DBusMessageHandler
3786 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
3787 the transport here, since we call this from the finalizer; it
3788 resulted in a double-finalize.
3790 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
3791 where we tried to use transport->connection that was NULL,
3792 happened when transport was disconnected early on due to OOM
3794 * bus/*.c: adapt to handle OOM for watches/timeouts
3796 * dbus/dbus-transport-unix.c: port to handle OOM during
3799 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
3800 reference to unused bytes instead of a copy
3802 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
3805 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
3808 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
3811 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3813 * doc/dbus-specification.sgml:
3814 Document reply message for ActivateService.
3816 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3818 * bus/activation.c: (bus_pending_activation_entry_free),
3819 (bus_pending_activation_free), (bus_activation_new),
3820 (bus_activation_unref), (bus_activation_service_created),
3821 (bus_activation_activate_service):
3823 * bus/bus.c: (bus_context_new):
3824 * bus/desktop-file.c: (new_section):
3825 * bus/driver.c: (bus_driver_send_service_deleted),
3826 (bus_driver_handle_activate_service):
3827 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
3829 * dbus/dbus-connection.c:
3830 (dbus_connection_send_with_reply_and_block):
3831 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3832 * dbus/dbus-protocol.h:
3833 Make activation work better. Now pending activations will be queued
3834 and the daemon won't try to activate services that are already registered.
3836 2003-03-16 Havoc Pennington <hp@pobox.com>
3838 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
3841 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
3842 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
3844 2003-03-16 Havoc Pennington <hp@pobox.com>
3846 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
3847 this. always run the test suite before commit...
3849 * bus/*: adapt to DBusConnection API changes
3851 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
3852 requires renaming stuff to avoid dbus_connection_dispatch name
3855 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
3858 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3859 separate from _dbus_message_loader_return_buffer()
3861 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
3862 this, because it's now always broken to use; the number of
3863 messages in queue vs. the number still buffered by the message
3864 loader is undefined/meaningless. Should use
3865 dbus_connection_get_dispatch_state().
3866 (dbus_connection_dispatch): rename from
3867 dbus_connection_dispatch_message
3869 2003-03-16 Havoc Pennington <hp@pobox.com>
3871 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
3874 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3876 * dbus/dbus-connection.c:
3877 (dbus_connection_send_with_reply_and_block):
3878 Decrease connection->n_incoming when removing an entry
3880 * dbus/dbus-dict.c: (dbus_dict_entry_free),
3881 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3882 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3883 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
3884 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
3885 (dbus_dict_get_byte_array):
3886 Handle NULL arrays and strings. Also add support for byte arrays.
3888 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
3889 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
3890 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3891 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3892 (_dbus_demarshal_dict), (demarshal_and_validate_len),
3893 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
3894 * dbus/dbus-marshal.h:
3895 Add support for marshalling and demarshalling empty arrays and strings.
3897 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3898 (dbus_message_append_string_array),
3899 (dbus_message_iter_get_boolean),
3900 (dbus_message_iter_get_boolean_array),
3901 (dbus_message_iter_get_int32_array),
3902 (dbus_message_iter_get_uint32_array),
3903 (dbus_message_iter_get_double_array),
3904 (dbus_message_iter_get_byte_array),
3905 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
3906 (check_message_handling):
3907 Add support for getting empty arrays and dicts.
3909 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
3910 Don't do any validation at all for now, that's better than just checking
3913 * test/data/valid-messages/emptiness.message:
3914 New test message with lots of empty arrays.
3916 2003-03-16 Havoc Pennington <hp@pobox.com>
3918 * dbus/dbus-connection.c
3919 (_dbus_connection_queue_received_message_link): new function that
3920 can't fail due to OOM
3922 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
3923 new function pops a message together with a list link
3926 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
3927 message queuing functions to avoid needing to alloc memory
3929 2003-03-16 Havoc Pennington <hp@pobox.com>
3931 Oops - test code was only testing failure of around 30 of the
3932 mallocs in the test path, but it turns out there are 500+
3933 mallocs. I believe this was due to misguided linking setup such
3934 that there was one copy of dbus_malloc etc. in the daemon and one
3935 in the shared lib, and only daemon mallocs were tested. In any
3936 case, the test case now tests all 500+ mallocs, and doesn't pass
3937 yet, though there are lots of fixes in this patch.
3939 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
3940 this so that it doesn't need to allocate memory, since it
3941 has no way of indicating failure due to OOM (and would be
3942 annoying if it did).
3944 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
3946 * bus/Makefile.am: rearrange to create two self-contained
3947 libraries, to avoid having libraries with overlapping symbols.
3948 that was resulting in weirdness, e.g. I'm pretty sure there
3949 were two copies of global static variables.
3951 * dbus/dbus-internals.c: move the malloc debug stuff to
3954 * dbus/dbus-list.c (free_link): free list mempool if it becomes
3957 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
3959 * dbus/dbus-address.c (dbus_parse_address): free list nodes
3962 * bus/dispatch.c (bus_dispatch_add_connection): free
3963 message_handler_slot when no longer using it, so
3964 memory leak checkers are happy for the test suite.
3966 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
3968 * bus/bus.c (new_connection_callback): disconnect in here if
3969 bus_connections_setup_connection fails.
3971 * bus/connection.c (bus_connections_unref): fix to free the
3973 (bus_connections_setup_connection): if this fails, don't
3974 disconnect the connection, just be sure there are no side
3977 * dbus/dbus-string.c (undo_alignment): unbreak this
3979 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
3981 (_dbus_auth_new): fix the order in which we free strings
3984 * bus/connection.c (bus_connection_disconnected): fix to
3985 not send ServiceDeleted multiple times in case of memory
3988 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
3989 get the base service name
3990 (dbus_bus_register_client): don't return base service name,
3991 instead store it on the DBusConnection and have an accessor
3993 (dbus_bus_register_client): rename dbus_bus_register()
3995 * bus/dispatch.c (check_hello_message): verify that other
3996 connections on the bus also got the correct results, not
3997 just the one sending hello
3999 2003-03-15 Havoc Pennington <hp@pobox.com>
4001 Make it pass the Hello handling test including all OOM codepaths.
4002 Now to do other messages...
4004 * bus/services.c (bus_service_remove_owner): fix crash when
4005 removing owner from an empty list of owners
4006 (bus_registry_ensure): don't leave service in the list of
4007 a connection's owned services if we fail to put the service
4010 * bus/connection.c (bus_connection_preallocate_oom_error): set
4011 error flag on the OOM error.
4013 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4014 handle _dbus_transport_set_connection failure
4016 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4017 to create watches up front and simply enable/disable them as
4019 (unix_connection_set): this can now fail on OOM
4021 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4022 of enabling/disabling a watch or timeout.
4024 * bus/loop.c (bus_loop_iterate): don't touch disabled
4027 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4029 2003-03-15 Havoc Pennington <hp@pobox.com>
4031 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4032 write useful test code, after all that futzing around ;-)
4034 Test does not yet pass because we can't handle OOM in
4035 _dbus_transport_messages_pending (basically,
4036 dbus_connection_preallocate_send() does not prealloc the write
4037 watch). To fix this, I think we need to add new stuff to
4038 set_watch_functions, namely a SetEnabled function so we can alloc
4039 the watch earlier, then enable it later.
4041 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4042 dbus-memory.c to the convenience lib
4044 * bus/test.c: rename some static functions to keep them clearly
4045 distinct from stuff in connection.c. Handle client disconnection.
4047 2003-03-14 Havoc Pennington <hp@pobox.com>
4049 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4050 transport, tests more of the real codepath. Set up clients
4051 with bus_setup_debug_client.
4053 * bus/test.c (bus_setup_debug_client): function to set up debug
4054 "clients" on the main loop
4056 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4059 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4062 * dbus/dbus-server-debug.c: support a debug server based on pipes
4064 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4065 (_dbus_close): new function
4067 * configure.in: check for socketpair
4069 2003-03-14 Havoc Pennington <hp@redhat.com>
4071 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4074 * dbus/dbus-transport-debug.c: rework this a good bit to be
4075 less complicated. hopefully still works.
4077 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
4080 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
4083 * dbus/dbus-message.c (dbus_message_copy): rename from
4084 dbus_message_new_from_message, fix it up to copy
4085 all the message fields, add test case
4087 * bus/dispatch.c (bus_dispatch_test): add some more test code,
4088 not quite passing yet
4090 2003-03-14 Havoc Pennington <hp@pobox.com>
4092 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4093 until no work remains" in test code. (the large diff here
4094 is just code movement, no actual changes)
4096 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4097 1, no point waiting around for test code.
4098 (_dbus_server_debug_accept_transport): unref the timeout
4099 after adding it (right?)
4101 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4103 2003-03-13 Havoc Pennington <hp@redhat.com>
4105 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4108 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4111 * dbus/dbus-connection.h: Make AddWatchFunction and
4112 AddTimeoutFunction return a bool so they can fail on out-of-memory
4114 * bus/bus.c (bus_context_new): set up timeout handlers
4116 * bus/connection.c (bus_connections_setup_connection): set up
4119 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4122 * bus/bus.c (bus_context_new): adapt to changes
4124 * bus/connection.c: adapt to changes
4126 * test/watch.c: adapt to DBusWatch changes
4128 * bus/dispatch.c (bus_dispatch_test): started adding this but
4131 2003-03-14 Anders Carlsson <andersca@codefactory.se>
4133 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4135 2003-03-13 Havoc Pennington <hp@pobox.com>
4137 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4138 set up a test framework as for the library
4140 2003-03-12 Havoc Pennington <hp@pobox.com>
4142 Throughout: purge global variables, introduce BusActivation,
4143 BusConnections, BusRegistry, etc. objects instead.
4145 * bus/bus.h, bus/bus.c: introduce BusContext as a global
4148 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4149 going to redo this a bit differently I think
4151 2003-03-12 Havoc Pennington <hp@redhat.com>
4153 Mega-patch that gets the message bus daemon initially handling
4154 out-of-memory. Work still needed. Also lots of random
4155 moving stuff to DBusError instead of ResultCode.
4157 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4159 * dbus/dbus-connection.c
4160 (dbus_connection_send_with_reply_and_block): use DBusError
4162 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4165 * dbus/dbus-connection.c (dbus_connection_send): drop the result
4166 code here, as the only failure possible is OOM.
4168 * bus/connection.c (bus_connection_disconnect):
4169 rename bus_connection_disconnected as it's a notification only
4171 * bus/driver.c (bus_driver_handle_acquire_service): don't free
4172 "name" on get_args failure, should be done by get_args;
4173 don't disconnect client for bad args, just return an error.
4174 (bus_driver_handle_service_exists): ditto
4176 * bus/services.c (bus_services_list): NULL-terminate returned array
4178 * bus/driver.c (bus_driver_send_service_lost)
4179 (bus_driver_send_service_acquired): send messages from driver to a
4180 specific client to the client's unique name, not to the broadcast
4183 * dbus/dbus-message.c (decode_header_data): reject messages that
4184 contain no name field
4185 (_dbus_message_get_client_serial): rename to
4186 dbus_message_get_serial and make public
4187 (_dbus_message_set_serial): rename from set_client_serial
4188 (_dbus_message_set_reply_serial): make public
4189 (_dbus_message_get_reply_serial): make public
4191 * bus/connection.c (bus_connection_foreach): allow stopping
4192 iteration by returning FALSE from foreach function.
4194 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4195 (dbus_connection_free_preallocated_send)
4196 (dbus_connection_preallocate_send): new API for sending a message
4197 without possibility of malloc failure.
4198 (dbus_connection_send_message): rename to just
4199 dbus_connection_send (and same for whole function family)
4201 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4203 * dbus/dbus-sysdeps.c (_dbus_exit): new function
4205 * bus/activation.c: handle/return errors
4207 * dbus/dbus-errors.h: add more DBUS_ERROR #define
4209 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4210 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4211 (_dbus_result_from_errno): move to this file
4213 2003-03-10 Anders Carlsson <andersca@codefactory.se>
4215 * dbus/dbus-marshal.c:
4216 (_dbus_marshal_set_string):
4217 Take a length argument so we can marshal the correct string
4220 (_dbus_marshal_dict), (_dbus_demarshal_dict),
4221 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4222 (_dbus_marshal_test):
4223 * dbus/dbus-marshal.h:
4224 Add support for marshalling and demarshalling dicts.
4226 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4227 Add support for TYPE DICT.
4229 * dbus/dbus-message.c: (set_string_field):
4230 Adjust header padding.
4232 (dbus_message_append_args_valist), (dbus_message_append_dict),
4233 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
4234 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
4235 (check_message_handling), (check_have_valid_message):
4236 * dbus/dbus-message.h:
4237 Add functions for setting and getting dicts.
4239 * dbus/dbus-protocol.h:
4245 * doc/dbus-specification.sgml:
4246 Add information about how dicts are marshalled.
4248 * test/data/invalid-messages/dict-with-nil-value.message:
4249 * test/data/invalid-messages/too-short-dict.message:
4250 * test/data/valid-messages/dict-simple.message:
4251 * test/data/valid-messages/dict.message:
4252 Add sample messages containing dicts.
4254 2003-03-08 Anders Carlsson <andersca@codefactory.se>
4256 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
4258 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4261 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4262 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
4263 (dbus_dict_set_int32), (dbus_dict_set_uint32),
4264 (dbus_dict_set_double), (dbus_dict_set_string),
4265 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4266 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4267 (dbus_dict_set_string_array), (_dbus_dict_test):
4269 Fix according to comments from Havoc.
4271 2003-03-06 Michael Meeks <michael@server.home>
4273 * configure.in: if we don't have kde-config, disable have_qt.
4275 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4280 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4281 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
4282 (dbus_dict_remove), (dbus_dict_get_value_type),
4283 (dbus_dict_get_keys), (dbus_dict_put_boolean),
4284 (dbus_dict_put_int32), (dbus_dict_put_uint32),
4285 (dbus_dict_put_double), (dbus_dict_put_string),
4286 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
4287 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
4288 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
4289 (dbus_dict_get_int32), (dbus_dict_get_uint32),
4290 (dbus_dict_get_double), (dbus_dict_get_string),
4291 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
4292 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
4293 (dbus_dict_get_string_array), (_dbus_dict_test):
4295 Add DBusDict implementation
4297 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
4301 2003-03-04 Havoc Pennington <hp@pobox.com>
4303 * test/data/auth/*: adapt to changes
4305 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
4306 USERID_BASE64 and change USERNAME_BASE64 to put in username not
4309 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
4310 more stuff from being in a context name, to make the protocol
4311 simpler to deal with
4313 * dbus/dbus-errors.c (dbus_error_has_name): new function
4314 (dbus_error_is_set): new function
4316 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
4317 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
4319 * dbus/dbus-connection.c (dbus_connection_flush): also read
4320 messages during a flush operation
4322 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
4324 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4326 * configure.in: Check for gethostbyname on Solaris.
4328 * dbus/dbus-transport.c: (_dbus_transport_open):
4329 Remove duplicate "tcp" entry.
4331 * doc/dbus-specification.sgml:
4332 Clarify some things.
4334 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4336 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
4337 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
4338 (_dbus_keyring_test):
4339 * dbus/dbus-md5.c: (_dbus_md5_compute):
4340 * dbus/dbus-sha.c: (_dbus_sha_compute):
4343 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4345 * README: Add some things.
4347 2003-03-04 Anders Carlsson <andersca@codefactory.se>
4349 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
4350 after case DBUS_TYPE_BOOELAN.
4352 2003-03-02 Havoc Pennington <hp@pobox.com>
4354 * test/break-loader.c (randomly_set_extreme_ints): add test that
4355 sets really huge and small integers
4357 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
4358 that length of boolean array fits in the string, and that
4359 string has room for boolean value in single-bool case.
4361 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
4362 optional value to "ALIGN" command which is what to fill the
4365 * test/data/valid-messages/no-padding.message: add regression
4366 test for the message padding problem
4368 2003-03-02 Havoc Pennington <hp@pobox.com>
4370 * dbus/dbus-message.c (decode_header_data): fix to always init
4371 message_padding, from Benjamin Dauvergne
4373 2003-03-02 Havoc Pennington <hp@pobox.com>
4379 2003-03-01 Joe Shaw <joe@assbarn.com>
4381 * configure.in: Check for "struct cmsgcred" and try to access its
4382 members for BSD-like unices.
4384 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
4385 _dbus_read_credentials_unix_socket().
4386 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
4387 read() for reading the credential byte off the unix socket. Use
4388 struct cmsgcred on systems that support it.
4390 2003-02-27 Alexander Larsson <alexl@redhat.com>
4394 Make gthreads-2.0 dependency optional. Don't build thread test if
4397 2003-02-27 Havoc Pennington <hp@pobox.com>
4399 * dbus/dbus-connection.c
4400 (dbus_connection_send_message_with_reply_and_block): fix doh!
4401 doh! doh! bug that resulted in never removing a reply from the
4402 queue, no wonder we called get_reply_serial so much ;-)
4404 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
4405 and client serial instead of demarshaling them every time
4407 2003-02-27 Havoc Pennington <hp@pobox.com>
4409 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
4410 more inlined, using dbus-string-private.h, speeds things up
4413 * dbus/dbus-string.c (_dbus_string_free): apply align offset
4414 when freeing the string
4415 (_dbus_string_steal_data): fix for align offset
4416 (undo_alignment): new function
4418 2003-02-26 Havoc Pennington <hp@redhat.com>
4420 All kinds of audit fixes from Owen, plus initial attempt to
4421 handle unaligned memory returned from malloc.
4423 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
4424 leave room for align_offset and nul byte
4425 (fixup_alignment): function to track an align_offset and
4426 ensure real->str is aligned
4427 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
4428 to allow a nul byte plus align offset
4429 (_dbus_string_lock): fix overflow issue
4430 (_dbus_string_init_const_len): add assertions on sanity of len,
4431 assign allocated to be ALLOCATION_PADDING larger than len
4432 (set_length): fixup the overflow handling
4433 (_dbus_string_get_data_len): fix overflow in assertion
4434 (open_gap): detect overflow in size of gap to be opened
4435 (_dbus_string_lengthen): add overflow check
4436 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
4437 (_dbus_string_append): add overflow check
4438 (_dbus_string_append_unichar): overflow
4439 (_dbus_string_delete): fix overflow in assertion
4440 (_dbus_string_copy_len): overflow in assertion
4441 (_dbus_string_replace_len): overflows in assertions
4442 (_dbus_string_find): change to implement in terms of
4443 _dbus_string_find_to
4444 (_dbus_string_find_to): assorted fixage
4445 (_dbus_string_equal_c_str): assert c_str != NULL,
4446 fix logic so the function works
4447 (_dbus_string_ends_with_c_str): fix overflow thingy
4448 (_dbus_string_base64_encode): overflow fix
4449 (_dbus_string_validate_ascii): overflow
4450 (_dbus_string_validate_nul): overflow
4452 2003-02-26 Havoc Pennington <hp@redhat.com>
4454 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
4456 2003-02-26 Alexander Larsson <alexl@redhat.com>
4459 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
4461 * dbus/dbus-connection.c:
4462 * dbus/dbus-connection.h:
4463 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4464 Add dbus_connection_set_wakeup_main_function and use it when queueing
4465 incoming and outgoing messages.
4468 * dbus/dbus-dataslot.c:
4469 Threadsafe usage of DBusDataSlotAllocator
4471 * dbus/dbus-message.c: (dbus_message_get_args_iter):
4474 * dbus/dbus-server-unix.c:
4477 * glib/dbus-gmain.c:
4478 Implement the new wakeup functions for glib.
4481 * glib/test-thread-client.c:
4482 * glib/test-thread-server.c:
4483 * glib/test-thread.h:
4484 Initial cut at some thread test code. Not really done yet.
4486 2003-02-26 Havoc Pennington <hp@pobox.com>
4488 * dbus/dbus-connection.c
4489 (dbus_connection_send_message_with_reply_and_block): fix crash
4490 where we ref'd the outgoing message instead of the returned reply
4492 * dbus/dbus-transport-unix.c (do_authentication): check read watch
4493 at the end of this function, so if we didn't need to read for
4494 authentication, we reinstall it for receiving messages
4496 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4497 a NULL sender for peer-to-peer case
4499 * dbus/dbus-transport-unix.c (check_read_watch): handle
4500 !authenticated case correctly
4502 * glib/dbus-gmain.c: add support for DBusServer
4504 * dbus/dbus-server.c: add data slot support
4506 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4507 return values and handle errors
4509 * dbus/dbus-dataslot.c: factor out the data slot stuff from
4512 * Doxyfile.in (INPUT): add glib subdir
4514 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4515 setup_with_g_main instead of hookup_with_g_main; write docs
4517 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4519 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4520 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4521 * dbus/dbus-message.c: (dbus_message_append_boolean),
4522 (dbus_message_append_boolean_array),
4523 (dbus_message_get_args_valist), (_dbus_message_test):
4524 * dbus/dbus-message.h:
4525 * doc/dbus-specification.sgml:
4526 Various fixes as pointed out by Havoc.
4528 * test/data/invalid-messages/bad-boolean-array.message:
4529 * test/data/invalid-messages/bad-boolean.message:
4530 Add invalid boolean value test cases.
4532 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4534 * dbus/dbus-internals.c: (_dbus_type_to_string):
4535 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4536 (_dbus_marshal_validate_arg):
4537 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4538 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4539 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4540 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4541 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4542 (dbus_message_iter_get_double),
4543 (dbus_message_iter_get_boolean_array), (message_iter_test):
4544 * dbus/dbus-message.h:
4545 * dbus/dbus-protocol.h:
4546 * doc/dbus-specification.sgml:
4547 * test/data/valid-messages/lots-of-arguments.message:
4548 Add support for boolean and boolean array types.
4550 2003-02-23 Havoc Pennington <hp@pobox.com>
4552 * dbus/dbus-keyring.c: finish most of this implementation and
4555 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4556 these barf if the error isn't cleared to NULL
4558 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4559 (_dbus_create_directory): new function
4561 * dbus/dbus-errors.c (dbus_set_error): fix warning
4563 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4564 (_dbus_string_hex_decode): new function
4565 (test_hex_roundtrip): test code
4567 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4569 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4571 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4572 the save-to-temp/rename trick to atomically write the new file
4573 (_dbus_string_parse_uint): new function
4575 2003-02-22 Havoc Pennington <hp@pobox.com>
4577 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4579 2003-02-22 Havoc Pennington <hp@pobox.com>
4581 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4582 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4584 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4586 * dbus/test/data/sha-1: add US government test suite for SHA-1
4588 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4590 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4591 Make string arrays NULL-terminated.
4593 * dbus/dbus-memory.c: (dbus_free_string_array):
4594 * dbus/dbus-memory.h:
4595 New function for freeing NULL-terminated string arrays.
4597 * dbus/dbus-message-builder.c: (append_quoted_string),
4598 (_dbus_message_data_load):
4599 Add support for array types.
4601 * dbus/dbus-message.c: (check_message_handling):
4602 Add more types as test cases.
4604 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4605 (_dbus_string_parse_double):
4606 Add the start offset to the end offset.
4608 * test/data/valid-messages/lots-of-arguments.message:
4609 New test message with lots of arguments.
4611 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4613 * dbus/dbus-message.c: (dbus_message_append_nil),
4614 (dbus_message_append_int32), (dbus_message_append_uint32),
4615 (dbus_message_append_double), (dbus_message_append_string),
4616 (dbus_message_append_int32_array),
4617 (dbus_message_append_uint32_array),
4618 (dbus_message_append_double_array),
4619 (dbus_message_append_byte_array),
4620 (dbus_message_append_string_array):
4621 Fix all out-of-memory handling in these functions.
4623 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4625 * dbus/dbus-message.c: (dbus_message_append_nil):
4628 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4630 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4631 (dbus_message_append_nil), (dbus_message_append_int32_array),
4632 (dbus_message_append_uint32_array),
4633 (dbus_message_append_double_array),
4634 (dbus_message_append_byte_array),
4635 (dbus_message_append_string_array), (dbus_message_get_args_valist),
4636 (dbus_message_iter_get_int32_array),
4637 (dbus_message_iter_get_uint32_array),
4638 (dbus_message_iter_get_double_array),
4639 (dbus_message_iter_get_byte_array),
4640 (dbus_message_iter_get_string_array):
4642 * dbus/dbus-message.h:
4643 Add functions for appending and getting arrays.
4645 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4647 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4648 element size at least 8 bytes, fixes mempool tests on
4651 2003-02-20 Alexander Larsson <alexl@redhat.com>
4653 * dbus/dbus-transport-unix.c (unix_do_iteration):
4654 Unlock the connection mutex during a blocking select call.
4655 Add todo about how we need a way to wake up the select.
4657 * dbus/dbus-connection-internal.h:
4658 * dbus/dbus-connection.c:
4659 Add _dbus_connection_lock and _dbus_connection_unlock.
4661 2003-02-19 Havoc Pennington <hp@pobox.com>
4663 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4664 Doxyfile.in, not Doxyfile
4666 * dbus/dbus-keyring.c: do some hacking on this
4668 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4670 * dbus/dbus-errors.c (dbus_set_error_const): do not call
4672 (dbus_set_error): remove dbus_error_init, check for message ==
4673 NULL *before* we sprintf into it, and add @todo about including
4674 system headers in this file
4676 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4678 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4680 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4681 get various bits of user information based on either username
4683 (_dbus_homedir_from_username): new function
4685 2003-02-19 Anders Carlsson <andersca@codefactory.se>
4688 Add check for nonposix getpwnam_r
4690 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4691 Align the pool element size to a sizeof (void *) boundary.
4693 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4694 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4695 General Solaris fixes.
4697 * test/data/valid-messages/simplest-manual.message:
4698 Explicitly state that we want little-endian packing.
4700 2003-02-19 Mikael Hallendal <micke@codefactory.se>
4702 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4704 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4705 Added to create a transport connecting using a tcp/ip socket.
4707 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4708 to a tcp socket at given host and port.
4709 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4712 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4714 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4715 Added to create a server listening on a TCP/IP socket.
4717 2003-02-19 Havoc Pennington <hp@pobox.com>
4719 Throughout: mop up all the Doxygen warnings and undocumented
4722 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4723 to search any paths.
4725 * dbus/dbus-threads.c: move global mutex initializers to
4726 dbus-internals.h, multiple prototypes was confusing doxygen
4727 besides being kind of ugly
4729 * Doxyfile (PREDEFINED): have Doxygen define
4730 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4731 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4732 (do not abuse the feature! it's for stuff like the autogenerated
4733 macros in dbus-md5.c, not just for things you don't feel like
4736 2003-02-18 Havoc Pennington <hp@pobox.com>
4738 * dbus/dbus-string.c (_dbus_string_zero): new function
4740 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4741 wrap it in some dbus-friendly API
4743 * dbus/dbus-types.h: add 16-bit types
4745 2003-02-18 Joe Shaw <joe@assbarn.com>
4747 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4748 credentials from our currently running process.
4749 (get_word): Fix a buglet where we were copying the entire length
4750 instead of relative to our position.
4752 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4753 keys on the stack... it's 640k of data.
4755 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4756 read the credentials byte off the socket, even if we don't have
4758 (_dbus_poll): Implement poll() using select() for systems which
4761 * glib/test-dbus-glib.c (main): Print out an error if no
4762 parameters are given.
4764 * test/data/auth/fallback.auth-script: Added. Tests that a client
4765 can fallback to a secondary auth mechanism if the first fails.
4767 2003-02-18 Havoc Pennington <hp@pobox.com>
4771 2003-02-17 Havoc Pennington <hp@pobox.com>
4773 * doc/dbus-specification.sgml: lots of cosmetic
4774 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
4775 env variable to DBUS_BUS_ADDRESS, s/client/application/,
4776 s/server/bus/ (except in authentication section). Add a section
4777 "Message Bus Message Routing"
4779 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
4785 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4787 * doc/dbus-specification.sgml:
4788 Specification updates.
4790 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4792 * bus/activation.c: (bus_activation_init), (child_setup),
4793 (bus_activation_activate_service):
4795 * bus/main.c: (main):
4796 Set DBUS_ADDRESS environment variable.
4798 * dbus/dbus-errors.c: (dbus_set_error):
4799 Don't use va_copy since that's a C99 feature.
4801 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
4802 (_dbus_spawn_async):
4803 * dbus/dbus-sysdeps.h:
4804 Add child_setup_func to _dbus_spawn_async.
4806 * doc/dbus-specification.sgml:
4807 Update specification.
4809 * test/spawn-test.c: (setup_func), (main):
4812 2003-02-17 Alexander Larsson <alexl@redhat.com>
4814 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
4817 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4821 * doc/dbus-test-plan.sgml:
4822 Add test plan document.
4827 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4829 * dbus/dbus-message.c: (decode_header_data),
4830 (_dbus_message_loader_return_buffer):
4831 Set the header padding amount when loading a message.
4833 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4835 * bus/dispatch.c: (send_one_message):
4836 Only send broadcast messages to registered connections.
4838 * dbus/dbus-message.c: (dbus_message_name_is):
4839 * dbus/dbus-message.h:
4840 New convenience function.
4842 * dbus/dbus-transport-debug.c: (do_reading):
4843 Only dispatch one message per run.
4846 * test/bus-test.c: (new_connection_callback), (die),
4847 (test_hello_client1_handler), (test_hello_client2_handler),
4848 (test_hello_replies), (main):
4850 * test/bus-test-loop.[ch]:
4853 2003-02-16 Havoc Pennington <hp@pobox.com>
4855 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4856 backward conditional
4858 2003-02-16 Alexander Larsson <alexl@redhat.com>
4860 * dbus/dbus-connection.c:
4861 Implement sent_message_with_reply. (with_reply_and block is still
4863 Made dispatch_message not lose message if OOM.
4865 * dbus/dbus-errors.h:
4866 Add NoReply error (for reply timeouts).
4868 2003-02-16 Alexander Larsson <alexl@redhat.com>
4870 * dbus/dbus-hash.c (_dbus_hash_table_unref):
4871 Actually free keys and values when destroying hashtable.
4873 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4875 * dbus/dbus-auth.c: (client_try_next_mechanism):
4878 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
4879 Return TRUE if there's no thread implementation around.
4881 * glib/dbus-gmain.c: (free_source),
4882 (dbus_connection_hookup_with_g_main):
4883 Make sure to remove the GSource when the connection is finalized.
4885 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4887 * bus/dispatch.c: (bus_dispatch_message_handler):
4888 * dbus/dbus-errors.h:
4889 Return an error if someone tries to send a message to a service
4892 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4894 * bus/activation.c: (load_directory), (bus_activation_init),
4895 (bus_activation_activate_service):
4898 (bus_driver_handle_activate_service), (bus_driver_handle_message):
4899 More work on the activation handling.
4901 * dbus/dbus-errors.h:
4902 Add some error messages
4904 * dbus/dbus-message.c: (dbus_message_new_error_reply):
4905 * dbus/dbus-message.h:
4906 New function that creates an error message.
4908 * dbus/dbus-protocol.h:
4909 Add ACTIVATE_SERVER message.
4911 * dbus/dbus-server-unix.c: (unix_handle_watch),
4912 (_dbus_server_new_for_domain_socket):
4913 Call _dbus_fd_set_close_on_exec.
4915 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
4916 (_dbus_spawn_async), (_dbus_disable_sigpipe),
4917 (_dbus_fd_set_close_on_exec):
4918 * dbus/dbus-sysdeps.h:
4919 Add _dbus_fd_set_close_on exec function. Also add function that checks
4920 that all open fds are set to close-on-exec and warns otherwise.
4922 * dbus/dbus-transport-unix.c:
4923 (_dbus_transport_new_for_domain_socket):
4924 Call _dbus_fd_set_close_on_exec.
4926 2003-02-16 Havoc Pennington <hp@pobox.com>
4928 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
4929 allow people to avoid setting SIGPIPE to SIG_IGN
4930 (_dbus_connection_new_for_transport): disable SIGPIPE unless
4931 we've been asked not to
4933 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4935 * dbus/dbus-list.c: (_dbus_list_append_link),
4936 (_dbus_list_prepend_link):
4937 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
4941 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4944 * bus/activation.c: (bus_activation_entry_free),
4945 (add_desktop_file_entry), (load_directory), (bus_activation_init):
4947 * bus/main.c: (main):
4948 Add simple activation support, doesn't work yet though.
4950 2003-02-15 Zack Rusin <zack@kde.org>
4952 * qt/dbus-qthread.cpp: small casting fix
4954 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4956 * dbus/dbus-errors.c: (dbus_set_error):
4957 * dbus/dbus-errors.h:
4958 Add a few errors and make dbus_set_error void.
4960 * dbus/dbus-sysdeps.c:
4961 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
4962 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
4963 * dbus/dbus-sysdeps.h:
4964 Add _dbus_spawn_async.
4966 * test/spawn-test.c: (main):
4967 Test for _dbus_spawn_async.
4969 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4971 * dbus/dbus-internals.h:
4972 Fix build without tests.
4974 * dbus/dbus-list.c: (alloc_link):
4975 Fix a segfault when a malloc fails.
4977 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
4978 (dbus_malloc0), (dbus_realloc):
4979 Add support for malloc debugging.
4981 2003-02-15 Alexander Larsson <alexl@redhat.com>
4983 * dbus/dbus-threads.c:
4984 * dbus/dbus-threads.h:
4985 Add condvars. Remove static mutext from API.
4986 Implement static mutexes by initializing them from threads_init.
4988 * glib/dbus-gthread.c:
4989 * qt/dbus-qthread.cpp:
4990 Update with the thread api changes.
4995 Turn StaticMutex into normal mutex + init function.
4996 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
4997 _dbus_list_append_link, _dbus_list_prepend_link
5000 * dbus/dbus-sysdeps.c:
5001 * dbus/dbus-sysdeps.h:
5002 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5003 _dbus_atomic_dec. Only slow fallback implementation at the moment.
5005 * dbus/dbus-protocol.h:
5006 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5008 * dbus/dbus-message.c:
5009 Make ref/unref atomic.
5012 * dbus/dbus-connection-internal.h:
5013 * dbus/dbus-connection.c:
5014 * dbus/dbus-connection.h:
5016 Change _peek to _borrow,_return & _steal_borrowed.
5017 Change disconnect callback to event.
5018 Make dbus_connection_dispatch_messages reentrant.
5020 * dbus/dbus-transport.c:
5021 Don't ref the connection on calls to the transport
5024 * dbus/dbus-message-handler.c:
5027 * glib/dbus-gmain.c:
5028 Don't use peek_message anymore
5031 * test/debug-thread.c:
5032 * test/debug-thread.h:
5033 Simple thread implementation that asserts() on deadlocks in
5034 single-threaded code.
5037 (main) Call debug_threads_init.
5040 Use disconnect message instead of disconnect callback.
5044 Don't call dbus_connection_set_disconnect_function. Instead export
5045 bus_connection_disconnect.
5048 Call bus_connection_disconnect when we get a disconnected message.
5050 2003-02-15 Havoc Pennington <hp@pobox.com>
5052 * dbus/dbus-message.c (dbus_message_new): fool around with the
5055 2003-02-14 Havoc Pennington <hp@pobox.com>
5057 * dbus/dbus-mempool.c: fail if the debug functions so indicate
5059 * dbus/dbus-memory.c: fail if the debug functions indicate we
5062 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5063 (_dbus_decrement_fail_alloc_counter): debug functions to
5064 simulate memory allocation failures
5066 2003-02-14 Havoc Pennington <hp@pobox.com>
5068 * dbus/dbus-errors.h (struct DBusError): add a word of padding
5071 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5073 * bus/driver.c: (bus_driver_handle_hello):
5075 * bus/services.c: (bus_service_lookup):
5076 Reorder message sending so we get a more sane order.
5078 * test/bus-test.c: (message_handler):
5081 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5083 * bus/driver.c: (bus_driver_send_service_deleted),
5084 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5085 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5086 (bus_driver_send_welcome_message),
5087 (bus_driver_handle_list_services),
5088 (bus_driver_handle_acquire_service),
5089 (bus_driver_handle_service_exists):
5090 * dbus/dbus-bus.c: (dbus_bus_register_client),
5091 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5092 * dbus/dbus-errors.c: (dbus_result_to_string):
5093 * dbus/dbus-errors.h:
5094 * dbus/dbus-message.c: (dbus_message_append_args),
5095 (dbus_message_append_args_valist), (dbus_message_get_args),
5096 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5097 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5098 (dbus_message_iter_get_byte_array),
5099 (dbus_message_iter_get_string_array), (message_iter_test),
5100 (check_message_handling), (_dbus_message_test):
5101 * dbus/dbus-message.h:
5102 * test/bus-test.c: (main):
5103 Change fields to arguments in messages, so that they won't be
5104 confused with header fields.
5106 * glib/test-dbus-glib.c: (main):
5107 Remove append_fields from hello message.
5109 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5111 * dbus/dbus-errors.c:
5112 * dbus/dbus-message.c:
5113 * dbus/dbus-string.c:
5114 Documentation fixes.
5116 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5118 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5120 Implement support for timeouts in dbus-glib.
5122 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5124 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5125 * dbus/dbus-message.c: (process_test_subdir):
5126 * test/break-loader.c: (find_breaks_based_on):
5127 Plug some memory leaks.
5129 2003-02-13 Richard Hult <rhult@codefactory.se>
5131 * bus/main.c: Fix build.
5133 * dbus/dbus-errors.h:
5134 * dbus/dbus-errors.c: Fix copyright for Anders.
5136 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5141 * bus/connection.c: (bus_connection_foreach):
5144 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5145 (unescape_string), (new_section), (parse_section_start),
5146 (parse_key_value), (report_error), (bus_desktop_file_load),
5147 (bus_desktop_file_get_string):
5148 * bus/desktop-file.h:
5149 Use DBusError for error reporting.
5151 * bus/dispatch.c: (send_one_message),
5152 (bus_dispatch_message_handler):
5153 * bus/driver.c: (bus_driver_send_service_deleted),
5154 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5155 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5156 (bus_driver_send_welcome_message),
5157 (bus_driver_handle_list_services),
5158 (bus_driver_handle_acquire_service),
5159 (bus_driver_handle_service_exists):
5160 * bus/loop.c: (bus_loop_run):
5162 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5164 * bus/utils.c: (bus_wait_for_memory):
5166 New files with general utility functions.
5168 * dbus/dbus-internals.h:
5169 Remove _DBUS_HANDLE_OOM.
5171 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5173 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5174 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5175 * dbus/dbus-errors.h:
5176 Add DBusError structure.
5178 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5180 * test/data/valid-messages/standard-acquire-service.message:
5181 * test/data/valid-messages/standard-hello.message:
5182 * test/data/valid-messages/standard-list-services.message:
5183 * test/data/valid-messages/standard-service-exists.message:
5184 Add some standard messages.
5186 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5188 * bus/driver.c: (bus_driver_send_welcome_message),
5189 (bus_driver_handle_list_services),
5190 (bus_driver_handle_acquire_service),
5191 (bus_driver_handle_service_exists), (bus_driver_handle_message):
5192 Update for API changes in libdbus.
5194 * dbus/dbus-message.c: (dbus_message_new_reply):
5195 * dbus/dbus-message.h:
5196 Remove the name argument. The spec states that replies shouldn't
5199 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5201 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5202 (report_error), (bus_desktop_file_load), (lookup_section),
5203 (lookup_line), (bus_desktop_file_get_raw),
5204 (bus_desktop_file_get_string):
5205 * bus/desktop-file.h:
5206 Some fixes, and new functions for getting a key value from a section.
5208 2003-02-13 Havoc Pennington <hp@pobox.com>
5210 * test/data/auth/fail-after-n-attempts.auth-script: new test
5212 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5215 2003-02-13 Havoc Pennington <hp@pobox.com>
5217 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5218 dbus_credentials_match were backward
5220 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5221 NO_CREDENTIALS and ROOT_CREDENTIALS
5223 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5224 into here. Never process more commands after we've reached an
5225 end state; store further data as unused bytes.
5227 * test/data/auth/*: add more auth tests
5229 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
5230 command to match exact string and EXPECT_UNUSED to match unused
5233 * test/Makefile.am (dist-hook): fix to dist all the test stuff
5235 2003-02-12 Havoc Pennington <hp@pobox.com>
5237 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
5238 \r off of popped lines
5240 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
5243 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
5246 2003-02-12 Havoc Pennington <hp@pobox.com>
5248 * dbus/Makefile.am: remove break-loader from the build, since it
5251 * configure.in: add --enable-gcov to turn on coverage profiling
5252 flags and disable optimization
5254 2003-02-10 Havoc Pennington <hp@pobox.com>
5256 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
5257 initial cut at test framework for DBusAuth from laptop.
5258 Doesn't quite work yet but it compiles and I need to get
5259 it off the 266mhz laptop. ;-)
5261 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
5262 fix a memleak in error case
5264 2003-02-12 Anders Carlsson <andersca@codefactory.se>
5267 * bus/desktop-file.c:
5268 * bus/desktop-file.h:
5269 Add a desktop file parser.
5271 2003-02-11 Zack Rusin <zack@kde.org>
5273 * qt/message.[h|cpp]: sample implementation
5274 of the KDE wrapper for DBusMessage
5276 2003-02-09 Zack Rusin <zack@kde.org>
5278 * test/bus-test.c: make_it_compile
5279 * doc/dbus-specification.sgml: minimal semantic fix
5281 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5287 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5290 * dbus/dbus-break-loader.c:
5292 * test/break-loader.c:
5293 Move dbus-break-loader to test/ and rename it to break-loader.
5295 2003-02-02 Havoc Pennington <hp@pobox.com>
5297 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
5298 for code to manage cookies in your home directory
5300 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
5302 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
5303 to authenticate, then disconnect the client.
5305 2003-02-03 Alexander Larsson <alexl@redhat.com>
5307 * dbus/dbus-message.c (dbus_message_append_fields):
5310 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5312 * doc/dbus-specification.sgml:
5313 Update address format section.
5315 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5318 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
5319 (message_handler), (new_connection_callback), (loop_quit),
5323 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5325 * bus/driver.c: (bus_driver_handle_service_exists):
5326 Simplify the code a bit.
5328 * dbus/dbus-bus.c: (dbus_bus_service_exists):
5331 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5334 Add libdbus-daemon.la and link to it.
5336 2003-02-01 James Willcox <jwillcox@gnome.org>
5338 * bus/driver.c: (bus_driver_handle_own_service):
5339 Actually include the service reply code in the message.
5341 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5343 * bus/driver.c: (bus_driver_handle_service_exists):
5344 Don't unref the incoming message.
5346 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5348 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
5350 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5352 * dbus/dbus-server.c: (dbus_server_listen):
5353 * dbus/dbus-transport.c: (_dbus_transport_open):
5354 ifdef out the calls to the debug transport and server.
5356 2003-02-02 Alexander Larsson <alexl@redhat.com>
5358 * dbus/dbus-watch.c (dbus_watch_get_flags):
5359 Add note in the docs that ERROR or HANGUP won't be returned
5360 and are assumed always on.
5362 * glib/dbus-gmain.c (add_watch):
5363 Always add IO_ERR | IO_HUP
5365 * dbus/dbus-message.h:
5366 Add semicolon after dbus_message_iter_get_string_array().
5367 Makes qt code build again
5369 2003-02-01 Anders Carlsson <andersca@codefactory.se>
5371 * bus/driver.c: (create_unique_client_name),
5372 (bus_driver_handle_hello):
5373 Don't take a name, just use a numeric id to identify
5377 * dbus/dbus-bus.c: (dbus_bus_register_client),
5378 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5380 Add new convenience functions for communicating with the bus.
5382 * dbus/dbus-message.h:
5384 * dbus/dbus-protocol.h:
5387 2003-02-01 Alexander Larsson <alexl@redhat.com>
5389 * dbus/dbus-message.c (dbus_message_append_fields):
5390 Add some more doc comments.
5392 2003-02-01 Havoc Pennington <hp@pobox.com>
5394 * dbus/dbus-break-loader.c (randomly_modify_length): change
5395 a 4-byte value in the message as if it were a length
5397 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
5398 execute bit on saved files
5400 2003-02-01 Havoc Pennington <hp@pobox.com>
5402 * dbus/dbus-break-loader.c (main): new program to find messages
5403 that break the loader.
5405 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
5406 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
5408 * dbus/dbus-string.c (_dbus_string_set_byte): new
5410 2003-01-31 Havoc Pennington <hp@pobox.com>
5412 * dbus/dbus-message.c: refactor the test code to be more general,
5413 in preparation for writing a "randomly permute test cases to
5414 try to break the loader" program.
5416 2003-01-31 Havoc Pennington <hp@pobox.com>
5418 * doc/dbus-specification.sgml: work on the specification
5420 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
5421 the protocol version of the message.
5423 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
5424 no longer specifies that.
5425 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
5428 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
5429 "break" for DBUS_TYPE_NIL, remove @todo
5431 2003-01-31 Havoc Pennington <hp@pobox.com>
5433 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
5434 just set_is_error/get_is_error as this is a commonly-used
5435 function, and write docs.
5437 2003-01-31 Anders Carlsson <andersca@codefactory.se>
5439 * dbus/dbus-address.c: (dbus_address_entry_free):
5440 Free key and value lists.
5442 * dbus/dbus-internals.c: (_dbus_type_to_string):
5443 Add the types we didn't have.
5445 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5446 (_dbus_marshal_validate_arg):
5449 * dbus/dbus-message.c: (dbus_message_set_sender):
5450 Remove todo about being able to set sender to NULL.
5452 (dbus_message_set_is_error_reply),
5453 (dbus_message_get_is_error_reply):
5454 * dbus/dbus-message.h:
5457 * dbus/dbus-protocol.h:
5458 Add error reply flag.
5460 * test/data/valid-messages/opposite-endian.message:
5461 Add NIL type to test.
5463 2003-01-31 Havoc Pennington <hp@pobox.com>
5465 * doc/dbus-specification.sgml: fully specify the header. Add
5466 flags and major protocol version, and change header/body len to
5469 * dbus/dbus-message-builder.c (append_saved_length): append length
5472 * dbus/dbus-message.c (dbus_message_create_header): change header
5473 length and body length to unsigned. Add the new fields from the
5475 (_dbus_message_loader_return_buffer): unsigned header/body len
5477 2003-01-30 Havoc Pennington <hp@pobox.com>
5479 * dbus/dbus-auth.c: rework to use only REJECTED, no
5482 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5483 use REJECTED, suggested by Mark McLoughlin
5485 2003-01-30 Havoc Pennington <hp@pobox.com>
5487 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5488 a better way to report errors here. e.g. "unix address lacks
5489 path" or something. also "no such file" when the path doesn't
5492 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5494 (dbus_parse_address): add @todo about documenting address format,
5495 and allowing , and ; to be escaped
5497 2003-01-30 Anders Carlsson <andersca@codefactory.se>
5500 Add dbus-address.[ch]
5502 * dbus/dbus-address.c: (dbus_address_entry_free),
5503 (dbus_address_entries_free), (create_entry),
5504 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5505 (dbus_parse_address), (_dbus_address_test):
5506 * dbus/dbus-address.h:
5507 New files for dealing with address parsing.
5509 * dbus/dbus-connection.c:
5510 Document timeout functions.
5512 * dbus/dbus-message.c:
5513 Document dbus_message_new_from_message.
5515 * dbus/dbus-server-debug.c:
5518 * dbus/dbus-server.c: (dbus_server_listen):
5519 Parse address and use correct server implementation.
5521 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5522 * dbus/dbus-string.h:
5523 New function with test.
5525 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5529 * dbus/dbus-transport-debug.c:
5532 * dbus/dbus-transport.c: (_dbus_transport_open):
5533 Parse address and use correct transport implementation.
5535 2003-01-30 Havoc Pennington <hp@pobox.com>
5537 * dbus/dbus-message.c: use message->byte_order instead of
5538 DBUS_COMPILER_BYTE_ORDER throughout.
5539 (dbus_message_create_header): pad header to align the
5540 start of the body of the message to 8-byte boundary
5542 * dbus/dbus-marshal.h: make all the demarshalers take const
5543 DBusString arguments.
5545 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5546 validate message args here, so we don't have to do slow validation
5547 later, and so we catch bad messages as they are incoming. Also add
5548 better checks on header_len and body_len. Also fill in
5551 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5552 implemented properly)
5553 (_dbus_string_validate_nul): new function to check all-nul
5555 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5556 get_arg_end_pos and remove all validation
5557 (_dbus_marshal_validate_arg): actually do validation here.
5559 2003-01-29 Havoc Pennington <hp@pobox.com>
5561 * dbus/dbus-message.c (check_message_handling): fix assertion
5562 failure on set_client_serial
5564 2003-01-28 Havoc Pennington <hp@pobox.com>
5566 * dbus/dbus-server-debug.c: Add doc section comments
5568 * dbus/dbus-transport-debug.c: add doc section comments
5570 2003-01-28 Havoc Pennington <hp@redhat.com>
5572 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5573 the reverse order from how I had it
5574 (_dbus_string_base64_encode): reverse encoding order. I was
5575 basically byteswapping everything during encoding.
5577 2003-01-28 Anders Carlsson <andersca@codefactory.se>
5579 * dbus/dbus-connection-internal.h:
5580 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5581 (_dbus_connection_remove_timeout):
5582 Add functions for adding and removing timeouts.
5584 * dbus/dbus-message.c: (dbus_message_new_from_message):
5585 Add new function that takes a message and creates an exact
5586 copy of it, but with the refcount set to 1.
5587 (check_message_handling):
5590 * dbus/dbus-server-protected.h:
5591 * dbus/dbus-server.c: (_dbus_server_init_base),
5592 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5593 (dbus_server_set_timeout_functions):
5594 (_dbus_server_remove_timeout):
5595 New functions so that a server can add and remove timeouts.
5597 (dbus_server_listen):
5598 Add commented out call to dbus_server_debug_new.
5600 * dbus/dbus-timeout.c: (_dbus_timeout_new):
5601 Actually set the handler, doh.
5603 * dbus/dbus-transport.c: (_dbus_transport_open):
5604 Add commented out call to dbus_transport_debug_client_new.
5607 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5609 2003-01-28 Havoc Pennington <hp@pobox.com>
5611 * dbus/dbus-message.c (check_message_handling): function to check
5612 on the loaded message, iterates over it etc.
5614 2003-01-28 Havoc Pennington <hp@pobox.com>
5616 * test/Makefile.am (dist-hook): fix make distdir
5618 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5620 2003-01-27 Havoc Pennington <hp@pobox.com>
5622 * dbus/dbus-mempool.c (time_for_size): replace printf with
5625 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5626 empty lines; fix the SAVE_LENGTH stuff to be
5627 START_LENGTH/END_LENGTH so it actually works; couple other
5630 * test/Makefile.am (dist-hook): add dist-hook for .message files
5632 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5633 can be constant or locked.
5634 (_dbus_string_free): allow freeing a const string as
5637 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5639 * dbus/dbus-test-main.c (main): take an argument which is the
5640 directory containing test data
5642 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5643 argument to this and load all the messages in test/data/
5644 checking that they can be loaded or not loaded as appropriate.
5646 2003-01-27 Anders Carlsson <andersca@codefactory.se>
5648 * bus/dispatch.c: (bus_dispatch_message_handler):
5649 Dispatch messages sent to services.
5651 * bus/driver.c: (bus_driver_send_service_deleted),
5652 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5653 (bus_driver_send_service_acquired):
5654 Add helper functions for sending service related messages.
5656 (bus_driver_send_welcome_message):
5657 Send HELLO_REPLY instead of WELCOME.
5659 (bus_driver_handle_list_services):
5660 Send LIST_SERVICES_REPLY instead of SERVICES.
5662 (bus_driver_handle_own_service),
5663 (bus_driver_handle_service_exists):
5664 New message handlers.
5666 (bus_driver_handle_message):
5667 Invoke new message handlers.
5669 (bus_driver_remove_connection):
5670 Don't remove any services here since that's done automatically
5671 by bus_service_remove_owner now.
5674 New function signatures.
5676 * bus/services.c: (bus_service_add_owner):
5677 Send ServiceAcquired message if we're the only primary owner.
5679 (bus_service_remove_owner):
5680 Send ServiceAcquired/ServiceLost messages.
5682 (bus_service_set_prohibit_replacement),
5683 (bus_service_get_prohibit_replacement):
5684 Functions for setting prohibit replacement.
5686 (bus_service_has_owner):
5687 New function that checks if a connection is in the owner queue of
5691 Add new function signatures.
5693 * dbus/dbus-list.c: (_dbus_list_test):
5694 Add tests for _dbus_list_remove_last and traversing the list backwards.
5697 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5698 go any further, so return NULL then.
5700 * dbus/dbus-protocol.h:
5701 Add new messages, service flags and service replies.
5703 2003-01-26 Havoc Pennington <hp@pobox.com>
5705 * dbus/dbus-message-builder.c: implement, completely untested.
5707 * test/data/*: add data to be used in testing.
5708 ".message" files are our simple loadable text format.
5709 ".message-raw" will be binary dumps of messages.
5711 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5713 2003-01-26 Havoc Pennington <hp@pobox.com>
5715 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5717 * dbus/dbus-errors.c (dbus_result_to_string): add
5720 * dbus/dbus-message-builder.c: new file, will contain code to load
5721 up messages from files. Not implemented yet.
5723 2003-01-26 Havoc Pennington <hp@pobox.com>
5725 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5726 the sender by setting to NULL
5728 2003-01-26 Havoc Pennington <hp@pobox.com>
5730 The unit tests pass, but otherwise untested. If it breaks, the
5731 tests should have been better. ;-)
5733 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5736 * dbus/dbus-message.c: redo everything so we maintain
5737 message->header as the only copy of the various fields.
5738 This avoids the possibility of out-of-memory in some cases,
5739 for example dbus_message_lock() can't run out of memory anymore,
5740 and avoids extra copying. Figured I may as well go ahead and do
5741 this since it was busted for dbus_message_lock to not return
5742 failure on OOM, and dbus_message_write_header was totally
5743 unchecked for OOM. Also fixed some random other bugs.
5745 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5746 that strings are nul-terminated. Also, end_pos can be equal
5747 to string length just not greater than, I think.
5748 (_dbus_marshal_set_int32): new function
5749 (_dbus_marshal_set_uint32): new function
5750 (_dbus_marshal_set_string): new function
5752 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5753 a warning, init timeout_list to NULL
5754 (dbus_connection_send_message): don't use uninitialized variable
5757 * dbus/dbus-string.c (_dbus_string_replace_len): new function
5759 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5761 * bus/driver.c: (bus_driver_handle_hello),
5762 (bus_driver_send_welcome_message):
5765 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5767 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
5768 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5769 (dbus_connection_unref):
5770 * dbus/dbus-marshal.c: (_dbus_marshal_test):
5771 * dbus/dbus-message.c: (dbus_message_unref),
5774 (dbus_message_get_fields):
5775 Remove debugging printout.
5777 (_dbus_message_loader_return_buffer):
5778 Don't store the header string.
5780 (_dbus_message_test):
5783 2003-01-26 Richard Hult <rhult@codefactory.se>
5785 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
5786 the file descriptor list, since it can change under us.
5788 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5790 * glib/dbus-gmain.c: (dbus_connection_prepare),
5791 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
5792 (remove_watch), (dbus_connection_hookup_with_g_main):
5793 Rewrite the glib handling to use its own GSource instead of a
5794 GIOChannel so we can catch messages put in the queue while waiting
5797 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5800 * bus/connection.c: (connection_disconnect_handler),
5801 (connection_watch_callback), (bus_connection_setup):
5802 * bus/dispatch.c: (send_one_message),
5803 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
5804 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
5806 * bus/driver.c: (bus_driver_send_service_deleted),
5807 (bus_driver_send_service_created), (bus_driver_handle_hello),
5808 (bus_driver_send_welcome_message),
5809 (bus_driver_handle_list_services), (bus_driver_remove_connection),
5810 (bus_driver_handle_message):
5812 Refactor code, put the message dispatching in its own file. Use
5813 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
5816 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5818 * dbus/dbus-internals.h:
5819 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
5821 * dbus/dbus-message.c: (dbus_message_get_sender):
5822 * dbus/dbus-message.h:
5823 Implement dbus_message_get_sender.
5825 * dbus/dbus-protocol.h:
5826 Add message and service defines.
5828 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5830 * dbus/dbus-connection.c: (dbus_connection_send_message):
5831 * dbus/dbus-message-internal.h:
5832 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
5833 (dbus_message_write_header):
5834 Remove _dbus_messag_unlock and don't set the client serial on a
5835 message if one already exists.
5837 2003-01-24 Havoc Pennington <hp@pobox.com>
5839 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
5842 * bus/driver.c (bus_driver_handle_list_services): fix a leak
5845 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5847 * dbus/dbus-list.c: (alloc_link), (free_link):
5848 Use a memory pool for the links.
5850 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5852 * bus/connection.c: (bus_connection_foreach):
5854 Add new bus_connection_foreach function.
5856 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
5857 Add function that broadcasts a message to all clients.
5859 (bus_driver_send_service_created), (bus_driver_handle_hello),
5860 (bus_driver_send_welcome_message),
5861 (bus_driver_handle_list_services), (bus_driver_message_handler):
5862 Implement functions that take care of listing services, and notifying
5863 clients when new services are created.
5865 * bus/services.c: (bus_services_list):
5867 Add new function that returns an array of strings with the currently
5868 registered services.
5871 * glib/dbus-gmain.c:
5872 Update copyright year.
5874 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5876 * dbus/dbus-connection.c: (dbus_connection_send_message):
5877 Unlock the message in case it was sent earlier.
5879 (dbus_connection_send_message_with_reply_and_block):
5880 Remove the reply message from the list.
5882 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5883 Set array_len and new_pos correctly.
5885 (_dbus_marshal_test):
5886 Remove debug output.
5888 * dbus/dbus-message-internal.h:
5889 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
5890 New function that returns the reply serial.
5892 (_dbus_message_unlock):
5893 New function that unlocks a message and resets its header.
5895 (dbus_message_append_string_array),
5896 (dbus_message_get_fields_valist),
5897 (dbus_message_iter_get_field_type),
5898 (dbus_message_iter_get_string_array),
5899 (dbus_message_get_fields),
5900 (dbus_message_append_fields_valist):
5901 Handle string arrays.
5903 (dbus_message_set_sender):
5904 Make this function public since the bus daemon needs it.
5906 (decode_header_data):
5907 Set the reply serial to -1 initially.
5909 * dbus/dbus-message.h:
5910 Add dbus_message_set_sender.
5912 2003-01-24 Havoc Pennington <hp@pobox.com>
5914 * doc/dbus-specification.sgml: add some stuff
5916 2003-01-22 Havoc Pennington <hp@pobox.com>
5918 * doc/dbus-specification.sgml: Start to document the protocol.
5920 2003-01-22 Havoc Pennington <hp@pobox.com>
5922 * dbus/dbus-connection.c
5923 (dbus_connection_send_message_with_reply_and_block): add some @todo
5925 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
5927 2003-01-21 Havoc Pennington <hp@pobox.com>
5929 (patch untested because can't compile)
5931 * bus/driver.c (create_unique_client_name): make this function
5932 never recycle client names. Also, caller should initialize
5935 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
5937 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5939 * dbus/dbus-marshal.c: (_dbus_marshal_double),
5940 (_dbus_marshal_int32), (_dbus_marshal_uint32),
5941 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
5942 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
5943 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5944 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5945 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
5946 * dbus/dbus-marshal.h:
5947 * dbus/dbus-protocol.h:
5948 Add support for marshalling and demarshalling integer, double
5951 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5956 * bus/connection.c: (connection_disconnect_handler):
5957 Remove the connection from the bus driver's list.
5959 (connection_watch_callback): Dispatch messages.
5961 (free_connection_data): Free connection name.
5963 (bus_connection_setup): Add connection to the bus driver's list.
5964 (bus_connection_remove_owned_service):
5965 (bus_connection_set_name), (bus_connection_get_name):
5966 Add functions for setting and getting the connection's name.
5969 Add function headers.
5971 * bus/driver.c: (create_unique_client_name),
5972 (bus_driver_handle_hello_message),
5973 (bus_driver_send_welcome_message), (bus_driver_message_handler),
5974 (bus_driver_add_connection), (bus_driver_remove_connection):
5977 * bus/services.c: (bus_service_free):
5979 New file that handles communication and registreation with the bus
5982 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5984 * dbus/dbus-connection.c: (dbus_connection_send_message):
5985 Add a new client_serial parameter.
5987 (dbus_connection_send_message_with_reply):
5988 Remove a @todo since we've implemented the blocking function.
5990 (dbus_connection_send_message_with_reply_and_block):
5991 New function that sends a message and waits for a reply and
5992 then returns the reply.
5994 * dbus/dbus-connection.h:
5997 * dbus/dbus-errors.c: (dbus_result_to_string):
5998 * dbus/dbus-errors.h:
5999 Add new DBUS_RESULT.
6001 * dbus/dbus-message-internal.h:
6002 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6003 (_dbus_message_set_sender), (dbus_message_write_header),
6004 (dbus_message_new_reply), (decode_header_data),
6005 (_dbus_message_loader_return_buffer), (_dbus_message_test):
6006 * dbus/dbus-message.h:
6007 Add new functions that set the reply serial and sender.
6008 Also marshal and demarshal them correctly and add test.
6010 * dbus/dbus-protocol.h:
6011 Add new DBUS_MESSAGE_TYPE_SENDER.
6014 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6015 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6016 (dbus_connection_hookup_with_g_main):
6017 * glib/test-dbus-glib.c: (main):
6018 Rewrite to use GIOChannel and remove the GSource crack.
6020 * test/echo-client.c: (main):
6021 * test/watch.c: (check_messages):
6022 Update for changed APIs
6024 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6026 * dbus/Makefile.am: Add dbus-timeout.[cħ]
6028 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6029 Create a DBusTimeoutList.
6030 (dbus_connection_set_timeout_functions): Add new function to
6031 set timeout callbacks
6033 * dbus/dbus-connection.h: Add public DBusTimeout API.
6035 * dbus/dbus-message.c: (dbus_message_get_service):
6036 * dbus/dbus-message.h: New function.
6038 * dbus/dbus-server.c: Fix small doc typo.
6040 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6042 2003-01-19 Anders Carlsson <andersca@codefactory.se>
6044 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6045 of the string, just as long as specified.
6047 2003-01-19 Havoc Pennington <hp@pobox.com>
6049 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6052 * dbus/dbus-server.c (dbus_server_set_max_connections)
6053 (dbus_server_get_max_connections, dbus_server_get_n_connections):
6054 keep track of current number of connections, and add API for
6055 setting a max (but haven't implemented enforcing the max yet)
6057 2003-01-18 Havoc Pennington <hp@pobox.com>
6059 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6060 reading/writing if read_watch != NULL or write_watch != NULL.
6062 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6063 the message loader code to actually load message->header and
6064 message->body into the newly-created message.
6066 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6069 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6070 (dbus_connection_get_max_message_size)
6071 (dbus_connection_set_max_live_messages_size)
6072 (dbus_connection_get_max_live_messages_size): implement some
6073 resource limitation functions
6075 * dbus/dbus-resources.c: new file implementing some of the
6076 resource limits stuff
6078 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
6079 missing docs, add @todo to handle OOM etc.
6081 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
6084 2003-01-18 Havoc Pennington <hp@pobox.com>
6086 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6087 connection if it hasn't been already.
6089 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6090 replace with DisconnectFunction.
6092 2003-01-18 Havoc Pennington <hp@pobox.com>
6094 Building --disable-verbose-mode --disable-asserts --disable-tests
6095 cuts the library from 112K to 45K or so
6097 * configure.in: check for varargs macro support,
6098 add --enable-verbose-mode, --enable-asserts.
6100 * dbus/dbus-internals.h (_dbus_assert): support
6102 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6104 2003-01-18 Havoc Pennington <hp@pobox.com>
6106 * dbus/dbus-test.c: include config.h so that tests actually run
6108 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6109 so the failure mode when that assumption fails will be plenty
6112 2003-01-18 Havoc Pennington <hp@pobox.com>
6114 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6116 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6119 * test/Makefile.am: don't use special variable "TESTS" for echo-*
6120 since we don't want to use those in make check
6122 2003-01-15 Havoc Pennington <hp@redhat.com>
6128 2003-01-15 Havoc Pennington <hp@redhat.com>
6130 * test/Makefile.am: fix so that test source code ends up in the
6131 distribution on make distcheck
6133 2003-01-15 Havoc Pennington <hp@redhat.com>
6139 2003-01-15 Havoc Pennington <hp@redhat.com>
6141 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6142 fix build when --disable-tests
6144 * Makefile.am (EXTRA_DIST): put HACKING in here
6146 * HACKING: document procedure for making a tarball release.
6148 2003-01-14 Anders Carlsson <andersca@codefactory.se>
6150 * bus/connection.c: (connection_error_handler),
6151 (bus_connection_setup):
6152 * bus/main.c: (main):
6153 Make sure that the DBusConnectionData struct is NULLed
6154 out to prevent a segfault.
6156 * dbus/dbus-errors.c: (dbus_result_to_string):
6157 * dbus/dbus-errors.h:
6158 * dbus/dbus-message.c: (dbus_message_get_fields),
6159 (dbus_message_get_fields_valist), (_dbus_message_test):
6160 * dbus/dbus-message.h:
6161 Make dbus_message_get_fields return a result code so we can
6162 track invalid fields as well as oom.
6164 2003-01-11 Havoc Pennington <hp@pobox.com>
6166 * configure.in: change --enable-test/--enable-ansi action-if-given
6167 to enable_foo=$enableval instead of enable_foo=yes
6169 2003-01-08 Havoc Pennington <hp@pobox.com>
6171 * dbus/dbus-string.c (_dbus_string_align_length): new function
6173 * dbus/dbus-test-main.c: move main() for test app here
6175 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6176 symbol to run tests, because dbus-test isn't in the main
6179 Code review nitpicks.
6181 * dbus/dbus-message.c (dbus_message_write_header): add newlines
6182 for people with narrow emacs ;-). Assert client_serial was filled
6183 in. Assert message->name != NULL.
6184 (dbus_message_append_fields): have "first_field_type" arg separate
6185 from va list, needed for C++ binding that also uses varargs IIRC
6186 and helps with type safety
6187 (dbus_message_new): add @todo about using DBusString to store
6188 service/name internally
6189 (dbus_message_new): don't leak ->service and ->name on OOM later
6191 (dbus_message_unref): free the service name
6192 (dbus_message_get_fields): same change to varargs
6193 i.e. first_field_type
6194 (_dbus_message_loader_return_buffer): assert that the message data
6195 is aligned (if not it's a bug in our code). Put in verbose griping
6196 about why we set corrupted = TRUE.
6197 (decode_header_data): add FIXME that char* is evil. Was going to
6198 add FIXME about evil locale-specific string.h strncmp, but just
6199 switched to wacky string-as-uint32 optimization. Move check for
6200 "no room for field name" above get_const_data_len() to avoid
6201 assertion failure in get_const_data_len if we have trailing 2
6202 bytes or the like. Check for service and name fields being
6203 provided twice. Don't leak service/name on error. Require field
6204 names to be aligned to 4 bytes.
6206 * dbus/dbus-marshal.c: move byte swap stuff to header
6207 (_dbus_pack_int32): uscore-prefix
6208 (_dbus_unpack_int32): uscore-prefix
6209 (_dbus_unpack_uint32): export
6210 (_dbus_demarshal_string): add @todo complaining about use of
6212 (_dbus_marshal_get_field_end_pos): add @todo about bad error
6213 handling allowing corrupt data to go unchecked
6215 2003-01-08 Havoc Pennington <hp@redhat.com>
6217 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6218 to the select() as needed for authentication. (should be using
6219 _dbus_poll() not select, but for another day)
6221 * dbus/dbus.h: include dbus/dbus-protocol.h
6223 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6225 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6228 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6230 * dbus/dbus-internals.c: (_dbus_type_to_string):
6231 New function that returns a string describing a type.
6233 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
6234 * dbus/dbus-marshal.h:
6235 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
6236 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
6237 (dbus_message_iter_get_byte_array):
6238 * dbus/dbus-message.h:
6239 Add new convenience functions for appending and getting message fields.
6240 Also add demarshalling routines for byte arrays.
6242 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6244 * dbus/dbus-connection-internal.h:
6245 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6246 (_dbus_connection_get_next_client_serial),
6247 (dbus_connection_send_message):
6248 * dbus/dbus-internals.h:
6249 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
6250 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
6251 (_dbus_marshal_uint32), (_dbus_demarshal_double),
6252 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
6253 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
6254 (_dbus_verbose_bytes), (_dbus_marshal_test):
6255 * dbus/dbus-marshal.h:
6256 * dbus/dbus-message-internal.h:
6257 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
6258 (dbus_message_write_header), (_dbus_message_lock),
6259 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
6260 (dbus_message_get_name), (dbus_message_append_int32),
6261 (dbus_message_append_uint32), (dbus_message_append_double),
6262 (dbus_message_append_string), (dbus_message_append_byte_array),
6263 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
6264 (dbus_message_iter_unref), (dbus_message_iter_has_next),
6265 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
6266 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
6267 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
6268 (decode_header_data), (_dbus_message_loader_return_buffer),
6269 (message_iter_test), (_dbus_message_test):
6270 * dbus/dbus-message.h:
6271 * dbus/dbus-protocol.h:
6272 * dbus/dbus-test.c: (main):
6274 * glib/test-dbus-glib.c: (message_handler), (main):
6275 * test/echo-client.c: (main):
6276 * test/watch.c: (check_messages):
6277 Make messages sendable and receivable for real.
6279 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6281 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6282 (_dbus_marshal_string), (_dbus_marshal_byte_array):
6283 * dbus/dbus-message.c: (dbus_message_append_int32),
6284 (dbus_message_append_uint32), (dbus_message_append_double),
6285 (dbus_message_append_string), (dbus_message_append_byte_array):
6286 Handle OOM restoration.
6288 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6290 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6291 (_dbus_demarshal_string), (_dbus_marshal_test):
6292 * dbus/dbus-marshal.h:
6293 * dbus/dbus-message.c: (dbus_message_get_name),
6294 Document these functions.
6296 (dbus_message_append_int32), (dbus_message_append_uint32),
6297 (dbus_message_append_double), (dbus_message_append_string),
6298 (dbus_message_append_byte_array):
6299 * dbus/dbus-message.h:
6300 Add functions for adding message fields of different types.
6302 * dbus/dbus-protocol.h:
6303 Add the different types.
6305 2003-01-05 Havoc Pennington <hp@pobox.com>
6307 * bus/connection.c: implement routines for handling connections,
6308 first thing is keeping a list of owned services on each connection
6309 and setting up watches etc.
6311 * bus/services.c: implement a mapping from service names to lists
6314 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
6316 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
6317 to use static mutexes for global data
6319 * dbus/dbus-connection.c (dbus_connection_set_data): add new
6320 collection of functions to set/get application-specific data
6321 on the DBusConnection.
6323 2003-01-04 Havoc Pennington <hp@pobox.com>
6325 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
6326 (_dbus_poll): new function
6328 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
6331 * bus/loop.c: initial code for the daemon main loop
6333 2003-01-04 Havoc Pennington <hp@pobox.com>
6335 * test/watch.c (error_handler): make it safe if the error handler
6336 is called multiple times (if we s/error handler/disconnect
6337 handler/ we should just guarantee it's called only once)
6339 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
6340 error handler on disconnect (it's quite possible we should
6341 just change the error handler to a "disconnect handler," I'm
6342 not sure we have any other meaningful errors)
6344 * configure.in: check for getpwnam_r
6346 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
6347 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
6348 mechanism as in SASL spec, using socket credentials
6350 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
6351 (_dbus_send_credentials_unix_socket): new function
6353 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
6355 (_dbus_write): only check errno if <0 returned
6356 (_dbus_write_two): ditto
6358 2003-01-02 Anders Carlsson <andersca@codefactory.se>
6360 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
6361 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
6362 (_dbus_marshal_test):
6363 * dbus/dbus-marshal.h:
6364 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
6365 to _dbus_marshal_utf8_string. Also fix some tests.
6367 2002-12-28 Harri Porten <porten@kde.org>
6369 * configure.in: added check for C++ compiler and a very cheesy
6370 check for the Qt integration
6372 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
6374 * qt/Makefile.am: added
6376 * qt/.cvsignore: added
6378 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
6379 latter, added #ifdef QT_THREAD_SUPPORT guard.
6381 * dbus/Makefile.am: added missing headers for make dist
6383 2002-12-28 Kristian Rietveld <kris@gtk.org>
6385 * dbus/Makefile.am: fixup export-symbols-regex.
6387 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6389 * acinclude.m4: Add this file and put the
6390 PKG_CHECK_MODULE macro in it.
6392 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6394 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6395 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6396 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6397 (_dbus_marshal_test):
6398 Make the demarshalling routines align the pos argument.
6399 Add string marshalling tests and fix the obvious bugs
6402 2002-12-26 Havoc Pennington <hp@pobox.com>
6404 * dbus/dbus-auth.c: fixes fixes fixes
6406 * dbus/dbus-transport-unix.c: wire up support for
6407 encoding/decoding data on the wire
6409 * dbus/dbus-auth.c (_dbus_auth_encode_data)
6410 (_dbus_auth_decode_data): append to target string
6411 instead of nuking it.
6413 2002-12-26 Havoc Pennington <hp@pobox.com>
6415 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
6416 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
6419 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
6420 avoid swap_bytes() overhead (ignoring possible assembly stuff for
6421 now). Main point is because I wanted unpack_uint32 to implement
6423 (_dbus_verbose_bytes): new function
6425 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
6427 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
6428 mechanism to handle a corrupt message stream
6429 (_dbus_message_loader_new): fix preallocation to only prealloc,
6432 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
6433 (_dbus_string_test): enhance tests for copy/move and fix the
6436 * dbus/dbus-transport-unix.c: Hold references in more places to
6437 avoid reentrancy problems
6439 * dbus/dbus-transport.c: ditto
6441 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
6442 leak reference count in no-message case
6444 * test/watch.c (do_mainloop): handle adding/removing watches
6445 during iteration over the watches. Also, ref the connection/server
6446 stored on a watch, so we don't try to mangle a destroyed one.
6448 * dbus/dbus-transport-unix.c (do_authentication): perform
6451 * dbus/dbus-auth.c (get_state): add a state
6452 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
6453 (_dbus_auth_get_unused_bytes): append the unused bytes
6454 to the passed in string, rather than prepend
6456 * dbus/dbus-transport.c (_dbus_transport_init_base): create
6457 the auth conversation DBusAuth
6459 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
6460 (_dbus_transport_new_for_domain_socket): when creating a
6461 transport, pass in whether it's a client-side or server-side
6462 transport so we know which DBusAuth to create
6464 2002-12-03 Havoc Pennington <hp@pobox.com>
6466 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6467 _after_ finalizing the derived members
6468 (unix_connection_set): unref watch if we fail to add it
6470 * dbus/dbus-connection.c (dbus_connection_unref): delete the
6471 transport first, so that the connection owned by the
6472 transport will be valid as the transport finalizes.
6474 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6475 if necessary, and remove watches from the connection.
6477 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6479 2002-12-26 Anders Carlsson <andersca@codefactory.se>
6481 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6482 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6483 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6484 (_dbus_marshal_test):
6485 * dbus/dbus-marshal.h:
6486 Add string marshal functions and have the demarshal functions
6487 return the new position.
6489 2002-12-25 Havoc Pennington <hp@pobox.com>
6491 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6492 it is a simple protocol that just maps directly to SASL.
6494 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6495 initial implementation, not actually used yet.
6497 * dbus/dbus-string.c (_dbus_string_find): new function
6498 (_dbus_string_equal): new function
6499 (_dbus_string_base64_encode): new function
6500 (_dbus_string_base64_decode): new function
6502 2002-12-25 Anders Carlsson <andersca@codefactory.se>
6505 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6506 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6507 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6508 (_dbus_demarshal_uint32), (_dbus_marshal_test):
6509 * dbus/dbus-marshal.h:
6510 * dbus/dbus-protocol.h:
6511 * dbus/dbus-test.c: (main):
6513 Add un-optimized marshalling/demarshalling routines.
6515 2002-12-25 Harri Porten <porten@kde.org>
6517 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6519 2002-12-24 Zack Rusin <zack@kde.org>
6521 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6522 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6525 2002-12-24 Havoc Pennington <hp@pobox.com>
6527 * glib/dbus-gthread.c: fix include
6529 * glib/dbus-glib.h: rename DBusMessageHandler for now.
6530 I think glib API needs to change, though, as you don't
6531 want to use DBusMessageFunction, you want to use the
6532 DBusMessageHandler object. Probably
6533 dbus_connection_open_with_g_main_loop()
6534 and dbus_connection_setup_g_main_loop() or something like that
6535 (but think of better names...) that just create a connection
6536 that has watch/timeout functions etc. already set up.
6538 * dbus/dbus-connection.c
6539 (dbus_connection_send_message_with_reply): new function just to
6540 show how the message handler helps us deal with replies.
6542 * dbus/dbus-list.c (_dbus_list_remove_last): new function
6544 * dbus/dbus-string.c (_dbus_string_test): free a string that
6547 * dbus/dbus-hash.c: use memory pools for the hash entries
6548 (rebuild_table): be more paranoid about overflow, and
6549 shrink table when we can
6550 (_dbus_hash_test): reduce number of sprintfs and write
6551 valid C89. Add tests for case where we grow and then
6552 shrink the hash table.
6554 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6556 * dbus/dbus-connection.c (dbus_connection_register_handler)
6557 (dbus_connection_unregister_handler): new functions
6559 * dbus/dbus-message.c (dbus_message_get_name): new
6561 * dbus/dbus-list.c: fix docs typo
6563 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6564 an object representing a handler for messages.
6566 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6569 * glib/dbus-gthread.c: (dbus_gthread_init):
6570 Don't use the gdbus prefix for public functions.
6572 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6576 Add GLib checks and fixup .pc files
6580 * glib/dbus-gmain.c: (gdbus_connection_prepare),
6581 (gdbus_connection_check), (gdbus_connection_dispatch),
6582 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6583 (dbus_connection_gsource_new):
6584 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6585 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6586 * glib/test-dbus-glib.c: (message_handler), (main):
6589 2002-12-15 Harri Porten <porten@kde.org>
6591 * autogen.sh: check for libtoolize before attempting to use it
6593 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6596 * .cvsignore: ignore more stamp files
6598 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6600 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6601 without make install.
6603 2002-12-15 Havoc Pennington <hp@pobox.com>
6605 * dbus/dbus-threads.c: add thread stubs that a higher library
6606 layer can fill in. e.g. the GLib wrapper might fill them in with
6607 GThread stuff. We still need to use this thread API to
6608 thread-safe-ize the library.
6610 2002-12-12 Havoc Pennington <hp@pobox.com>
6612 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6613 below new interfaces and include fewer system headers.
6615 * dbus/dbus-sysdeps.c (_dbus_read): new function
6616 (_dbus_write): new function
6617 (_dbus_write_two): new function
6618 (_dbus_connect_unix_socket): new function
6619 (_dbus_listen_unix_socket): new function
6621 * dbus/dbus-message-internal.h: change interfaces to use
6624 2002-12-11 Havoc Pennington <hp@pobox.com>
6626 * dbus/dbus-types.h: add dbus_unichar
6628 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6630 * dbus/dbus-connection.c (dbus_connection_send_message): return
6633 * dbus/dbus-transport.c: include dbus-watch.h
6635 * dbus/dbus-connection.c: include dbus-message-internal.h
6637 * HACKING: add file with coding guidelines stuff.
6639 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6640 handling here, for security purposes (as in vsftpd). Not actually
6641 using this class yet.
6643 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6644 system/libc usage here, as in vsftpd, for ease of auditing (and
6645 should also simplify portability). Haven't actually moved all the
6646 system/libc usage into here yet.
6648 2002-11-25 Havoc Pennington <hp@pobox.com>
6650 * dbus/dbus-internals.c (_dbus_verbose): fix to not
6651 always print the first verbose message.
6653 2002-11-24 Havoc Pennington <hp@pobox.com>
6655 * test/echo-client.c, test/echo-server.c: cheesy test
6658 * configure.in (AC_CHECK_FUNCS): check for writev
6660 * dbus/dbus-message.c (_dbus_message_get_network_data): new
6663 * dbus/dbus-list.c (_dbus_list_foreach): new function
6665 * dbus/dbus-internals.c (_dbus_verbose): new function
6667 * dbus/dbus-server.c, dbus/dbus-server.h: public object
6668 representing a server that listens for connections.
6670 * dbus/.cvsignore: create
6672 * dbus/dbus-errors.h, dbus/dbus-errors.c:
6673 public API for reporting errors
6675 * dbus/dbus-connection.h, dbus/dbus-connection.c:
6676 public object representing a connection that
6677 sends/receives messages. (Same object used for
6678 both client and server.)
6680 * dbus/dbus-transport.h, dbus/dbus-transport.c:
6681 Basic abstraction for different kinds of stream
6682 that we might read/write messages from.
6684 2002-11-23 Havoc Pennington <hp@pobox.com>
6686 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6689 * dbus/dbus-test.c (main): add list test, and include
6690 dbus-test.h as intended
6692 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6693 (_dbus_hash_table_remove_int): return value indicates
6694 whether the entry existed to remove
6696 * dbus/dbus-list.c: add linked list utility class,
6699 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6702 2002-11-23 Havoc Pennington <hp@pobox.com>
6704 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6705 DBUS_END_DECLS to nothing, that should fix this once and for all
6707 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6709 * dbus/dbus-message.c, dbus/dbus-hash.c:
6710 add some missing @brief
6712 2002-11-23 Havoc Pennington <hp@pobox.com>
6714 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6715 to avoid confusing Doxygen
6717 * dbus/dbus-hash.c: @} not }@
6719 * dbus/dbus-message.c (struct DBusMessage): split out
6722 2002-11-23 Havoc Pennington <hp@pobox.com>
6724 * configure.in: pile on more warning flags if using gcc
6726 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6727 to document static functions
6729 * configure.in: add summary to end of configure so it
6730 looks nice and attractive
6732 * dbus/dbus-hash.c: finish implementation and write unit
6735 * configure.in: add --enable-tests to enable unit tests
6737 * dbus/dbus-test.c: test program to run unit tests
6738 for all files in dbus/*, initially runs a test for
6741 * dbus/dbus-internals.h: file to hold some internal utility stuff
6743 2002-11-22 Havoc Pennington <hp@redhat.com>
6745 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6746 "ported" away from Tcl
6748 * dbus/dbus-types.h: header for types such as dbus_bool_t
6750 2002-11-22 Havoc Pennington <hp@redhat.com>
6752 * dbus/dbus.h: fixups for doc warnings
6754 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6756 (QUIET): make it quiet so we can see warnings
6758 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
6760 2002-11-22 Havoc Pennington <hp@redhat.com>
6762 * Makefile.am: include "Doxyfile" target in all-local
6764 * configure.in: generate the Doxyfile
6766 * Doxyfile.in: move Doxyfile here, so we can use
6767 configure to generate a Doxyfile with the right
6770 2002-11-22 Havoc Pennington <hp@redhat.com>
6772 * dbus/dbus-message.c: move inline docs into .c file
6774 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
6775 so all docs are under doc/
6776 (MAN_EXTENSION): generate man pages. Use extension
6777 ".3dbus" which matches ".3qt" on my system,
6778 I guess this is OK, I don't know really.
6779 (FILE_PATTERNS): look for .c files not .h, makes sense
6782 2002-11-22 Havoc Pennington <hp@pobox.com>
6784 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
6785 because any app can be a server, and any app can be a client,
6786 the bus is a special kind of server.
6788 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
6790 * Doxyfile : adding. Still needs Makefile rules to be generated
6791 automatically (just run "doxygen" in the toplevel dir for now to
6794 * dbus/dbus-message.h : Adding sample docs (javadoc since
6795 resembles gtk-doc a little more)
6797 * dbus/dbus.h : Adding sample docs
6799 2002-11-21 Havoc Pennington <hp@redhat.com>
6801 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
6802 so we can allow ourselves to include files directly,
6803 instead of having to use dbus.h
6805 * dbus/dbus.h: fill in
6807 * dbus/dbus-message.h: sketch out a sample header file.
6808 Include griping if you include it directly instead of
6811 * dbus/dbus-macros.h: new file with macros for extern "C",
6812 TRUE/FALSE, NULL, etc.
6814 * doc/file-boilerplate.c: put include guards in here
6816 2002-11-21 Havoc Pennington <hp@redhat.com>
6818 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
6820 * COPYING: include the GPL as well, and license code
6821 under both AFL and GPL.
6823 2002-11-21 Havoc Pennington <hp@redhat.com>
6825 * acconfig.h: get rid of this
6827 * autogen.sh (run_configure): add --no-configure option
6829 * configure.in: remove AC_ARG_PROGRAM to make
6830 autoconf complain less. add AC_PREREQ.
6831 add AC_DEFINE third arg.
6833 2002-11-21 Anders Carlsson <andersca@codefactory.se>
6836 Fix references so we can distcheck.
6838 2002-11-21 Havoc Pennington <hp@redhat.com>
6840 * Initial module creation