1 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
3 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
5 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
7 * mono/DBusType/Dict.cs: Handle empty dicts
8 * mono/DBusType/Array.cs: Handle empty arrays
9 * mono/Arguments.cs: Handle empty arguments
11 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
13 * dbus-sharp.pc.in: Modified to include include Libs and Requires
16 2004-04-25 Kristian Høgsberg <krh@redhat.com>
18 * test/data/valid-messages/standard-*.message: Update message
19 test scripts to new header field names.
21 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
23 * test/break-loader.c (randomly_do_n_things): tracked down buffer
24 overflow to times_we_did_each_thing array which would chop off the
25 first character of the failure_dir string. Increased the size of
26 the array to 7 to reflect the number of random mutation functions
29 2004-04-21 Kristian Høgsberg <krh@redhat.com>
31 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
32 unix_server->watch here, it is unreffed in disconnect.
33 (_dbus_server_new_for_tcp_socket): convert NULL host to
34 "localhost" here so we don't append NULL to address.
36 * dbus/dbus-server.c (_dbus_server_test): Add test case for
37 various addresses, including tcp with no explicit host.
39 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
41 * dbus/dbus-message.c (decode_header_data, decode_string_field):
42 fix incorrect setting of .name_offset in the HeaderField (it was
43 off by two bytes, positioned right after the name and typecode)
45 * bus/bus.c (bus_context_new, bus_context_unref): test before
46 calling dbus_server_free_data_slot and _dbus_user_database_unref
49 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
52 2004-04-19 Kristian Høgsberg <krh@redhat.com>
54 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
55 _dbus_poll() instead of select().
57 2004-04-15 Jon Trowbridge <trow@ximian.com>
59 * bus/main.c (signal_handler): Reload the configuration files
61 (main): Set up our SIGHUP handler.
63 * bus/bus.c (struct BusContext): Store the config file, user and
64 fork flag in the BusContext.
65 (process_config_first_time_only): Added. Contains the code
66 (previously in bus_context_new) for setting up the BusContext from
67 the BusConfigParser that should only be run the first time the
68 config files are read.
69 (process_config_every_time): Added. Contains the code (previously
70 in bus_context_new) for setting up the BusContext from the
71 BusConfigParser that should be run every time the config files are
73 (load_config): Added. Builds a BusConfigParser from the config
74 files and passes the resulting structure off to
75 process_config_first_time_only (assuming this is the first time)
76 and process_config_every_time.
77 (bus_context_new): All of the config-related code has been moved
78 to process_config_first_time_only and process_config_every_time.
79 Now this function just does the non-config-related initializations
80 and calls load_config.
81 (bus_context_reload_config): Added.
83 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
85 * bus/driver.c (bus_driver_handle_get_service_owner):
86 implement a GetServiceOwner method.
87 * doc/dbus-specification.xml: document it.
88 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
90 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
91 implement, using the bus GetServiceOwner method.
93 * test/glib/test-dbus-glib.c:
94 use dbus_gproxy_new_for_service_owner so that we can receive the
97 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
99 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
100 dbus/dbus-message.c, dbus/dbus-protocol.h
101 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
103 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
104 dbus/dbus-message.c, dbus/dbus-protocol.h
105 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
107 * dbus/dbus-internals.c (_dbus_header_field_to_string):
108 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
109 DBUS_HEADER_FIELD_SENDER resolves to "sender"
111 * doc/dbus-specification.xml (Header Fields Table):
112 s/SERVICE/DESTINATION
113 s/SENDER_SERVICE/SENDER
116 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
118 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
121 2004-04-13 Michael Meeks <michael@ximian.com>
123 * glib/dbus-gobject.c (handle_introspect): split out
124 (introspect_properties): this.
125 (handle_introspect): implement this.
127 * test/glib/Makefile.am: use the absolute path so the bus
128 daemon's chdir ("/") doesn't kill us dead.
130 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
132 2004-04-12 Jon Trowbridge <trow@ximian.com>
134 * bus/config-parser.c (struct BusConfigParser): Added
135 included_files field.
136 (seen_include): Added. Checks whether or not a file has already
137 been included by any parent BusConfigParser.
138 (bus_config_parser_new): Copy the parent's included_files.
139 (include_file): Track which files have been included, and fail on
141 (process_test_valid_subdir): Changed printf to report if we are
142 testing valid or invalid conf files.
143 (all_are_equiv): Changed printf to be a bit clearer about
144 what we are actually doing.
145 (bus_config_parser_test): Test invalid configuration files.
147 2004-04-09 Jon Trowbridge <trow@ximian.com>
149 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
150 argument. If non-null, the newly-constructed BusConfigParser will
151 be initialized with the parent's BusLimits instead of the default
153 (include_file): When including a config file, pass in
154 the current parser as the parent and then copy the BusLimits
155 from the included BusConfigParser pack to the current parser.
156 (process_test_valid_subdir): Renamed from process_test_subdir.
157 (process_test_equiv_subdir): Added. Walks through a directory,
158 descending into each subdirectory and loading the config files
159 it finds there. If any subdirectory contains two config files
160 that don't produce identical BusConfigParser structs, fail.
161 For now, the BusConfigParser's BusPolicies are not compared.
162 (bus_config_parser_test): Call both process_test_valid_subdir and
163 process_test_equiv_subdir.
165 * bus/config-loader-libxml.c (bus_config_load): Take a parent
166 argument and pass it along to the call to bus_config_parser_new.
167 Also made a few small changes to allow this code to compile.
169 * bus/config-loader-expat.c (bus_config_load): Take a parent
170 argument and pass it along to the call to bus_config_parser_new.
172 * bus/bus.c (bus_context_new): Load the config file
173 with a NULL parent argument.
175 2004-03-29 Michael Meeks <michael@ximian.com>
177 * glib/dbus-gobject.c (introspect_properties): split
178 out, fix mangled 'while' flow control.
179 (introspect_signals): implement.
180 (handle_introspect): update.
182 2004-03-29 Michael Meeks <michael@ximian.com>
184 * glib/dbus-gobject.c (set_object_property): split out /
185 re-work, use the property type, and not the message type(!)
186 (get_object_property): ditto.
188 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
189 (dbus_gvalue_marshal): make this code re-usable, needed
190 for signals too, also on both proxy and server side.
191 Re-write for more efficiency / readability.
193 2004-03-29 Michael Meeks <michael@ximian.com>
195 * dbus/dbus-message.c
196 (dbus_message_new_error_printf): impl.
198 * dbus/dbus-connection.c
199 (dbus_connection_unregister_object_path): fix warning.
201 * configure.in: fix no-mono-installed situation.
203 2004-03-27 Havoc Pennington <hp@redhat.com>
205 Patch from Timo Teräs:
207 * tools/dbus-send.c (main): if --print-reply, assume type is
208 method call; support boolean type args
210 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
211 bunch of memleak and logic bugs
213 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
216 * mono/Introspector.cs:
218 * mono/InterfaceProxy.cs:
220 * mono/ProxyBuilder.cs:
222 Added InterfaceProxy class to avoid building proxies for every
226 * dbus-message.c (dbus_message_append_args_valist)
227 (dbus_message_iter_get_object_path)
228 (dbus_message_iter_get_object_path_array)
229 (dbus_message_iter_append_object_path)
230 (dbus_message_iter_append_object_path_array):
231 Added object_path iter functions to handle OBJECT_PATH arguments
233 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
235 First checkin of mono bindings.
238 Build stuff for the bindings
239 * dbus-sharp.pc.in: Added for pkgconfig
241 2004-03-21 Havoc Pennington <hp@redhat.com>
243 * test/test-service.c (main): remove debug spew
245 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
247 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
250 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
251 (dbus_message_iter_init_array_iterator)
252 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
253 indicate whether the iterator is empty
255 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
258 2004-03-19 Havoc Pennington <hp@redhat.com>
264 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
266 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
267 you don't need pyrex to make dist
269 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
272 2004-03-18 Richard Hult <richard@imendio.com>
274 * dbus/dbus-message.c (dbus_message_get_auto_activation)
275 (dbus_message_set_auto_activation): Add doxygen docs.
277 2004-03-16 Richard Hult <richard@imendio.com>
279 * bus/activation.c: (bus_activation_service_created),
280 (bus_activation_send_pending_auto_activation_messages),
281 (bus_activation_activate_service):
283 * bus/dispatch.c: (bus_dispatch),
284 (check_nonexistent_service_auto_activation),
285 (check_service_auto_activated),
286 (check_segfault_service_auto_activation),
287 (check_existent_service_auto_activation), (bus_dispatch_test):
288 * bus/driver.c: (bus_driver_handle_activate_service):
289 * bus/services.c: (bus_registry_acquire_service):
290 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
291 (dbus_message_get_auto_activation):
292 * dbus/dbus-message.h:
293 * dbus/dbus-protocol.h: Implement auto-activation.
295 * doc/dbus-specification.xml: Add auto-activation to the spec.
297 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
299 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
300 fix a bug with CUSTOM types.
302 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
303 a unit test for this bug (used to fail).
305 2004-03-12 Mikael Hallendal <micke@imendio.com>
308 (babysitter_watch_callback): notify all pending activations waiting for
309 the same exec that the activation failed.
310 (bus_activation_activate_service): shortcut the activation if we
311 already waiting for the same executable to start up.
313 2004-03-12 Mikael Hallendal <micke@imendio.com>
316 - Added service file reloading.
317 Each service files directory is kept in an hash table in
318 BusActivation and each BusActivationEntry knows what .service-file it
319 was read from. So when you try to activate a service the bus will
320 check if it's been updated, removed or if new .service-files has
322 - Test code at the bottom for the service file reloading.
323 * bus/test-main.c: (main):
325 - added service reloading test.
326 * dbus/dbus-sysdeps.c:
327 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
329 2004-03-08 Michael Meeks <michael@ximian.com>
331 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
332 bail immediately if disconnected, to avoid busy loop.
334 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
335 cleanup cut/paste/inefficiency.
337 2004-03-01 David Zeuthen <david@fubar.dk>
339 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
340 bug where args were used twice. This bug resulted in a segfault
341 on a Debian/PPC system when starting the messagebus daemon. Include
342 dbus-sysdeps.h for DBUS_VA_COPY
344 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
346 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
347 appropriate va_copy implementation. From GLib
349 2004-02-24 Joe Shaw <joe@ximian.com>
351 * bus/services.c (bus_registry_acquire_service): We need to pass
352 in the service name to dbus_set_error() to prevent a crash.
354 2003-12-26 Anders Carlsson <andersca@gnome.org>
356 * AUTHORS: Reveal my True identity.
358 2003-12-17 Mikael Hallendal <micke@imendio.com>
360 * dbus/dbus-message.c: (dbus_message_append_args_valist):
361 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
363 2003-12-13 Mikael Hallendal <micke@imendio.com>
365 * doc/TODO: Added not about better error check of configuration files.
367 2003-12-02 Richard Hult <richard@imendio.com>
369 * Update AFL version to 2.0 throughout the source files to reflect
370 the update that was done a while ago.
372 2003-12-02 Richard Hult <richard@imendio.com>
374 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
375 wrote_dict_key to FALSE on the iter that the dict is appended to,
376 just like when appending other types. Fixes a bug where a dict
377 couldn't be put inside a dict.
378 (dbus_message_iter_append_dict_key): Fix typo in warning message.
379 (message_iter_test, _dbus_message_test): Add test case for dict
382 2003-12-01 David Zeuthen <david@fubar.dk>
384 * python/dbus.py: Add the actual message when calling the reciever
385 of a signal such that parameters can be inspected. Add the method
386 remove_signal_receiver
388 2003-11-26 Mikael Hallendal <micke@imendio.com>
392 * glib/*.[ch]: Made ref functions return the pointer
394 2003-11-25 Zack Rusin <zack@kde.org>
396 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
398 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
401 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
402 the Integrator and to better fit with the server,
404 2003-11-24 Zack Rusin <zack@kde.org>
406 * qt/connection.h, qt/connection.cpp: removing initDbus method since
407 the integrator handles it now
409 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
410 since QTimer wasn't really meant to be used the way DBusTimeout is
412 2003-11-24 Zack Rusin <zack@kde.org>
414 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
415 Integrator class which integrates D-BUS with the Qt event loop,
417 * qt/connection.h, qt/connection.cpp: Move all the code which
418 was dealing with D-BUS integration to the Integrator class,
419 and start using Integrator,
421 2003-11-23 Zack Rusin <zack@kde.org>
423 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
426 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
427 switching namespaces to DBusQt, reworking the class,
429 * Makefile.cvs: switching dependencies so that it matches KDE
432 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
435 2003-11-19 Havoc Pennington <hp@redhat.com>
439 * configure.in: bump version to 0.20
441 * configure.in (have_qt): add yet another place to look for qt
442 (someone hand trolltech a .pc file...)
444 2003-11-01 Havoc Pennington <hp@redhat.com>
446 * doc/dbus-specification.xml: add state machine docs on the auth
447 protocol; just a first draft, I'm sure it's wrong.
449 2003-10-28 David Zeuthen <david@fubar.dk>
451 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
452 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
454 2003-10-28 Havoc Pennington <hp@redhat.com>
456 * dbus/dbus-message.c (get_next_field): delete unused function
458 2003-10-28 Havoc Pennington <hp@redhat.com>
460 * bus/expirelist.c (do_expiration_with_current_time): detect
461 failure of the expire_func due to OOM
463 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
465 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
466 NoReply error that's now created by the bus when the service exits
468 2003-10-28 Havoc Pennington <hp@redhat.com>
470 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
471 tests for set_path, set_interface, set_member, etc.
473 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
475 * dbus/dbus-message.c (set_string_field): always just delete and
476 re-append the field; accept NULL for deletion
477 (re_align_fields_recurse): reimplement
479 2003-10-26 Havoc Pennington <hp@redhat.com>
481 * dbus/dbus-connection.c: fix docs to properly describe the
483 (_dbus_connection_notify_disconnected): remove this function;
484 we can't synchronously add the disconnected message, we have to
485 do it after we've queued any remaining real messages
486 (_dbus_connection_get_dispatch_status_unlocked): queue the
487 disconnect message only if the transport has finished queueing all
488 its real messages and is disconnected.
489 (dbus_connection_disconnect): update the dispatch status here
491 2003-10-22 Havoc Pennington <hp@redhat.com>
493 * bus/bus.c (bus_context_check_security_policy): fix up assertion
495 * bus/connection.c (bus_transaction_send_from_driver): set the
496 destination to the connection's base service
498 2003-10-20 Havoc Pennington <hp@redhat.com>
500 hmm, make check is currently not passing.
502 * doc/dbus-specification.xml: add requirement that custom type
503 names follow the same rules as interface names.
505 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
506 duplication and allow 'c' to be 'custom'; dict is now 'm' for
509 * doc/dbus-specification.xml: update type codes to match
510 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
511 CUSTOM. Add type OBJECT_PATH to the spec.
513 2003-10-17 Havoc Pennington <hp@redhat.com>
515 * bus/driver.c (create_unique_client_name): use "." as separator
516 in base service names instead of '-'
518 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
519 byte at the end of the string
521 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
522 optimization macros since string validation seems to be a slow
525 * doc/dbus-specification.xml: restrict valid
526 service/interface/member/error names. Add test suite code for the
529 * dbus/dbus-string.c: limit service/interface/member/error names
532 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
533 format arg to verbose spew
535 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
536 memory, return instead of g_error
538 * test/test-service.c (path_message_func): support emitting a
541 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
542 activation bus type if DBUS_BUS_ACTIVATION was set; default to
543 assuming the activation bus was the session bus so that services
544 started manually will still register.
545 (init_connections_unlocked): fix so that in OOM situation we get
546 the same semantics when retrying the function
548 * test/test-service.c (main): change to use path registration, to
549 test those codepaths; register with DBUS_BUS_ACTIVATION rather
550 than DBUS_BUS_SESSION
552 2003-10-16 Havoc Pennington <hp@redhat.com>
554 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
556 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
557 coverage of the tests
558 (coverage-report.txt): don't move the .da and .bbg files around
560 2003-10-16 Havoc Pennington <hp@redhat.com>
562 * bus/bus.c (struct BusContext): remove struct field I didn't mean
565 2003-10-16 Havoc Pennington <hp@redhat.com>
567 * bus/connection.c (bus_pending_reply_expired): either cancel or
569 (bus_connections_check_reply): use unlink, not remove_link, as we
570 don't want to free the link; fixes double free mess
572 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
573 where no reply was received
575 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
578 * bus/signals.c (match_rule_matches): add special cases for the
579 bus driver, so you can match on sender/destination for it.
581 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
582 DBUS_PRINT_BACKTRACE is set
584 * dbus/dbus-internals.c: add pid to assertion failure messages
586 * dbus/dbus-connection.c: add message type code to the debug spew
588 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
589 sender=foo not service=foo
591 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
592 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
593 DBUS_ACTIVATION_ADDRESS instead
595 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
596 DBUS_SYSTEM_BUS_ADDRESS if appropriate
598 * bus/bus.c (bus_context_new): handle OOM copying bus type into
601 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
602 (dbus_message_iter_get_object_path_array): new function (half
603 finished, disabled for the moment)
605 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
606 DBUS_MESSAGE_TYPE_ERROR
608 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
609 avoid redirecting stderr to /dev/null
610 (babysit): close stdin if not doing the "exit_with_session" thing
612 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
613 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
614 stdout/stdin, so things don't get confused
616 * bus/system.conf.in: fix to allow replies, I modified .conf
617 instead of .conf.in again.
619 2003-10-14 David Zeuthen <david@fubar.dk>
621 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
622 argtype to arg_type when raising unknown arg type exception.
623 Changed type list to reflect the changes in dbus-protocol.h so
624 the bindings actually work.
626 2003-10-14 Havoc Pennington <hp@redhat.com>
628 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
629 to have a bug keeping it from outputting the .da files sometimes
630 (string_get_string): don't append garbage nul bytes to the string.
632 2003-10-15 Seth Nickell <seth@gnome.org>
634 * python/Makefile.am:
636 Include dbus_h_wrapper.h in the dist tarball.
638 2003-10-14 Havoc Pennington <hp@redhat.com>
640 * bus/bus.c (bus_context_check_security_policy): revamp this to
641 work more sanely with new policy-based requested reply setup
643 * bus/connection.c (bus_transaction_send_from_driver): set bus
644 driver messages as no reply
646 * bus/policy.c (bus_client_policy_check_can_receive): handle a
647 requested_reply attribute on allow/deny rules
649 * bus/system.conf: add <allow requested_reply="true"/>
651 * bus/driver.c (bus_driver_handle_message): fix check for replies
652 sent to the bus driver, which was backward. How did this ever work
653 at all though? I think I'm missing something.
655 * dbus/dbus-message.c (decode_header_data): require error and
656 method return messages to have a reply serial field to be valid
657 (_dbus_message_loader_queue_messages): break up this function;
658 validate that reply serial and plain serial are nonzero;
659 clean up the OOM/error handling.
660 (get_uint_field): don't return -1 from this
661 (dbus_message_create_header): fix signed/unsigned bug
663 * bus/connection.c (bus_connections_expect_reply): save serial of
664 the incoming message, not reply serial
666 2003-10-14 Havoc Pennington <hp@redhat.com>
668 * bus/connection.c: implement pending reply tracking using
671 * bus/bus.c (bus_context_check_security_policy): verify that a
672 reply is pending in order to allow a reply to be sent. Deny
673 messages of unknown type.
675 * bus/dbus-daemon-1.1.in: update to mention new resource limits
677 * bus/bus.c (bus_context_get_max_replies_per_connection): new
678 (bus_context_get_reply_timeout): new
680 2003-10-13 Seth Nickell <seth@gnome.org>
682 * python/Makefile.am:
684 Pass "make distcheck": remove a couple files from DIST_FILES
685 that weren't included in the final version.
687 2003-10-12 Havoc Pennington <hp@pobox.com>
689 Added test code that 1) starts an actual bus daemon and 2) uses
690 DBusGProxy; fixed bugs that were revealed by the test. Lots
691 more testing possible, but this is the basic framework.
693 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
694 empty proxy lists from the proxy list hash
696 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
697 couple of return_if_fail checks
699 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
700 to allocate, so everything is cleared to NULL as it should be.
702 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
703 source as data to dbus_connection_set_timeout_functions() as the
704 timeout functions expected
706 * test/glib/run-test.sh: add a little script to start up a message
707 bus and run tests using it
709 * tools/dbus-launch.1: updates
711 * tools/dbus-launch.c (main): add --config-file option
713 * tools/dbus-launch.c (main): remove confusing else if (runprog)
714 that could never be reached.
716 * dbus/dbus-message.c (dbus_message_new_method_return)
717 (dbus_message_new_error, dbus_message_new_signal): set the
718 no-reply-expected flag on all these. Redundant, but may
719 as well be consistent.
721 2003-10-11 Havoc Pennington <hp@pobox.com>
723 * test/decode-gcov.c (function_solve_graph): make broken block
724 graph a nonfatal error since it seems to be broken. Need to debug
727 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
728 can't just check type > INVALID < LAST anymore
730 * dbus/dbus-message.c (dbus_message_get_signature): new function
731 (dbus_message_has_signature): new function
732 (struct DBusMessage): add signature field (right now it isn't sent
733 over the wire, just generated on the fly)
734 (dbus_message_copy): copy the signature, and init strings to
735 proper length to avoid some reallocs
736 (dbus_message_iter_init_array_iterator): return void, since it
738 (dbus_message_iter_init_dict_iterator): return void since it can't fail
739 (_dbus_message_loader_queue_messages): add silly temporary hack to
740 fill in message->signature on load
742 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
743 characters, so they are relatively human-readable.
745 2003-10-11 Havoc Pennington <hp@pobox.com>
747 * dbus/dbus-message.c (_dbus_message_test): add more test
748 coverage, but #if 0 for now since they uncover a bug
749 not fixed yet; I think in re_align_field_recurse()
750 (re_align_field_recurse): add FIXME about broken assertion
752 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
754 * bus/connection.c: share a couple code bits with expirelist.c
756 * bus/expirelist.h, bus/expirelist.c: implement a generic
757 expire-items-after-N-seconds facility, was going to share between
758 expiring connections and replies, decided not to use for expiring
761 * COPYING: include AFL 2.0 (still need to change all the file headers)
763 2003-10-09 Havoc Pennington <hp@redhat.com>
765 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
766 gcc 3.3. Not that we do anything about it yet.
768 * bus/signals.c (bus_match_rule_parse): impose max length on the
771 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
773 2003-10-09 Havoc Pennington <hp@redhat.com>
775 Make matching rules theoretically work (add parser).
777 * bus/bus.c (bus_context_check_security_policy): fix up to handle
778 the case where destination is explicitly specified as bus driver
779 and someone else is eavesdropping.
781 * bus/policy.c (bus_client_policy_check_can_receive): fix up
782 definition of eavesdropping and assertion
784 * tools/dbus-send.c (main): use dbus_message_type_from_string
786 * bus/signals.c (bus_match_rule_parse): implement
788 * dbus/dbus-message.c (dbus_message_type_from_string): new
790 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
792 2003-10-02 Havoc Pennington <hp@pobox.com>
794 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
795 dbus_gproxy_oneway_call
797 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
798 (dbus_server_setup_with_g_main): fix to allow calling them more
799 than once on the same args
800 (dbus_bus_get_with_g_main): new function
802 2003-10-02 Havoc Pennington <hp@redhat.com>
804 * doc/dbus-tutorial.xml: write some stuff
806 2003-09-29 Havoc Pennington <hp@pobox.com>
808 * configure.in: split checks for Doxygen from XML docs, check for
811 * doc/Makefile.am: XML-ify all the docs, and add a blank
814 2003-09-29 Havoc Pennington <hp@pobox.com>
816 * Merge dbus-object-names branch. To see the entire patch
817 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
819 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
821 2003-09-28 Havoc Pennington <hp@pobox.com>
823 * HACKING: update to reflect new server
825 2003-09-26 Seth Nickell <seth@gnome.org>
828 * python/examples/example-signals.py:
830 Start implementing some notions of signals. The API
831 is really terrible, but they sort of work (with the
832 exception of being able to filter by service, and to
833 transmit signals *as* a particular service). Need to
834 figure out how to make messages come from the service
837 * python/dbus_bindings.pyx.in:
839 Removed duplicate message_handler callbacks.
841 2003-09-25 Havoc Pennington <hp@redhat.com>
843 * bus/session.conf.in: fix my mess
845 2003-09-25 Havoc Pennington <hp@pobox.com>
847 * bus/session.conf.in: fix security policy, reported by Seth Nickell
849 2003-09-25 Seth Nickell <seth@gnome.org>
851 * python/examples/example-service.py:
853 Johan notices complete wrong code in example-service, but
854 completely wrong in a way that works exactly the same (!).
855 Johan is confused, how could this possibly work? Example
856 code fails to serve purpose of making things clear.
859 2003-09-25 Mark McLoughlin <mark@skynet.ie>
861 * doc/dbus-specification.sgml: don't require header fields
862 to be 4-byte aligned and specify that fields should be
863 distinguished from padding by the fact that zero is not
866 * doc/TODO: remove re-alignment item and add item to doc
867 the OBJECT_PATH type.
869 * dbus/dbus-message.c:
870 (HeaderField): rename the original member to value_offset
871 and introduce a name_offset member to keep track of where
872 the field actually begins.
873 (adjust_field_offsets): remove.
874 (append_int_field), (append_uint_field),
875 (append_string_field): don't align the start of the header
876 field to a 4-byte boundary.
877 (get_next_field): impl finding the next marhsalled field
879 (re_align_field_recurse): impl re-aligning a number of
880 already marshalled fields.
881 (delete_field): impl deleting a field of any type and
882 re-aligning any following fields.
883 (delete_int_or_uint_field), (delete_string_field): remove.
884 (set_int_field), (set_uint_field): no need to re-check
885 that we have the correct type for the field.
886 (set_string_field): ditto and impl re-aligning any
888 (decode_header_data): update to take into account that
889 the fields aren't 4-byte aligned any more and the new
890 way to distinguish padding from header fields. Also,
891 don't exit when there is too much header padding.
892 (process_test_subdir): print the directory.
893 (_dbus_message_test): add test to make sure a following
894 field is re-aligned correctly after field deletion.
896 * dbus/dbus-string.[ch]:
897 (_dbus_string_insert_bytes): rename from insert_byte and
898 allow the insert of multiple bytes.
899 (_dbus_string_test): test inserting multiple bytes.
901 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
902 warning note to docs about having to re-align any
903 marshalled values following the string.
905 * dbus/dbus-message-builder.c:
906 (append_string_field), (_dbus_message_data_load):
907 don't align the header field.
909 * dbus/dbus-auth.c: (process_test_subdir): print the
912 * test/break-loader.c: (randomly_add_one_byte): upd. for
915 * test/data/invalid-messages/bad-header-field-alignment.message:
918 * test/data/valid-messages/unknown-header-field.message: shove
919 a dict in the unknown field.
921 2003-09-25 Seth Nickell <seth@gnome.org>
924 * python/dbus_bindings.pyx.in:
926 Handle return values.
928 * python/examples/example-client.py:
929 * python/examples/example-service.py:
931 Pass back return values from the service to the client.
933 2003-09-24 Seth Nickell <seth@gnome.org>
937 Connect Object methods (when you are sharing an object) up... pass
938 in a list of methods to be shared. Sharing all the methods just
939 worked out too weird. You can now create nice Services over the
942 * python/dbus_bindings.pyx.in:
944 Keep references to user_data tuples passed into C functions so
945 Python doesn't garbage collect on us.
947 Implement MethodReturn and Error subclasses of Message for creating
948 DBusMessage's of those types.
950 * python/examples/example-client.py:
951 * python/examples/example-service.py:
953 Simple example code showing both how create DBus services and objects,
956 2003-09-23 Havoc Pennington <hp@pobox.com>
958 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
960 2003-09-23 Havoc Pennington <hp@redhat.com>
962 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
963 (dbus_gproxy_disconnect_signal): implement
964 (dbus_gproxy_manager_remove_signal_match): implement
965 (dbus_gproxy_manager_add_signal_match): implement
966 (dbus_gproxy_oneway_call): implement
968 2003-09-23 Havoc Pennington <hp@pobox.com>
970 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
971 subclass. This means dropping the transparent thread safety of the
972 proxy; you now need a separate proxy per-thread, or your own
973 locking on the proxy. Probably right anyway.
974 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
976 2003-09-22 Havoc Pennington <hp@redhat.com>
978 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
980 2003-09-21 Seth Nickell <seth@gnome.org>
982 First checkin of the Python bindings.
985 * python/Makefile.am:
986 * python/dbus_bindings.pyx.in:
987 * python/dbus_h_wrapper.h:
989 Pieces for Pyrex to operate on, building a dbus_bindings.so
990 python module for low-level access to the DBus APIs.
994 High-level Python module for accessing DBus objects.
999 Build stuff for the python bindings.
1003 Extra macro needed for finding the Python C header files.
1005 2003-09-21 Havoc Pennington <hp@pobox.com>
1007 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1008 implementing the proxy manager, didn't get very far.
1010 * dbus/dbus-bus.c (dbus_bus_add_match): new
1011 (dbus_bus_remove_match): new
1013 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1014 path_name argument; adjust the other not-yet-implemented
1015 gproxy constructors to be what I think they should be.
1017 2003-09-21 Havoc Pennington <hp@pobox.com>
1019 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1020 by default for message bus connections.
1022 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1023 exit_on_disconnect flag is set and we process the disconnected
1025 (dbus_connection_set_exit_on_disconnect): new function
1027 2003-09-21 Havoc Pennington <hp@pobox.com>
1029 Get matching rules mostly working in the bus; only actually
1030 parsing the rule text remains. However, the client side of
1031 "signal connections" hasn't been started, this patch is only the
1034 * dbus/dispatch.c: fix for the matching rules changes
1036 * bus/driver.c (bus_driver_handle_remove_match)
1037 (bus_driver_handle_add_match): send an ack reply from these
1040 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
1041 arguments, reported by Seth Nickell
1043 * bus/config-parser.c (append_rule_from_element): support
1044 eavesdrop=true|false attribute on policies so match rules
1045 can be prevented from snooping on the system bus.
1047 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
1048 and "destination" in attribute names; fix some docs bugs;
1049 add eavesdrop=true|false attribute
1051 * bus/driver.c (bus_driver_handle_add_match)
1052 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
1055 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
1056 rid of broadcast service concept, signals are just always broadcast
1058 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
1059 mostly implement matching rules stuff (currently only exposed as signal
1062 2003-09-21 Mark McLoughlin <mark@skynet.ie>
1064 * doc/dbus-specification.sgml: Change the header field name
1065 to be an enum and update the rest of the spec to reference
1066 the fields using the conventinal name.
1068 * dbus/dbus-protocol.h: update to reflect the spec.
1070 * doc/TODO: add item to remove the 4 byte alignment requirement.
1072 * dbus/dbus-message.c: Remove the code to generalise the
1073 header/body length and serial number header fields as named
1074 header fields so we can reference field names using the
1076 (append_int_field), (append_uint_field), (append_string_field):
1077 Append the field name as a byte rather than four chars.
1078 (delete_int_or_uint_field), (delete_string_field): reflect the
1079 fact that the field name and typecode now occupy 4 bytes instead
1081 (decode_string_field), (decode_header_data): update to reflect
1082 protocol changes and move the field specific encoding from
1083 decode_string_field() back into decode_header_data().
1085 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
1086 Add utility to aid debugging.
1088 * dbus/dbus-message-builder.c:
1089 (append_string_field), (_dbus_message_data_load): Update to
1090 reflect protocol changes; Change the FIELD_NAME directive
1091 to HEADER_FIELD and allow it to take the field's conventional
1092 name rather than the actual value.
1094 * test/data/*/*.message: Update to use HEADER_FIELD instead
1095 of FIELD_NAME; Always align the header on an 8 byte boundary
1096 *before* updating the header length.
1098 2003-09-15 Havoc Pennington <hp@pobox.com>
1100 * dbus/dbus-pending-call.c: add the get/set object data
1101 boilerplate as for DBusConnection, etc. Use generic object data
1102 for the notify callback.
1104 * glib/dbus-gparser.c (parse_node): parse child nodes
1106 * tools/dbus-viewer.c: more hacking on the dbus-viewer
1108 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
1109 contain functions shared between the convenience lib and the
1112 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
1113 -export-symbols-regex to the GLib library
1115 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
1116 fix the locking in here, and add a default handler for
1117 Introspect() that just returns sub-nodes.
1119 2003-09-14 Havoc Pennington <hp@pobox.com>
1121 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
1122 rather than gfoo consistent
1124 * glib/dbus-gproxy.h: delete for now, move contents to
1125 dbus-glib.h, because the include files don't work right since we
1126 aren't in the dbus/ subdir.
1128 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
1129 (dbus_gproxy_end_call): finish
1130 (dbus_gproxy_begin_call): finish
1132 * glib/dbus-gmain.c (dbus_set_g_error): new
1134 * glib/dbus-gobject.c (handle_introspect): include information
1135 about child nodes in the introspection
1137 * dbus/dbus-connection.c (dbus_connection_list_registered): new
1138 function to help in implementation of introspection
1140 * dbus/dbus-object-tree.c
1141 (_dbus_object_tree_list_registered_and_unlock): new function
1143 2003-09-12 Havoc Pennington <hp@pobox.com>
1145 * glib/dbus-gidl.h: add common base class for all the foo_info
1148 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
1151 * test/Makefile.am: try test srcdir -ef . in addition to test
1152 srcdir = ., one of them should work (yeah lame)
1154 * glib/Makefile.am: build the "idl" parser stuff as a convenience
1157 * glib/dbus-gparser.h: make description_load routines return
1158 NodeInfo* not Parser*
1160 * Makefile.am (SUBDIRS): build test dir after all library dirs
1162 * configure.in: add GTK+ detection
1164 2003-09-07 Havoc Pennington <hp@pobox.com>
1166 * Make Doxygen contented.
1168 2003-09-07 Havoc Pennington <hp@pobox.com>
1170 * doc/dbus-specification.sgml: more updates
1172 2003-09-06 Havoc Pennington <hp@pobox.com>
1174 * doc/dbus-specification.sgml: partial updates
1176 * bus/dbus-daemon-1.1.in: fix the config file docs for the
1177 zillionth time; hopefully I edited the right file this time.
1179 * bus/config-parser.c (append_rule_from_element): support
1180 send_type, send_path, receive_type, receive_path
1182 * bus/policy.c: add message type and path to the list of things
1183 that can be "firewalled"
1185 2003-09-06 Havoc Pennington <hp@pobox.com>
1187 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
1188 (dbus_connection_register_object_path): make this not handle
1189 messages to paths below the given path
1191 2003-09-03 Havoc Pennington <hp@pobox.com>
1193 * test/glib/Makefile.am: add this with random glib-linked test
1196 * glib/Makefile.am: remove the random test programs from here,
1197 leave only the unit tests
1199 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
1200 uscore/javacaps conversion, and fix
1201 (get_object_property, set_object_property): change to .NET
1202 convention for mapping props to methods, set_FooBar/get_FooBar,
1203 since one language has such a convention we may as well copy it.
1204 Plus real methods in either getFooBar or get_foo_bar style won't
1205 collide with this convention.
1207 2003-09-01 Havoc Pennington <hp@pobox.com>
1209 * glib/dbus-gparser.c: implement
1211 * glib/dbus-gobject.c: start implementing skeletons support
1213 * configure.in: when disabling checks/assert, also define
1214 G_DISABLE_ASSERT and G_DISABLE_CHECKS
1216 2003-09-01 Havoc Pennington <hp@pobox.com>
1218 * glib/Makefile.am: rearrange a bunch of files and get "make
1219 check" framework set up
1221 2003-08-31 Havoc Pennington <hp@pobox.com>
1223 * fix build with --disable-tests
1225 2003-08-30 Havoc Pennington <hp@pobox.com>
1227 * dbus/dbus-connection.c: purge DBusMessageHandler
1229 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
1230 use callbacks everywhere
1232 2003-08-30 Havoc Pennington <hp@pobox.com>
1234 * test/data/valid-config-files/system.d/test.conf: change to
1235 root for the user so warnings don't get printed
1237 * dbus/dbus-message.c: add dbus_message_get_path,
1238 dbus_message_set_path
1240 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
1241 dispatching to a path
1243 * dbus/dbus-string.c (_dbus_string_validate_path): add
1245 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
1246 (_dbus_marshal_object_path): implement
1248 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
1249 to contain the path to the target object
1250 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
1251 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
1253 2003-08-30 Havoc Pennington <hp@pobox.com>
1255 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
1257 2003-08-29 Havoc Pennington <hp@pobox.com>
1259 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
1261 (struct DBusObjectSubtree): shrink this
1262 a lot, since we may have a lot of them
1263 (_dbus_object_tree_free_all_unlocked): implement
1264 (_dbus_object_tree_dispatch_and_unlock): implement
1266 2003-08-29 Havoc Pennington <hp@pobox.com>
1268 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
1270 2003-08-28 Havoc Pennington <hp@pobox.com>
1274 * dbus/dbus-connection.c: port to no ObjectID, create a
1275 DBusObjectTree, rename ObjectTree to ObjectPath in public API
1277 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
1278 everything except UnregisterFunction and MessageFunction
1280 * dbus/dbus-marshal.c: port away from DBusObjectID,
1281 add DBUS_TYPE_OBJECT_PATH
1283 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
1284 dbus/dbus-objectid.[hc]: remove these, we are moving to
1285 path-based object IDs
1287 2003-08-25 Havoc Pennington <hp@pobox.com>
1289 Just noticed that dbus_message_test is hosed, I wonder when I
1290 broke that. I thought make check was passing earlier...
1292 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
1293 container tree, will replace most of dbus-object-registry
1295 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1298 2003-08-19 Havoc Pennington <hp@pobox.com>
1300 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1301 (dbus_message_is_error): fix this function
1303 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1306 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1307 reflect clarified man page
1308 (bus_client_policy_check_can_send): ditto
1310 * bus/session.conf.in: fixup
1312 * bus/system.conf.in: fixup
1314 2003-08-18 Havoc Pennington <hp@redhat.com>
1316 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1318 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1319 dumb bug created earlier (wrong order of args to
1320 decode_header_data())
1322 * tools/dbus-send.c: port
1324 * tools/dbus-print-message.c (print_message): port
1326 * test/data/*messages: port all messages over
1328 * dbus/dbus-message-builder.c: support including
1331 * bus/driver.c: port over
1333 * bus/dispatch.c: port over to new stuff
1335 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1336 rename disconnect signal to "Disconnected"
1338 2003-08-17 Havoc Pennington <hp@pobox.com>
1340 This doesn't compile yet, but syncing up so I can hack on it from
1341 work. What are branches for if not broken code? ;-)
1343 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1344 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1345 DBUS_HEADER_FIELD_ERROR_NAME
1347 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1348 for the interface+member pairs
1349 (string_hash): change to use g_str_hash algorithm
1350 (find_direct_function, find_string_function): refactor these to
1353 * dbus/dbus-message.c: port all of this over to support
1354 interface/member fields instead of name field
1356 * dbus/dbus-object-registry.c: port over
1358 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1359 from _dbus_string_validate_name
1361 * bus/dbus-daemon-1.1: change file format for the
1362 <deny>/<allow> stuff to match new message naming scheme
1364 * bus/policy.c: port over
1366 * bus/config-parser.c: parse new format
1368 2003-08-16 Havoc Pennington <hp@pobox.com>
1370 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1373 * glib/dbus-gproxy.c: some hacking
1375 2003-08-15 Havoc Pennington <hp@redhat.com>
1377 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1379 * dbus/dbus-connection.c
1380 (dbus_connection_send_with_reply_and_block): factor out internals;
1381 change to convert any error replies to DBusError instead of
1382 returning them as a message
1384 2003-08-15 Havoc Pennington <hp@pobox.com>
1386 * dbus/dbus-connection.c,
1387 dbus/dbus-pending-call.c: Finish the pending call stuff
1389 2003-08-14 Havoc Pennington <hp@redhat.com>
1391 * dbus/dbus-pending-call.c: start on new object that will replace
1392 DBusMessageHandler and ReplyHandlerData for tracking outstanding
1395 * dbus/dbus-gproxy.c: start on proxy object used to communicate
1396 with remote interfaces
1398 * dbus/dbus-gidl.c: do the boring boilerplate in here
1400 2003-08-12 Havoc Pennington <hp@pobox.com>
1402 * bus/dispatch.c (bus_dispatch): make this return proper
1403 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1405 * dbus/dbus-errors.c (dbus_set_error): use
1406 _dbus_string_append_printf_valist
1408 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1409 (_dbus_string_append_printf): new
1411 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1414 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1415 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1416 message is unhandled.
1418 2003-08-11 Havoc Pennington <hp@pobox.com>
1420 * bus/test.c (client_disconnect_handler): change to return
1421 HANDLED (would have been REMOVE_MESSAGE)
1423 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1424 HANDLED/NOT_YET_HANDLED instead of
1425 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
1428 2003-08-10 Havoc Pennington <hp@pobox.com>
1430 * tools/dbus-send.c (main): add --type argument, for now
1431 supporting only method_call and signal types.
1433 * tools/dbus-print-message.c: print message type
1435 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1436 init connection->objects
1438 * doc/dbus-specification.sgml: fix sgml
1440 * bus/*.c: port over to object-instance API changes
1442 * test/test-service.c: ditto
1444 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1445 name, we will have to fix up the rest of the code to also handle
1447 (dbus_message_new): generic message-creation call
1448 (set_string_field): allow appending name field
1450 2003-08-06 Havoc Pennington <hp@pobox.com>
1452 * dbus/dbus-object-registry.c: implement signal connection
1455 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1457 * dbus/dbus-internals.c (_dbus_memdup): new function
1459 2003-08-02 Havoc Pennington <hp@pobox.com>
1461 * dbus/dbus-message.c (dbus_message_get_no_reply)
1462 (dbus_message_set_no_reply): add these and remove
1463 set_is_error/get_is_error
1465 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
1466 remove the ERROR flag, since there's now an ERROR type
1468 2003-08-01 Havoc Pennington <hp@pobox.com>
1470 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1473 * dbus/dbus-message.c (dbus_message_get_type): new function
1475 * doc/dbus-specification.sgml: add "type" byte to messages
1477 2003-08-01 Havoc Pennington <hp@pobox.com>
1479 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1480 a message type enum to distinguish kinds of message
1481 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
1482 that need not be replied to
1484 2003-08-01 Havoc Pennington <hp@pobox.com>
1486 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1487 (unpack_8_octets): fix no-64-bit-int bug
1489 * dbus/dbus-object-registry.c (validate_id): validate the
1490 connection ID bits, not just the instance ID.
1492 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1493 the connection-global 33 bits of the object ID
1495 * dbus/dbus-object-registry.c (info_from_entry): fill in
1496 object ID in the new way
1498 * dbus/dbus-objectid.h: rather than high/low bits, specifically
1499 define server/client/instance bits.
1501 2003-07-30 Havoc Pennington <hp@pobox.com>
1503 * dbus/dbus-connection.c (dbus_connection_register_object): fix
1506 2003-07-13 Havoc Pennington <hp@pobox.com>
1508 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1509 fields to DBusObjectVTable and DBusObjectInfo
1511 2003-07-12 Havoc Pennington <hp@pobox.com>
1513 * dbus/dbus-object-registry.c: implement unit test,
1514 fix bugs discovered in process
1516 * dbus/dbus-connection.c: remove handler_table and
1517 register_handler(), add DBusObjectRegistry usage
1519 * dbus/dbus-objectid.c (dbus_object_id_is_null)
1520 (dbus_object_id_set_null): new functions
1522 2003-07-08 Havoc Pennington <hp@pobox.com>
1524 * dbus/dbus-object.c: implement some of this
1526 * dbus/dbus-object-registry.c
1527 (_dbus_object_registry_add_and_unlock): fill in the object_id out
1529 (_dbus_object_registry_new): handle OOM
1531 2003-07-08 Havoc Pennington <hp@pobox.com>
1533 * dbus/dbus-object.h: sketch out an API for registering objects
1534 with a connection, that allows us to use as little as 24 bytes
1535 per object and lets application code represent an object in
1536 any conceivable way.
1538 * dbus/dbus-object-registry.c: implement the hard bits of the
1539 DBusConnection aspect of object API. Not yet wired up.
1541 2003-07-06 Havoc Pennington <hp@pobox.com>
1543 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1544 (_dbus_marshal_object_id): new
1545 (_dbus_demarshal_object_id): new
1546 (_dbus_marshal_get_arg_end_pos): support object ID type, and
1547 consolidate identical switch cases. Don't conditionalize handling
1548 of DBUS_TYPE_UINT64, need to handle the type always.
1549 (_dbus_marshal_validate_arg): consolidate identical cases, and
1550 handle DBUS_TYPE_OBJECT_ID
1552 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1554 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1556 2003-09-28 Havoc Pennington <hp@pobox.com>
1560 2003-09-28 Havoc Pennington <hp@pobox.com>
1562 * doc/Makefile.am (dbus-specification.html): testing a funky hack
1563 to work with Debian db2html
1565 2003-09-28 Havoc Pennington <hp@pobox.com>
1567 * configure.in: 0.13
1569 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
1570 stylesheet-images for benefit of Debian
1572 Change back to using filesystem-linked sockets for the system
1573 bus, so only root can create the default system bus address.
1575 * bus/system.conf.in: change to use
1576 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1578 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
1581 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1582 here, and AC_DEFINE DBUS_SYSTEM_PATH
1584 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1587 * doc/busconfig.dtd:
1590 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1592 * doc/dbus-specification.sgml:
1593 Add activation reply values.
1595 2003-08-05 Havoc Pennington <hp@redhat.com>
1597 * configure.in: 0.12
1599 2003-08-05 Anders Carlsson <andersca@codefactory.se>
1601 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
1602 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
1603 (add_watch), (remove_watch), (create_source):
1604 Refcount fds, fixes some reentrancy issues.
1606 2003-07-30 Havoc Pennington <hp@redhat.com>
1608 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
1609 bus address to be abstract if we have abstract sockets
1613 2003-07-28 Havoc Pennington <hp@redhat.com>
1615 * bus/messagebus.in: fix to avoid processname/servicename
1616 confusion, from Michael Kearey
1617 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
1619 2003-07-23 Havoc Pennington <hp@pobox.com>
1621 * dbus/dbus-message.c (dbus_message_iter_get_named):
1622 fix from Andy Hanton to remove broken "+1"
1624 2003-07-16 Havoc Pennington <hp@pobox.com>
1626 * tools/dbus-launch.c (babysit): close stdout/stderr in the
1627 babysitter process, as suggested by Thomas Leonard, so
1628 an "eval `dbus-launch --exit-with-session`" will actually
1631 2003-07-16 Havoc Pennington <hp@pobox.com>
1633 * configure.in: print out EXPANDED_* variables in the summary at
1634 the end; clean up the code that computes EXPANDED_ variables and
1635 get the ones using exec_prefix right. Should make things work
1636 when you build without --prefix
1638 2003-06-29 Havoc Pennington <hp@pobox.com>
1640 * mono/Test.cs (class Test): fire up a main loop and run it
1642 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
1643 done once, the app has to do it
1645 2003-06-26 Havoc Pennington <hp@pobox.com>
1647 * mono/Connection.cs: set up connection with the glib main loop
1649 2003-07-01 Havoc Pennington <hp@redhat.com>
1651 * doc/dbus-specification.sgml: clarify the format of a type code,
1652 change suggested by Jim Blandy
1654 2003-06-29 Miloslav Trmac <mitr@volny.cz>
1657 * tools/Makefile.am: Don't assume srcdir == builddir.
1659 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
1660 the allocated block.
1661 (_dbus_memory_test): New function.
1662 * dbus/dbus-test.h: Add _dbus_memory_test ().
1663 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
1665 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
1667 (dbus_message_new): Remove obsolete @todo.
1669 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
1670 (_dbus_marshal_set_uint64): Fix comment.
1672 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
1673 hardcode FIELD_REPLY_SERIAL.
1675 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
1676 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
1678 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
1679 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
1681 2003-06-24 Havoc Pennington <hp@pobox.com>
1683 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
1685 2003-06-23 Anders Carlsson <andersca@codefactory.se>
1691 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
1692 * gcj/org/.cvsignore:
1693 * gcj/org/Makefile.am:
1694 * gcj/org/freedesktop/.cvsignore:
1695 * gcj/org/freedesktop/Makefile.am:
1696 * gcj/org/freedesktop/dbus/.cvsignore:
1697 * gcj/org/freedesktop/dbus/Makefile.am:
1698 * gcj/org/freedesktop/dbus/Message.java: (Message),
1700 * gcj/org/freedesktop/dbus/natMessage.cc:
1701 Fix the build system.
1703 2003-06-22 Havoc Pennington <hp@pobox.com>
1705 * mono/Connection.cs: add more bindings
1707 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
1710 2003-06-22 Havoc Pennington <hp@pobox.com>
1712 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
1713 Start wrapping more stuff.
1715 2003-06-22 Havoc Pennington <hp@pobox.com>
1717 * mono/Message.cs: implement Message.Wrap() that ensures we only
1718 have a single C# wrapper per DBusMessage, assuming it works which
1719 it probably doesn't.
1721 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
1722 (dbus_message_free_data_slot): new
1723 (dbus_message_set_data): new
1724 (dbus_message_get_data): new
1726 2003-06-22 Havoc Pennington <hp@pobox.com>
1728 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
1729 (_dbus_data_slot_allocator_alloc): rework these to keep a
1730 reference count on each slot and automatically manage a global
1731 slot ID variable passed in by address
1733 * bus/bus.c: convert to new dataslot API
1735 * dbus/dbus-bus.c: convert to new dataslot API
1737 * dbus/dbus-connection.c: convert to new dataslot API
1739 * dbus/dbus-server.c: convert to new dataslot API
1741 * glib/dbus-gmain.c: ditto
1745 * bus/connection.c: ditto
1747 2003-06-22 Anders Carlsson <andersca@codefactory.se>
1749 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
1750 after the gcj checks so that the correct configuration tags
1751 will be added to libtool.
1753 * dbus-glib-1.pc.in: No need to specify any includes since
1754 dbus-1.pc.in has those.
1756 2003-06-22 Havoc Pennington <hp@pobox.com>
1758 * mono/*, gcj/*, configure.in, Makefile.am:
1759 Check in makefiles and subdirs for mono and gcj bindings.
1760 Neither binding actually exists, just trying to get through
1761 all the build and other boring bits.
1763 2003-06-21 Philip Blundell <philb@gnu.org>
1765 * tools/dbus-monitor.1: Updated.
1767 * tools/dbus-send.1: Likewise.
1769 2003-06-20 Anders Carlsson <andersca@codefactory.se>
1771 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
1772 for hangup and error after checking read so we won't discard
1773 pending data if both hangup and read are set.
1775 2003-06-19 Philip Blundell <philb@gnu.org>
1777 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
1779 * tools/dbus-send.c: Accept both --system and --session.
1781 * tools/dbus-monitor.c: Same here.
1783 2003-06-19 Anders Carlsson <andersca@codefactory.se>
1785 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
1786 from C++ (Patch by Miloslav Trmac).
1788 2003-06-15 Joe Shaw <joe@assbarn.com>
1790 * configure.in: Check for socklen_t.
1792 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
1794 * test/test-segfault.c: Add #include <sys/time.h>
1796 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
1797 dbus-launch needs it.
1799 2003-06-09 Havoc Pennington <hp@redhat.com>
1801 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
1802 SUN_LEN, it breaks abstract socket usage
1804 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
1807 2003-06-04 Havoc Pennington <hp@pobox.com>
1809 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
1810 using unix:abstract=/foo, and when listening in a tmpdir
1811 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
1813 * dbus/dbus-transport.c (_dbus_transport_open): support
1816 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1817 support abstract sockets
1819 * dbus/dbus-transport-unix.c
1820 (_dbus_transport_new_for_domain_socket): support abstract sockets
1822 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
1823 toggle as an argument, implement abstract namespace support
1824 (_dbus_listen_unix_socket): ditto
1826 * configure.in: add --enable-abstract-sockets and implement
1827 a configure check for autodetection of the right value.
1829 2003-06-01 Havoc Pennington <hp@pobox.com>
1831 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
1832 in /tmp (though on Linux this will end up being useless,
1833 when we add abstract namespace support)
1835 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
1838 2003-05-28 Colin Walters <walters@verbum.org>
1840 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
1842 2003-05-18 Anders Carlsson <andersca@codefactory.se>
1844 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
1846 2003-05-17 Colin Walters <walters@gnu.org>
1848 * tools/dbus-send.c: Don't exit with an error code if --help was
1849 passed. Default to using the session bus instead of the system
1852 * tools/dbus-launch.c: Ditto.
1854 * tools/dbus-monitor.c: Ditto.
1856 * tools/dbus-send.1: Update with new arguments.
1858 * tools/dbus-launch.c: Emit code to export variables. New
1859 arguments -s and -c to specify shell syntax, and a bit of code to
1860 autodetect syntax. Also, allow specifying a program to run.
1862 * tools/dbus-launch.1: Update with new arguments.
1864 * tools/dbus-send.1: Ditto.
1866 * tools/dbus-monitor.1: Ditto.
1868 2003-05-17 Havoc Pennington <hp@pobox.com>
1870 * bus/config-parser.c (merge_included): merge in policies from
1871 child configuration file.
1873 * bus/policy.c (bus_policy_merge): function to merge two policies
1876 2003-05-16 Havoc Pennington <hp@redhat.com>
1878 * dbus/dbus-connection.c: disable verbose lock spew
1880 * tools/dbus-send.c: add --print-reply command line option
1882 * tools/dbus-print-message.h (print_message): new util function
1883 shared by dbus-send and dbus-monitor
1885 * tools/dbus-monitor.c (handler_func): exit on disconnect
1887 * dbus/dbus-transport-unix.c (do_reading): if the transport is
1888 disconnected, don't try to use the read_watch
1890 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
1891 so we can find this bug more easily
1893 2003-05-16 Havoc Pennington <hp@redhat.com>
1895 * bus/policy.c (free_rule_list_func): avoid a crash when passed
1896 NULL as DBusHashTable is annoyingly likely to do.
1898 2003-05-16 Colin Walters <walters@verbum.org>
1900 * tools/dbus-monitor.c: Add --session argument and usage()
1903 * tools/dbus-monitor.1: Update with new --session arg.
1905 * bus/Makefile.am (install-data-hook): Create
1906 $(libdir)/dbus-1.0/services so that the session bus is happy.
1908 2003-05-15 Havoc Pennington <hp@redhat.com>
1910 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
1911 on non-x86. ifdef's are evil.
1913 2003-05-15 Havoc Pennington <hp@redhat.com>
1915 * configure.in: 0.11
1919 * bus/Makefile.am (initddir): apparently we are supposed to put
1920 init scripts in /etc/rc.d/init.d not /etc/init.d
1922 * bus/Makefile.am: remove the "you must --enable-tests to make
1923 check" as it broke distcheck
1925 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
1927 2003-05-13 James Willcox <jwillcox@gnome.org>
1930 * bus/activation.c: (bus_activation_service_created),
1931 (bus_activation_activate_service):
1932 * bus/driver.c: (bus_driver_send_service_deleted),
1933 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1934 (bus_driver_send_service_acquired),
1935 (bus_driver_send_welcome_message),
1936 (bus_driver_handle_list_services):
1937 * bus/session.conf.in:
1938 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
1939 (dbus_bus_service_exists), (dbus_bus_activate_service):
1942 Add some convenience API which lets you activate a service, and did a
1943 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
1944 and dbus_message_get_args()
1946 2003-05-11 Havoc Pennington <hp@pobox.com>
1948 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
1949 calling _dbus_marshal_validate_arg() for every byte in a byte
1952 * dbus/dbus-message-handler.c: use atomic reference counting to
1953 reduce number of locks slightly; the global lock in here sucks
1955 * dbus/dbus-connection.c
1956 (_dbus_connection_update_dispatch_status_and_unlock): variant of
1957 update_dispatch_status that can be called with lock held; then use
1958 in a couple places to reduce locking/unlocking
1959 (dbus_connection_send): hold the lock over the whole function
1960 instead of acquiring it twice.
1962 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
1964 * bus/connection.c (bus_connections_setup_connection): fix access
1965 to already-freed memory.
1967 * dbus/dbus-connection.c: keep a little cache of linked list
1968 nodes, to avoid using the global linked list alloc lock in the
1969 normal send-message case. Instead we just use the connection lock
1970 that we already have to take.
1972 * dbus/dbus-list.c (_dbus_list_find_last): new function
1974 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
1975 change to use a struct for the atomic type; fix docs,
1976 they return value before increment, not after increment.
1978 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
1979 (_dbus_string_append_8_aligned): new functions to try to
1980 microoptimize this operation.
1981 (reallocate_for_length): break this out of set_length(), to
1982 improve profile info, and also so we can consider inlining the
1985 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
1986 strings with some preallocation, cuts down on our calls to realloc
1987 a fair bit. Though if we can get the "move entire string to empty
1988 string" optimization below to kick in here, it would be better.
1990 * dbus/dbus-string.c (_dbus_string_move): just call
1991 _dbus_string_move_len
1992 (_dbus_string_move_len): add a special case for moving
1993 an entire string into an empty string; we can just
1994 swap the string data instead of doing any reallocs.
1995 (_dbus_string_init_preallocated): new function
1997 2003-05-11 Havoc Pennington <hp@pobox.com>
1999 Write a "test-profile" that does echo client-server with threads;
2000 profile reveals lock contention, memcpy/realloc of buffers, and
2001 UTF-8 validation as hot spots. 20% of lock contention eliminated
2002 with dbus_atomic_inc/dec implementation on x86. Much remaining
2003 contention is global mempool locks for GList and DBusList.
2005 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2008 * dbus/dbus-connection.c (struct DBusConnection): use
2009 dbus_atomic_t for the reference count
2011 * dbus/dbus-message.c (struct DBusMessage): declare
2012 dbus_atomic_t values as volatile
2014 * configure.in: code to detect ability to use atomic integer
2015 operations in assembly, from GLib patch
2017 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2018 time, tired of it being wrong in threads and forked processes
2020 * glib/test-profile.c: a little program to bounce messages back
2021 and forth between threads and eat CPU
2023 * dbus/dbus-connection.c: add debug spew macros for debugging
2024 thread locks; include config.h at top; fix deadlock in
2025 dbus_connection_flush()
2027 2003-05-08 Havoc Pennington <hp@pobox.com>
2029 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2030 data from getting written, and there wasn't a good reason to
2033 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2034 dbus_verbose lines in test coverage
2035 (main): add list of functions sorted by # of untested blocks
2036 to the coverage report
2038 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
2040 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
2042 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
2043 extend test coverage
2045 * test/data/auth/cancel.auth-script: test canceling an
2048 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
2049 aren't used. in CVS history if we end up needing them.
2051 2003-05-04 Havoc Pennington <hp@pobox.com>
2053 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
2056 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
2057 function, which assumed length was in # of strings, not bytes
2059 * dbus/dbus-message.c (_dbus_message_test): add tests for some
2062 * dbus/dbus-connection.c
2063 (_dbus_connection_queue_received_message): disable function for
2064 now, we are only using it in test mode
2066 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2067 remove a mistaken FIXME
2069 2003-05-04 Havoc Pennington <hp@pobox.com>
2071 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
2072 unlock mutex on successful return, patch from Anders Gustafsson
2074 2003-05-04 Havoc Pennington <hp@pobox.com>
2076 * dbus-glib-1.pc.in (Requires): fix dependencies, from
2079 2003-05-04 Havoc Pennington <hp@pobox.com>
2081 * tools/dbus-launch.c: implement
2083 * bus/main.c (main), bus/bus.c (bus_context_new):
2084 implement --print-pid and --fork
2086 2003-05-03 Havoc Pennington <hp@redhat.com>
2088 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
2089 the address had no value, and add to test suite. Fix and
2090 regression test from Miloslav Trmac
2092 2003-05-03 Havoc Pennington <hp@pobox.com>
2094 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
2095 watch is invalid when handled
2097 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
2098 dbus-launch utility to launch the bus from a shell script. Didn't
2099 actually implement dbus-launch yet, it's just a placeholder still.
2101 2003-05-03 Havoc Pennington <hp@pobox.com>
2103 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
2104 daemon; also documents daemon config file, so replaces
2105 doc/config-file.txt. Corrected some stuff from config-file.txt in
2106 the process of moving it.
2108 2003-05-03 Havoc Pennington <hp@pobox.com>
2110 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
2113 2003-05-03 Colin Walters <walters@verbum.org>
2115 * dbus/dbus-sysdeps.c (fill_user_info): Test against
2116 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
2118 * Makefile.am: Update to use new .pc versioning scheme.
2120 2003-05-02 Havoc Pennington <hp@redhat.com>
2122 * bus/system.conf.in: allow send/receive to/from message bus
2125 2003-04-30 Havoc Pennington <hp@redhat.com>
2127 * configure.in: print a note when building with unit tests and
2130 2003-04-30 Havoc Pennington <hp@redhat.com>
2132 * Makefile.am: add a check-local that complains if you didn't
2133 configure with --enable-tests
2135 2003-04-29 Havoc Pennington <hp@redhat.com>
2137 * glib/dbus-gmain.c: docs cleanups
2139 * dbus/dbus-types.h: add docs on int64 types
2141 * dbus/dbus-memory.c: fix docs to avoid putting private API in
2142 public API docs section
2144 2003-04-29 Havoc Pennington <hp@redhat.com>
2146 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
2147 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
2148 parallel install API version, not with the D-BUS package version.
2150 * HACKING: move some of README over here
2152 * README: updates, and document API/ABI policy
2154 * configure.in: reindentation
2156 2003-04-29 Havoc Pennington <hp@redhat.com>
2158 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
2159 to use this library" to be sure people have the right
2162 2003-04-28 Havoc Pennington <hp@redhat.com>
2164 * configure.in: add --enable-docs which by default is auto yes if
2165 doxygen and db2html found, no otherwise; but can be forced on/off
2167 * doc/Makefile.am: conditionalize whether to build docs on
2170 2003-04-28 Havoc Pennington <hp@redhat.com>
2172 * configure.in: 0.10
2176 * bus/system.conf.in: add <includedir>system.d</includedir>
2178 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
2179 username was provided but not uid
2181 * bus/config-parser.c (struct BusConfigParser): keep track of
2182 whether the parser is toplevel or was included; change some
2183 of the error handling if it's included.
2185 2003-04-27 Havoc Pennington <hp@pobox.com>
2189 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2190 report correct status if we finish processing authentication
2191 inside this function.
2193 * bus/activation.c (try_send_activation_failure): use
2194 bus_transaction_send_error_reply
2196 * bus/connection.c (bus_connection_get_groups): return an error
2197 explaining the problem
2199 * bus/bus.c (bus_context_check_security_policy): implement
2200 restriction here that inactive connections can only send the
2201 hello message. Also, allow bus driver to send anything to
2204 * bus/connection.c (bus_connection_complete): create the
2205 BusClientPolicy here instead of on-demand.
2206 (bus_connection_get_policy): don't return an error
2208 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
2209 sender field in message being replied to
2211 * bus/bus.c (bus_context_check_security_policy): fix silly typo
2212 causing it to return FALSE always
2214 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
2215 we checked sender rather than destination
2217 2003-04-25 Havoc Pennington <hp@redhat.com>
2219 test suite is slightly hosed at the moment, will fix soon
2221 * bus/connection.c (bus_connections_expire_incomplete): fix to
2222 properly disable the timeout when required
2223 (bus_connection_set_name): check whether we can remove incomplete
2224 connections timeout after we complete each connection.
2226 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
2227 probably still broken.
2229 * bus/services.c (bus_registry_acquire_service): implement max
2230 number of services owned, and honor allow/deny rules on which
2231 services a connection can own.
2233 * bus/connection.c (bus_connection_get_policy): report errors here
2235 * bus/activation.c: implement limit on number of pending
2238 2003-04-25 Havoc Pennington <hp@redhat.com>
2240 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
2241 where we used >= 0 instead of != DBUS_UID_UNSET.
2243 2003-04-25 Havoc Pennington <hp@redhat.com>
2245 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
2246 were toggled without add/remove, fix from Anders Gustafsson
2248 2003-04-24 Havoc Pennington <hp@redhat.com>
2250 * test/data/valid-config-files/basic.conf: add <limit> tags to
2253 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
2254 <limit> tag in configuration file.
2256 2003-04-24 Havoc Pennington <hp@redhat.com>
2258 * bus/dispatch.c: somehow missed some name_is
2260 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
2261 (_dbus_timeout_set_interval): new
2263 * bus/connection.c (bus_connections_setup_connection): record time
2264 when each connection is first set up, and expire them after the
2265 auth timeout passes.
2267 2003-04-24 Havoc Pennington <hp@redhat.com>
2269 * dbus/dbus-message.c (dbus_message_name_is): rename
2270 (dbus_message_service_is): rename
2271 (dbus_message_sender_is): rename
2272 (dbus_message_get_service): rename
2274 2003-04-24 Havoc Pennington <hp@redhat.com>
2276 * configure.in: add --enable-checks
2278 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2280 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2281 to use thread locks.
2282 (_dbus_connection_handler_destroyed_locked): move some private
2283 functions into proper docs group
2285 * dbus/dbus-internals.h: add _dbus_return_if_fail,
2286 _dbus_return_val_if_fail
2288 Throughout: use dbus_return_if_fail
2290 2003-04-23 James Willcox <jwillcox@gnome.org>
2293 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2294 (dbus_connection_setup_with_g_main),
2295 (dbus_server_setup_with_g_main):
2296 * glib/test-dbus-glib.c: (main):
2297 * glib/test-thread-client.c: (main):
2298 * glib/test-thread-server.c: (new_connection_callback), (main):
2299 * tools/dbus-monitor.c: (main):
2301 Added a GMainContext argument to dbus_connection_setup_with_g_main()
2302 and dbus_server_setup_with_g_main().
2304 2003-04-20 Havoc Pennington <hp@pobox.com>
2306 * doc/dbus-specification.sgml: document the restrictions on
2307 message and service names
2309 2003-04-22 Havoc Pennington <hp@redhat.com>
2311 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2312 support, and do some code cleanups to share more code and
2313 speed up array marshal/demarshal.
2315 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2317 * configure.in: generate dbus-arch-deps.h
2319 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2322 2003-04-22 Havoc Pennington <hp@redhat.com>
2324 * test/data/valid-messages/opposite-endian.message: fix test
2325 to use proper type for rply field
2327 * test/data/invalid-messages: add tests for below validation
2329 * dbus/dbus-message.c (decode_header_data): validate field types,
2330 and validate that named fields are valid names
2331 (decode_name_field): consider messages in the
2332 org.freedesktop.Local. namespace to be invalid.
2334 * dbus/dbus-string.c (_dbus_string_validate_name): new
2336 2003-04-19 Havoc Pennington <hp@pobox.com>
2338 * bus/driver.c (bus_driver_handle_hello): check limits and
2339 return an error if they are exceeded.
2341 * bus/connection.c: maintain separate lists of active and inactive
2342 connections, and a count of each. Maintain count of completed
2343 connections per user. Implement code to check connection limits.
2345 * dbus/dbus-list.c (_dbus_list_unlink): export
2347 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2348 number of bytes in the message queue for a connection
2350 2003-04-18 Havoc Pennington <hp@pobox.com>
2352 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2354 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2357 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2358 on realloc be sure to update the pointer in the keyring
2360 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2361 offset to avoid writing to unallocated memory
2363 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2364 try the next mechanism, so we properly handle OOM
2366 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2368 (_dbus_keyring_new): fix OOM bug
2369 (_dbus_keyring_new_homedir): always set error; impose a maximum
2370 number of keys we'll load from the file, mostly to speed up the
2371 test suite and make its OOM checks more useful, but also for
2374 * dbus/dbus-auth.c (process_error_server): reject authentication
2375 if we get an error from the client
2376 (process_cancel): on cancel, send REJECTED, per the spec
2377 (process_error_client): send CANCEL if we get an error from the
2380 2003-04-18 Havoc Pennington <hp@pobox.com>
2382 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2385 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2388 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2389 about DBUS_TEST_HOMEDIR once
2391 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2394 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2395 config file so we test the right thing
2397 Throughout: assorted docs improvements
2399 2003-04-18 Havoc Pennington <hp@pobox.com>
2401 * glib/dbus-gmain.c: adapt to watch changes
2403 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2405 * dbus/dbus-server.h: remove dbus_server_handle_watch
2407 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2409 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2410 like DBusTimeout, so we don't need dbus_connection_handle_watch
2413 2003-04-17 Havoc Pennington <hp@redhat.com>
2415 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2416 database usage so it all goes via the DBusUserDatabase cache.
2418 2003-04-17 Havoc Pennington <hp@redhat.com>
2420 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2421 there was an OOM watch we skipped, we always return TRUE so we
2422 iterate again to have a look at it again. Fixes test suite hang.
2423 Code rearrangement also lets us lose some memset and only iterate
2424 over callbacks once.
2426 * bus/driver.c (bus_driver_handle_message): sense of test for
2429 2003-04-16 Havoc Pennington <hp@pobox.com>
2431 * doc/dbus-specification.sgml: make spec say serials are unsigned
2433 * dbus/dbus-message.h: change message serials to unsigned
2435 * dbus/dbus-connection.c: adapt to message serials being unsigned
2437 2003-04-15 Havoc Pennington <hp@pobox.com>
2439 * bus/bus.c: create and keep around a shared DBusUserDatabase
2442 * bus/connection.c (bus_connection_get_groups): don't cache
2443 groups for user in the connection object, since user database
2444 object now does that.
2446 2003-04-16 Havoc Pennington <hp@redhat.com>
2448 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2449 list of size counters
2450 (_dbus_message_loader_putback_message_link): put back a popped link
2452 * dbus/dbus-connection.c
2453 (dbus_connection_set_max_live_messages_size): rename
2455 (dbus_connection_get_outgoing_size): get size of outgoing
2457 (_dbus_connection_set_connection_counter): remove this cruft
2459 2003-04-14 Havoc Pennington <hp@redhat.com>
2461 * dbus/dbus-userdb.c: user database abstraction, mostly to get
2462 caching, but at some point we might want to be able to use a
2465 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2466 SHA1 conf file to test the sha1 auth mechanism, since the regular
2467 test always uses EXTERNAL when available.
2470 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2471 add conf file that requires use of sha1 auth
2473 2003-04-13 Havoc Pennington <hp@pobox.com>
2475 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2476 from Philip Blundell to send messages and monitor them.
2478 2003-04-13 Havoc Pennington <hp@pobox.com>
2480 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2483 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2486 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2487 fix to only recover unused bytes if we're already authenticated
2488 (_dbus_transport_get_is_authenticated): fix to still mark us
2489 authenticated if there are unused bytes.
2491 * bus/dispatch.c: implement security policy checking
2493 * bus/connection.c (bus_transaction_send_from_driver): new
2495 * bus/bus.c (bus_context_check_security_policy): new
2497 * bus/dispatch.c (send_service_nonexistent_error): delete this,
2498 now we just set the DBusError and it gets converted to an error
2501 * bus/connection.c (allow_user_function): enable code using actual
2502 data from the config file
2504 * bus/policy.c (list_allows_user): handle wildcard rules for
2505 user/group connection perms
2507 2003-04-13 Havoc Pennington <hp@pobox.com>
2509 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2511 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2513 * bus/policy.c (bus_policy_append_mandatory_rule)
2514 (bus_policy_append_default_rule, bus_policy_append_user_rule)
2515 (bus_policy_append_group_rule): new functions
2517 2003-04-12 Havoc Pennington <hp@pobox.com>
2519 * bus/config-parser.c (bus_config_parser_new): fix a memleak
2521 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2522 the pid/gid/uid, just for paranoia.
2524 * test/break-loader.c (randomly_do_n_things): find a byte
2525 containing a type code, and randomly change it to a different
2528 2003-04-12 Havoc Pennington <hp@pobox.com>
2530 * bus/policy.h: change BusPolicy to be the thing from the config
2531 file, and rename old BusPolicy to BusClientPolicy
2533 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2534 match change in how policy works
2536 * dbus/dbus-internals.h: mark assert_not_reached as
2537 __attribute((noreturn))__
2539 2003-04-11 Havoc Pennington <hp@redhat.com>
2541 * doc/dbus-specification.sgml: fix a spot with the wrong name for
2542 the broadcast service. Use boolean return for ServiceExists.
2544 2003-04-11 Havoc Pennington <hp@redhat.com>
2546 * configure.in: add another directory to look for qt in.
2548 2003-04-11 Havoc Pennington <hp@redhat.com>
2550 * AUTHORS: add Colin Walters
2552 2003-04-11 Havoc Pennington <hp@redhat.com>
2558 2003-04-11 Havoc Pennington <hp@redhat.com>
2560 * bus/messagebus.in: remove pid file when stopping the
2561 message bus, since the bus won't have privileges to remove it
2564 2003-04-11 Havoc Pennington <hp@redhat.com>
2566 * bus/bus.c (bus_context_new): move credentials change after
2569 2003-04-11 Havoc Pennington <hp@pobox.com>
2571 * test/decode-gcov.c: add "below average functions" to the
2572 coverage report, and change how some of the code works.
2574 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
2575 not in the coverage stats.
2577 * test/test-service.c (main): use _dbus_verbose not fprintf in a
2578 couple places so running the test suite doesn't result in megaspam.
2580 2003-04-11 Havoc Pennington <hp@pobox.com>
2582 * bus/dispatch.c (check_existent_service_activation): accept a no
2583 memory error in a place we didn't before
2585 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
2586 in case the first one failed," since the test suite is less
2589 2003-04-10 Havoc Pennington <hp@pobox.com>
2591 * bus/dispatch.c (check_segfault_service_activation): add test
2592 for launching an executable that just crashes.
2594 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
2595 don't leave a million cores. We'll see how portable this is.
2597 2003-04-10 Havoc Pennington <hp@pobox.com>
2599 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
2600 the possible parent failures before we fork, so that we don't
2601 fail to create a babysitter after creating the child.
2603 * bus/activation.c (bus_activation_activate_service): kill child
2604 if we don't successfully complete the activation.
2606 2003-04-10 Havoc Pennington <hp@redhat.com>
2608 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
2609 the connection if it's disconnected
2611 * bus/activation.c (bus_activation_service_created): use new
2612 transaction features to roll back removal of pending activation if
2613 we don't successfully create the service after all. Don't remove
2614 pending activation if the function fails.
2616 * dbus/dbus-list.c (_dbus_list_insert_before_link)
2617 (_dbus_list_insert_after_link): new code to facilitate
2620 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
2621 new functionality, so we can preallocate the ability to insert
2624 * bus/connection.c (bus_transaction_add_cancel_hook): new function
2625 allowing us to put custom hooks in a transaction to be used for
2626 cancelling said transaction
2628 * doc/dbus-specification.sgml: add some discussion of secondary
2629 service owners, and disallow zero-length service names
2631 * bus/services.c (bus_registry_acquire_service): new function,
2632 splits out part of bus_driver_handle_acquire_service() and fixes
2633 a bug where we didn't remove the service doing the acquiring
2634 from the secondary queue if we failed to remove the current owner
2635 from the front of the queue.
2637 2003-04-10 Alexander Larsson <alexl@redhat.com>
2639 * doc/dbus-specification.sgml:
2640 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
2642 2003-04-10 Alexander Larsson <alexl@redhat.com>
2647 Added files to cvsignore
2649 * dbus/dbus-message.h:
2650 * dbus/dbus-message.c: (dbus_message_iter_get_named):
2651 Make get_named() take two out argument and return a boolean.
2652 (dbus_message_iter_get_args_valist):
2653 Update usage of get_named().
2654 (dbus_message_iter_append_byte):
2656 (dbus_message_iter_append_named)
2658 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
2661 2003-04-10 Alexander Larsson <alexl@redhat.com>
2663 * dbus/dbus-marshal.[ch]:
2664 Add array_type_pos argument to _dbus_marshal_validate_arg.
2665 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
2667 * dbus/dbus-message.[ch]:
2668 Multi-dimensional arrays have full type specification in the
2669 outermost array. Iter code re-arranged to handle this.
2670 Added some more iter tests.
2672 * doc/dbus-specification.sgml:
2675 Update new array encoding description.
2676 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
2678 * test/data/invalid-messages/array-with-mixed-types.message:
2679 * test/data/valid-messages/array-of-array-of-uint32.message:
2680 Change to the new array format.
2682 * test/data/invalid-messages/too-short-dict.message:
2685 * test/data/valid-messages/recursive-types.message:
2686 Fix up and extend test.
2688 2003-04-10 Havoc Pennington <hp@pobox.com>
2690 * bus/dispatch.c: lots of fixes
2692 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
2693 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
2694 that was crack, broke the test service.
2696 * dbus/dbus-transport.c (_dbus_transport_open): fix error
2697 handling to avoid piling up errors if we get a failure on the
2700 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
2701 pid in assertion failures.
2703 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
2704 to some fixed size of file descriptor array. Don't return TRUE
2705 anytime a timeout exists, that led to lots of busy loop silliness
2708 2003-04-09 Havoc Pennington <hp@redhat.com>
2710 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
2711 I'd checked this in earlier but hadn't.
2713 2003-04-09 Havoc Pennington <hp@redhat.com>
2715 * bus/dispatch.c (bus_dispatch_test): get a bit further through
2716 the activation test (man this is getting old!)
2718 2003-04-09 Havoc Pennington <hp@redhat.com>
2720 * test/test-utils.c: use dispatch status function to fix this up
2722 * bus/connection.c (connection_watch_callback): don't dispatch
2724 (connection_timeout_callback): don't dispatch from here
2725 (bus_connections_setup_connection): set the dispatch status function
2726 (bus_connection_disconnected): unset it
2728 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
2729 used to add a connection to be dispatched
2730 (_dbus_loop_iterate): do the dispatching at the end of each
2733 * dbus/dbus-connection.c
2734 (dbus_connection_set_dispatch_status_function): new function
2735 allowing us to fix up main loop usage
2736 (_dbus_connection_last_unref): free all the various function
2738 (dbus_connection_dispatch): call the DispatchStatusFunction
2739 whenever this function returns
2740 (dbus_connection_handle_watch): call DispatchStatusFunction
2741 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
2742 (reply_handler_timeout): call DispatchStatusFunction
2743 (dbus_connection_flush): call DispatchStatusFunction
2745 2003-04-09 Havoc Pennington <hp@redhat.com>
2747 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
2750 * bus/dispatch.c (check_service_activated): fix bug in test
2752 * dbus/dbus-mainloop.c (check_timeout): fix this up
2754 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
2755 verbose output so we can sort out output from different processes,
2756 e.g. in the activation case.
2758 2003-04-08 Colin Walters <walters@gnu.org>
2760 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
2762 (bus_context_new): Set it.
2763 (bus_context_unref): Use it to delete the pid file.
2765 2003-04-08 Havoc Pennington <hp@redhat.com>
2767 * test/data/invalid-messages/array-with-mixed-types.message:
2768 regression test that fails for the moment
2770 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
2771 tests for convenience
2773 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
2774 array of nil, it broke things.
2776 * test/data/invalid-messages/array-of-nil.message: regression test
2778 * test/data/valid-messages/array-of-array-of-uint32.message:
2779 happened to write this so added it to suite
2781 2003-04-08 Havoc Pennington <hp@redhat.com>
2783 * bus/driver.c (bus_driver_handle_acquire_service): init
2784 retval/reply before checking name
2786 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
2787 recursion depth argument
2789 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
2790 in the public struct for future extension
2792 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
2795 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
2798 * doc/dbus-specification.sgml: fix typo
2800 2003-04-08 Alexander Larsson <alexl@redhat.com>
2802 Implemented recursive types, named types and new-style iters
2805 * glib/test-thread-client.c: (thread_func):
2806 * glib/test-thread-server.c: (handle_test_message):
2807 * test/test-service.c: (handle_echo):
2816 * dbus/dbus-internals.c: (_dbus_type_to_string):
2817 Update for new types.
2819 * dbus/dbus-marshal.[ch]:
2820 Implement recursive types and the new marshalling format.
2821 Remove hardcoded dict marshalling.
2822 Marshal named types.
2824 * dbus/dbus-message-builder.c:
2826 Remove references to old types
2828 * dbus/dbus-message.[ch]:
2829 New non-refcounted iter API that supports recursive iters.
2830 Use iters for appending, including support for recursive
2832 Add byte and named type support.
2833 Update everything to new marshalling formats.
2834 Add tests for new API.
2836 * dbus/dbus-protocol.h:
2837 Remove old array types.
2838 Add types: BYTE, ARRAY, DICT, NAMED
2840 * dbus/dbus-string.c:
2841 * dbus/dbus-sysdeps.c:
2842 Make parse_double locale safe.
2844 * dbus/dbus-test-main.c:
2850 * doc/dbus-specification.sgml:
2853 * test/data/incomplete-messages/missing-body.message:
2854 * test/data/invalid-messages/bad-boolean.message:
2855 * test/data/invalid-messages/bad-boolean-array.message:
2856 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
2857 * test/data/invalid-messages/boolean-has-no-value.message-raw:
2858 * test/data/invalid-messages/too-short-dict.message:
2859 * test/data/valid-messages/dict-simple.message:
2860 * test/data/valid-messages/dict.message:
2861 * test/data/valid-messages/emptiness.message:
2862 * test/data/valid-messages/lots-of-arguments.message:
2863 * test/data/valid-messages/no-padding.message:
2864 * test/data/valid-messages/recursive-types.message:
2865 Add missing NAME fields
2866 Fix up dicts & arrays
2868 * test/data/invalid-messages/dict-with-nil-value.message:
2869 Removed, this is not invalid anymore.
2871 * test/data/valid-messages/recursive-types.message:
2872 Add new test for deeply recursive types.
2874 2003-04-07 Havoc Pennington <hp@pobox.com>
2876 * bus/driver.c (bus_driver_handle_acquire_service): return an
2877 error if you try to acquire a service that starts with ':'
2879 2003-04-07 Havoc Pennington <hp@redhat.com>
2881 * doc/dbus-specification.sgml: require that base service names
2882 start with ':' and that the base service is created/deleted
2883 as first and last things a connection does on the bus
2885 * bus/dispatch.c (check_existent_service_activation): lots more
2886 work on the activation test; it doesn't fully pass yet...
2888 * test/test-service.c (main): fix so we don't memleak the
2889 connection to the message bus
2890 (filter_func): accept a message asking us to exit
2892 2003-04-06 Havoc Pennington <hp@pobox.com>
2894 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
2897 * configure.in: fixes to Qt detection from Colin Walters
2899 * doc/Makefile.am: Only remove generated docbook dirs if they
2900 exist, from Colin Walters
2902 * dbus/dbus-bus.c: change how we set well-known connections to
2903 NULL, so that it works if a single connection is stored in
2904 two well-known array slots.
2906 * test/Makefile.am: remove a lot of stuff that isn't immediately
2907 useful, it's in CVS history if we want it.
2909 * test/test-service.c: use dbus-mainloop instead of that
2912 2003-04-06 Havoc Pennington <hp@pobox.com>
2914 * dbus/Makefile.am: split lists of sources into stuff that goes in
2915 the library, util functions that go in the lib and are also used
2916 elsewhere, and util functions that are used in tests/daemon but
2917 don't go in the lib.
2919 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
2920 here so it can be used in test binaries also
2922 2003-04-06 Havoc Pennington <hp@pobox.com>
2924 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
2925 here in the parent process, so we can return an error if it
2926 fails. Also, move some of the code into the child so the parent
2927 is less hosed if we fail midway through.
2929 * bus/bus.c (bus_context_new): move pidfile detection further up
2930 in the function, before we start overwriting sockets and such.
2932 * bus/messagebus.in: adjust this a bit, not sure if it will work.
2934 * configure.in: add --with-system-pid-file and --with-system-socket
2936 2003-04-06 Colin Walters <walters@verbum.org>
2938 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
2940 * bus/system.conf.in: Declare a pidfile.
2942 * bus/bus.c (bus_context_new): Test for an existing pid file, and
2943 create one (if appropriate).
2945 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
2946 (struct BusConfigParser) [pidfile]: New.
2947 (element_type_to_name, merge_included, start_busconfig_child)
2948 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
2949 (bus_config_parser_unref): Free it.
2950 (bus_config_parser_get_pidfile): New function.
2952 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
2954 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
2956 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
2958 * dbus/dbus-sysdeps.h: Prototype it.
2960 2003-04-06 Havoc Pennington <hp@pobox.com>
2962 * bus/bus.c (bus_context_new): print the address in here, rather
2963 than in main(), because we need to do it before forking the daemon
2965 * bus/dispatch.c (send_service_nonexistent_error): set the sender
2966 on the service nonexistent error
2968 * bus/driver.c (bus_driver_handle_acquire_service): set the
2969 sender on the AcquireService reply
2971 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
2972 server also listen on a UNIX socket so services can connect to it.
2974 2003-04-06 Havoc Pennington <hp@pobox.com>
2976 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
2977 so it detects deadlocks and also we actually init threads when
2980 2003-04-06 Havoc Pennington <hp@pobox.com>
2982 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2983 save the domain socket name, and unlink it when we disconnect the
2984 server. Means that at least when we exit normally, we won't leave
2985 a bunch of junk in /tmp
2987 * dbus/dbus-transport-unix.c
2988 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
2989 memory management). (I was making a real change here but then
2992 2003-04-06 Havoc Pennington <hp@pobox.com>
2994 * bus/bus.c (bus_context_new): fix wrong handling of
2995 server_data_slot_unref() in the error case.
2997 * dbus/dbus-internals.h (_dbus_assert): change so it passes
2998 "(condition) != 0" to _dbus_real_assert so that
2999 "_dbus_assert (pointer)" doesn't cause a warning
3001 * bus/main.c (main): accept --print-address option to print out
3002 the message bus address
3004 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3006 * dbus/dbus-transport.c (_dbus_transport_open): special error for
3007 "tmpdir" option to unix: address on client side
3009 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3012 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3013 we can use to create sockets in the test suite.
3015 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3016 cleanly. To be used for testing.
3018 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3020 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3022 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3023 handle trying to call this when there's no servers active
3025 2003-04-05 Havoc Pennington <hp@pobox.com>
3031 2003-04-05 Havoc Pennington <hp@pobox.com>
3033 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3034 crash on startup. Need to get "try starting the daemon"
3035 in the test suite I guess. ;-)
3037 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
3038 tracked the number of open connections; it's better done in
3039 application-specific code as you want it to span all servers etc.
3041 2003-04-05 Havoc Pennington <hp@pobox.com>
3043 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
3044 patch from Colin Walters
3046 2003-04-05 Havoc Pennington <hp@pobox.com>
3048 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
3049 reality; in fact multiple mechanisms are allowed.
3051 * dbus/dbus-internals.c (_dbus_real_assert)
3052 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
3053 _dbus_assert_not_reached() into functions, so that they don't show
3054 up in basic block counts for test coverage, and don't use up as
3055 much disk space. Does mean slower execution speed though, so
3056 assumes --disable-asserts is the normal production case.
3058 2003-04-05 Havoc Pennington <hp@pobox.com>
3060 * test/Makefile.am (dist-hook): also dist *.in files
3066 2003-04-05 Havoc Pennington <hp@pobox.com>
3068 * dbus/dbus-string.c: docs warning
3070 * dbus/dbus-spawn.c: missing docs
3072 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
3074 2003-04-05 Havoc Pennington <hp@pobox.com>
3076 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
3079 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
3080 to -1 once we've reaped the babysitter
3081 (_dbus_babysitter_handle_watch): do as much work as we can, not
3084 * bus/activation.c: add code using DBusBabysitter so that we
3085 handle it when a service fails to start up properly.
3086 (bus_activation_service_created): don't remove the activation
3087 entries as we go, just let them get removed when we free the pending
3088 activation. Unref reply messages after sending them.
3090 2003-04-05 Havoc Pennington <hp@pobox.com>
3092 * test/decode-gcov.c (main): print per-directory stats in the report
3094 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
3096 2003-04-05 Havoc Pennington <hp@pobox.com>
3098 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
3100 * test/decode-gcov.c: hack up a little program to suck data
3101 out of gcov files. Yes this is sort of silly.
3103 * configure.in: define something in config.h and do an
3104 AM_CONDITIONAL when gcov is enabled
3106 2003-04-04 Havoc Pennington <hp@redhat.com>
3108 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
3109 return a "babysitter" object that is used to monitor the status of
3110 the spawned process and reap it when required.
3112 * test/test-segfault.c, test/test-exit.c,
3113 test/test-sleep-forever.c: binaries that do various lame things,
3114 used in the test suite.
3116 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
3118 2003-04-03 Havoc Pennington <hp@pobox.com>
3120 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
3121 in preparation for modifying it, dbus-sysdeps is getting
3124 2003-04-03 Havoc Pennington <hp@redhat.com>
3126 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
3129 * bus/*.[hc]: adapt to mainloop change
3131 2003-04-03 Havoc Pennington <hp@redhat.com>
3133 * bus/activation.c (load_directory): fix up memleaks
3134 (bus_activation_entry_free): free the entry
3136 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
3137 we get one from the message bus; fix memleaks.
3139 * dbus/dbus-message.c (dbus_set_error_from_message): new function
3141 2003-04-03 Havoc Pennington <hp@pobox.com>
3143 * bus/config-parser.c (bus_config_parser_unref): free
3144 list of mechanisms, bug discovered by test suite enhancements
3145 (putting system.conf and session.conf into suite)
3147 * test/Makefile.am, test/test-service.c: add placeholder for a
3148 test service that we'll activate as part of test suite. Doesn't
3151 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
3152 setting NULL value, and use system malloc not dbus_malloc()
3153 when we have unavoidable memleakage.
3155 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
3156 didn't work, and support DBUS_BUS_ACTIVATION.
3158 * bus/activation.c (child_setup): pass our well-known bus type to
3161 * bus/config-parser.c: support <type> to specify well-known type
3163 * doc/dbus-specification.sgml: document the env variables to
3164 locate well-known buses and find service activator
3166 2003-04-02 Havoc Pennington <hp@redhat.com>
3168 * test/Makefile.am (all-local): add a rule to copy tests to
3169 builddir, so we can have generated tests. Use this to remove the
3170 silly hack for testing system.conf and session.conf. Will use this
3171 shortly to generate .service files pointing to test binaries.
3173 2003-04-02 Havoc Pennington <hp@redhat.com>
3175 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
3176 current alloc and needed new length, not max of the doubled
3177 allocation and needed new length. Also, when building tests,
3178 don't do the double-allocation stuff, just realloc every time.
3180 2003-04-02 Havoc Pennington <hp@redhat.com>
3182 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
3184 (_dbus_string_get_dirname): new
3185 (_dbus_sysdeps_test): new
3186 (_dbus_directory_open): include dirnames in error messages
3188 * bus/config-parser.c: interpret <include> and <includedir> and
3189 <servicedir> relative to config file location if the given
3190 filename is not absolute.
3192 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
3194 2003-04-02 Havoc Pennington <hp@redhat.com>
3196 * bus/connection.c (bus_transaction_send_error_reply): set sender
3197 service for the error, and unref the reply on success
3199 * bus/activation.c: convert to use BusTransaction so OOM can be
3201 (bus_activation_service_created): set sender of the message
3203 2003-04-01 Havoc Pennington <hp@redhat.com>
3205 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
3206 <includedir> (at least mostly)
3208 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
3209 first, then the user ID
3211 2003-04-01 Havoc Pennington <hp@pobox.com>
3213 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
3216 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
3218 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
3220 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
3221 socket 0777, and unlink any existing socket.
3223 * bus/bus.c (bus_context_new): change our UID/GID and fork if
3224 the configuration file so specifies; set up auth mechanism
3227 * bus/config-parser.c (bus_config_parser_content): add support
3228 for <fork> option and fill in code for <auth>
3230 * bus/system.conf.in: add <fork/> to default configuration,
3231 and limit auth mechanisms to EXTERNAL
3233 * doc/config-file.txt (Elements): add <fork>
3235 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
3236 (_dbus_change_identity): new function
3238 2003-03-31 Havoc Pennington <hp@redhat.com>
3240 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
3241 (_dbus_listen_unix_socket): fix off-by-one error in null
3242 termination spotted by Nalin
3244 2003-03-31 Havoc Pennington <hp@redhat.com>
3246 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
3247 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
3248 having a real home directory available.
3250 2003-03-31 Havoc Pennington <hp@redhat.com>
3252 * bus/Makefile.am (install-data-hook): create /var/run/dbus
3254 * bus/messagebus.in: add init script for Red Hat /etc/init.d
3256 * configure.in: add support for specifying a style of init script
3259 2003-03-31 Havoc Pennington <hp@redhat.com>
3261 Fix some annoying DBusString API and fix all affected code.
3263 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
3265 (_dbus_string_get_data): change to return string instead of using
3267 (_dbus_string_get_const_data): ditto
3268 (_dbus_string_get_data_len): ditto
3269 (_dbus_string_get_const_data_len): ditto
3271 2003-03-31 Havoc Pennington <hp@redhat.com>
3273 * bus/main.c (main): fix up the command line arguments to be nicer
3275 2003-03-31 Havoc Pennington <hp@redhat.com>
3277 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3278 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3279 final location that lands in the config file
3281 * bus/config-loader-expat.c (bus_config_load): fix type of
3284 * doc/TODO: remove TODO item for dbus_bus_get()
3286 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3288 2003-03-31 Havoc Pennington <hp@pobox.com>
3290 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3291 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3292 argument since they are always client side
3294 * dbus/dbus-server.c (dbus_server_get_address): new function
3296 * bus/main.c (main): take the configuration file as an argument.
3298 * test/data/valid-config-files/debug-allow-all.conf: new file to
3299 use with dispatch.c tests for example
3301 * bus/test-main.c (main): require test data dir
3303 * bus/bus.c (bus_context_new): change this to take a
3304 configuration file name as argument
3306 * doc/config-file.txt (Elements): add <servicedir>
3308 * bus/system.conf, bus/session.conf: new files
3310 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3311 well-known socket if none set
3313 * configure.in: create system.conf and session.conf
3315 2003-03-30 Havoc Pennington <hp@pobox.com>
3317 * bus/config-parser.c: hacking
3319 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3320 to shut down, since it could cause weirdness with the DBusList
3323 * dbus/dbus-list.c (_dbus_list_test): add tests for the
3324 link-oriented stack routines
3325 (alloc_link): free the mempool if the first alloc from it fails
3327 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3329 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3331 (_dbus_string_skip_white): new
3333 * doc/config-file.txt (Elements): add <includedir>
3335 2003-03-28 Havoc Pennington <hp@pobox.com>
3337 * dbus/dbus-string.c (_dbus_string_copy_data_len)
3338 (_dbus_string_copy_data): new functions
3340 2003-03-28 Anders Carlsson <andersca@codefactory.se>
3342 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3346 * dbus/dbus-memory.c:
3349 2003-03-28 Havoc Pennington <hp@pobox.com>
3351 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3352 I think it may have just been superstition. Not sure.
3354 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3355 failures that were not being handled.
3357 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3359 * dbus/dbus-memory.c: add ability to set number of mallocs in a
3360 row that will fail on out-of-memory.
3362 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3363 function for testing out-of-memory handling.
3365 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3366 allocation functions, they do map exactly to the expat ones.
3368 2003-03-27 Havoc Pennington <hp@redhat.com>
3370 * bus/config-loader-libxml.c (bus_config_load): add another error
3373 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3376 Add note about automatic service activation.
3378 * doc/dbus-specification.sgml:
3379 Rename the specification and clarify a few things.
3381 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3384 * dbus/dbus-address.c:
3386 * dbus/dbus-marshal.c:
3387 * dbus/dbus-server-debug-pipe.c:
3388 * dbus/dbus-transport-unix.c:
3389 Fix documentation warnings.
3391 2003-03-26 Havoc Pennington <hp@pobox.com>
3393 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3394 after every test so it's quick and easy to see which leaked, and
3395 so we test multiple dbus_shutdown() calls
3397 * configure.in: change configure.in XML stuff to also support
3400 * config-loader-libxml.c: some hacking
3402 * config-loader-expat.c: some hacking
3404 * config-parser.c: some hacking, plus tests
3406 2003-03-25 Havoc Pennington <hp@redhat.com>
3408 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3410 * configure.in: add --with-xml option to specify XML library,
3411 right now only libxml is supported.
3413 * bus/config-loader-libxml.c, config-parser.c: sync some minor
3414 nonworking code between home and work, still just stubs
3416 2003-03-24 Havoc Pennington <hp@redhat.com>
3418 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3421 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3422 NULL argument for "message" if the error is a well-known one,
3423 fill in a generic message in this case.
3425 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3428 * bus/test.c (bus_test_flush_bus): add
3430 * bus/policy.c (bus_policy_test): test code stub
3432 2003-03-24 Havoc Pennington <hp@pobox.com>
3434 * bus/connection.c (bus_connections_setup_connection): set up
3435 the "can this user connect" function, but it always returns
3436 TRUE until we have a config file parser so we can have a config
3437 file that allows connections.
3439 2003-03-23 Havoc Pennington <hp@pobox.com>
3441 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3442 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3443 the mutex, so we can check for proper memory management
3446 * dbus/dbus-dataslot.c: remove the mutex from
3447 DBusDataSlotAllocator and lock it manually when using it,
3448 to simplify fitting it into the global slots framework.
3450 * dbus/dbus-threads.c (init_static_locks): rework how we're
3451 handling global locks so they are easily shut down.
3453 * bus/policy.c (bus_policy_append_rule): fix
3455 * bus/test-main.c (main): check for memleaks
3457 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3458 test suite check for memleaks
3460 * dbus/dbus-memory.c: add support in test mode for tracking
3461 number of outstanding blocks
3463 2003-03-23 Havoc Pennington <hp@pobox.com>
3465 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3468 * dbus/dbus-hash.h: add ULONG hash keys
3470 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3471 (_dbus_get_group_id): new function
3473 2003-03-20 Havoc Pennington <hp@redhat.com>
3475 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3477 (dbus_connection_get_unix_user): new function
3479 2003-03-20 Havoc Pennington <hp@pobox.com>
3481 * bus/connection.c (bus_connection_send_oom_error): assert that
3482 message has a sender
3483 (connection_execute_transaction): ditto
3484 (bus_connection_preallocate_oom_error): fix to set the sender, and
3485 set recipient to the destination service, not the bus driver
3487 * bus/policy.c: hacking
3489 * dbus/dbus-message.c (dbus_message_service_is): new function
3490 (dbus_message_sender_is): new
3492 2003-03-19 Havoc Pennington <hp@redhat.com>
3494 * bus/policy.c: start sketching code for policy restrictions on
3495 what connections can do.
3497 2003-03-18 Havoc Pennington <hp@redhat.com>
3499 * doc/TODO: some notes on high-level todo items. Little nitpick
3500 stuff is all in @todo, so no need to add it here.
3502 * doc/config-file.txt: some notes on how config file might look
3504 2003-03-18 Anders Carlsson <andersca@codefactory.se>
3510 2003-03-17 Havoc Pennington <hp@redhat.com>
3512 * dbus/dbus-internals.h: add gcc attributes so that
3513 our printf-style functions warn on bad arguments to
3516 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3519 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3522 2003-03-17 Havoc Pennington <hp@redhat.com>
3524 * bus/test-main.c (main): make it print something as it runs
3525 so make check doesn't look stuck
3527 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3528 from CVS, now obsolete
3530 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3532 * bus/dispatch.c: (bus_dispatch):
3533 Refetch the service name since it may have been reallocated
3534 when dbus_message_set_sender was called.
3536 * dbus/dbus-sysdeps.c: (_dbus_accept):
3537 Add address and address length variables and use them to stop
3538 valgrind from complaining.
3540 2003-03-17 Havoc Pennington <hp@pobox.com>
3542 All tests pass, no memleaks, no valgrind complaints.
3544 * bus/test.c: refcount handler_slot
3546 * bus/connection.c (bus_connections_new): refcount
3547 connection_data_slot
3549 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3550 bytes so that auth scripts pass.
3552 * bus/dispatch.c: init message_handler_slot so it gets allocated
3555 * bus/dispatch.c (message_handler_slot_ref): fix memleak
3557 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3558 dealloc server_pipe_hash when no longer used for benefit of
3561 * dbus/dbus-auth.c (process_command): memleak fix
3563 * bus/dispatch.c (check_hello_message): memleak fix
3565 2003-03-16 Havoc Pennington <hp@pobox.com>
3567 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
3569 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3571 * bus/activation.c (bus_activation_activate_service): Append
3572 the pending activation entry to the list of pending activations.
3574 2003-03-16 Havoc Pennington <hp@pobox.com>
3576 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
3579 * dbus/dbus-address.c (create_entry): fix OOM handling when
3580 failing to alloc entry->method
3582 2003-03-16 Havoc Pennington <hp@pobox.com>
3584 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
3587 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3588 add some missing dbus_set_result
3590 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
3591 alloc the DBusMessageHandler
3593 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
3594 the transport here, since we call this from the finalizer; it
3595 resulted in a double-finalize.
3597 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
3598 where we tried to use transport->connection that was NULL,
3599 happened when transport was disconnected early on due to OOM
3601 * bus/*.c: adapt to handle OOM for watches/timeouts
3603 * dbus/dbus-transport-unix.c: port to handle OOM during
3606 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
3607 reference to unused bytes instead of a copy
3609 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
3612 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
3615 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
3618 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3620 * doc/dbus-specification.sgml:
3621 Document reply message for ActivateService.
3623 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3625 * bus/activation.c: (bus_pending_activation_entry_free),
3626 (bus_pending_activation_free), (bus_activation_new),
3627 (bus_activation_unref), (bus_activation_service_created),
3628 (bus_activation_activate_service):
3630 * bus/bus.c: (bus_context_new):
3631 * bus/desktop-file.c: (new_section):
3632 * bus/driver.c: (bus_driver_send_service_deleted),
3633 (bus_driver_handle_activate_service):
3634 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
3636 * dbus/dbus-connection.c:
3637 (dbus_connection_send_with_reply_and_block):
3638 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3639 * dbus/dbus-protocol.h:
3640 Make activation work better. Now pending activations will be queued
3641 and the daemon won't try to activate services that are already registered.
3643 2003-03-16 Havoc Pennington <hp@pobox.com>
3645 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
3648 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
3649 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
3651 2003-03-16 Havoc Pennington <hp@pobox.com>
3653 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
3654 this. always run the test suite before commit...
3656 * bus/*: adapt to DBusConnection API changes
3658 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
3659 requires renaming stuff to avoid dbus_connection_dispatch name
3662 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
3665 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3666 separate from _dbus_message_loader_return_buffer()
3668 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
3669 this, because it's now always broken to use; the number of
3670 messages in queue vs. the number still buffered by the message
3671 loader is undefined/meaningless. Should use
3672 dbus_connection_get_dispatch_state().
3673 (dbus_connection_dispatch): rename from
3674 dbus_connection_dispatch_message
3676 2003-03-16 Havoc Pennington <hp@pobox.com>
3678 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
3681 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3683 * dbus/dbus-connection.c:
3684 (dbus_connection_send_with_reply_and_block):
3685 Decrease connection->n_incoming when removing an entry
3687 * dbus/dbus-dict.c: (dbus_dict_entry_free),
3688 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3689 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3690 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
3691 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
3692 (dbus_dict_get_byte_array):
3693 Handle NULL arrays and strings. Also add support for byte arrays.
3695 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
3696 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
3697 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3698 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3699 (_dbus_demarshal_dict), (demarshal_and_validate_len),
3700 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
3701 * dbus/dbus-marshal.h:
3702 Add support for marshalling and demarshalling empty arrays and strings.
3704 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3705 (dbus_message_append_string_array),
3706 (dbus_message_iter_get_boolean),
3707 (dbus_message_iter_get_boolean_array),
3708 (dbus_message_iter_get_int32_array),
3709 (dbus_message_iter_get_uint32_array),
3710 (dbus_message_iter_get_double_array),
3711 (dbus_message_iter_get_byte_array),
3712 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
3713 (check_message_handling):
3714 Add support for getting empty arrays and dicts.
3716 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
3717 Don't do any validation at all for now, that's better than just checking
3720 * test/data/valid-messages/emptiness.message:
3721 New test message with lots of empty arrays.
3723 2003-03-16 Havoc Pennington <hp@pobox.com>
3725 * dbus/dbus-connection.c
3726 (_dbus_connection_queue_received_message_link): new function that
3727 can't fail due to OOM
3729 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
3730 new function pops a message together with a list link
3733 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
3734 message queuing functions to avoid needing to alloc memory
3736 2003-03-16 Havoc Pennington <hp@pobox.com>
3738 Oops - test code was only testing failure of around 30 of the
3739 mallocs in the test path, but it turns out there are 500+
3740 mallocs. I believe this was due to misguided linking setup such
3741 that there was one copy of dbus_malloc etc. in the daemon and one
3742 in the shared lib, and only daemon mallocs were tested. In any
3743 case, the test case now tests all 500+ mallocs, and doesn't pass
3744 yet, though there are lots of fixes in this patch.
3746 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
3747 this so that it doesn't need to allocate memory, since it
3748 has no way of indicating failure due to OOM (and would be
3749 annoying if it did).
3751 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
3753 * bus/Makefile.am: rearrange to create two self-contained
3754 libraries, to avoid having libraries with overlapping symbols.
3755 that was resulting in weirdness, e.g. I'm pretty sure there
3756 were two copies of global static variables.
3758 * dbus/dbus-internals.c: move the malloc debug stuff to
3761 * dbus/dbus-list.c (free_link): free list mempool if it becomes
3764 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
3766 * dbus/dbus-address.c (dbus_parse_address): free list nodes
3769 * bus/dispatch.c (bus_dispatch_add_connection): free
3770 message_handler_slot when no longer using it, so
3771 memory leak checkers are happy for the test suite.
3773 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
3775 * bus/bus.c (new_connection_callback): disconnect in here if
3776 bus_connections_setup_connection fails.
3778 * bus/connection.c (bus_connections_unref): fix to free the
3780 (bus_connections_setup_connection): if this fails, don't
3781 disconnect the connection, just be sure there are no side
3784 * dbus/dbus-string.c (undo_alignment): unbreak this
3786 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
3788 (_dbus_auth_new): fix the order in which we free strings
3791 * bus/connection.c (bus_connection_disconnected): fix to
3792 not send ServiceDeleted multiple times in case of memory
3795 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
3796 get the base service name
3797 (dbus_bus_register_client): don't return base service name,
3798 instead store it on the DBusConnection and have an accessor
3800 (dbus_bus_register_client): rename dbus_bus_register()
3802 * bus/dispatch.c (check_hello_message): verify that other
3803 connections on the bus also got the correct results, not
3804 just the one sending hello
3806 2003-03-15 Havoc Pennington <hp@pobox.com>
3808 Make it pass the Hello handling test including all OOM codepaths.
3809 Now to do other messages...
3811 * bus/services.c (bus_service_remove_owner): fix crash when
3812 removing owner from an empty list of owners
3813 (bus_registry_ensure): don't leave service in the list of
3814 a connection's owned services if we fail to put the service
3817 * bus/connection.c (bus_connection_preallocate_oom_error): set
3818 error flag on the OOM error.
3820 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3821 handle _dbus_transport_set_connection failure
3823 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
3824 to create watches up front and simply enable/disable them as
3826 (unix_connection_set): this can now fail on OOM
3828 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
3829 of enabling/disabling a watch or timeout.
3831 * bus/loop.c (bus_loop_iterate): don't touch disabled
3834 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
3836 2003-03-15 Havoc Pennington <hp@pobox.com>
3838 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
3839 write useful test code, after all that futzing around ;-)
3841 Test does not yet pass because we can't handle OOM in
3842 _dbus_transport_messages_pending (basically,
3843 dbus_connection_preallocate_send() does not prealloc the write
3844 watch). To fix this, I think we need to add new stuff to
3845 set_watch_functions, namely a SetEnabled function so we can alloc
3846 the watch earlier, then enable it later.
3848 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
3849 dbus-memory.c to the convenience lib
3851 * bus/test.c: rename some static functions to keep them clearly
3852 distinct from stuff in connection.c. Handle client disconnection.
3854 2003-03-14 Havoc Pennington <hp@pobox.com>
3856 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
3857 transport, tests more of the real codepath. Set up clients
3858 with bus_setup_debug_client.
3860 * bus/test.c (bus_setup_debug_client): function to set up debug
3861 "clients" on the main loop
3863 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
3866 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
3869 * dbus/dbus-server-debug.c: support a debug server based on pipes
3871 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
3872 (_dbus_close): new function
3874 * configure.in: check for socketpair
3876 2003-03-14 Havoc Pennington <hp@redhat.com>
3878 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
3881 * dbus/dbus-transport-debug.c: rework this a good bit to be
3882 less complicated. hopefully still works.
3884 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
3887 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
3890 * dbus/dbus-message.c (dbus_message_copy): rename from
3891 dbus_message_new_from_message, fix it up to copy
3892 all the message fields, add test case
3894 * bus/dispatch.c (bus_dispatch_test): add some more test code,
3895 not quite passing yet
3897 2003-03-14 Havoc Pennington <hp@pobox.com>
3899 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
3900 until no work remains" in test code. (the large diff here
3901 is just code movement, no actual changes)
3903 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
3904 1, no point waiting around for test code.
3905 (_dbus_server_debug_accept_transport): unref the timeout
3906 after adding it (right?)
3908 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
3910 2003-03-13 Havoc Pennington <hp@redhat.com>
3912 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
3915 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
3918 * dbus/dbus-connection.h: Make AddWatchFunction and
3919 AddTimeoutFunction return a bool so they can fail on out-of-memory
3921 * bus/bus.c (bus_context_new): set up timeout handlers
3923 * bus/connection.c (bus_connections_setup_connection): set up
3926 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
3929 * bus/bus.c (bus_context_new): adapt to changes
3931 * bus/connection.c: adapt to changes
3933 * test/watch.c: adapt to DBusWatch changes
3935 * bus/dispatch.c (bus_dispatch_test): started adding this but
3938 2003-03-14 Anders Carlsson <andersca@codefactory.se>
3940 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
3942 2003-03-13 Havoc Pennington <hp@pobox.com>
3944 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
3945 set up a test framework as for the library
3947 2003-03-12 Havoc Pennington <hp@pobox.com>
3949 Throughout: purge global variables, introduce BusActivation,
3950 BusConnections, BusRegistry, etc. objects instead.
3952 * bus/bus.h, bus/bus.c: introduce BusContext as a global
3955 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
3956 going to redo this a bit differently I think
3958 2003-03-12 Havoc Pennington <hp@redhat.com>
3960 Mega-patch that gets the message bus daemon initially handling
3961 out-of-memory. Work still needed. Also lots of random
3962 moving stuff to DBusError instead of ResultCode.
3964 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
3966 * dbus/dbus-connection.c
3967 (dbus_connection_send_with_reply_and_block): use DBusError
3969 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
3972 * dbus/dbus-connection.c (dbus_connection_send): drop the result
3973 code here, as the only failure possible is OOM.
3975 * bus/connection.c (bus_connection_disconnect):
3976 rename bus_connection_disconnected as it's a notification only
3978 * bus/driver.c (bus_driver_handle_acquire_service): don't free
3979 "name" on get_args failure, should be done by get_args;
3980 don't disconnect client for bad args, just return an error.
3981 (bus_driver_handle_service_exists): ditto
3983 * bus/services.c (bus_services_list): NULL-terminate returned array
3985 * bus/driver.c (bus_driver_send_service_lost)
3986 (bus_driver_send_service_acquired): send messages from driver to a
3987 specific client to the client's unique name, not to the broadcast
3990 * dbus/dbus-message.c (decode_header_data): reject messages that
3991 contain no name field
3992 (_dbus_message_get_client_serial): rename to
3993 dbus_message_get_serial and make public
3994 (_dbus_message_set_serial): rename from set_client_serial
3995 (_dbus_message_set_reply_serial): make public
3996 (_dbus_message_get_reply_serial): make public
3998 * bus/connection.c (bus_connection_foreach): allow stopping
3999 iteration by returning FALSE from foreach function.
4001 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4002 (dbus_connection_free_preallocated_send)
4003 (dbus_connection_preallocate_send): new API for sending a message
4004 without possibility of malloc failure.
4005 (dbus_connection_send_message): rename to just
4006 dbus_connection_send (and same for whole function family)
4008 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4010 * dbus/dbus-sysdeps.c (_dbus_exit): new function
4012 * bus/activation.c: handle/return errors
4014 * dbus/dbus-errors.h: add more DBUS_ERROR #define
4016 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4017 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4018 (_dbus_result_from_errno): move to this file
4020 2003-03-10 Anders Carlsson <andersca@codefactory.se>
4022 * dbus/dbus-marshal.c:
4023 (_dbus_marshal_set_string):
4024 Take a length argument so we can marshal the correct string
4027 (_dbus_marshal_dict), (_dbus_demarshal_dict),
4028 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4029 (_dbus_marshal_test):
4030 * dbus/dbus-marshal.h:
4031 Add support for marshalling and demarshalling dicts.
4033 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4034 Add support for TYPE DICT.
4036 * dbus/dbus-message.c: (set_string_field):
4037 Adjust header padding.
4039 (dbus_message_append_args_valist), (dbus_message_append_dict),
4040 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
4041 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
4042 (check_message_handling), (check_have_valid_message):
4043 * dbus/dbus-message.h:
4044 Add functions for setting and getting dicts.
4046 * dbus/dbus-protocol.h:
4052 * doc/dbus-specification.sgml:
4053 Add information about how dicts are marshalled.
4055 * test/data/invalid-messages/dict-with-nil-value.message:
4056 * test/data/invalid-messages/too-short-dict.message:
4057 * test/data/valid-messages/dict-simple.message:
4058 * test/data/valid-messages/dict.message:
4059 Add sample messages containing dicts.
4061 2003-03-08 Anders Carlsson <andersca@codefactory.se>
4063 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
4065 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4068 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4069 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
4070 (dbus_dict_set_int32), (dbus_dict_set_uint32),
4071 (dbus_dict_set_double), (dbus_dict_set_string),
4072 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4073 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4074 (dbus_dict_set_string_array), (_dbus_dict_test):
4076 Fix according to comments from Havoc.
4078 2003-03-06 Michael Meeks <michael@server.home>
4080 * configure.in: if we don't have kde-config, disable have_qt.
4082 2003-03-07 Anders Carlsson <andersca@codefactory.se>
4087 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4088 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
4089 (dbus_dict_remove), (dbus_dict_get_value_type),
4090 (dbus_dict_get_keys), (dbus_dict_put_boolean),
4091 (dbus_dict_put_int32), (dbus_dict_put_uint32),
4092 (dbus_dict_put_double), (dbus_dict_put_string),
4093 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
4094 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
4095 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
4096 (dbus_dict_get_int32), (dbus_dict_get_uint32),
4097 (dbus_dict_get_double), (dbus_dict_get_string),
4098 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
4099 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
4100 (dbus_dict_get_string_array), (_dbus_dict_test):
4102 Add DBusDict implementation
4104 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
4108 2003-03-04 Havoc Pennington <hp@pobox.com>
4110 * test/data/auth/*: adapt to changes
4112 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
4113 USERID_BASE64 and change USERNAME_BASE64 to put in username not
4116 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
4117 more stuff from being in a context name, to make the protocol
4118 simpler to deal with
4120 * dbus/dbus-errors.c (dbus_error_has_name): new function
4121 (dbus_error_is_set): new function
4123 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
4124 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
4126 * dbus/dbus-connection.c (dbus_connection_flush): also read
4127 messages during a flush operation
4129 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
4131 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4133 * configure.in: Check for gethostbyname on Solaris.
4135 * dbus/dbus-transport.c: (_dbus_transport_open):
4136 Remove duplicate "tcp" entry.
4138 * doc/dbus-specification.sgml:
4139 Clarify some things.
4141 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4143 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
4144 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
4145 (_dbus_keyring_test):
4146 * dbus/dbus-md5.c: (_dbus_md5_compute):
4147 * dbus/dbus-sha.c: (_dbus_sha_compute):
4150 2003-03-05 Anders Carlsson <andersca@codefactory.se>
4152 * README: Add some things.
4154 2003-03-04 Anders Carlsson <andersca@codefactory.se>
4156 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
4157 after case DBUS_TYPE_BOOELAN.
4159 2003-03-02 Havoc Pennington <hp@pobox.com>
4161 * test/break-loader.c (randomly_set_extreme_ints): add test that
4162 sets really huge and small integers
4164 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
4165 that length of boolean array fits in the string, and that
4166 string has room for boolean value in single-bool case.
4168 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
4169 optional value to "ALIGN" command which is what to fill the
4172 * test/data/valid-messages/no-padding.message: add regression
4173 test for the message padding problem
4175 2003-03-02 Havoc Pennington <hp@pobox.com>
4177 * dbus/dbus-message.c (decode_header_data): fix to always init
4178 message_padding, from Benjamin Dauvergne
4180 2003-03-02 Havoc Pennington <hp@pobox.com>
4186 2003-03-01 Joe Shaw <joe@assbarn.com>
4188 * configure.in: Check for "struct cmsgcred" and try to access its
4189 members for BSD-like unices.
4191 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
4192 _dbus_read_credentials_unix_socket().
4193 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
4194 read() for reading the credential byte off the unix socket. Use
4195 struct cmsgcred on systems that support it.
4197 2003-02-27 Alexander Larsson <alexl@redhat.com>
4201 Make gthreads-2.0 dependency optional. Don't build thread test if
4204 2003-02-27 Havoc Pennington <hp@pobox.com>
4206 * dbus/dbus-connection.c
4207 (dbus_connection_send_message_with_reply_and_block): fix doh!
4208 doh! doh! bug that resulted in never removing a reply from the
4209 queue, no wonder we called get_reply_serial so much ;-)
4211 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
4212 and client serial instead of demarshaling them every time
4214 2003-02-27 Havoc Pennington <hp@pobox.com>
4216 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
4217 more inlined, using dbus-string-private.h, speeds things up
4220 * dbus/dbus-string.c (_dbus_string_free): apply align offset
4221 when freeing the string
4222 (_dbus_string_steal_data): fix for align offset
4223 (undo_alignment): new function
4225 2003-02-26 Havoc Pennington <hp@redhat.com>
4227 All kinds of audit fixes from Owen, plus initial attempt to
4228 handle unaligned memory returned from malloc.
4230 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
4231 leave room for align_offset and nul byte
4232 (fixup_alignment): function to track an align_offset and
4233 ensure real->str is aligned
4234 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
4235 to allow a nul byte plus align offset
4236 (_dbus_string_lock): fix overflow issue
4237 (_dbus_string_init_const_len): add assertions on sanity of len,
4238 assign allocated to be ALLOCATION_PADDING larger than len
4239 (set_length): fixup the overflow handling
4240 (_dbus_string_get_data_len): fix overflow in assertion
4241 (open_gap): detect overflow in size of gap to be opened
4242 (_dbus_string_lengthen): add overflow check
4243 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
4244 (_dbus_string_append): add overflow check
4245 (_dbus_string_append_unichar): overflow
4246 (_dbus_string_delete): fix overflow in assertion
4247 (_dbus_string_copy_len): overflow in assertion
4248 (_dbus_string_replace_len): overflows in assertions
4249 (_dbus_string_find): change to implement in terms of
4250 _dbus_string_find_to
4251 (_dbus_string_find_to): assorted fixage
4252 (_dbus_string_equal_c_str): assert c_str != NULL,
4253 fix logic so the function works
4254 (_dbus_string_ends_with_c_str): fix overflow thingy
4255 (_dbus_string_base64_encode): overflow fix
4256 (_dbus_string_validate_ascii): overflow
4257 (_dbus_string_validate_nul): overflow
4259 2003-02-26 Havoc Pennington <hp@redhat.com>
4261 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
4263 2003-02-26 Alexander Larsson <alexl@redhat.com>
4266 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
4268 * dbus/dbus-connection.c:
4269 * dbus/dbus-connection.h:
4270 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4271 Add dbus_connection_set_wakeup_main_function and use it when queueing
4272 incoming and outgoing messages.
4275 * dbus/dbus-dataslot.c:
4276 Threadsafe usage of DBusDataSlotAllocator
4278 * dbus/dbus-message.c: (dbus_message_get_args_iter):
4281 * dbus/dbus-server-unix.c:
4284 * glib/dbus-gmain.c:
4285 Implement the new wakeup functions for glib.
4288 * glib/test-thread-client.c:
4289 * glib/test-thread-server.c:
4290 * glib/test-thread.h:
4291 Initial cut at some thread test code. Not really done yet.
4293 2003-02-26 Havoc Pennington <hp@pobox.com>
4295 * dbus/dbus-connection.c
4296 (dbus_connection_send_message_with_reply_and_block): fix crash
4297 where we ref'd the outgoing message instead of the returned reply
4299 * dbus/dbus-transport-unix.c (do_authentication): check read watch
4300 at the end of this function, so if we didn't need to read for
4301 authentication, we reinstall it for receiving messages
4303 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4304 a NULL sender for peer-to-peer case
4306 * dbus/dbus-transport-unix.c (check_read_watch): handle
4307 !authenticated case correctly
4309 * glib/dbus-gmain.c: add support for DBusServer
4311 * dbus/dbus-server.c: add data slot support
4313 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4314 return values and handle errors
4316 * dbus/dbus-dataslot.c: factor out the data slot stuff from
4319 * Doxyfile.in (INPUT): add glib subdir
4321 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4322 setup_with_g_main instead of hookup_with_g_main; write docs
4324 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4326 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4327 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4328 * dbus/dbus-message.c: (dbus_message_append_boolean),
4329 (dbus_message_append_boolean_array),
4330 (dbus_message_get_args_valist), (_dbus_message_test):
4331 * dbus/dbus-message.h:
4332 * doc/dbus-specification.sgml:
4333 Various fixes as pointed out by Havoc.
4335 * test/data/invalid-messages/bad-boolean-array.message:
4336 * test/data/invalid-messages/bad-boolean.message:
4337 Add invalid boolean value test cases.
4339 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4341 * dbus/dbus-internals.c: (_dbus_type_to_string):
4342 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4343 (_dbus_marshal_validate_arg):
4344 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4345 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4346 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4347 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4348 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4349 (dbus_message_iter_get_double),
4350 (dbus_message_iter_get_boolean_array), (message_iter_test):
4351 * dbus/dbus-message.h:
4352 * dbus/dbus-protocol.h:
4353 * doc/dbus-specification.sgml:
4354 * test/data/valid-messages/lots-of-arguments.message:
4355 Add support for boolean and boolean array types.
4357 2003-02-23 Havoc Pennington <hp@pobox.com>
4359 * dbus/dbus-keyring.c: finish most of this implementation and
4362 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4363 these barf if the error isn't cleared to NULL
4365 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4366 (_dbus_create_directory): new function
4368 * dbus/dbus-errors.c (dbus_set_error): fix warning
4370 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4371 (_dbus_string_hex_decode): new function
4372 (test_hex_roundtrip): test code
4374 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4376 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4378 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4379 the save-to-temp/rename trick to atomically write the new file
4380 (_dbus_string_parse_uint): new function
4382 2003-02-22 Havoc Pennington <hp@pobox.com>
4384 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4386 2003-02-22 Havoc Pennington <hp@pobox.com>
4388 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4389 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4391 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4393 * dbus/test/data/sha-1: add US government test suite for SHA-1
4395 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4397 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4398 Make string arrays NULL-terminated.
4400 * dbus/dbus-memory.c: (dbus_free_string_array):
4401 * dbus/dbus-memory.h:
4402 New function for freeing NULL-terminated string arrays.
4404 * dbus/dbus-message-builder.c: (append_quoted_string),
4405 (_dbus_message_data_load):
4406 Add support for array types.
4408 * dbus/dbus-message.c: (check_message_handling):
4409 Add more types as test cases.
4411 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4412 (_dbus_string_parse_double):
4413 Add the start offset to the end offset.
4415 * test/data/valid-messages/lots-of-arguments.message:
4416 New test message with lots of arguments.
4418 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4420 * dbus/dbus-message.c: (dbus_message_append_nil),
4421 (dbus_message_append_int32), (dbus_message_append_uint32),
4422 (dbus_message_append_double), (dbus_message_append_string),
4423 (dbus_message_append_int32_array),
4424 (dbus_message_append_uint32_array),
4425 (dbus_message_append_double_array),
4426 (dbus_message_append_byte_array),
4427 (dbus_message_append_string_array):
4428 Fix all out-of-memory handling in these functions.
4430 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4432 * dbus/dbus-message.c: (dbus_message_append_nil):
4435 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4437 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4438 (dbus_message_append_nil), (dbus_message_append_int32_array),
4439 (dbus_message_append_uint32_array),
4440 (dbus_message_append_double_array),
4441 (dbus_message_append_byte_array),
4442 (dbus_message_append_string_array), (dbus_message_get_args_valist),
4443 (dbus_message_iter_get_int32_array),
4444 (dbus_message_iter_get_uint32_array),
4445 (dbus_message_iter_get_double_array),
4446 (dbus_message_iter_get_byte_array),
4447 (dbus_message_iter_get_string_array):
4449 * dbus/dbus-message.h:
4450 Add functions for appending and getting arrays.
4452 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4454 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4455 element size at least 8 bytes, fixes mempool tests on
4458 2003-02-20 Alexander Larsson <alexl@redhat.com>
4460 * dbus/dbus-transport-unix.c (unix_do_iteration):
4461 Unlock the connection mutex during a blocking select call.
4462 Add todo about how we need a way to wake up the select.
4464 * dbus/dbus-connection-internal.h:
4465 * dbus/dbus-connection.c:
4466 Add _dbus_connection_lock and _dbus_connection_unlock.
4468 2003-02-19 Havoc Pennington <hp@pobox.com>
4470 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4471 Doxyfile.in, not Doxyfile
4473 * dbus/dbus-keyring.c: do some hacking on this
4475 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4477 * dbus/dbus-errors.c (dbus_set_error_const): do not call
4479 (dbus_set_error): remove dbus_error_init, check for message ==
4480 NULL *before* we sprintf into it, and add @todo about including
4481 system headers in this file
4483 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4485 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4487 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4488 get various bits of user information based on either username
4490 (_dbus_homedir_from_username): new function
4492 2003-02-19 Anders Carlsson <andersca@codefactory.se>
4495 Add check for nonposix getpwnam_r
4497 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4498 Align the pool element size to a sizeof (void *) boundary.
4500 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4501 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4502 General Solaris fixes.
4504 * test/data/valid-messages/simplest-manual.message:
4505 Explicitly state that we want little-endian packing.
4507 2003-02-19 Mikael Hallendal <micke@codefactory.se>
4509 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4511 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4512 Added to create a transport connecting using a tcp/ip socket.
4514 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4515 to a tcp socket at given host and port.
4516 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4519 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4521 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4522 Added to create a server listening on a TCP/IP socket.
4524 2003-02-19 Havoc Pennington <hp@pobox.com>
4526 Throughout: mop up all the Doxygen warnings and undocumented
4529 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4530 to search any paths.
4532 * dbus/dbus-threads.c: move global mutex initializers to
4533 dbus-internals.h, multiple prototypes was confusing doxygen
4534 besides being kind of ugly
4536 * Doxyfile (PREDEFINED): have Doxygen define
4537 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4538 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4539 (do not abuse the feature! it's for stuff like the autogenerated
4540 macros in dbus-md5.c, not just for things you don't feel like
4543 2003-02-18 Havoc Pennington <hp@pobox.com>
4545 * dbus/dbus-string.c (_dbus_string_zero): new function
4547 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4548 wrap it in some dbus-friendly API
4550 * dbus/dbus-types.h: add 16-bit types
4552 2003-02-18 Joe Shaw <joe@assbarn.com>
4554 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4555 credentials from our currently running process.
4556 (get_word): Fix a buglet where we were copying the entire length
4557 instead of relative to our position.
4559 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4560 keys on the stack... it's 640k of data.
4562 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4563 read the credentials byte off the socket, even if we don't have
4565 (_dbus_poll): Implement poll() using select() for systems which
4568 * glib/test-dbus-glib.c (main): Print out an error if no
4569 parameters are given.
4571 * test/data/auth/fallback.auth-script: Added. Tests that a client
4572 can fallback to a secondary auth mechanism if the first fails.
4574 2003-02-18 Havoc Pennington <hp@pobox.com>
4578 2003-02-17 Havoc Pennington <hp@pobox.com>
4580 * doc/dbus-specification.sgml: lots of cosmetic
4581 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
4582 env variable to DBUS_BUS_ADDRESS, s/client/application/,
4583 s/server/bus/ (except in authentication section). Add a section
4584 "Message Bus Message Routing"
4586 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
4592 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4594 * doc/dbus-specification.sgml:
4595 Specification updates.
4597 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4599 * bus/activation.c: (bus_activation_init), (child_setup),
4600 (bus_activation_activate_service):
4602 * bus/main.c: (main):
4603 Set DBUS_ADDRESS environment variable.
4605 * dbus/dbus-errors.c: (dbus_set_error):
4606 Don't use va_copy since that's a C99 feature.
4608 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
4609 (_dbus_spawn_async):
4610 * dbus/dbus-sysdeps.h:
4611 Add child_setup_func to _dbus_spawn_async.
4613 * doc/dbus-specification.sgml:
4614 Update specification.
4616 * test/spawn-test.c: (setup_func), (main):
4619 2003-02-17 Alexander Larsson <alexl@redhat.com>
4621 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
4624 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4628 * doc/dbus-test-plan.sgml:
4629 Add test plan document.
4634 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4636 * dbus/dbus-message.c: (decode_header_data),
4637 (_dbus_message_loader_return_buffer):
4638 Set the header padding amount when loading a message.
4640 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4642 * bus/dispatch.c: (send_one_message):
4643 Only send broadcast messages to registered connections.
4645 * dbus/dbus-message.c: (dbus_message_name_is):
4646 * dbus/dbus-message.h:
4647 New convenience function.
4649 * dbus/dbus-transport-debug.c: (do_reading):
4650 Only dispatch one message per run.
4653 * test/bus-test.c: (new_connection_callback), (die),
4654 (test_hello_client1_handler), (test_hello_client2_handler),
4655 (test_hello_replies), (main):
4657 * test/bus-test-loop.[ch]:
4660 2003-02-16 Havoc Pennington <hp@pobox.com>
4662 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4663 backward conditional
4665 2003-02-16 Alexander Larsson <alexl@redhat.com>
4667 * dbus/dbus-connection.c:
4668 Implement sent_message_with_reply. (with_reply_and block is still
4670 Made dispatch_message not lose message if OOM.
4672 * dbus/dbus-errors.h:
4673 Add NoReply error (for reply timeouts).
4675 2003-02-16 Alexander Larsson <alexl@redhat.com>
4677 * dbus/dbus-hash.c (_dbus_hash_table_unref):
4678 Actually free keys and values when destroying hashtable.
4680 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4682 * dbus/dbus-auth.c: (client_try_next_mechanism):
4685 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
4686 Return TRUE if there's no thread implementation around.
4688 * glib/dbus-gmain.c: (free_source),
4689 (dbus_connection_hookup_with_g_main):
4690 Make sure to remove the GSource when the connection is finalized.
4692 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4694 * bus/dispatch.c: (bus_dispatch_message_handler):
4695 * dbus/dbus-errors.h:
4696 Return an error if someone tries to send a message to a service
4699 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4701 * bus/activation.c: (load_directory), (bus_activation_init),
4702 (bus_activation_activate_service):
4705 (bus_driver_handle_activate_service), (bus_driver_handle_message):
4706 More work on the activation handling.
4708 * dbus/dbus-errors.h:
4709 Add some error messages
4711 * dbus/dbus-message.c: (dbus_message_new_error_reply):
4712 * dbus/dbus-message.h:
4713 New function that creates an error message.
4715 * dbus/dbus-protocol.h:
4716 Add ACTIVATE_SERVER message.
4718 * dbus/dbus-server-unix.c: (unix_handle_watch),
4719 (_dbus_server_new_for_domain_socket):
4720 Call _dbus_fd_set_close_on_exec.
4722 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
4723 (_dbus_spawn_async), (_dbus_disable_sigpipe),
4724 (_dbus_fd_set_close_on_exec):
4725 * dbus/dbus-sysdeps.h:
4726 Add _dbus_fd_set_close_on exec function. Also add function that checks
4727 that all open fds are set to close-on-exec and warns otherwise.
4729 * dbus/dbus-transport-unix.c:
4730 (_dbus_transport_new_for_domain_socket):
4731 Call _dbus_fd_set_close_on_exec.
4733 2003-02-16 Havoc Pennington <hp@pobox.com>
4735 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
4736 allow people to avoid setting SIGPIPE to SIG_IGN
4737 (_dbus_connection_new_for_transport): disable SIGPIPE unless
4738 we've been asked not to
4740 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4742 * dbus/dbus-list.c: (_dbus_list_append_link),
4743 (_dbus_list_prepend_link):
4744 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
4748 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4751 * bus/activation.c: (bus_activation_entry_free),
4752 (add_desktop_file_entry), (load_directory), (bus_activation_init):
4754 * bus/main.c: (main):
4755 Add simple activation support, doesn't work yet though.
4757 2003-02-15 Zack Rusin <zack@kde.org>
4759 * qt/dbus-qthread.cpp: small casting fix
4761 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4763 * dbus/dbus-errors.c: (dbus_set_error):
4764 * dbus/dbus-errors.h:
4765 Add a few errors and make dbus_set_error void.
4767 * dbus/dbus-sysdeps.c:
4768 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
4769 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
4770 * dbus/dbus-sysdeps.h:
4771 Add _dbus_spawn_async.
4773 * test/spawn-test.c: (main):
4774 Test for _dbus_spawn_async.
4776 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4778 * dbus/dbus-internals.h:
4779 Fix build without tests.
4781 * dbus/dbus-list.c: (alloc_link):
4782 Fix a segfault when a malloc fails.
4784 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
4785 (dbus_malloc0), (dbus_realloc):
4786 Add support for malloc debugging.
4788 2003-02-15 Alexander Larsson <alexl@redhat.com>
4790 * dbus/dbus-threads.c:
4791 * dbus/dbus-threads.h:
4792 Add condvars. Remove static mutext from API.
4793 Implement static mutexes by initializing them from threads_init.
4795 * glib/dbus-gthread.c:
4796 * qt/dbus-qthread.cpp:
4797 Update with the thread api changes.
4802 Turn StaticMutex into normal mutex + init function.
4803 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
4804 _dbus_list_append_link, _dbus_list_prepend_link
4807 * dbus/dbus-sysdeps.c:
4808 * dbus/dbus-sysdeps.h:
4809 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
4810 _dbus_atomic_dec. Only slow fallback implementation at the moment.
4812 * dbus/dbus-protocol.h:
4813 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
4815 * dbus/dbus-message.c:
4816 Make ref/unref atomic.
4819 * dbus/dbus-connection-internal.h:
4820 * dbus/dbus-connection.c:
4821 * dbus/dbus-connection.h:
4823 Change _peek to _borrow,_return & _steal_borrowed.
4824 Change disconnect callback to event.
4825 Make dbus_connection_dispatch_messages reentrant.
4827 * dbus/dbus-transport.c:
4828 Don't ref the connection on calls to the transport
4831 * dbus/dbus-message-handler.c:
4834 * glib/dbus-gmain.c:
4835 Don't use peek_message anymore
4838 * test/debug-thread.c:
4839 * test/debug-thread.h:
4840 Simple thread implementation that asserts() on deadlocks in
4841 single-threaded code.
4844 (main) Call debug_threads_init.
4847 Use disconnect message instead of disconnect callback.
4851 Don't call dbus_connection_set_disconnect_function. Instead export
4852 bus_connection_disconnect.
4855 Call bus_connection_disconnect when we get a disconnected message.
4857 2003-02-15 Havoc Pennington <hp@pobox.com>
4859 * dbus/dbus-message.c (dbus_message_new): fool around with the
4862 2003-02-14 Havoc Pennington <hp@pobox.com>
4864 * dbus/dbus-mempool.c: fail if the debug functions so indicate
4866 * dbus/dbus-memory.c: fail if the debug functions indicate we
4869 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
4870 (_dbus_decrement_fail_alloc_counter): debug functions to
4871 simulate memory allocation failures
4873 2003-02-14 Havoc Pennington <hp@pobox.com>
4875 * dbus/dbus-errors.h (struct DBusError): add a word of padding
4878 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4880 * bus/driver.c: (bus_driver_handle_hello):
4882 * bus/services.c: (bus_service_lookup):
4883 Reorder message sending so we get a more sane order.
4885 * test/bus-test.c: (message_handler):
4888 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4890 * bus/driver.c: (bus_driver_send_service_deleted),
4891 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4892 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4893 (bus_driver_send_welcome_message),
4894 (bus_driver_handle_list_services),
4895 (bus_driver_handle_acquire_service),
4896 (bus_driver_handle_service_exists):
4897 * dbus/dbus-bus.c: (dbus_bus_register_client),
4898 (dbus_bus_acquire_service), (dbus_bus_service_exists):
4899 * dbus/dbus-errors.c: (dbus_result_to_string):
4900 * dbus/dbus-errors.h:
4901 * dbus/dbus-message.c: (dbus_message_append_args),
4902 (dbus_message_append_args_valist), (dbus_message_get_args),
4903 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
4904 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
4905 (dbus_message_iter_get_byte_array),
4906 (dbus_message_iter_get_string_array), (message_iter_test),
4907 (check_message_handling), (_dbus_message_test):
4908 * dbus/dbus-message.h:
4909 * test/bus-test.c: (main):
4910 Change fields to arguments in messages, so that they won't be
4911 confused with header fields.
4913 * glib/test-dbus-glib.c: (main):
4914 Remove append_fields from hello message.
4916 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4918 * dbus/dbus-errors.c:
4919 * dbus/dbus-message.c:
4920 * dbus/dbus-string.c:
4921 Documentation fixes.
4923 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4925 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
4927 Implement support for timeouts in dbus-glib.
4929 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4931 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4932 * dbus/dbus-message.c: (process_test_subdir):
4933 * test/break-loader.c: (find_breaks_based_on):
4934 Plug some memory leaks.
4936 2003-02-13 Richard Hult <rhult@codefactory.se>
4938 * bus/main.c: Fix build.
4940 * dbus/dbus-errors.h:
4941 * dbus/dbus-errors.c: Fix copyright for Anders.
4943 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4948 * bus/connection.c: (bus_connection_foreach):
4951 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
4952 (unescape_string), (new_section), (parse_section_start),
4953 (parse_key_value), (report_error), (bus_desktop_file_load),
4954 (bus_desktop_file_get_string):
4955 * bus/desktop-file.h:
4956 Use DBusError for error reporting.
4958 * bus/dispatch.c: (send_one_message),
4959 (bus_dispatch_message_handler):
4960 * bus/driver.c: (bus_driver_send_service_deleted),
4961 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4962 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4963 (bus_driver_send_welcome_message),
4964 (bus_driver_handle_list_services),
4965 (bus_driver_handle_acquire_service),
4966 (bus_driver_handle_service_exists):
4967 * bus/loop.c: (bus_loop_run):
4969 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
4971 * bus/utils.c: (bus_wait_for_memory):
4973 New files with general utility functions.
4975 * dbus/dbus-internals.h:
4976 Remove _DBUS_HANDLE_OOM.
4978 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4980 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
4981 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
4982 * dbus/dbus-errors.h:
4983 Add DBusError structure.
4985 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4987 * test/data/valid-messages/standard-acquire-service.message:
4988 * test/data/valid-messages/standard-hello.message:
4989 * test/data/valid-messages/standard-list-services.message:
4990 * test/data/valid-messages/standard-service-exists.message:
4991 Add some standard messages.
4993 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4995 * bus/driver.c: (bus_driver_send_welcome_message),
4996 (bus_driver_handle_list_services),
4997 (bus_driver_handle_acquire_service),
4998 (bus_driver_handle_service_exists), (bus_driver_handle_message):
4999 Update for API changes in libdbus.
5001 * dbus/dbus-message.c: (dbus_message_new_reply):
5002 * dbus/dbus-message.h:
5003 Remove the name argument. The spec states that replies shouldn't
5006 2003-02-13 Anders Carlsson <andersca@codefactory.se>
5008 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5009 (report_error), (bus_desktop_file_load), (lookup_section),
5010 (lookup_line), (bus_desktop_file_get_raw),
5011 (bus_desktop_file_get_string):
5012 * bus/desktop-file.h:
5013 Some fixes, and new functions for getting a key value from a section.
5015 2003-02-13 Havoc Pennington <hp@pobox.com>
5017 * test/data/auth/fail-after-n-attempts.auth-script: new test
5019 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5022 2003-02-13 Havoc Pennington <hp@pobox.com>
5024 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5025 dbus_credentials_match were backward
5027 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5028 NO_CREDENTIALS and ROOT_CREDENTIALS
5030 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5031 into here. Never process more commands after we've reached an
5032 end state; store further data as unused bytes.
5034 * test/data/auth/*: add more auth tests
5036 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
5037 command to match exact string and EXPECT_UNUSED to match unused
5040 * test/Makefile.am (dist-hook): fix to dist all the test stuff
5042 2003-02-12 Havoc Pennington <hp@pobox.com>
5044 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
5045 \r off of popped lines
5047 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
5050 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
5053 2003-02-12 Havoc Pennington <hp@pobox.com>
5055 * dbus/Makefile.am: remove break-loader from the build, since it
5058 * configure.in: add --enable-gcov to turn on coverage profiling
5059 flags and disable optimization
5061 2003-02-10 Havoc Pennington <hp@pobox.com>
5063 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
5064 initial cut at test framework for DBusAuth from laptop.
5065 Doesn't quite work yet but it compiles and I need to get
5066 it off the 266mhz laptop. ;-)
5068 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
5069 fix a memleak in error case
5071 2003-02-12 Anders Carlsson <andersca@codefactory.se>
5074 * bus/desktop-file.c:
5075 * bus/desktop-file.h:
5076 Add a desktop file parser.
5078 2003-02-11 Zack Rusin <zack@kde.org>
5080 * qt/message.[h|cpp]: sample implementation
5081 of the KDE wrapper for DBusMessage
5083 2003-02-09 Zack Rusin <zack@kde.org>
5085 * test/bus-test.c: make_it_compile
5086 * doc/dbus-specification.sgml: minimal semantic fix
5088 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5094 2003-02-06 Anders Carlsson <andersca@codefactory.se>
5097 * dbus/dbus-break-loader.c:
5099 * test/break-loader.c:
5100 Move dbus-break-loader to test/ and rename it to break-loader.
5102 2003-02-02 Havoc Pennington <hp@pobox.com>
5104 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
5105 for code to manage cookies in your home directory
5107 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
5109 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
5110 to authenticate, then disconnect the client.
5112 2003-02-03 Alexander Larsson <alexl@redhat.com>
5114 * dbus/dbus-message.c (dbus_message_append_fields):
5117 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5119 * doc/dbus-specification.sgml:
5120 Update address format section.
5122 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5125 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
5126 (message_handler), (new_connection_callback), (loop_quit),
5130 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5132 * bus/driver.c: (bus_driver_handle_service_exists):
5133 Simplify the code a bit.
5135 * dbus/dbus-bus.c: (dbus_bus_service_exists):
5138 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5141 Add libdbus-daemon.la and link to it.
5143 2003-02-01 James Willcox <jwillcox@gnome.org>
5145 * bus/driver.c: (bus_driver_handle_own_service):
5146 Actually include the service reply code in the message.
5148 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5150 * bus/driver.c: (bus_driver_handle_service_exists):
5151 Don't unref the incoming message.
5153 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5155 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
5157 2003-02-02 Anders Carlsson <andersca@codefactory.se>
5159 * dbus/dbus-server.c: (dbus_server_listen):
5160 * dbus/dbus-transport.c: (_dbus_transport_open):
5161 ifdef out the calls to the debug transport and server.
5163 2003-02-02 Alexander Larsson <alexl@redhat.com>
5165 * dbus/dbus-watch.c (dbus_watch_get_flags):
5166 Add note in the docs that ERROR or HANGUP won't be returned
5167 and are assumed always on.
5169 * glib/dbus-gmain.c (add_watch):
5170 Always add IO_ERR | IO_HUP
5172 * dbus/dbus-message.h:
5173 Add semicolon after dbus_message_iter_get_string_array().
5174 Makes qt code build again
5176 2003-02-01 Anders Carlsson <andersca@codefactory.se>
5178 * bus/driver.c: (create_unique_client_name),
5179 (bus_driver_handle_hello):
5180 Don't take a name, just use a numeric id to identify
5184 * dbus/dbus-bus.c: (dbus_bus_register_client),
5185 (dbus_bus_acquire_service), (dbus_bus_service_exists):
5187 Add new convenience functions for communicating with the bus.
5189 * dbus/dbus-message.h:
5191 * dbus/dbus-protocol.h:
5194 2003-02-01 Alexander Larsson <alexl@redhat.com>
5196 * dbus/dbus-message.c (dbus_message_append_fields):
5197 Add some more doc comments.
5199 2003-02-01 Havoc Pennington <hp@pobox.com>
5201 * dbus/dbus-break-loader.c (randomly_modify_length): change
5202 a 4-byte value in the message as if it were a length
5204 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
5205 execute bit on saved files
5207 2003-02-01 Havoc Pennington <hp@pobox.com>
5209 * dbus/dbus-break-loader.c (main): new program to find messages
5210 that break the loader.
5212 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
5213 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
5215 * dbus/dbus-string.c (_dbus_string_set_byte): new
5217 2003-01-31 Havoc Pennington <hp@pobox.com>
5219 * dbus/dbus-message.c: refactor the test code to be more general,
5220 in preparation for writing a "randomly permute test cases to
5221 try to break the loader" program.
5223 2003-01-31 Havoc Pennington <hp@pobox.com>
5225 * doc/dbus-specification.sgml: work on the specification
5227 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
5228 the protocol version of the message.
5230 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
5231 no longer specifies that.
5232 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
5235 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
5236 "break" for DBUS_TYPE_NIL, remove @todo
5238 2003-01-31 Havoc Pennington <hp@pobox.com>
5240 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
5241 just set_is_error/get_is_error as this is a commonly-used
5242 function, and write docs.
5244 2003-01-31 Anders Carlsson <andersca@codefactory.se>
5246 * dbus/dbus-address.c: (dbus_address_entry_free):
5247 Free key and value lists.
5249 * dbus/dbus-internals.c: (_dbus_type_to_string):
5250 Add the types we didn't have.
5252 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5253 (_dbus_marshal_validate_arg):
5256 * dbus/dbus-message.c: (dbus_message_set_sender):
5257 Remove todo about being able to set sender to NULL.
5259 (dbus_message_set_is_error_reply),
5260 (dbus_message_get_is_error_reply):
5261 * dbus/dbus-message.h:
5264 * dbus/dbus-protocol.h:
5265 Add error reply flag.
5267 * test/data/valid-messages/opposite-endian.message:
5268 Add NIL type to test.
5270 2003-01-31 Havoc Pennington <hp@pobox.com>
5272 * doc/dbus-specification.sgml: fully specify the header. Add
5273 flags and major protocol version, and change header/body len to
5276 * dbus/dbus-message-builder.c (append_saved_length): append length
5279 * dbus/dbus-message.c (dbus_message_create_header): change header
5280 length and body length to unsigned. Add the new fields from the
5282 (_dbus_message_loader_return_buffer): unsigned header/body len
5284 2003-01-30 Havoc Pennington <hp@pobox.com>
5286 * dbus/dbus-auth.c: rework to use only REJECTED, no
5289 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5290 use REJECTED, suggested by Mark McLoughlin
5292 2003-01-30 Havoc Pennington <hp@pobox.com>
5294 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5295 a better way to report errors here. e.g. "unix address lacks
5296 path" or something. also "no such file" when the path doesn't
5299 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5301 (dbus_parse_address): add @todo about documenting address format,
5302 and allowing , and ; to be escaped
5304 2003-01-30 Anders Carlsson <andersca@codefactory.se>
5307 Add dbus-address.[ch]
5309 * dbus/dbus-address.c: (dbus_address_entry_free),
5310 (dbus_address_entries_free), (create_entry),
5311 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5312 (dbus_parse_address), (_dbus_address_test):
5313 * dbus/dbus-address.h:
5314 New files for dealing with address parsing.
5316 * dbus/dbus-connection.c:
5317 Document timeout functions.
5319 * dbus/dbus-message.c:
5320 Document dbus_message_new_from_message.
5322 * dbus/dbus-server-debug.c:
5325 * dbus/dbus-server.c: (dbus_server_listen):
5326 Parse address and use correct server implementation.
5328 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5329 * dbus/dbus-string.h:
5330 New function with test.
5332 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5336 * dbus/dbus-transport-debug.c:
5339 * dbus/dbus-transport.c: (_dbus_transport_open):
5340 Parse address and use correct transport implementation.
5342 2003-01-30 Havoc Pennington <hp@pobox.com>
5344 * dbus/dbus-message.c: use message->byte_order instead of
5345 DBUS_COMPILER_BYTE_ORDER throughout.
5346 (dbus_message_create_header): pad header to align the
5347 start of the body of the message to 8-byte boundary
5349 * dbus/dbus-marshal.h: make all the demarshalers take const
5350 DBusString arguments.
5352 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5353 validate message args here, so we don't have to do slow validation
5354 later, and so we catch bad messages as they are incoming. Also add
5355 better checks on header_len and body_len. Also fill in
5358 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5359 implemented properly)
5360 (_dbus_string_validate_nul): new function to check all-nul
5362 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5363 get_arg_end_pos and remove all validation
5364 (_dbus_marshal_validate_arg): actually do validation here.
5366 2003-01-29 Havoc Pennington <hp@pobox.com>
5368 * dbus/dbus-message.c (check_message_handling): fix assertion
5369 failure on set_client_serial
5371 2003-01-28 Havoc Pennington <hp@pobox.com>
5373 * dbus/dbus-server-debug.c: Add doc section comments
5375 * dbus/dbus-transport-debug.c: add doc section comments
5377 2003-01-28 Havoc Pennington <hp@redhat.com>
5379 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5380 the reverse order from how I had it
5381 (_dbus_string_base64_encode): reverse encoding order. I was
5382 basically byteswapping everything during encoding.
5384 2003-01-28 Anders Carlsson <andersca@codefactory.se>
5386 * dbus/dbus-connection-internal.h:
5387 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5388 (_dbus_connection_remove_timeout):
5389 Add functions for adding and removing timeouts.
5391 * dbus/dbus-message.c: (dbus_message_new_from_message):
5392 Add new function that takes a message and creates an exact
5393 copy of it, but with the refcount set to 1.
5394 (check_message_handling):
5397 * dbus/dbus-server-protected.h:
5398 * dbus/dbus-server.c: (_dbus_server_init_base),
5399 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5400 (dbus_server_set_timeout_functions):
5401 (_dbus_server_remove_timeout):
5402 New functions so that a server can add and remove timeouts.
5404 (dbus_server_listen):
5405 Add commented out call to dbus_server_debug_new.
5407 * dbus/dbus-timeout.c: (_dbus_timeout_new):
5408 Actually set the handler, doh.
5410 * dbus/dbus-transport.c: (_dbus_transport_open):
5411 Add commented out call to dbus_transport_debug_client_new.
5414 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5416 2003-01-28 Havoc Pennington <hp@pobox.com>
5418 * dbus/dbus-message.c (check_message_handling): function to check
5419 on the loaded message, iterates over it etc.
5421 2003-01-28 Havoc Pennington <hp@pobox.com>
5423 * test/Makefile.am (dist-hook): fix make distdir
5425 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5427 2003-01-27 Havoc Pennington <hp@pobox.com>
5429 * dbus/dbus-mempool.c (time_for_size): replace printf with
5432 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5433 empty lines; fix the SAVE_LENGTH stuff to be
5434 START_LENGTH/END_LENGTH so it actually works; couple other
5437 * test/Makefile.am (dist-hook): add dist-hook for .message files
5439 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5440 can be constant or locked.
5441 (_dbus_string_free): allow freeing a const string as
5444 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5446 * dbus/dbus-test-main.c (main): take an argument which is the
5447 directory containing test data
5449 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5450 argument to this and load all the messages in test/data/
5451 checking that they can be loaded or not loaded as appropriate.
5453 2003-01-27 Anders Carlsson <andersca@codefactory.se>
5455 * bus/dispatch.c: (bus_dispatch_message_handler):
5456 Dispatch messages sent to services.
5458 * bus/driver.c: (bus_driver_send_service_deleted),
5459 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5460 (bus_driver_send_service_acquired):
5461 Add helper functions for sending service related messages.
5463 (bus_driver_send_welcome_message):
5464 Send HELLO_REPLY instead of WELCOME.
5466 (bus_driver_handle_list_services):
5467 Send LIST_SERVICES_REPLY instead of SERVICES.
5469 (bus_driver_handle_own_service),
5470 (bus_driver_handle_service_exists):
5471 New message handlers.
5473 (bus_driver_handle_message):
5474 Invoke new message handlers.
5476 (bus_driver_remove_connection):
5477 Don't remove any services here since that's done automatically
5478 by bus_service_remove_owner now.
5481 New function signatures.
5483 * bus/services.c: (bus_service_add_owner):
5484 Send ServiceAcquired message if we're the only primary owner.
5486 (bus_service_remove_owner):
5487 Send ServiceAcquired/ServiceLost messages.
5489 (bus_service_set_prohibit_replacement),
5490 (bus_service_get_prohibit_replacement):
5491 Functions for setting prohibit replacement.
5493 (bus_service_has_owner):
5494 New function that checks if a connection is in the owner queue of
5498 Add new function signatures.
5500 * dbus/dbus-list.c: (_dbus_list_test):
5501 Add tests for _dbus_list_remove_last and traversing the list backwards.
5504 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5505 go any further, so return NULL then.
5507 * dbus/dbus-protocol.h:
5508 Add new messages, service flags and service replies.
5510 2003-01-26 Havoc Pennington <hp@pobox.com>
5512 * dbus/dbus-message-builder.c: implement, completely untested.
5514 * test/data/*: add data to be used in testing.
5515 ".message" files are our simple loadable text format.
5516 ".message-raw" will be binary dumps of messages.
5518 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5520 2003-01-26 Havoc Pennington <hp@pobox.com>
5522 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5524 * dbus/dbus-errors.c (dbus_result_to_string): add
5527 * dbus/dbus-message-builder.c: new file, will contain code to load
5528 up messages from files. Not implemented yet.
5530 2003-01-26 Havoc Pennington <hp@pobox.com>
5532 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5533 the sender by setting to NULL
5535 2003-01-26 Havoc Pennington <hp@pobox.com>
5537 The unit tests pass, but otherwise untested. If it breaks, the
5538 tests should have been better. ;-)
5540 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5543 * dbus/dbus-message.c: redo everything so we maintain
5544 message->header as the only copy of the various fields.
5545 This avoids the possibility of out-of-memory in some cases,
5546 for example dbus_message_lock() can't run out of memory anymore,
5547 and avoids extra copying. Figured I may as well go ahead and do
5548 this since it was busted for dbus_message_lock to not return
5549 failure on OOM, and dbus_message_write_header was totally
5550 unchecked for OOM. Also fixed some random other bugs.
5552 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5553 that strings are nul-terminated. Also, end_pos can be equal
5554 to string length just not greater than, I think.
5555 (_dbus_marshal_set_int32): new function
5556 (_dbus_marshal_set_uint32): new function
5557 (_dbus_marshal_set_string): new function
5559 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5560 a warning, init timeout_list to NULL
5561 (dbus_connection_send_message): don't use uninitialized variable
5564 * dbus/dbus-string.c (_dbus_string_replace_len): new function
5566 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5568 * bus/driver.c: (bus_driver_handle_hello),
5569 (bus_driver_send_welcome_message):
5572 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5574 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
5575 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5576 (dbus_connection_unref):
5577 * dbus/dbus-marshal.c: (_dbus_marshal_test):
5578 * dbus/dbus-message.c: (dbus_message_unref),
5581 (dbus_message_get_fields):
5582 Remove debugging printout.
5584 (_dbus_message_loader_return_buffer):
5585 Don't store the header string.
5587 (_dbus_message_test):
5590 2003-01-26 Richard Hult <rhult@codefactory.se>
5592 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
5593 the file descriptor list, since it can change under us.
5595 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5597 * glib/dbus-gmain.c: (dbus_connection_prepare),
5598 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
5599 (remove_watch), (dbus_connection_hookup_with_g_main):
5600 Rewrite the glib handling to use its own GSource instead of a
5601 GIOChannel so we can catch messages put in the queue while waiting
5604 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5607 * bus/connection.c: (connection_disconnect_handler),
5608 (connection_watch_callback), (bus_connection_setup):
5609 * bus/dispatch.c: (send_one_message),
5610 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
5611 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
5613 * bus/driver.c: (bus_driver_send_service_deleted),
5614 (bus_driver_send_service_created), (bus_driver_handle_hello),
5615 (bus_driver_send_welcome_message),
5616 (bus_driver_handle_list_services), (bus_driver_remove_connection),
5617 (bus_driver_handle_message):
5619 Refactor code, put the message dispatching in its own file. Use
5620 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
5623 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5625 * dbus/dbus-internals.h:
5626 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
5628 * dbus/dbus-message.c: (dbus_message_get_sender):
5629 * dbus/dbus-message.h:
5630 Implement dbus_message_get_sender.
5632 * dbus/dbus-protocol.h:
5633 Add message and service defines.
5635 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5637 * dbus/dbus-connection.c: (dbus_connection_send_message):
5638 * dbus/dbus-message-internal.h:
5639 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
5640 (dbus_message_write_header):
5641 Remove _dbus_messag_unlock and don't set the client serial on a
5642 message if one already exists.
5644 2003-01-24 Havoc Pennington <hp@pobox.com>
5646 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
5649 * bus/driver.c (bus_driver_handle_list_services): fix a leak
5652 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5654 * dbus/dbus-list.c: (alloc_link), (free_link):
5655 Use a memory pool for the links.
5657 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5659 * bus/connection.c: (bus_connection_foreach):
5661 Add new bus_connection_foreach function.
5663 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
5664 Add function that broadcasts a message to all clients.
5666 (bus_driver_send_service_created), (bus_driver_handle_hello),
5667 (bus_driver_send_welcome_message),
5668 (bus_driver_handle_list_services), (bus_driver_message_handler):
5669 Implement functions that take care of listing services, and notifying
5670 clients when new services are created.
5672 * bus/services.c: (bus_services_list):
5674 Add new function that returns an array of strings with the currently
5675 registered services.
5678 * glib/dbus-gmain.c:
5679 Update copyright year.
5681 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5683 * dbus/dbus-connection.c: (dbus_connection_send_message):
5684 Unlock the message in case it was sent earlier.
5686 (dbus_connection_send_message_with_reply_and_block):
5687 Remove the reply message from the list.
5689 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5690 Set array_len and new_pos correctly.
5692 (_dbus_marshal_test):
5693 Remove debug output.
5695 * dbus/dbus-message-internal.h:
5696 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
5697 New function that returns the reply serial.
5699 (_dbus_message_unlock):
5700 New function that unlocks a message and resets its header.
5702 (dbus_message_append_string_array),
5703 (dbus_message_get_fields_valist),
5704 (dbus_message_iter_get_field_type),
5705 (dbus_message_iter_get_string_array),
5706 (dbus_message_get_fields),
5707 (dbus_message_append_fields_valist):
5708 Handle string arrays.
5710 (dbus_message_set_sender):
5711 Make this function public since the bus daemon needs it.
5713 (decode_header_data):
5714 Set the reply serial to -1 initially.
5716 * dbus/dbus-message.h:
5717 Add dbus_message_set_sender.
5719 2003-01-24 Havoc Pennington <hp@pobox.com>
5721 * doc/dbus-specification.sgml: add some stuff
5723 2003-01-22 Havoc Pennington <hp@pobox.com>
5725 * doc/dbus-specification.sgml: Start to document the protocol.
5727 2003-01-22 Havoc Pennington <hp@pobox.com>
5729 * dbus/dbus-connection.c
5730 (dbus_connection_send_message_with_reply_and_block): add some @todo
5732 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
5734 2003-01-21 Havoc Pennington <hp@pobox.com>
5736 (patch untested because can't compile)
5738 * bus/driver.c (create_unique_client_name): make this function
5739 never recycle client names. Also, caller should initialize
5742 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
5744 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5746 * dbus/dbus-marshal.c: (_dbus_marshal_double),
5747 (_dbus_marshal_int32), (_dbus_marshal_uint32),
5748 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
5749 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
5750 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5751 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5752 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
5753 * dbus/dbus-marshal.h:
5754 * dbus/dbus-protocol.h:
5755 Add support for marshalling and demarshalling integer, double
5758 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5763 * bus/connection.c: (connection_disconnect_handler):
5764 Remove the connection from the bus driver's list.
5766 (connection_watch_callback): Dispatch messages.
5768 (free_connection_data): Free connection name.
5770 (bus_connection_setup): Add connection to the bus driver's list.
5771 (bus_connection_remove_owned_service):
5772 (bus_connection_set_name), (bus_connection_get_name):
5773 Add functions for setting and getting the connection's name.
5776 Add function headers.
5778 * bus/driver.c: (create_unique_client_name),
5779 (bus_driver_handle_hello_message),
5780 (bus_driver_send_welcome_message), (bus_driver_message_handler),
5781 (bus_driver_add_connection), (bus_driver_remove_connection):
5784 * bus/services.c: (bus_service_free):
5786 New file that handles communication and registreation with the bus
5789 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5791 * dbus/dbus-connection.c: (dbus_connection_send_message):
5792 Add a new client_serial parameter.
5794 (dbus_connection_send_message_with_reply):
5795 Remove a @todo since we've implemented the blocking function.
5797 (dbus_connection_send_message_with_reply_and_block):
5798 New function that sends a message and waits for a reply and
5799 then returns the reply.
5801 * dbus/dbus-connection.h:
5804 * dbus/dbus-errors.c: (dbus_result_to_string):
5805 * dbus/dbus-errors.h:
5806 Add new DBUS_RESULT.
5808 * dbus/dbus-message-internal.h:
5809 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
5810 (_dbus_message_set_sender), (dbus_message_write_header),
5811 (dbus_message_new_reply), (decode_header_data),
5812 (_dbus_message_loader_return_buffer), (_dbus_message_test):
5813 * dbus/dbus-message.h:
5814 Add new functions that set the reply serial and sender.
5815 Also marshal and demarshal them correctly and add test.
5817 * dbus/dbus-protocol.h:
5818 Add new DBUS_MESSAGE_TYPE_SENDER.
5821 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
5822 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
5823 (dbus_connection_hookup_with_g_main):
5824 * glib/test-dbus-glib.c: (main):
5825 Rewrite to use GIOChannel and remove the GSource crack.
5827 * test/echo-client.c: (main):
5828 * test/watch.c: (check_messages):
5829 Update for changed APIs
5831 2003-01-19 Anders Carlsson <andersca@codefactory.se>
5833 * dbus/Makefile.am: Add dbus-timeout.[cħ]
5835 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
5836 Create a DBusTimeoutList.
5837 (dbus_connection_set_timeout_functions): Add new function to
5838 set timeout callbacks
5840 * dbus/dbus-connection.h: Add public DBusTimeout API.
5842 * dbus/dbus-message.c: (dbus_message_get_service):
5843 * dbus/dbus-message.h: New function.
5845 * dbus/dbus-server.c: Fix small doc typo.
5847 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
5849 2003-01-19 Anders Carlsson <andersca@codefactory.se>
5851 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
5852 of the string, just as long as specified.
5854 2003-01-19 Havoc Pennington <hp@pobox.com>
5856 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
5859 * dbus/dbus-server.c (dbus_server_set_max_connections)
5860 (dbus_server_get_max_connections, dbus_server_get_n_connections):
5861 keep track of current number of connections, and add API for
5862 setting a max (but haven't implemented enforcing the max yet)
5864 2003-01-18 Havoc Pennington <hp@pobox.com>
5866 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
5867 reading/writing if read_watch != NULL or write_watch != NULL.
5869 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
5870 the message loader code to actually load message->header and
5871 message->body into the newly-created message.
5873 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
5876 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
5877 (dbus_connection_get_max_message_size)
5878 (dbus_connection_set_max_live_messages_size)
5879 (dbus_connection_get_max_live_messages_size): implement some
5880 resource limitation functions
5882 * dbus/dbus-resources.c: new file implementing some of the
5883 resource limits stuff
5885 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
5886 missing docs, add @todo to handle OOM etc.
5888 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
5891 2003-01-18 Havoc Pennington <hp@pobox.com>
5893 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
5894 connection if it hasn't been already.
5896 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
5897 replace with DisconnectFunction.
5899 2003-01-18 Havoc Pennington <hp@pobox.com>
5901 Building --disable-verbose-mode --disable-asserts --disable-tests
5902 cuts the library from 112K to 45K or so
5904 * configure.in: check for varargs macro support,
5905 add --enable-verbose-mode, --enable-asserts.
5907 * dbus/dbus-internals.h (_dbus_assert): support
5909 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
5911 2003-01-18 Havoc Pennington <hp@pobox.com>
5913 * dbus/dbus-test.c: include config.h so that tests actually run
5915 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
5916 so the failure mode when that assumption fails will be plenty
5919 2003-01-18 Havoc Pennington <hp@pobox.com>
5921 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
5923 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
5926 * test/Makefile.am: don't use special variable "TESTS" for echo-*
5927 since we don't want to use those in make check
5929 2003-01-15 Havoc Pennington <hp@redhat.com>
5935 2003-01-15 Havoc Pennington <hp@redhat.com>
5937 * test/Makefile.am: fix so that test source code ends up in the
5938 distribution on make distcheck
5940 2003-01-15 Havoc Pennington <hp@redhat.com>
5946 2003-01-15 Havoc Pennington <hp@redhat.com>
5948 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
5949 fix build when --disable-tests
5951 * Makefile.am (EXTRA_DIST): put HACKING in here
5953 * HACKING: document procedure for making a tarball release.
5955 2003-01-14 Anders Carlsson <andersca@codefactory.se>
5957 * bus/connection.c: (connection_error_handler),
5958 (bus_connection_setup):
5959 * bus/main.c: (main):
5960 Make sure that the DBusConnectionData struct is NULLed
5961 out to prevent a segfault.
5963 * dbus/dbus-errors.c: (dbus_result_to_string):
5964 * dbus/dbus-errors.h:
5965 * dbus/dbus-message.c: (dbus_message_get_fields),
5966 (dbus_message_get_fields_valist), (_dbus_message_test):
5967 * dbus/dbus-message.h:
5968 Make dbus_message_get_fields return a result code so we can
5969 track invalid fields as well as oom.
5971 2003-01-11 Havoc Pennington <hp@pobox.com>
5973 * configure.in: change --enable-test/--enable-ansi action-if-given
5974 to enable_foo=$enableval instead of enable_foo=yes
5976 2003-01-08 Havoc Pennington <hp@pobox.com>
5978 * dbus/dbus-string.c (_dbus_string_align_length): new function
5980 * dbus/dbus-test-main.c: move main() for test app here
5982 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
5983 symbol to run tests, because dbus-test isn't in the main
5986 Code review nitpicks.
5988 * dbus/dbus-message.c (dbus_message_write_header): add newlines
5989 for people with narrow emacs ;-). Assert client_serial was filled
5990 in. Assert message->name != NULL.
5991 (dbus_message_append_fields): have "first_field_type" arg separate
5992 from va list, needed for C++ binding that also uses varargs IIRC
5993 and helps with type safety
5994 (dbus_message_new): add @todo about using DBusString to store
5995 service/name internally
5996 (dbus_message_new): don't leak ->service and ->name on OOM later
5998 (dbus_message_unref): free the service name
5999 (dbus_message_get_fields): same change to varargs
6000 i.e. first_field_type
6001 (_dbus_message_loader_return_buffer): assert that the message data
6002 is aligned (if not it's a bug in our code). Put in verbose griping
6003 about why we set corrupted = TRUE.
6004 (decode_header_data): add FIXME that char* is evil. Was going to
6005 add FIXME about evil locale-specific string.h strncmp, but just
6006 switched to wacky string-as-uint32 optimization. Move check for
6007 "no room for field name" above get_const_data_len() to avoid
6008 assertion failure in get_const_data_len if we have trailing 2
6009 bytes or the like. Check for service and name fields being
6010 provided twice. Don't leak service/name on error. Require field
6011 names to be aligned to 4 bytes.
6013 * dbus/dbus-marshal.c: move byte swap stuff to header
6014 (_dbus_pack_int32): uscore-prefix
6015 (_dbus_unpack_int32): uscore-prefix
6016 (_dbus_unpack_uint32): export
6017 (_dbus_demarshal_string): add @todo complaining about use of
6019 (_dbus_marshal_get_field_end_pos): add @todo about bad error
6020 handling allowing corrupt data to go unchecked
6022 2003-01-08 Havoc Pennington <hp@redhat.com>
6024 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6025 to the select() as needed for authentication. (should be using
6026 _dbus_poll() not select, but for another day)
6028 * dbus/dbus.h: include dbus/dbus-protocol.h
6030 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6032 * dbus/Makefile.am (dbusinclude_HEADERS): Install
6035 2003-01-08 Anders Carlsson <andersca@codefactory.se>
6037 * dbus/dbus-internals.c: (_dbus_type_to_string):
6038 New function that returns a string describing a type.
6040 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
6041 * dbus/dbus-marshal.h:
6042 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
6043 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
6044 (dbus_message_iter_get_byte_array):
6045 * dbus/dbus-message.h:
6046 Add new convenience functions for appending and getting message fields.
6047 Also add demarshalling routines for byte arrays.
6049 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6051 * dbus/dbus-connection-internal.h:
6052 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6053 (_dbus_connection_get_next_client_serial),
6054 (dbus_connection_send_message):
6055 * dbus/dbus-internals.h:
6056 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
6057 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
6058 (_dbus_marshal_uint32), (_dbus_demarshal_double),
6059 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
6060 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
6061 (_dbus_verbose_bytes), (_dbus_marshal_test):
6062 * dbus/dbus-marshal.h:
6063 * dbus/dbus-message-internal.h:
6064 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
6065 (dbus_message_write_header), (_dbus_message_lock),
6066 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
6067 (dbus_message_get_name), (dbus_message_append_int32),
6068 (dbus_message_append_uint32), (dbus_message_append_double),
6069 (dbus_message_append_string), (dbus_message_append_byte_array),
6070 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
6071 (dbus_message_iter_unref), (dbus_message_iter_has_next),
6072 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
6073 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
6074 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
6075 (decode_header_data), (_dbus_message_loader_return_buffer),
6076 (message_iter_test), (_dbus_message_test):
6077 * dbus/dbus-message.h:
6078 * dbus/dbus-protocol.h:
6079 * dbus/dbus-test.c: (main):
6081 * glib/test-dbus-glib.c: (message_handler), (main):
6082 * test/echo-client.c: (main):
6083 * test/watch.c: (check_messages):
6084 Make messages sendable and receivable for real.
6086 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6088 * dbus/dbus-marshal.c: (_dbus_marshal_double),
6089 (_dbus_marshal_string), (_dbus_marshal_byte_array):
6090 * dbus/dbus-message.c: (dbus_message_append_int32),
6091 (dbus_message_append_uint32), (dbus_message_append_double),
6092 (dbus_message_append_string), (dbus_message_append_byte_array):
6093 Handle OOM restoration.
6095 2003-01-07 Anders Carlsson <andersca@codefactory.se>
6097 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6098 (_dbus_demarshal_string), (_dbus_marshal_test):
6099 * dbus/dbus-marshal.h:
6100 * dbus/dbus-message.c: (dbus_message_get_name),
6101 Document these functions.
6103 (dbus_message_append_int32), (dbus_message_append_uint32),
6104 (dbus_message_append_double), (dbus_message_append_string),
6105 (dbus_message_append_byte_array):
6106 * dbus/dbus-message.h:
6107 Add functions for adding message fields of different types.
6109 * dbus/dbus-protocol.h:
6110 Add the different types.
6112 2003-01-05 Havoc Pennington <hp@pobox.com>
6114 * bus/connection.c: implement routines for handling connections,
6115 first thing is keeping a list of owned services on each connection
6116 and setting up watches etc.
6118 * bus/services.c: implement a mapping from service names to lists
6121 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
6123 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
6124 to use static mutexes for global data
6126 * dbus/dbus-connection.c (dbus_connection_set_data): add new
6127 collection of functions to set/get application-specific data
6128 on the DBusConnection.
6130 2003-01-04 Havoc Pennington <hp@pobox.com>
6132 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
6133 (_dbus_poll): new function
6135 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
6138 * bus/loop.c: initial code for the daemon main loop
6140 2003-01-04 Havoc Pennington <hp@pobox.com>
6142 * test/watch.c (error_handler): make it safe if the error handler
6143 is called multiple times (if we s/error handler/disconnect
6144 handler/ we should just guarantee it's called only once)
6146 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
6147 error handler on disconnect (it's quite possible we should
6148 just change the error handler to a "disconnect handler," I'm
6149 not sure we have any other meaningful errors)
6151 * configure.in: check for getpwnam_r
6153 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
6154 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
6155 mechanism as in SASL spec, using socket credentials
6157 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
6158 (_dbus_send_credentials_unix_socket): new function
6160 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
6162 (_dbus_write): only check errno if <0 returned
6163 (_dbus_write_two): ditto
6165 2003-01-02 Anders Carlsson <andersca@codefactory.se>
6167 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
6168 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
6169 (_dbus_marshal_test):
6170 * dbus/dbus-marshal.h:
6171 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
6172 to _dbus_marshal_utf8_string. Also fix some tests.
6174 2002-12-28 Harri Porten <porten@kde.org>
6176 * configure.in: added check for C++ compiler and a very cheesy
6177 check for the Qt integration
6179 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
6181 * qt/Makefile.am: added
6183 * qt/.cvsignore: added
6185 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
6186 latter, added #ifdef QT_THREAD_SUPPORT guard.
6188 * dbus/Makefile.am: added missing headers for make dist
6190 2002-12-28 Kristian Rietveld <kris@gtk.org>
6192 * dbus/Makefile.am: fixup export-symbols-regex.
6194 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6196 * acinclude.m4: Add this file and put the
6197 PKG_CHECK_MODULE macro in it.
6199 2002-12-27 Anders Carlsson <andersca@codefactory.se>
6201 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6202 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6203 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6204 (_dbus_marshal_test):
6205 Make the demarshalling routines align the pos argument.
6206 Add string marshalling tests and fix the obvious bugs
6209 2002-12-26 Havoc Pennington <hp@pobox.com>
6211 * dbus/dbus-auth.c: fixes fixes fixes
6213 * dbus/dbus-transport-unix.c: wire up support for
6214 encoding/decoding data on the wire
6216 * dbus/dbus-auth.c (_dbus_auth_encode_data)
6217 (_dbus_auth_decode_data): append to target string
6218 instead of nuking it.
6220 2002-12-26 Havoc Pennington <hp@pobox.com>
6222 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
6223 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
6226 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
6227 avoid swap_bytes() overhead (ignoring possible assembly stuff for
6228 now). Main point is because I wanted unpack_uint32 to implement
6230 (_dbus_verbose_bytes): new function
6232 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
6234 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
6235 mechanism to handle a corrupt message stream
6236 (_dbus_message_loader_new): fix preallocation to only prealloc,
6239 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
6240 (_dbus_string_test): enhance tests for copy/move and fix the
6243 * dbus/dbus-transport-unix.c: Hold references in more places to
6244 avoid reentrancy problems
6246 * dbus/dbus-transport.c: ditto
6248 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
6249 leak reference count in no-message case
6251 * test/watch.c (do_mainloop): handle adding/removing watches
6252 during iteration over the watches. Also, ref the connection/server
6253 stored on a watch, so we don't try to mangle a destroyed one.
6255 * dbus/dbus-transport-unix.c (do_authentication): perform
6258 * dbus/dbus-auth.c (get_state): add a state
6259 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
6260 (_dbus_auth_get_unused_bytes): append the unused bytes
6261 to the passed in string, rather than prepend
6263 * dbus/dbus-transport.c (_dbus_transport_init_base): create
6264 the auth conversation DBusAuth
6266 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
6267 (_dbus_transport_new_for_domain_socket): when creating a
6268 transport, pass in whether it's a client-side or server-side
6269 transport so we know which DBusAuth to create
6271 2002-12-03 Havoc Pennington <hp@pobox.com>
6273 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6274 _after_ finalizing the derived members
6275 (unix_connection_set): unref watch if we fail to add it
6277 * dbus/dbus-connection.c (dbus_connection_unref): delete the
6278 transport first, so that the connection owned by the
6279 transport will be valid as the transport finalizes.
6281 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6282 if necessary, and remove watches from the connection.
6284 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6286 2002-12-26 Anders Carlsson <andersca@codefactory.se>
6288 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6289 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6290 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6291 (_dbus_marshal_test):
6292 * dbus/dbus-marshal.h:
6293 Add string marshal functions and have the demarshal functions
6294 return the new position.
6296 2002-12-25 Havoc Pennington <hp@pobox.com>
6298 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6299 it is a simple protocol that just maps directly to SASL.
6301 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6302 initial implementation, not actually used yet.
6304 * dbus/dbus-string.c (_dbus_string_find): new function
6305 (_dbus_string_equal): new function
6306 (_dbus_string_base64_encode): new function
6307 (_dbus_string_base64_decode): new function
6309 2002-12-25 Anders Carlsson <andersca@codefactory.se>
6312 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6313 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6314 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6315 (_dbus_demarshal_uint32), (_dbus_marshal_test):
6316 * dbus/dbus-marshal.h:
6317 * dbus/dbus-protocol.h:
6318 * dbus/dbus-test.c: (main):
6320 Add un-optimized marshalling/demarshalling routines.
6322 2002-12-25 Harri Porten <porten@kde.org>
6324 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6326 2002-12-24 Zack Rusin <zack@kde.org>
6328 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6329 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6332 2002-12-24 Havoc Pennington <hp@pobox.com>
6334 * glib/dbus-gthread.c: fix include
6336 * glib/dbus-glib.h: rename DBusMessageHandler for now.
6337 I think glib API needs to change, though, as you don't
6338 want to use DBusMessageFunction, you want to use the
6339 DBusMessageHandler object. Probably
6340 dbus_connection_open_with_g_main_loop()
6341 and dbus_connection_setup_g_main_loop() or something like that
6342 (but think of better names...) that just create a connection
6343 that has watch/timeout functions etc. already set up.
6345 * dbus/dbus-connection.c
6346 (dbus_connection_send_message_with_reply): new function just to
6347 show how the message handler helps us deal with replies.
6349 * dbus/dbus-list.c (_dbus_list_remove_last): new function
6351 * dbus/dbus-string.c (_dbus_string_test): free a string that
6354 * dbus/dbus-hash.c: use memory pools for the hash entries
6355 (rebuild_table): be more paranoid about overflow, and
6356 shrink table when we can
6357 (_dbus_hash_test): reduce number of sprintfs and write
6358 valid C89. Add tests for case where we grow and then
6359 shrink the hash table.
6361 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6363 * dbus/dbus-connection.c (dbus_connection_register_handler)
6364 (dbus_connection_unregister_handler): new functions
6366 * dbus/dbus-message.c (dbus_message_get_name): new
6368 * dbus/dbus-list.c: fix docs typo
6370 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6371 an object representing a handler for messages.
6373 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6376 * glib/dbus-gthread.c: (dbus_gthread_init):
6377 Don't use the gdbus prefix for public functions.
6379 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6383 Add GLib checks and fixup .pc files
6387 * glib/dbus-gmain.c: (gdbus_connection_prepare),
6388 (gdbus_connection_check), (gdbus_connection_dispatch),
6389 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6390 (dbus_connection_gsource_new):
6391 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6392 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6393 * glib/test-dbus-glib.c: (message_handler), (main):
6396 2002-12-15 Harri Porten <porten@kde.org>
6398 * autogen.sh: check for libtoolize before attempting to use it
6400 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6403 * .cvsignore: ignore more stamp files
6405 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6407 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6408 without make install.
6410 2002-12-15 Havoc Pennington <hp@pobox.com>
6412 * dbus/dbus-threads.c: add thread stubs that a higher library
6413 layer can fill in. e.g. the GLib wrapper might fill them in with
6414 GThread stuff. We still need to use this thread API to
6415 thread-safe-ize the library.
6417 2002-12-12 Havoc Pennington <hp@pobox.com>
6419 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6420 below new interfaces and include fewer system headers.
6422 * dbus/dbus-sysdeps.c (_dbus_read): new function
6423 (_dbus_write): new function
6424 (_dbus_write_two): new function
6425 (_dbus_connect_unix_socket): new function
6426 (_dbus_listen_unix_socket): new function
6428 * dbus/dbus-message-internal.h: change interfaces to use
6431 2002-12-11 Havoc Pennington <hp@pobox.com>
6433 * dbus/dbus-types.h: add dbus_unichar
6435 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6437 * dbus/dbus-connection.c (dbus_connection_send_message): return
6440 * dbus/dbus-transport.c: include dbus-watch.h
6442 * dbus/dbus-connection.c: include dbus-message-internal.h
6444 * HACKING: add file with coding guidelines stuff.
6446 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6447 handling here, for security purposes (as in vsftpd). Not actually
6448 using this class yet.
6450 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6451 system/libc usage here, as in vsftpd, for ease of auditing (and
6452 should also simplify portability). Haven't actually moved all the
6453 system/libc usage into here yet.
6455 2002-11-25 Havoc Pennington <hp@pobox.com>
6457 * dbus/dbus-internals.c (_dbus_verbose): fix to not
6458 always print the first verbose message.
6460 2002-11-24 Havoc Pennington <hp@pobox.com>
6462 * test/echo-client.c, test/echo-server.c: cheesy test
6465 * configure.in (AC_CHECK_FUNCS): check for writev
6467 * dbus/dbus-message.c (_dbus_message_get_network_data): new
6470 * dbus/dbus-list.c (_dbus_list_foreach): new function
6472 * dbus/dbus-internals.c (_dbus_verbose): new function
6474 * dbus/dbus-server.c, dbus/dbus-server.h: public object
6475 representing a server that listens for connections.
6477 * dbus/.cvsignore: create
6479 * dbus/dbus-errors.h, dbus/dbus-errors.c:
6480 public API for reporting errors
6482 * dbus/dbus-connection.h, dbus/dbus-connection.c:
6483 public object representing a connection that
6484 sends/receives messages. (Same object used for
6485 both client and server.)
6487 * dbus/dbus-transport.h, dbus/dbus-transport.c:
6488 Basic abstraction for different kinds of stream
6489 that we might read/write messages from.
6491 2002-11-23 Havoc Pennington <hp@pobox.com>
6493 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6496 * dbus/dbus-test.c (main): add list test, and include
6497 dbus-test.h as intended
6499 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6500 (_dbus_hash_table_remove_int): return value indicates
6501 whether the entry existed to remove
6503 * dbus/dbus-list.c: add linked list utility class,
6506 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6509 2002-11-23 Havoc Pennington <hp@pobox.com>
6511 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6512 DBUS_END_DECLS to nothing, that should fix this once and for all
6514 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6516 * dbus/dbus-message.c, dbus/dbus-hash.c:
6517 add some missing @brief
6519 2002-11-23 Havoc Pennington <hp@pobox.com>
6521 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6522 to avoid confusing Doxygen
6524 * dbus/dbus-hash.c: @} not }@
6526 * dbus/dbus-message.c (struct DBusMessage): split out
6529 2002-11-23 Havoc Pennington <hp@pobox.com>
6531 * configure.in: pile on more warning flags if using gcc
6533 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6534 to document static functions
6536 * configure.in: add summary to end of configure so it
6537 looks nice and attractive
6539 * dbus/dbus-hash.c: finish implementation and write unit
6542 * configure.in: add --enable-tests to enable unit tests
6544 * dbus/dbus-test.c: test program to run unit tests
6545 for all files in dbus/*, initially runs a test for
6548 * dbus/dbus-internals.h: file to hold some internal utility stuff
6550 2002-11-22 Havoc Pennington <hp@redhat.com>
6552 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6553 "ported" away from Tcl
6555 * dbus/dbus-types.h: header for types such as dbus_bool_t
6557 2002-11-22 Havoc Pennington <hp@redhat.com>
6559 * dbus/dbus.h: fixups for doc warnings
6561 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6563 (QUIET): make it quiet so we can see warnings
6565 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
6567 2002-11-22 Havoc Pennington <hp@redhat.com>
6569 * Makefile.am: include "Doxyfile" target in all-local
6571 * configure.in: generate the Doxyfile
6573 * Doxyfile.in: move Doxyfile here, so we can use
6574 configure to generate a Doxyfile with the right
6577 2002-11-22 Havoc Pennington <hp@redhat.com>
6579 * dbus/dbus-message.c: move inline docs into .c file
6581 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
6582 so all docs are under doc/
6583 (MAN_EXTENSION): generate man pages. Use extension
6584 ".3dbus" which matches ".3qt" on my system,
6585 I guess this is OK, I don't know really.
6586 (FILE_PATTERNS): look for .c files not .h, makes sense
6589 2002-11-22 Havoc Pennington <hp@pobox.com>
6591 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
6592 because any app can be a server, and any app can be a client,
6593 the bus is a special kind of server.
6595 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
6597 * Doxyfile : adding. Still needs Makefile rules to be generated
6598 automatically (just run "doxygen" in the toplevel dir for now to
6601 * dbus/dbus-message.h : Adding sample docs (javadoc since
6602 resembles gtk-doc a little more)
6604 * dbus/dbus.h : Adding sample docs
6606 2002-11-21 Havoc Pennington <hp@redhat.com>
6608 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
6609 so we can allow ourselves to include files directly,
6610 instead of having to use dbus.h
6612 * dbus/dbus.h: fill in
6614 * dbus/dbus-message.h: sketch out a sample header file.
6615 Include griping if you include it directly instead of
6618 * dbus/dbus-macros.h: new file with macros for extern "C",
6619 TRUE/FALSE, NULL, etc.
6621 * doc/file-boilerplate.c: put include guards in here
6623 2002-11-21 Havoc Pennington <hp@redhat.com>
6625 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
6627 * COPYING: include the GPL as well, and license code
6628 under both AFL and GPL.
6630 2002-11-21 Havoc Pennington <hp@redhat.com>
6632 * acconfig.h: get rid of this
6634 * autogen.sh (run_configure): add --no-configure option
6636 * configure.in: remove AC_ARG_PROGRAM to make
6637 autoconf complain less. add AC_PREREQ.
6638 add AC_DEFINE third arg.
6640 2002-11-21 Anders Carlsson <andersca@codefactory.se>
6643 Fix references so we can distcheck.
6645 2002-11-21 Havoc Pennington <hp@redhat.com>
6647 * Initial module creation