1 2004-03-18 Richard Hult <richard@imendio.com>
3 * dbus/dbus-message.c (dbus_message_get_auto_activation)
4 (dbus_message_set_auto_activation): Add doxygen docs.
6 2004-03-16 Richard Hult <richard@imendio.com>
8 * bus/activation.c: (bus_activation_service_created),
9 (bus_activation_send_pending_auto_activation_messages),
10 (bus_activation_activate_service):
12 * bus/dispatch.c: (bus_dispatch),
13 (check_nonexistent_service_auto_activation),
14 (check_service_auto_activated),
15 (check_segfault_service_auto_activation),
16 (check_existent_service_auto_activation), (bus_dispatch_test):
17 * bus/driver.c: (bus_driver_handle_activate_service):
18 * bus/services.c: (bus_registry_acquire_service):
19 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
20 (dbus_message_get_auto_activation):
21 * dbus/dbus-message.h:
22 * dbus/dbus-protocol.h: Implement auto-activation.
24 * doc/dbus-specification.xml: Add auto-activation to the spec.
26 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
28 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
29 fix a bug with CUSTOM types.
31 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
32 a unit test for this bug (used to fail).
34 2004-03-12 Mikael Hallendal <micke@imendio.com>
37 (babysitter_watch_callback): notify all pending activations waiting for
38 the same exec that the activation failed.
39 (bus_activation_activate_service): shortcut the activation if we
40 already waiting for the same executable to start up.
42 2004-03-12 Mikael Hallendal <micke@imendio.com>
45 - Added service file reloading.
46 Each service files directory is kept in an hash table in
47 BusActivation and each BusActivationEntry knows what .service-file it
48 was read from. So when you try to activate a service the bus will
49 check if it's been updated, removed or if new .service-files has
51 - Test code at the bottom for the service file reloading.
52 * bus/test-main.c: (main):
54 - added service reloading test.
55 * dbus/dbus-sysdeps.c:
56 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
58 2004-03-08 Michael Meeks <michael@ximian.com>
60 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
61 bail immediately if disconnected, to avoid busy loop.
63 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
64 cleanup cut/paste/inefficiency.
66 2004-03-01 David Zeuthen <david@fubar.dk>
68 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
69 bug where args were used twice. This bug resulted in a segfault
70 on a Debian/PPC system when starting the messagebus daemon. Include
71 dbus-sysdeps.h for DBUS_VA_COPY
73 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
75 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
76 appropriate va_copy implementation. From GLib
78 2004-02-24 Joe Shaw <joe@ximian.com>
80 * bus/services.c (bus_registry_acquire_service): We need to pass
81 in the service name to dbus_set_error() to prevent a crash.
83 2003-12-26 Anders Carlsson <andersca@gnome.org>
85 * AUTHORS: Reveal my True identity.
87 2003-12-17 Mikael Hallendal <micke@imendio.com>
89 * dbus/dbus-message.c: (dbus_message_append_args_valist):
90 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
92 2003-12-13 Mikael Hallendal <micke@imendio.com>
94 * doc/TODO: Added not about better error check of configuration files.
96 2003-12-02 Richard Hult <richard@imendio.com>
98 * Update AFL version to 2.0 throughout the source files to reflect
99 the update that was done a while ago.
101 2003-12-02 Richard Hult <richard@imendio.com>
103 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
104 wrote_dict_key to FALSE on the iter that the dict is appended to,
105 just like when appending other types. Fixes a bug where a dict
106 couldn't be put inside a dict.
107 (dbus_message_iter_append_dict_key): Fix typo in warning message.
108 (message_iter_test, _dbus_message_test): Add test case for dict
111 2003-12-01 David Zeuthen <david@fubar.dk>
113 * python/dbus.py: Add the actual message when calling the reciever
114 of a signal such that parameters can be inspected. Add the method
115 remove_signal_receiver
117 2003-11-26 Mikael Hallendal <micke@imendio.com>
121 * glib/*.[ch]: Made ref functions return the pointer
123 2003-11-25 Zack Rusin <zack@kde.org>
125 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
127 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
130 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
131 the Integrator and to better fit with the server,
133 2003-11-24 Zack Rusin <zack@kde.org>
135 * qt/connection.h, qt/connection.cpp: removing initDbus method since
136 the integrator handles it now
138 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
139 since QTimer wasn't really meant to be used the way DBusTimeout is
141 2003-11-24 Zack Rusin <zack@kde.org>
143 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
144 Integrator class which integrates D-BUS with the Qt event loop,
146 * qt/connection.h, qt/connection.cpp: Move all the code which
147 was dealing with D-BUS integration to the Integrator class,
148 and start using Integrator,
150 2003-11-23 Zack Rusin <zack@kde.org>
152 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
155 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
156 switching namespaces to DBusQt, reworking the class,
158 * Makefile.cvs: switching dependencies so that it matches KDE
161 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
164 2003-11-19 Havoc Pennington <hp@redhat.com>
168 * configure.in: bump version to 0.20
170 * configure.in (have_qt): add yet another place to look for qt
171 (someone hand trolltech a .pc file...)
173 2003-11-01 Havoc Pennington <hp@redhat.com>
175 * doc/dbus-specification.xml: add state machine docs on the auth
176 protocol; just a first draft, I'm sure it's wrong.
178 2003-10-28 David Zeuthen <david@fubar.dk>
180 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
181 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
183 2003-10-28 Havoc Pennington <hp@redhat.com>
185 * dbus/dbus-message.c (get_next_field): delete unused function
187 2003-10-28 Havoc Pennington <hp@redhat.com>
189 * bus/expirelist.c (do_expiration_with_current_time): detect
190 failure of the expire_func due to OOM
192 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
194 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
195 NoReply error that's now created by the bus when the service exits
197 2003-10-28 Havoc Pennington <hp@redhat.com>
199 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
200 tests for set_path, set_interface, set_member, etc.
202 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
204 * dbus/dbus-message.c (set_string_field): always just delete and
205 re-append the field; accept NULL for deletion
206 (re_align_fields_recurse): reimplement
208 2003-10-26 Havoc Pennington <hp@redhat.com>
210 * dbus/dbus-connection.c: fix docs to properly describe the
212 (_dbus_connection_notify_disconnected): remove this function;
213 we can't synchronously add the disconnected message, we have to
214 do it after we've queued any remaining real messages
215 (_dbus_connection_get_dispatch_status_unlocked): queue the
216 disconnect message only if the transport has finished queueing all
217 its real messages and is disconnected.
218 (dbus_connection_disconnect): update the dispatch status here
220 2003-10-22 Havoc Pennington <hp@redhat.com>
222 * bus/bus.c (bus_context_check_security_policy): fix up assertion
224 * bus/connection.c (bus_transaction_send_from_driver): set the
225 destination to the connection's base service
227 2003-10-20 Havoc Pennington <hp@redhat.com>
229 hmm, make check is currently not passing.
231 * doc/dbus-specification.xml: add requirement that custom type
232 names follow the same rules as interface names.
234 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
235 duplication and allow 'c' to be 'custom'; dict is now 'm' for
238 * doc/dbus-specification.xml: update type codes to match
239 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
240 CUSTOM. Add type OBJECT_PATH to the spec.
242 2003-10-17 Havoc Pennington <hp@redhat.com>
244 * bus/driver.c (create_unique_client_name): use "." as separator
245 in base service names instead of '-'
247 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
248 byte at the end of the string
250 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
251 optimization macros since string validation seems to be a slow
254 * doc/dbus-specification.xml: restrict valid
255 service/interface/member/error names. Add test suite code for the
258 * dbus/dbus-string.c: limit service/interface/member/error names
261 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
262 format arg to verbose spew
264 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
265 memory, return instead of g_error
267 * test/test-service.c (path_message_func): support emitting a
270 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
271 activation bus type if DBUS_BUS_ACTIVATION was set; default to
272 assuming the activation bus was the session bus so that services
273 started manually will still register.
274 (init_connections_unlocked): fix so that in OOM situation we get
275 the same semantics when retrying the function
277 * test/test-service.c (main): change to use path registration, to
278 test those codepaths; register with DBUS_BUS_ACTIVATION rather
279 than DBUS_BUS_SESSION
281 2003-10-16 Havoc Pennington <hp@redhat.com>
283 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
285 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
286 coverage of the tests
287 (coverage-report.txt): don't move the .da and .bbg files around
289 2003-10-16 Havoc Pennington <hp@redhat.com>
291 * bus/bus.c (struct BusContext): remove struct field I didn't mean
294 2003-10-16 Havoc Pennington <hp@redhat.com>
296 * bus/connection.c (bus_pending_reply_expired): either cancel or
298 (bus_connections_check_reply): use unlink, not remove_link, as we
299 don't want to free the link; fixes double free mess
301 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
302 where no reply was received
304 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
307 * bus/signals.c (match_rule_matches): add special cases for the
308 bus driver, so you can match on sender/destination for it.
310 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
311 DBUS_PRINT_BACKTRACE is set
313 * dbus/dbus-internals.c: add pid to assertion failure messages
315 * dbus/dbus-connection.c: add message type code to the debug spew
317 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
318 sender=foo not service=foo
320 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
321 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
322 DBUS_ACTIVATION_ADDRESS instead
324 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
325 DBUS_SYSTEM_BUS_ADDRESS if appropriate
327 * bus/bus.c (bus_context_new): handle OOM copying bus type into
330 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
331 (dbus_message_iter_get_object_path_array): new function (half
332 finished, disabled for the moment)
334 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
335 DBUS_MESSAGE_TYPE_ERROR
337 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
338 avoid redirecting stderr to /dev/null
339 (babysit): close stdin if not doing the "exit_with_session" thing
341 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
342 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
343 stdout/stdin, so things don't get confused
345 * bus/system.conf.in: fix to allow replies, I modified .conf
346 instead of .conf.in again.
348 2003-10-14 David Zeuthen <david@fubar.dk>
350 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
351 argtype to arg_type when raising unknown arg type exception.
352 Changed type list to reflect the changes in dbus-protocol.h so
353 the bindings actually work.
355 2003-10-14 Havoc Pennington <hp@redhat.com>
357 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
358 to have a bug keeping it from outputting the .da files sometimes
359 (string_get_string): don't append garbage nul bytes to the string.
361 2003-10-15 Seth Nickell <seth@gnome.org>
363 * python/Makefile.am:
365 Include dbus_h_wrapper.h in the dist tarball.
367 2003-10-14 Havoc Pennington <hp@redhat.com>
369 * bus/bus.c (bus_context_check_security_policy): revamp this to
370 work more sanely with new policy-based requested reply setup
372 * bus/connection.c (bus_transaction_send_from_driver): set bus
373 driver messages as no reply
375 * bus/policy.c (bus_client_policy_check_can_receive): handle a
376 requested_reply attribute on allow/deny rules
378 * bus/system.conf: add <allow requested_reply="true"/>
380 * bus/driver.c (bus_driver_handle_message): fix check for replies
381 sent to the bus driver, which was backward. How did this ever work
382 at all though? I think I'm missing something.
384 * dbus/dbus-message.c (decode_header_data): require error and
385 method return messages to have a reply serial field to be valid
386 (_dbus_message_loader_queue_messages): break up this function;
387 validate that reply serial and plain serial are nonzero;
388 clean up the OOM/error handling.
389 (get_uint_field): don't return -1 from this
390 (dbus_message_create_header): fix signed/unsigned bug
392 * bus/connection.c (bus_connections_expect_reply): save serial of
393 the incoming message, not reply serial
395 2003-10-14 Havoc Pennington <hp@redhat.com>
397 * bus/connection.c: implement pending reply tracking using
400 * bus/bus.c (bus_context_check_security_policy): verify that a
401 reply is pending in order to allow a reply to be sent. Deny
402 messages of unknown type.
404 * bus/dbus-daemon-1.1.in: update to mention new resource limits
406 * bus/bus.c (bus_context_get_max_replies_per_connection): new
407 (bus_context_get_reply_timeout): new
409 2003-10-13 Seth Nickell <seth@gnome.org>
411 * python/Makefile.am:
413 Pass "make distcheck": remove a couple files from DIST_FILES
414 that weren't included in the final version.
416 2003-10-12 Havoc Pennington <hp@pobox.com>
418 Added test code that 1) starts an actual bus daemon and 2) uses
419 DBusGProxy; fixed bugs that were revealed by the test. Lots
420 more testing possible, but this is the basic framework.
422 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
423 empty proxy lists from the proxy list hash
425 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
426 couple of return_if_fail checks
428 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
429 to allocate, so everything is cleared to NULL as it should be.
431 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
432 source as data to dbus_connection_set_timeout_functions() as the
433 timeout functions expected
435 * test/glib/run-test.sh: add a little script to start up a message
436 bus and run tests using it
438 * tools/dbus-launch.1: updates
440 * tools/dbus-launch.c (main): add --config-file option
442 * tools/dbus-launch.c (main): remove confusing else if (runprog)
443 that could never be reached.
445 * dbus/dbus-message.c (dbus_message_new_method_return)
446 (dbus_message_new_error, dbus_message_new_signal): set the
447 no-reply-expected flag on all these. Redundant, but may
448 as well be consistent.
450 2003-10-11 Havoc Pennington <hp@pobox.com>
452 * test/decode-gcov.c (function_solve_graph): make broken block
453 graph a nonfatal error since it seems to be broken. Need to debug
456 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
457 can't just check type > INVALID < LAST anymore
459 * dbus/dbus-message.c (dbus_message_get_signature): new function
460 (dbus_message_has_signature): new function
461 (struct DBusMessage): add signature field (right now it isn't sent
462 over the wire, just generated on the fly)
463 (dbus_message_copy): copy the signature, and init strings to
464 proper length to avoid some reallocs
465 (dbus_message_iter_init_array_iterator): return void, since it
467 (dbus_message_iter_init_dict_iterator): return void since it can't fail
468 (_dbus_message_loader_queue_messages): add silly temporary hack to
469 fill in message->signature on load
471 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
472 characters, so they are relatively human-readable.
474 2003-10-11 Havoc Pennington <hp@pobox.com>
476 * dbus/dbus-message.c (_dbus_message_test): add more test
477 coverage, but #if 0 for now since they uncover a bug
478 not fixed yet; I think in re_align_field_recurse()
479 (re_align_field_recurse): add FIXME about broken assertion
481 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
483 * bus/connection.c: share a couple code bits with expirelist.c
485 * bus/expirelist.h, bus/expirelist.c: implement a generic
486 expire-items-after-N-seconds facility, was going to share between
487 expiring connections and replies, decided not to use for expiring
490 * COPYING: include AFL 2.0 (still need to change all the file headers)
492 2003-10-09 Havoc Pennington <hp@redhat.com>
494 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
495 gcc 3.3. Not that we do anything about it yet.
497 * bus/signals.c (bus_match_rule_parse): impose max length on the
500 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
502 2003-10-09 Havoc Pennington <hp@redhat.com>
504 Make matching rules theoretically work (add parser).
506 * bus/bus.c (bus_context_check_security_policy): fix up to handle
507 the case where destination is explicitly specified as bus driver
508 and someone else is eavesdropping.
510 * bus/policy.c (bus_client_policy_check_can_receive): fix up
511 definition of eavesdropping and assertion
513 * tools/dbus-send.c (main): use dbus_message_type_from_string
515 * bus/signals.c (bus_match_rule_parse): implement
517 * dbus/dbus-message.c (dbus_message_type_from_string): new
519 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
521 2003-10-02 Havoc Pennington <hp@pobox.com>
523 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
524 dbus_gproxy_oneway_call
526 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
527 (dbus_server_setup_with_g_main): fix to allow calling them more
528 than once on the same args
529 (dbus_bus_get_with_g_main): new function
531 2003-10-02 Havoc Pennington <hp@redhat.com>
533 * doc/dbus-tutorial.xml: write some stuff
535 2003-09-29 Havoc Pennington <hp@pobox.com>
537 * configure.in: split checks for Doxygen from XML docs, check for
540 * doc/Makefile.am: XML-ify all the docs, and add a blank
543 2003-09-29 Havoc Pennington <hp@pobox.com>
545 * Merge dbus-object-names branch. To see the entire patch
546 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
548 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
550 2003-09-28 Havoc Pennington <hp@pobox.com>
552 * HACKING: update to reflect new server
554 2003-09-26 Seth Nickell <seth@gnome.org>
557 * python/examples/example-signals.py:
559 Start implementing some notions of signals. The API
560 is really terrible, but they sort of work (with the
561 exception of being able to filter by service, and to
562 transmit signals *as* a particular service). Need to
563 figure out how to make messages come from the service
566 * python/dbus_bindings.pyx.in:
568 Removed duplicate message_handler callbacks.
570 2003-09-25 Havoc Pennington <hp@redhat.com>
572 * bus/session.conf.in: fix my mess
574 2003-09-25 Havoc Pennington <hp@pobox.com>
576 * bus/session.conf.in: fix security policy, reported by Seth Nickell
578 2003-09-25 Seth Nickell <seth@gnome.org>
580 * python/examples/example-service.py:
582 Johan notices complete wrong code in example-service, but
583 completely wrong in a way that works exactly the same (!).
584 Johan is confused, how could this possibly work? Example
585 code fails to serve purpose of making things clear.
588 2003-09-25 Mark McLoughlin <mark@skynet.ie>
590 * doc/dbus-specification.sgml: don't require header fields
591 to be 4-byte aligned and specify that fields should be
592 distinguished from padding by the fact that zero is not
595 * doc/TODO: remove re-alignment item and add item to doc
596 the OBJECT_PATH type.
598 * dbus/dbus-message.c:
599 (HeaderField): rename the original member to value_offset
600 and introduce a name_offset member to keep track of where
601 the field actually begins.
602 (adjust_field_offsets): remove.
603 (append_int_field), (append_uint_field),
604 (append_string_field): don't align the start of the header
605 field to a 4-byte boundary.
606 (get_next_field): impl finding the next marhsalled field
608 (re_align_field_recurse): impl re-aligning a number of
609 already marshalled fields.
610 (delete_field): impl deleting a field of any type and
611 re-aligning any following fields.
612 (delete_int_or_uint_field), (delete_string_field): remove.
613 (set_int_field), (set_uint_field): no need to re-check
614 that we have the correct type for the field.
615 (set_string_field): ditto and impl re-aligning any
617 (decode_header_data): update to take into account that
618 the fields aren't 4-byte aligned any more and the new
619 way to distinguish padding from header fields. Also,
620 don't exit when there is too much header padding.
621 (process_test_subdir): print the directory.
622 (_dbus_message_test): add test to make sure a following
623 field is re-aligned correctly after field deletion.
625 * dbus/dbus-string.[ch]:
626 (_dbus_string_insert_bytes): rename from insert_byte and
627 allow the insert of multiple bytes.
628 (_dbus_string_test): test inserting multiple bytes.
630 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
631 warning note to docs about having to re-align any
632 marshalled values following the string.
634 * dbus/dbus-message-builder.c:
635 (append_string_field), (_dbus_message_data_load):
636 don't align the header field.
638 * dbus/dbus-auth.c: (process_test_subdir): print the
641 * test/break-loader.c: (randomly_add_one_byte): upd. for
644 * test/data/invalid-messages/bad-header-field-alignment.message:
647 * test/data/valid-messages/unknown-header-field.message: shove
648 a dict in the unknown field.
650 2003-09-25 Seth Nickell <seth@gnome.org>
653 * python/dbus_bindings.pyx.in:
655 Handle return values.
657 * python/examples/example-client.py:
658 * python/examples/example-service.py:
660 Pass back return values from the service to the client.
662 2003-09-24 Seth Nickell <seth@gnome.org>
666 Connect Object methods (when you are sharing an object) up... pass
667 in a list of methods to be shared. Sharing all the methods just
668 worked out too weird. You can now create nice Services over the
671 * python/dbus_bindings.pyx.in:
673 Keep references to user_data tuples passed into C functions so
674 Python doesn't garbage collect on us.
676 Implement MethodReturn and Error subclasses of Message for creating
677 DBusMessage's of those types.
679 * python/examples/example-client.py:
680 * python/examples/example-service.py:
682 Simple example code showing both how create DBus services and objects,
685 2003-09-23 Havoc Pennington <hp@pobox.com>
687 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
689 2003-09-23 Havoc Pennington <hp@redhat.com>
691 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
692 (dbus_gproxy_disconnect_signal): implement
693 (dbus_gproxy_manager_remove_signal_match): implement
694 (dbus_gproxy_manager_add_signal_match): implement
695 (dbus_gproxy_oneway_call): implement
697 2003-09-23 Havoc Pennington <hp@pobox.com>
699 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
700 subclass. This means dropping the transparent thread safety of the
701 proxy; you now need a separate proxy per-thread, or your own
702 locking on the proxy. Probably right anyway.
703 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
705 2003-09-22 Havoc Pennington <hp@redhat.com>
707 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
709 2003-09-21 Seth Nickell <seth@gnome.org>
711 First checkin of the Python bindings.
714 * python/Makefile.am:
715 * python/dbus_bindings.pyx.in:
716 * python/dbus_h_wrapper.h:
718 Pieces for Pyrex to operate on, building a dbus_bindings.so
719 python module for low-level access to the DBus APIs.
723 High-level Python module for accessing DBus objects.
728 Build stuff for the python bindings.
732 Extra macro needed for finding the Python C header files.
734 2003-09-21 Havoc Pennington <hp@pobox.com>
736 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
737 implementing the proxy manager, didn't get very far.
739 * dbus/dbus-bus.c (dbus_bus_add_match): new
740 (dbus_bus_remove_match): new
742 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
743 path_name argument; adjust the other not-yet-implemented
744 gproxy constructors to be what I think they should be.
746 2003-09-21 Havoc Pennington <hp@pobox.com>
748 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
749 by default for message bus connections.
751 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
752 exit_on_disconnect flag is set and we process the disconnected
754 (dbus_connection_set_exit_on_disconnect): new function
756 2003-09-21 Havoc Pennington <hp@pobox.com>
758 Get matching rules mostly working in the bus; only actually
759 parsing the rule text remains. However, the client side of
760 "signal connections" hasn't been started, this patch is only the
763 * dbus/dispatch.c: fix for the matching rules changes
765 * bus/driver.c (bus_driver_handle_remove_match)
766 (bus_driver_handle_add_match): send an ack reply from these
769 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
770 arguments, reported by Seth Nickell
772 * bus/config-parser.c (append_rule_from_element): support
773 eavesdrop=true|false attribute on policies so match rules
774 can be prevented from snooping on the system bus.
776 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
777 and "destination" in attribute names; fix some docs bugs;
778 add eavesdrop=true|false attribute
780 * bus/driver.c (bus_driver_handle_add_match)
781 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
784 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
785 rid of broadcast service concept, signals are just always broadcast
787 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
788 mostly implement matching rules stuff (currently only exposed as signal
791 2003-09-21 Mark McLoughlin <mark@skynet.ie>
793 * doc/dbus-specification.sgml: Change the header field name
794 to be an enum and update the rest of the spec to reference
795 the fields using the conventinal name.
797 * dbus/dbus-protocol.h: update to reflect the spec.
799 * doc/TODO: add item to remove the 4 byte alignment requirement.
801 * dbus/dbus-message.c: Remove the code to generalise the
802 header/body length and serial number header fields as named
803 header fields so we can reference field names using the
805 (append_int_field), (append_uint_field), (append_string_field):
806 Append the field name as a byte rather than four chars.
807 (delete_int_or_uint_field), (delete_string_field): reflect the
808 fact that the field name and typecode now occupy 4 bytes instead
810 (decode_string_field), (decode_header_data): update to reflect
811 protocol changes and move the field specific encoding from
812 decode_string_field() back into decode_header_data().
814 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
815 Add utility to aid debugging.
817 * dbus/dbus-message-builder.c:
818 (append_string_field), (_dbus_message_data_load): Update to
819 reflect protocol changes; Change the FIELD_NAME directive
820 to HEADER_FIELD and allow it to take the field's conventional
821 name rather than the actual value.
823 * test/data/*/*.message: Update to use HEADER_FIELD instead
824 of FIELD_NAME; Always align the header on an 8 byte boundary
825 *before* updating the header length.
827 2003-09-15 Havoc Pennington <hp@pobox.com>
829 * dbus/dbus-pending-call.c: add the get/set object data
830 boilerplate as for DBusConnection, etc. Use generic object data
831 for the notify callback.
833 * glib/dbus-gparser.c (parse_node): parse child nodes
835 * tools/dbus-viewer.c: more hacking on the dbus-viewer
837 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
838 contain functions shared between the convenience lib and the
841 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
842 -export-symbols-regex to the GLib library
844 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
845 fix the locking in here, and add a default handler for
846 Introspect() that just returns sub-nodes.
848 2003-09-14 Havoc Pennington <hp@pobox.com>
850 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
851 rather than gfoo consistent
853 * glib/dbus-gproxy.h: delete for now, move contents to
854 dbus-glib.h, because the include files don't work right since we
855 aren't in the dbus/ subdir.
857 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
858 (dbus_gproxy_end_call): finish
859 (dbus_gproxy_begin_call): finish
861 * glib/dbus-gmain.c (dbus_set_g_error): new
863 * glib/dbus-gobject.c (handle_introspect): include information
864 about child nodes in the introspection
866 * dbus/dbus-connection.c (dbus_connection_list_registered): new
867 function to help in implementation of introspection
869 * dbus/dbus-object-tree.c
870 (_dbus_object_tree_list_registered_and_unlock): new function
872 2003-09-12 Havoc Pennington <hp@pobox.com>
874 * glib/dbus-gidl.h: add common base class for all the foo_info
877 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
880 * test/Makefile.am: try test srcdir -ef . in addition to test
881 srcdir = ., one of them should work (yeah lame)
883 * glib/Makefile.am: build the "idl" parser stuff as a convenience
886 * glib/dbus-gparser.h: make description_load routines return
887 NodeInfo* not Parser*
889 * Makefile.am (SUBDIRS): build test dir after all library dirs
891 * configure.in: add GTK+ detection
893 2003-09-07 Havoc Pennington <hp@pobox.com>
895 * Make Doxygen contented.
897 2003-09-07 Havoc Pennington <hp@pobox.com>
899 * doc/dbus-specification.sgml: more updates
901 2003-09-06 Havoc Pennington <hp@pobox.com>
903 * doc/dbus-specification.sgml: partial updates
905 * bus/dbus-daemon-1.1.in: fix the config file docs for the
906 zillionth time; hopefully I edited the right file this time.
908 * bus/config-parser.c (append_rule_from_element): support
909 send_type, send_path, receive_type, receive_path
911 * bus/policy.c: add message type and path to the list of things
912 that can be "firewalled"
914 2003-09-06 Havoc Pennington <hp@pobox.com>
916 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
917 (dbus_connection_register_object_path): make this not handle
918 messages to paths below the given path
920 2003-09-03 Havoc Pennington <hp@pobox.com>
922 * test/glib/Makefile.am: add this with random glib-linked test
925 * glib/Makefile.am: remove the random test programs from here,
926 leave only the unit tests
928 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
929 uscore/javacaps conversion, and fix
930 (get_object_property, set_object_property): change to .NET
931 convention for mapping props to methods, set_FooBar/get_FooBar,
932 since one language has such a convention we may as well copy it.
933 Plus real methods in either getFooBar or get_foo_bar style won't
934 collide with this convention.
936 2003-09-01 Havoc Pennington <hp@pobox.com>
938 * glib/dbus-gparser.c: implement
940 * glib/dbus-gobject.c: start implementing skeletons support
942 * configure.in: when disabling checks/assert, also define
943 G_DISABLE_ASSERT and G_DISABLE_CHECKS
945 2003-09-01 Havoc Pennington <hp@pobox.com>
947 * glib/Makefile.am: rearrange a bunch of files and get "make
948 check" framework set up
950 2003-08-31 Havoc Pennington <hp@pobox.com>
952 * fix build with --disable-tests
954 2003-08-30 Havoc Pennington <hp@pobox.com>
956 * dbus/dbus-connection.c: purge DBusMessageHandler
958 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
959 use callbacks everywhere
961 2003-08-30 Havoc Pennington <hp@pobox.com>
963 * test/data/valid-config-files/system.d/test.conf: change to
964 root for the user so warnings don't get printed
966 * dbus/dbus-message.c: add dbus_message_get_path,
967 dbus_message_set_path
969 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
970 dispatching to a path
972 * dbus/dbus-string.c (_dbus_string_validate_path): add
974 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
975 (_dbus_marshal_object_path): implement
977 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
978 to contain the path to the target object
979 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
980 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
982 2003-08-30 Havoc Pennington <hp@pobox.com>
984 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
986 2003-08-29 Havoc Pennington <hp@pobox.com>
988 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
990 (struct DBusObjectSubtree): shrink this
991 a lot, since we may have a lot of them
992 (_dbus_object_tree_free_all_unlocked): implement
993 (_dbus_object_tree_dispatch_and_unlock): implement
995 2003-08-29 Havoc Pennington <hp@pobox.com>
997 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
999 2003-08-28 Havoc Pennington <hp@pobox.com>
1003 * dbus/dbus-connection.c: port to no ObjectID, create a
1004 DBusObjectTree, rename ObjectTree to ObjectPath in public API
1006 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
1007 everything except UnregisterFunction and MessageFunction
1009 * dbus/dbus-marshal.c: port away from DBusObjectID,
1010 add DBUS_TYPE_OBJECT_PATH
1012 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
1013 dbus/dbus-objectid.[hc]: remove these, we are moving to
1014 path-based object IDs
1016 2003-08-25 Havoc Pennington <hp@pobox.com>
1018 Just noticed that dbus_message_test is hosed, I wonder when I
1019 broke that. I thought make check was passing earlier...
1021 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
1022 container tree, will replace most of dbus-object-registry
1024 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1027 2003-08-19 Havoc Pennington <hp@pobox.com>
1029 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1030 (dbus_message_is_error): fix this function
1032 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1035 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1036 reflect clarified man page
1037 (bus_client_policy_check_can_send): ditto
1039 * bus/session.conf.in: fixup
1041 * bus/system.conf.in: fixup
1043 2003-08-18 Havoc Pennington <hp@redhat.com>
1045 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1047 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1048 dumb bug created earlier (wrong order of args to
1049 decode_header_data())
1051 * tools/dbus-send.c: port
1053 * tools/dbus-print-message.c (print_message): port
1055 * test/data/*messages: port all messages over
1057 * dbus/dbus-message-builder.c: support including
1060 * bus/driver.c: port over
1062 * bus/dispatch.c: port over to new stuff
1064 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1065 rename disconnect signal to "Disconnected"
1067 2003-08-17 Havoc Pennington <hp@pobox.com>
1069 This doesn't compile yet, but syncing up so I can hack on it from
1070 work. What are branches for if not broken code? ;-)
1072 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1073 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1074 DBUS_HEADER_FIELD_ERROR_NAME
1076 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1077 for the interface+member pairs
1078 (string_hash): change to use g_str_hash algorithm
1079 (find_direct_function, find_string_function): refactor these to
1082 * dbus/dbus-message.c: port all of this over to support
1083 interface/member fields instead of name field
1085 * dbus/dbus-object-registry.c: port over
1087 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1088 from _dbus_string_validate_name
1090 * bus/dbus-daemon-1.1: change file format for the
1091 <deny>/<allow> stuff to match new message naming scheme
1093 * bus/policy.c: port over
1095 * bus/config-parser.c: parse new format
1097 2003-08-16 Havoc Pennington <hp@pobox.com>
1099 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1102 * glib/dbus-gproxy.c: some hacking
1104 2003-08-15 Havoc Pennington <hp@redhat.com>
1106 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1108 * dbus/dbus-connection.c
1109 (dbus_connection_send_with_reply_and_block): factor out internals;
1110 change to convert any error replies to DBusError instead of
1111 returning them as a message
1113 2003-08-15 Havoc Pennington <hp@pobox.com>
1115 * dbus/dbus-connection.c,
1116 dbus/dbus-pending-call.c: Finish the pending call stuff
1118 2003-08-14 Havoc Pennington <hp@redhat.com>
1120 * dbus/dbus-pending-call.c: start on new object that will replace
1121 DBusMessageHandler and ReplyHandlerData for tracking outstanding
1124 * dbus/dbus-gproxy.c: start on proxy object used to communicate
1125 with remote interfaces
1127 * dbus/dbus-gidl.c: do the boring boilerplate in here
1129 2003-08-12 Havoc Pennington <hp@pobox.com>
1131 * bus/dispatch.c (bus_dispatch): make this return proper
1132 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1134 * dbus/dbus-errors.c (dbus_set_error): use
1135 _dbus_string_append_printf_valist
1137 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1138 (_dbus_string_append_printf): new
1140 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1143 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1144 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1145 message is unhandled.
1147 2003-08-11 Havoc Pennington <hp@pobox.com>
1149 * bus/test.c (client_disconnect_handler): change to return
1150 HANDLED (would have been REMOVE_MESSAGE)
1152 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1153 HANDLED/NOT_YET_HANDLED instead of
1154 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
1157 2003-08-10 Havoc Pennington <hp@pobox.com>
1159 * tools/dbus-send.c (main): add --type argument, for now
1160 supporting only method_call and signal types.
1162 * tools/dbus-print-message.c: print message type
1164 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1165 init connection->objects
1167 * doc/dbus-specification.sgml: fix sgml
1169 * bus/*.c: port over to object-instance API changes
1171 * test/test-service.c: ditto
1173 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1174 name, we will have to fix up the rest of the code to also handle
1176 (dbus_message_new): generic message-creation call
1177 (set_string_field): allow appending name field
1179 2003-08-06 Havoc Pennington <hp@pobox.com>
1181 * dbus/dbus-object-registry.c: implement signal connection
1184 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1186 * dbus/dbus-internals.c (_dbus_memdup): new function
1188 2003-08-02 Havoc Pennington <hp@pobox.com>
1190 * dbus/dbus-message.c (dbus_message_get_no_reply)
1191 (dbus_message_set_no_reply): add these and remove
1192 set_is_error/get_is_error
1194 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
1195 remove the ERROR flag, since there's now an ERROR type
1197 2003-08-01 Havoc Pennington <hp@pobox.com>
1199 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1202 * dbus/dbus-message.c (dbus_message_get_type): new function
1204 * doc/dbus-specification.sgml: add "type" byte to messages
1206 2003-08-01 Havoc Pennington <hp@pobox.com>
1208 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1209 a message type enum to distinguish kinds of message
1210 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
1211 that need not be replied to
1213 2003-08-01 Havoc Pennington <hp@pobox.com>
1215 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1216 (unpack_8_octets): fix no-64-bit-int bug
1218 * dbus/dbus-object-registry.c (validate_id): validate the
1219 connection ID bits, not just the instance ID.
1221 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1222 the connection-global 33 bits of the object ID
1224 * dbus/dbus-object-registry.c (info_from_entry): fill in
1225 object ID in the new way
1227 * dbus/dbus-objectid.h: rather than high/low bits, specifically
1228 define server/client/instance bits.
1230 2003-07-30 Havoc Pennington <hp@pobox.com>
1232 * dbus/dbus-connection.c (dbus_connection_register_object): fix
1235 2003-07-13 Havoc Pennington <hp@pobox.com>
1237 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1238 fields to DBusObjectVTable and DBusObjectInfo
1240 2003-07-12 Havoc Pennington <hp@pobox.com>
1242 * dbus/dbus-object-registry.c: implement unit test,
1243 fix bugs discovered in process
1245 * dbus/dbus-connection.c: remove handler_table and
1246 register_handler(), add DBusObjectRegistry usage
1248 * dbus/dbus-objectid.c (dbus_object_id_is_null)
1249 (dbus_object_id_set_null): new functions
1251 2003-07-08 Havoc Pennington <hp@pobox.com>
1253 * dbus/dbus-object.c: implement some of this
1255 * dbus/dbus-object-registry.c
1256 (_dbus_object_registry_add_and_unlock): fill in the object_id out
1258 (_dbus_object_registry_new): handle OOM
1260 2003-07-08 Havoc Pennington <hp@pobox.com>
1262 * dbus/dbus-object.h: sketch out an API for registering objects
1263 with a connection, that allows us to use as little as 24 bytes
1264 per object and lets application code represent an object in
1265 any conceivable way.
1267 * dbus/dbus-object-registry.c: implement the hard bits of the
1268 DBusConnection aspect of object API. Not yet wired up.
1270 2003-07-06 Havoc Pennington <hp@pobox.com>
1272 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1273 (_dbus_marshal_object_id): new
1274 (_dbus_demarshal_object_id): new
1275 (_dbus_marshal_get_arg_end_pos): support object ID type, and
1276 consolidate identical switch cases. Don't conditionalize handling
1277 of DBUS_TYPE_UINT64, need to handle the type always.
1278 (_dbus_marshal_validate_arg): consolidate identical cases, and
1279 handle DBUS_TYPE_OBJECT_ID
1281 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1283 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1285 2003-09-28 Havoc Pennington <hp@pobox.com>
1289 2003-09-28 Havoc Pennington <hp@pobox.com>
1291 * doc/Makefile.am (dbus-specification.html): testing a funky hack
1292 to work with Debian db2html
1294 2003-09-28 Havoc Pennington <hp@pobox.com>
1296 * configure.in: 0.13
1298 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
1299 stylesheet-images for benefit of Debian
1301 Change back to using filesystem-linked sockets for the system
1302 bus, so only root can create the default system bus address.
1304 * bus/system.conf.in: change to use
1305 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1307 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
1310 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1311 here, and AC_DEFINE DBUS_SYSTEM_PATH
1313 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1316 * doc/busconfig.dtd:
1319 2003-08-09 Anders Carlsson <andersca@codefactory.se>
1321 * doc/dbus-specification.sgml:
1322 Add activation reply values.
1324 2003-08-05 Havoc Pennington <hp@redhat.com>
1326 * configure.in: 0.12
1328 2003-08-05 Anders Carlsson <andersca@codefactory.se>
1330 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
1331 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
1332 (add_watch), (remove_watch), (create_source):
1333 Refcount fds, fixes some reentrancy issues.
1335 2003-07-30 Havoc Pennington <hp@redhat.com>
1337 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
1338 bus address to be abstract if we have abstract sockets
1342 2003-07-28 Havoc Pennington <hp@redhat.com>
1344 * bus/messagebus.in: fix to avoid processname/servicename
1345 confusion, from Michael Kearey
1346 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
1348 2003-07-23 Havoc Pennington <hp@pobox.com>
1350 * dbus/dbus-message.c (dbus_message_iter_get_named):
1351 fix from Andy Hanton to remove broken "+1"
1353 2003-07-16 Havoc Pennington <hp@pobox.com>
1355 * tools/dbus-launch.c (babysit): close stdout/stderr in the
1356 babysitter process, as suggested by Thomas Leonard, so
1357 an "eval `dbus-launch --exit-with-session`" will actually
1360 2003-07-16 Havoc Pennington <hp@pobox.com>
1362 * configure.in: print out EXPANDED_* variables in the summary at
1363 the end; clean up the code that computes EXPANDED_ variables and
1364 get the ones using exec_prefix right. Should make things work
1365 when you build without --prefix
1367 2003-06-29 Havoc Pennington <hp@pobox.com>
1369 * mono/Test.cs (class Test): fire up a main loop and run it
1371 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
1372 done once, the app has to do it
1374 2003-06-26 Havoc Pennington <hp@pobox.com>
1376 * mono/Connection.cs: set up connection with the glib main loop
1378 2003-07-01 Havoc Pennington <hp@redhat.com>
1380 * doc/dbus-specification.sgml: clarify the format of a type code,
1381 change suggested by Jim Blandy
1383 2003-06-29 Miloslav Trmac <mitr@volny.cz>
1386 * tools/Makefile.am: Don't assume srcdir == builddir.
1388 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
1389 the allocated block.
1390 (_dbus_memory_test): New function.
1391 * dbus/dbus-test.h: Add _dbus_memory_test ().
1392 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
1394 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
1396 (dbus_message_new): Remove obsolete @todo.
1398 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
1399 (_dbus_marshal_set_uint64): Fix comment.
1401 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
1402 hardcode FIELD_REPLY_SERIAL.
1404 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
1405 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
1407 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
1408 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
1410 2003-06-24 Havoc Pennington <hp@pobox.com>
1412 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
1414 2003-06-23 Anders Carlsson <andersca@codefactory.se>
1420 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
1421 * gcj/org/.cvsignore:
1422 * gcj/org/Makefile.am:
1423 * gcj/org/freedesktop/.cvsignore:
1424 * gcj/org/freedesktop/Makefile.am:
1425 * gcj/org/freedesktop/dbus/.cvsignore:
1426 * gcj/org/freedesktop/dbus/Makefile.am:
1427 * gcj/org/freedesktop/dbus/Message.java: (Message),
1429 * gcj/org/freedesktop/dbus/natMessage.cc:
1430 Fix the build system.
1432 2003-06-22 Havoc Pennington <hp@pobox.com>
1434 * mono/Connection.cs: add more bindings
1436 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
1439 2003-06-22 Havoc Pennington <hp@pobox.com>
1441 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
1442 Start wrapping more stuff.
1444 2003-06-22 Havoc Pennington <hp@pobox.com>
1446 * mono/Message.cs: implement Message.Wrap() that ensures we only
1447 have a single C# wrapper per DBusMessage, assuming it works which
1448 it probably doesn't.
1450 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
1451 (dbus_message_free_data_slot): new
1452 (dbus_message_set_data): new
1453 (dbus_message_get_data): new
1455 2003-06-22 Havoc Pennington <hp@pobox.com>
1457 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
1458 (_dbus_data_slot_allocator_alloc): rework these to keep a
1459 reference count on each slot and automatically manage a global
1460 slot ID variable passed in by address
1462 * bus/bus.c: convert to new dataslot API
1464 * dbus/dbus-bus.c: convert to new dataslot API
1466 * dbus/dbus-connection.c: convert to new dataslot API
1468 * dbus/dbus-server.c: convert to new dataslot API
1470 * glib/dbus-gmain.c: ditto
1474 * bus/connection.c: ditto
1476 2003-06-22 Anders Carlsson <andersca@codefactory.se>
1478 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
1479 after the gcj checks so that the correct configuration tags
1480 will be added to libtool.
1482 * dbus-glib-1.pc.in: No need to specify any includes since
1483 dbus-1.pc.in has those.
1485 2003-06-22 Havoc Pennington <hp@pobox.com>
1487 * mono/*, gcj/*, configure.in, Makefile.am:
1488 Check in makefiles and subdirs for mono and gcj bindings.
1489 Neither binding actually exists, just trying to get through
1490 all the build and other boring bits.
1492 2003-06-21 Philip Blundell <philb@gnu.org>
1494 * tools/dbus-monitor.1: Updated.
1496 * tools/dbus-send.1: Likewise.
1498 2003-06-20 Anders Carlsson <andersca@codefactory.se>
1500 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
1501 for hangup and error after checking read so we won't discard
1502 pending data if both hangup and read are set.
1504 2003-06-19 Philip Blundell <philb@gnu.org>
1506 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
1508 * tools/dbus-send.c: Accept both --system and --session.
1510 * tools/dbus-monitor.c: Same here.
1512 2003-06-19 Anders Carlsson <andersca@codefactory.se>
1514 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
1515 from C++ (Patch by Miloslav Trmac).
1517 2003-06-15 Joe Shaw <joe@assbarn.com>
1519 * configure.in: Check for socklen_t.
1521 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
1523 * test/test-segfault.c: Add #include <sys/time.h>
1525 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
1526 dbus-launch needs it.
1528 2003-06-09 Havoc Pennington <hp@redhat.com>
1530 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
1531 SUN_LEN, it breaks abstract socket usage
1533 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
1536 2003-06-04 Havoc Pennington <hp@pobox.com>
1538 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
1539 using unix:abstract=/foo, and when listening in a tmpdir
1540 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
1542 * dbus/dbus-transport.c (_dbus_transport_open): support
1545 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1546 support abstract sockets
1548 * dbus/dbus-transport-unix.c
1549 (_dbus_transport_new_for_domain_socket): support abstract sockets
1551 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
1552 toggle as an argument, implement abstract namespace support
1553 (_dbus_listen_unix_socket): ditto
1555 * configure.in: add --enable-abstract-sockets and implement
1556 a configure check for autodetection of the right value.
1558 2003-06-01 Havoc Pennington <hp@pobox.com>
1560 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
1561 in /tmp (though on Linux this will end up being useless,
1562 when we add abstract namespace support)
1564 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
1567 2003-05-28 Colin Walters <walters@verbum.org>
1569 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
1571 2003-05-18 Anders Carlsson <andersca@codefactory.se>
1573 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
1575 2003-05-17 Colin Walters <walters@gnu.org>
1577 * tools/dbus-send.c: Don't exit with an error code if --help was
1578 passed. Default to using the session bus instead of the system
1581 * tools/dbus-launch.c: Ditto.
1583 * tools/dbus-monitor.c: Ditto.
1585 * tools/dbus-send.1: Update with new arguments.
1587 * tools/dbus-launch.c: Emit code to export variables. New
1588 arguments -s and -c to specify shell syntax, and a bit of code to
1589 autodetect syntax. Also, allow specifying a program to run.
1591 * tools/dbus-launch.1: Update with new arguments.
1593 * tools/dbus-send.1: Ditto.
1595 * tools/dbus-monitor.1: Ditto.
1597 2003-05-17 Havoc Pennington <hp@pobox.com>
1599 * bus/config-parser.c (merge_included): merge in policies from
1600 child configuration file.
1602 * bus/policy.c (bus_policy_merge): function to merge two policies
1605 2003-05-16 Havoc Pennington <hp@redhat.com>
1607 * dbus/dbus-connection.c: disable verbose lock spew
1609 * tools/dbus-send.c: add --print-reply command line option
1611 * tools/dbus-print-message.h (print_message): new util function
1612 shared by dbus-send and dbus-monitor
1614 * tools/dbus-monitor.c (handler_func): exit on disconnect
1616 * dbus/dbus-transport-unix.c (do_reading): if the transport is
1617 disconnected, don't try to use the read_watch
1619 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
1620 so we can find this bug more easily
1622 2003-05-16 Havoc Pennington <hp@redhat.com>
1624 * bus/policy.c (free_rule_list_func): avoid a crash when passed
1625 NULL as DBusHashTable is annoyingly likely to do.
1627 2003-05-16 Colin Walters <walters@verbum.org>
1629 * tools/dbus-monitor.c: Add --session argument and usage()
1632 * tools/dbus-monitor.1: Update with new --session arg.
1634 * bus/Makefile.am (install-data-hook): Create
1635 $(libdir)/dbus-1.0/services so that the session bus is happy.
1637 2003-05-15 Havoc Pennington <hp@redhat.com>
1639 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
1640 on non-x86. ifdef's are evil.
1642 2003-05-15 Havoc Pennington <hp@redhat.com>
1644 * configure.in: 0.11
1648 * bus/Makefile.am (initddir): apparently we are supposed to put
1649 init scripts in /etc/rc.d/init.d not /etc/init.d
1651 * bus/Makefile.am: remove the "you must --enable-tests to make
1652 check" as it broke distcheck
1654 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
1656 2003-05-13 James Willcox <jwillcox@gnome.org>
1659 * bus/activation.c: (bus_activation_service_created),
1660 (bus_activation_activate_service):
1661 * bus/driver.c: (bus_driver_send_service_deleted),
1662 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1663 (bus_driver_send_service_acquired),
1664 (bus_driver_send_welcome_message),
1665 (bus_driver_handle_list_services):
1666 * bus/session.conf.in:
1667 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
1668 (dbus_bus_service_exists), (dbus_bus_activate_service):
1671 Add some convenience API which lets you activate a service, and did a
1672 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
1673 and dbus_message_get_args()
1675 2003-05-11 Havoc Pennington <hp@pobox.com>
1677 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
1678 calling _dbus_marshal_validate_arg() for every byte in a byte
1681 * dbus/dbus-message-handler.c: use atomic reference counting to
1682 reduce number of locks slightly; the global lock in here sucks
1684 * dbus/dbus-connection.c
1685 (_dbus_connection_update_dispatch_status_and_unlock): variant of
1686 update_dispatch_status that can be called with lock held; then use
1687 in a couple places to reduce locking/unlocking
1688 (dbus_connection_send): hold the lock over the whole function
1689 instead of acquiring it twice.
1691 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
1693 * bus/connection.c (bus_connections_setup_connection): fix access
1694 to already-freed memory.
1696 * dbus/dbus-connection.c: keep a little cache of linked list
1697 nodes, to avoid using the global linked list alloc lock in the
1698 normal send-message case. Instead we just use the connection lock
1699 that we already have to take.
1701 * dbus/dbus-list.c (_dbus_list_find_last): new function
1703 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
1704 change to use a struct for the atomic type; fix docs,
1705 they return value before increment, not after increment.
1707 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
1708 (_dbus_string_append_8_aligned): new functions to try to
1709 microoptimize this operation.
1710 (reallocate_for_length): break this out of set_length(), to
1711 improve profile info, and also so we can consider inlining the
1714 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
1715 strings with some preallocation, cuts down on our calls to realloc
1716 a fair bit. Though if we can get the "move entire string to empty
1717 string" optimization below to kick in here, it would be better.
1719 * dbus/dbus-string.c (_dbus_string_move): just call
1720 _dbus_string_move_len
1721 (_dbus_string_move_len): add a special case for moving
1722 an entire string into an empty string; we can just
1723 swap the string data instead of doing any reallocs.
1724 (_dbus_string_init_preallocated): new function
1726 2003-05-11 Havoc Pennington <hp@pobox.com>
1728 Write a "test-profile" that does echo client-server with threads;
1729 profile reveals lock contention, memcpy/realloc of buffers, and
1730 UTF-8 validation as hot spots. 20% of lock contention eliminated
1731 with dbus_atomic_inc/dec implementation on x86. Much remaining
1732 contention is global mempool locks for GList and DBusList.
1734 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
1737 * dbus/dbus-connection.c (struct DBusConnection): use
1738 dbus_atomic_t for the reference count
1740 * dbus/dbus-message.c (struct DBusMessage): declare
1741 dbus_atomic_t values as volatile
1743 * configure.in: code to detect ability to use atomic integer
1744 operations in assembly, from GLib patch
1746 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
1747 time, tired of it being wrong in threads and forked processes
1749 * glib/test-profile.c: a little program to bounce messages back
1750 and forth between threads and eat CPU
1752 * dbus/dbus-connection.c: add debug spew macros for debugging
1753 thread locks; include config.h at top; fix deadlock in
1754 dbus_connection_flush()
1756 2003-05-08 Havoc Pennington <hp@pobox.com>
1758 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
1759 data from getting written, and there wasn't a good reason to
1762 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
1763 dbus_verbose lines in test coverage
1764 (main): add list of functions sorted by # of untested blocks
1765 to the coverage report
1767 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
1769 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
1771 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
1772 extend test coverage
1774 * test/data/auth/cancel.auth-script: test canceling an
1777 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
1778 aren't used. in CVS history if we end up needing them.
1780 2003-05-04 Havoc Pennington <hp@pobox.com>
1782 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
1785 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
1786 function, which assumed length was in # of strings, not bytes
1788 * dbus/dbus-message.c (_dbus_message_test): add tests for some
1791 * dbus/dbus-connection.c
1792 (_dbus_connection_queue_received_message): disable function for
1793 now, we are only using it in test mode
1795 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1796 remove a mistaken FIXME
1798 2003-05-04 Havoc Pennington <hp@pobox.com>
1800 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
1801 unlock mutex on successful return, patch from Anders Gustafsson
1803 2003-05-04 Havoc Pennington <hp@pobox.com>
1805 * dbus-glib-1.pc.in (Requires): fix dependencies, from
1808 2003-05-04 Havoc Pennington <hp@pobox.com>
1810 * tools/dbus-launch.c: implement
1812 * bus/main.c (main), bus/bus.c (bus_context_new):
1813 implement --print-pid and --fork
1815 2003-05-03 Havoc Pennington <hp@redhat.com>
1817 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
1818 the address had no value, and add to test suite. Fix and
1819 regression test from Miloslav Trmac
1821 2003-05-03 Havoc Pennington <hp@pobox.com>
1823 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
1824 watch is invalid when handled
1826 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
1827 dbus-launch utility to launch the bus from a shell script. Didn't
1828 actually implement dbus-launch yet, it's just a placeholder still.
1830 2003-05-03 Havoc Pennington <hp@pobox.com>
1832 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
1833 daemon; also documents daemon config file, so replaces
1834 doc/config-file.txt. Corrected some stuff from config-file.txt in
1835 the process of moving it.
1837 2003-05-03 Havoc Pennington <hp@pobox.com>
1839 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
1842 2003-05-03 Colin Walters <walters@verbum.org>
1844 * dbus/dbus-sysdeps.c (fill_user_info): Test against
1845 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
1847 * Makefile.am: Update to use new .pc versioning scheme.
1849 2003-05-02 Havoc Pennington <hp@redhat.com>
1851 * bus/system.conf.in: allow send/receive to/from message bus
1854 2003-04-30 Havoc Pennington <hp@redhat.com>
1856 * configure.in: print a note when building with unit tests and
1859 2003-04-30 Havoc Pennington <hp@redhat.com>
1861 * Makefile.am: add a check-local that complains if you didn't
1862 configure with --enable-tests
1864 2003-04-29 Havoc Pennington <hp@redhat.com>
1866 * glib/dbus-gmain.c: docs cleanups
1868 * dbus/dbus-types.h: add docs on int64 types
1870 * dbus/dbus-memory.c: fix docs to avoid putting private API in
1871 public API docs section
1873 2003-04-29 Havoc Pennington <hp@redhat.com>
1875 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
1876 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
1877 parallel install API version, not with the D-BUS package version.
1879 * HACKING: move some of README over here
1881 * README: updates, and document API/ABI policy
1883 * configure.in: reindentation
1885 2003-04-29 Havoc Pennington <hp@redhat.com>
1887 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
1888 to use this library" to be sure people have the right
1891 2003-04-28 Havoc Pennington <hp@redhat.com>
1893 * configure.in: add --enable-docs which by default is auto yes if
1894 doxygen and db2html found, no otherwise; but can be forced on/off
1896 * doc/Makefile.am: conditionalize whether to build docs on
1899 2003-04-28 Havoc Pennington <hp@redhat.com>
1901 * configure.in: 0.10
1905 * bus/system.conf.in: add <includedir>system.d</includedir>
1907 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
1908 username was provided but not uid
1910 * bus/config-parser.c (struct BusConfigParser): keep track of
1911 whether the parser is toplevel or was included; change some
1912 of the error handling if it's included.
1914 2003-04-27 Havoc Pennington <hp@pobox.com>
1918 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
1919 report correct status if we finish processing authentication
1920 inside this function.
1922 * bus/activation.c (try_send_activation_failure): use
1923 bus_transaction_send_error_reply
1925 * bus/connection.c (bus_connection_get_groups): return an error
1926 explaining the problem
1928 * bus/bus.c (bus_context_check_security_policy): implement
1929 restriction here that inactive connections can only send the
1930 hello message. Also, allow bus driver to send anything to
1933 * bus/connection.c (bus_connection_complete): create the
1934 BusClientPolicy here instead of on-demand.
1935 (bus_connection_get_policy): don't return an error
1937 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
1938 sender field in message being replied to
1940 * bus/bus.c (bus_context_check_security_policy): fix silly typo
1941 causing it to return FALSE always
1943 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
1944 we checked sender rather than destination
1946 2003-04-25 Havoc Pennington <hp@redhat.com>
1948 test suite is slightly hosed at the moment, will fix soon
1950 * bus/connection.c (bus_connections_expire_incomplete): fix to
1951 properly disable the timeout when required
1952 (bus_connection_set_name): check whether we can remove incomplete
1953 connections timeout after we complete each connection.
1955 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
1956 probably still broken.
1958 * bus/services.c (bus_registry_acquire_service): implement max
1959 number of services owned, and honor allow/deny rules on which
1960 services a connection can own.
1962 * bus/connection.c (bus_connection_get_policy): report errors here
1964 * bus/activation.c: implement limit on number of pending
1967 2003-04-25 Havoc Pennington <hp@redhat.com>
1969 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
1970 where we used >= 0 instead of != DBUS_UID_UNSET.
1972 2003-04-25 Havoc Pennington <hp@redhat.com>
1974 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
1975 were toggled without add/remove, fix from Anders Gustafsson
1977 2003-04-24 Havoc Pennington <hp@redhat.com>
1979 * test/data/valid-config-files/basic.conf: add <limit> tags to
1982 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
1983 <limit> tag in configuration file.
1985 2003-04-24 Havoc Pennington <hp@redhat.com>
1987 * bus/dispatch.c: somehow missed some name_is
1989 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
1990 (_dbus_timeout_set_interval): new
1992 * bus/connection.c (bus_connections_setup_connection): record time
1993 when each connection is first set up, and expire them after the
1994 auth timeout passes.
1996 2003-04-24 Havoc Pennington <hp@redhat.com>
1998 * dbus/dbus-message.c (dbus_message_name_is): rename
1999 (dbus_message_service_is): rename
2000 (dbus_message_sender_is): rename
2001 (dbus_message_get_service): rename
2003 2003-04-24 Havoc Pennington <hp@redhat.com>
2005 * configure.in: add --enable-checks
2007 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2009 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2010 to use thread locks.
2011 (_dbus_connection_handler_destroyed_locked): move some private
2012 functions into proper docs group
2014 * dbus/dbus-internals.h: add _dbus_return_if_fail,
2015 _dbus_return_val_if_fail
2017 Throughout: use dbus_return_if_fail
2019 2003-04-23 James Willcox <jwillcox@gnome.org>
2022 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2023 (dbus_connection_setup_with_g_main),
2024 (dbus_server_setup_with_g_main):
2025 * glib/test-dbus-glib.c: (main):
2026 * glib/test-thread-client.c: (main):
2027 * glib/test-thread-server.c: (new_connection_callback), (main):
2028 * tools/dbus-monitor.c: (main):
2030 Added a GMainContext argument to dbus_connection_setup_with_g_main()
2031 and dbus_server_setup_with_g_main().
2033 2003-04-20 Havoc Pennington <hp@pobox.com>
2035 * doc/dbus-specification.sgml: document the restrictions on
2036 message and service names
2038 2003-04-22 Havoc Pennington <hp@redhat.com>
2040 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2041 support, and do some code cleanups to share more code and
2042 speed up array marshal/demarshal.
2044 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2046 * configure.in: generate dbus-arch-deps.h
2048 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2051 2003-04-22 Havoc Pennington <hp@redhat.com>
2053 * test/data/valid-messages/opposite-endian.message: fix test
2054 to use proper type for rply field
2056 * test/data/invalid-messages: add tests for below validation
2058 * dbus/dbus-message.c (decode_header_data): validate field types,
2059 and validate that named fields are valid names
2060 (decode_name_field): consider messages in the
2061 org.freedesktop.Local. namespace to be invalid.
2063 * dbus/dbus-string.c (_dbus_string_validate_name): new
2065 2003-04-19 Havoc Pennington <hp@pobox.com>
2067 * bus/driver.c (bus_driver_handle_hello): check limits and
2068 return an error if they are exceeded.
2070 * bus/connection.c: maintain separate lists of active and inactive
2071 connections, and a count of each. Maintain count of completed
2072 connections per user. Implement code to check connection limits.
2074 * dbus/dbus-list.c (_dbus_list_unlink): export
2076 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2077 number of bytes in the message queue for a connection
2079 2003-04-18 Havoc Pennington <hp@pobox.com>
2081 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2083 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2086 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2087 on realloc be sure to update the pointer in the keyring
2089 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2090 offset to avoid writing to unallocated memory
2092 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2093 try the next mechanism, so we properly handle OOM
2095 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2097 (_dbus_keyring_new): fix OOM bug
2098 (_dbus_keyring_new_homedir): always set error; impose a maximum
2099 number of keys we'll load from the file, mostly to speed up the
2100 test suite and make its OOM checks more useful, but also for
2103 * dbus/dbus-auth.c (process_error_server): reject authentication
2104 if we get an error from the client
2105 (process_cancel): on cancel, send REJECTED, per the spec
2106 (process_error_client): send CANCEL if we get an error from the
2109 2003-04-18 Havoc Pennington <hp@pobox.com>
2111 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2114 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2117 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2118 about DBUS_TEST_HOMEDIR once
2120 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2123 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2124 config file so we test the right thing
2126 Throughout: assorted docs improvements
2128 2003-04-18 Havoc Pennington <hp@pobox.com>
2130 * glib/dbus-gmain.c: adapt to watch changes
2132 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2134 * dbus/dbus-server.h: remove dbus_server_handle_watch
2136 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2138 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2139 like DBusTimeout, so we don't need dbus_connection_handle_watch
2142 2003-04-17 Havoc Pennington <hp@redhat.com>
2144 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2145 database usage so it all goes via the DBusUserDatabase cache.
2147 2003-04-17 Havoc Pennington <hp@redhat.com>
2149 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2150 there was an OOM watch we skipped, we always return TRUE so we
2151 iterate again to have a look at it again. Fixes test suite hang.
2152 Code rearrangement also lets us lose some memset and only iterate
2153 over callbacks once.
2155 * bus/driver.c (bus_driver_handle_message): sense of test for
2158 2003-04-16 Havoc Pennington <hp@pobox.com>
2160 * doc/dbus-specification.sgml: make spec say serials are unsigned
2162 * dbus/dbus-message.h: change message serials to unsigned
2164 * dbus/dbus-connection.c: adapt to message serials being unsigned
2166 2003-04-15 Havoc Pennington <hp@pobox.com>
2168 * bus/bus.c: create and keep around a shared DBusUserDatabase
2171 * bus/connection.c (bus_connection_get_groups): don't cache
2172 groups for user in the connection object, since user database
2173 object now does that.
2175 2003-04-16 Havoc Pennington <hp@redhat.com>
2177 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2178 list of size counters
2179 (_dbus_message_loader_putback_message_link): put back a popped link
2181 * dbus/dbus-connection.c
2182 (dbus_connection_set_max_live_messages_size): rename
2184 (dbus_connection_get_outgoing_size): get size of outgoing
2186 (_dbus_connection_set_connection_counter): remove this cruft
2188 2003-04-14 Havoc Pennington <hp@redhat.com>
2190 * dbus/dbus-userdb.c: user database abstraction, mostly to get
2191 caching, but at some point we might want to be able to use a
2194 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2195 SHA1 conf file to test the sha1 auth mechanism, since the regular
2196 test always uses EXTERNAL when available.
2199 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2200 add conf file that requires use of sha1 auth
2202 2003-04-13 Havoc Pennington <hp@pobox.com>
2204 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2205 from Philip Blundell to send messages and monitor them.
2207 2003-04-13 Havoc Pennington <hp@pobox.com>
2209 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2212 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2215 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2216 fix to only recover unused bytes if we're already authenticated
2217 (_dbus_transport_get_is_authenticated): fix to still mark us
2218 authenticated if there are unused bytes.
2220 * bus/dispatch.c: implement security policy checking
2222 * bus/connection.c (bus_transaction_send_from_driver): new
2224 * bus/bus.c (bus_context_check_security_policy): new
2226 * bus/dispatch.c (send_service_nonexistent_error): delete this,
2227 now we just set the DBusError and it gets converted to an error
2230 * bus/connection.c (allow_user_function): enable code using actual
2231 data from the config file
2233 * bus/policy.c (list_allows_user): handle wildcard rules for
2234 user/group connection perms
2236 2003-04-13 Havoc Pennington <hp@pobox.com>
2238 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2240 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2242 * bus/policy.c (bus_policy_append_mandatory_rule)
2243 (bus_policy_append_default_rule, bus_policy_append_user_rule)
2244 (bus_policy_append_group_rule): new functions
2246 2003-04-12 Havoc Pennington <hp@pobox.com>
2248 * bus/config-parser.c (bus_config_parser_new): fix a memleak
2250 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2251 the pid/gid/uid, just for paranoia.
2253 * test/break-loader.c (randomly_do_n_things): find a byte
2254 containing a type code, and randomly change it to a different
2257 2003-04-12 Havoc Pennington <hp@pobox.com>
2259 * bus/policy.h: change BusPolicy to be the thing from the config
2260 file, and rename old BusPolicy to BusClientPolicy
2262 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2263 match change in how policy works
2265 * dbus/dbus-internals.h: mark assert_not_reached as
2266 __attribute((noreturn))__
2268 2003-04-11 Havoc Pennington <hp@redhat.com>
2270 * doc/dbus-specification.sgml: fix a spot with the wrong name for
2271 the broadcast service. Use boolean return for ServiceExists.
2273 2003-04-11 Havoc Pennington <hp@redhat.com>
2275 * configure.in: add another directory to look for qt in.
2277 2003-04-11 Havoc Pennington <hp@redhat.com>
2279 * AUTHORS: add Colin Walters
2281 2003-04-11 Havoc Pennington <hp@redhat.com>
2287 2003-04-11 Havoc Pennington <hp@redhat.com>
2289 * bus/messagebus.in: remove pid file when stopping the
2290 message bus, since the bus won't have privileges to remove it
2293 2003-04-11 Havoc Pennington <hp@redhat.com>
2295 * bus/bus.c (bus_context_new): move credentials change after
2298 2003-04-11 Havoc Pennington <hp@pobox.com>
2300 * test/decode-gcov.c: add "below average functions" to the
2301 coverage report, and change how some of the code works.
2303 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
2304 not in the coverage stats.
2306 * test/test-service.c (main): use _dbus_verbose not fprintf in a
2307 couple places so running the test suite doesn't result in megaspam.
2309 2003-04-11 Havoc Pennington <hp@pobox.com>
2311 * bus/dispatch.c (check_existent_service_activation): accept a no
2312 memory error in a place we didn't before
2314 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
2315 in case the first one failed," since the test suite is less
2318 2003-04-10 Havoc Pennington <hp@pobox.com>
2320 * bus/dispatch.c (check_segfault_service_activation): add test
2321 for launching an executable that just crashes.
2323 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
2324 don't leave a million cores. We'll see how portable this is.
2326 2003-04-10 Havoc Pennington <hp@pobox.com>
2328 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
2329 the possible parent failures before we fork, so that we don't
2330 fail to create a babysitter after creating the child.
2332 * bus/activation.c (bus_activation_activate_service): kill child
2333 if we don't successfully complete the activation.
2335 2003-04-10 Havoc Pennington <hp@redhat.com>
2337 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
2338 the connection if it's disconnected
2340 * bus/activation.c (bus_activation_service_created): use new
2341 transaction features to roll back removal of pending activation if
2342 we don't successfully create the service after all. Don't remove
2343 pending activation if the function fails.
2345 * dbus/dbus-list.c (_dbus_list_insert_before_link)
2346 (_dbus_list_insert_after_link): new code to facilitate
2349 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
2350 new functionality, so we can preallocate the ability to insert
2353 * bus/connection.c (bus_transaction_add_cancel_hook): new function
2354 allowing us to put custom hooks in a transaction to be used for
2355 cancelling said transaction
2357 * doc/dbus-specification.sgml: add some discussion of secondary
2358 service owners, and disallow zero-length service names
2360 * bus/services.c (bus_registry_acquire_service): new function,
2361 splits out part of bus_driver_handle_acquire_service() and fixes
2362 a bug where we didn't remove the service doing the acquiring
2363 from the secondary queue if we failed to remove the current owner
2364 from the front of the queue.
2366 2003-04-10 Alexander Larsson <alexl@redhat.com>
2368 * doc/dbus-specification.sgml:
2369 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
2371 2003-04-10 Alexander Larsson <alexl@redhat.com>
2376 Added files to cvsignore
2378 * dbus/dbus-message.h:
2379 * dbus/dbus-message.c: (dbus_message_iter_get_named):
2380 Make get_named() take two out argument and return a boolean.
2381 (dbus_message_iter_get_args_valist):
2382 Update usage of get_named().
2383 (dbus_message_iter_append_byte):
2385 (dbus_message_iter_append_named)
2387 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
2390 2003-04-10 Alexander Larsson <alexl@redhat.com>
2392 * dbus/dbus-marshal.[ch]:
2393 Add array_type_pos argument to _dbus_marshal_validate_arg.
2394 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
2396 * dbus/dbus-message.[ch]:
2397 Multi-dimensional arrays have full type specification in the
2398 outermost array. Iter code re-arranged to handle this.
2399 Added some more iter tests.
2401 * doc/dbus-specification.sgml:
2404 Update new array encoding description.
2405 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
2407 * test/data/invalid-messages/array-with-mixed-types.message:
2408 * test/data/valid-messages/array-of-array-of-uint32.message:
2409 Change to the new array format.
2411 * test/data/invalid-messages/too-short-dict.message:
2414 * test/data/valid-messages/recursive-types.message:
2415 Fix up and extend test.
2417 2003-04-10 Havoc Pennington <hp@pobox.com>
2419 * bus/dispatch.c: lots of fixes
2421 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
2422 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
2423 that was crack, broke the test service.
2425 * dbus/dbus-transport.c (_dbus_transport_open): fix error
2426 handling to avoid piling up errors if we get a failure on the
2429 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
2430 pid in assertion failures.
2432 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
2433 to some fixed size of file descriptor array. Don't return TRUE
2434 anytime a timeout exists, that led to lots of busy loop silliness
2437 2003-04-09 Havoc Pennington <hp@redhat.com>
2439 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
2440 I'd checked this in earlier but hadn't.
2442 2003-04-09 Havoc Pennington <hp@redhat.com>
2444 * bus/dispatch.c (bus_dispatch_test): get a bit further through
2445 the activation test (man this is getting old!)
2447 2003-04-09 Havoc Pennington <hp@redhat.com>
2449 * test/test-utils.c: use dispatch status function to fix this up
2451 * bus/connection.c (connection_watch_callback): don't dispatch
2453 (connection_timeout_callback): don't dispatch from here
2454 (bus_connections_setup_connection): set the dispatch status function
2455 (bus_connection_disconnected): unset it
2457 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
2458 used to add a connection to be dispatched
2459 (_dbus_loop_iterate): do the dispatching at the end of each
2462 * dbus/dbus-connection.c
2463 (dbus_connection_set_dispatch_status_function): new function
2464 allowing us to fix up main loop usage
2465 (_dbus_connection_last_unref): free all the various function
2467 (dbus_connection_dispatch): call the DispatchStatusFunction
2468 whenever this function returns
2469 (dbus_connection_handle_watch): call DispatchStatusFunction
2470 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
2471 (reply_handler_timeout): call DispatchStatusFunction
2472 (dbus_connection_flush): call DispatchStatusFunction
2474 2003-04-09 Havoc Pennington <hp@redhat.com>
2476 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
2479 * bus/dispatch.c (check_service_activated): fix bug in test
2481 * dbus/dbus-mainloop.c (check_timeout): fix this up
2483 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
2484 verbose output so we can sort out output from different processes,
2485 e.g. in the activation case.
2487 2003-04-08 Colin Walters <walters@gnu.org>
2489 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
2491 (bus_context_new): Set it.
2492 (bus_context_unref): Use it to delete the pid file.
2494 2003-04-08 Havoc Pennington <hp@redhat.com>
2496 * test/data/invalid-messages/array-with-mixed-types.message:
2497 regression test that fails for the moment
2499 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
2500 tests for convenience
2502 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
2503 array of nil, it broke things.
2505 * test/data/invalid-messages/array-of-nil.message: regression test
2507 * test/data/valid-messages/array-of-array-of-uint32.message:
2508 happened to write this so added it to suite
2510 2003-04-08 Havoc Pennington <hp@redhat.com>
2512 * bus/driver.c (bus_driver_handle_acquire_service): init
2513 retval/reply before checking name
2515 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
2516 recursion depth argument
2518 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
2519 in the public struct for future extension
2521 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
2524 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
2527 * doc/dbus-specification.sgml: fix typo
2529 2003-04-08 Alexander Larsson <alexl@redhat.com>
2531 Implemented recursive types, named types and new-style iters
2534 * glib/test-thread-client.c: (thread_func):
2535 * glib/test-thread-server.c: (handle_test_message):
2536 * test/test-service.c: (handle_echo):
2545 * dbus/dbus-internals.c: (_dbus_type_to_string):
2546 Update for new types.
2548 * dbus/dbus-marshal.[ch]:
2549 Implement recursive types and the new marshalling format.
2550 Remove hardcoded dict marshalling.
2551 Marshal named types.
2553 * dbus/dbus-message-builder.c:
2555 Remove references to old types
2557 * dbus/dbus-message.[ch]:
2558 New non-refcounted iter API that supports recursive iters.
2559 Use iters for appending, including support for recursive
2561 Add byte and named type support.
2562 Update everything to new marshalling formats.
2563 Add tests for new API.
2565 * dbus/dbus-protocol.h:
2566 Remove old array types.
2567 Add types: BYTE, ARRAY, DICT, NAMED
2569 * dbus/dbus-string.c:
2570 * dbus/dbus-sysdeps.c:
2571 Make parse_double locale safe.
2573 * dbus/dbus-test-main.c:
2579 * doc/dbus-specification.sgml:
2582 * test/data/incomplete-messages/missing-body.message:
2583 * test/data/invalid-messages/bad-boolean.message:
2584 * test/data/invalid-messages/bad-boolean-array.message:
2585 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
2586 * test/data/invalid-messages/boolean-has-no-value.message-raw:
2587 * test/data/invalid-messages/too-short-dict.message:
2588 * test/data/valid-messages/dict-simple.message:
2589 * test/data/valid-messages/dict.message:
2590 * test/data/valid-messages/emptiness.message:
2591 * test/data/valid-messages/lots-of-arguments.message:
2592 * test/data/valid-messages/no-padding.message:
2593 * test/data/valid-messages/recursive-types.message:
2594 Add missing NAME fields
2595 Fix up dicts & arrays
2597 * test/data/invalid-messages/dict-with-nil-value.message:
2598 Removed, this is not invalid anymore.
2600 * test/data/valid-messages/recursive-types.message:
2601 Add new test for deeply recursive types.
2603 2003-04-07 Havoc Pennington <hp@pobox.com>
2605 * bus/driver.c (bus_driver_handle_acquire_service): return an
2606 error if you try to acquire a service that starts with ':'
2608 2003-04-07 Havoc Pennington <hp@redhat.com>
2610 * doc/dbus-specification.sgml: require that base service names
2611 start with ':' and that the base service is created/deleted
2612 as first and last things a connection does on the bus
2614 * bus/dispatch.c (check_existent_service_activation): lots more
2615 work on the activation test; it doesn't fully pass yet...
2617 * test/test-service.c (main): fix so we don't memleak the
2618 connection to the message bus
2619 (filter_func): accept a message asking us to exit
2621 2003-04-06 Havoc Pennington <hp@pobox.com>
2623 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
2626 * configure.in: fixes to Qt detection from Colin Walters
2628 * doc/Makefile.am: Only remove generated docbook dirs if they
2629 exist, from Colin Walters
2631 * dbus/dbus-bus.c: change how we set well-known connections to
2632 NULL, so that it works if a single connection is stored in
2633 two well-known array slots.
2635 * test/Makefile.am: remove a lot of stuff that isn't immediately
2636 useful, it's in CVS history if we want it.
2638 * test/test-service.c: use dbus-mainloop instead of that
2641 2003-04-06 Havoc Pennington <hp@pobox.com>
2643 * dbus/Makefile.am: split lists of sources into stuff that goes in
2644 the library, util functions that go in the lib and are also used
2645 elsewhere, and util functions that are used in tests/daemon but
2646 don't go in the lib.
2648 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
2649 here so it can be used in test binaries also
2651 2003-04-06 Havoc Pennington <hp@pobox.com>
2653 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
2654 here in the parent process, so we can return an error if it
2655 fails. Also, move some of the code into the child so the parent
2656 is less hosed if we fail midway through.
2658 * bus/bus.c (bus_context_new): move pidfile detection further up
2659 in the function, before we start overwriting sockets and such.
2661 * bus/messagebus.in: adjust this a bit, not sure if it will work.
2663 * configure.in: add --with-system-pid-file and --with-system-socket
2665 2003-04-06 Colin Walters <walters@verbum.org>
2667 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
2669 * bus/system.conf.in: Declare a pidfile.
2671 * bus/bus.c (bus_context_new): Test for an existing pid file, and
2672 create one (if appropriate).
2674 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
2675 (struct BusConfigParser) [pidfile]: New.
2676 (element_type_to_name, merge_included, start_busconfig_child)
2677 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
2678 (bus_config_parser_unref): Free it.
2679 (bus_config_parser_get_pidfile): New function.
2681 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
2683 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
2685 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
2687 * dbus/dbus-sysdeps.h: Prototype it.
2689 2003-04-06 Havoc Pennington <hp@pobox.com>
2691 * bus/bus.c (bus_context_new): print the address in here, rather
2692 than in main(), because we need to do it before forking the daemon
2694 * bus/dispatch.c (send_service_nonexistent_error): set the sender
2695 on the service nonexistent error
2697 * bus/driver.c (bus_driver_handle_acquire_service): set the
2698 sender on the AcquireService reply
2700 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
2701 server also listen on a UNIX socket so services can connect to it.
2703 2003-04-06 Havoc Pennington <hp@pobox.com>
2705 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
2706 so it detects deadlocks and also we actually init threads when
2709 2003-04-06 Havoc Pennington <hp@pobox.com>
2711 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2712 save the domain socket name, and unlink it when we disconnect the
2713 server. Means that at least when we exit normally, we won't leave
2714 a bunch of junk in /tmp
2716 * dbus/dbus-transport-unix.c
2717 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
2718 memory management). (I was making a real change here but then
2721 2003-04-06 Havoc Pennington <hp@pobox.com>
2723 * bus/bus.c (bus_context_new): fix wrong handling of
2724 server_data_slot_unref() in the error case.
2726 * dbus/dbus-internals.h (_dbus_assert): change so it passes
2727 "(condition) != 0" to _dbus_real_assert so that
2728 "_dbus_assert (pointer)" doesn't cause a warning
2730 * bus/main.c (main): accept --print-address option to print out
2731 the message bus address
2733 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
2735 * dbus/dbus-transport.c (_dbus_transport_open): special error for
2736 "tmpdir" option to unix: address on client side
2738 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
2741 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
2742 we can use to create sockets in the test suite.
2744 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
2745 cleanly. To be used for testing.
2747 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
2749 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
2751 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
2752 handle trying to call this when there's no servers active
2754 2003-04-05 Havoc Pennington <hp@pobox.com>
2760 2003-04-05 Havoc Pennington <hp@pobox.com>
2762 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
2763 crash on startup. Need to get "try starting the daemon"
2764 in the test suite I guess. ;-)
2766 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
2767 tracked the number of open connections; it's better done in
2768 application-specific code as you want it to span all servers etc.
2770 2003-04-05 Havoc Pennington <hp@pobox.com>
2772 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
2773 patch from Colin Walters
2775 2003-04-05 Havoc Pennington <hp@pobox.com>
2777 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
2778 reality; in fact multiple mechanisms are allowed.
2780 * dbus/dbus-internals.c (_dbus_real_assert)
2781 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
2782 _dbus_assert_not_reached() into functions, so that they don't show
2783 up in basic block counts for test coverage, and don't use up as
2784 much disk space. Does mean slower execution speed though, so
2785 assumes --disable-asserts is the normal production case.
2787 2003-04-05 Havoc Pennington <hp@pobox.com>
2789 * test/Makefile.am (dist-hook): also dist *.in files
2795 2003-04-05 Havoc Pennington <hp@pobox.com>
2797 * dbus/dbus-string.c: docs warning
2799 * dbus/dbus-spawn.c: missing docs
2801 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
2803 2003-04-05 Havoc Pennington <hp@pobox.com>
2805 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
2808 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
2809 to -1 once we've reaped the babysitter
2810 (_dbus_babysitter_handle_watch): do as much work as we can, not
2813 * bus/activation.c: add code using DBusBabysitter so that we
2814 handle it when a service fails to start up properly.
2815 (bus_activation_service_created): don't remove the activation
2816 entries as we go, just let them get removed when we free the pending
2817 activation. Unref reply messages after sending them.
2819 2003-04-05 Havoc Pennington <hp@pobox.com>
2821 * test/decode-gcov.c (main): print per-directory stats in the report
2823 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
2825 2003-04-05 Havoc Pennington <hp@pobox.com>
2827 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
2829 * test/decode-gcov.c: hack up a little program to suck data
2830 out of gcov files. Yes this is sort of silly.
2832 * configure.in: define something in config.h and do an
2833 AM_CONDITIONAL when gcov is enabled
2835 2003-04-04 Havoc Pennington <hp@redhat.com>
2837 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
2838 return a "babysitter" object that is used to monitor the status of
2839 the spawned process and reap it when required.
2841 * test/test-segfault.c, test/test-exit.c,
2842 test/test-sleep-forever.c: binaries that do various lame things,
2843 used in the test suite.
2845 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
2847 2003-04-03 Havoc Pennington <hp@pobox.com>
2849 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
2850 in preparation for modifying it, dbus-sysdeps is getting
2853 2003-04-03 Havoc Pennington <hp@redhat.com>
2855 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
2858 * bus/*.[hc]: adapt to mainloop change
2860 2003-04-03 Havoc Pennington <hp@redhat.com>
2862 * bus/activation.c (load_directory): fix up memleaks
2863 (bus_activation_entry_free): free the entry
2865 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
2866 we get one from the message bus; fix memleaks.
2868 * dbus/dbus-message.c (dbus_set_error_from_message): new function
2870 2003-04-03 Havoc Pennington <hp@pobox.com>
2872 * bus/config-parser.c (bus_config_parser_unref): free
2873 list of mechanisms, bug discovered by test suite enhancements
2874 (putting system.conf and session.conf into suite)
2876 * test/Makefile.am, test/test-service.c: add placeholder for a
2877 test service that we'll activate as part of test suite. Doesn't
2880 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
2881 setting NULL value, and use system malloc not dbus_malloc()
2882 when we have unavoidable memleakage.
2884 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
2885 didn't work, and support DBUS_BUS_ACTIVATION.
2887 * bus/activation.c (child_setup): pass our well-known bus type to
2890 * bus/config-parser.c: support <type> to specify well-known type
2892 * doc/dbus-specification.sgml: document the env variables to
2893 locate well-known buses and find service activator
2895 2003-04-02 Havoc Pennington <hp@redhat.com>
2897 * test/Makefile.am (all-local): add a rule to copy tests to
2898 builddir, so we can have generated tests. Use this to remove the
2899 silly hack for testing system.conf and session.conf. Will use this
2900 shortly to generate .service files pointing to test binaries.
2902 2003-04-02 Havoc Pennington <hp@redhat.com>
2904 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
2905 current alloc and needed new length, not max of the doubled
2906 allocation and needed new length. Also, when building tests,
2907 don't do the double-allocation stuff, just realloc every time.
2909 2003-04-02 Havoc Pennington <hp@redhat.com>
2911 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
2913 (_dbus_string_get_dirname): new
2914 (_dbus_sysdeps_test): new
2915 (_dbus_directory_open): include dirnames in error messages
2917 * bus/config-parser.c: interpret <include> and <includedir> and
2918 <servicedir> relative to config file location if the given
2919 filename is not absolute.
2921 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
2923 2003-04-02 Havoc Pennington <hp@redhat.com>
2925 * bus/connection.c (bus_transaction_send_error_reply): set sender
2926 service for the error, and unref the reply on success
2928 * bus/activation.c: convert to use BusTransaction so OOM can be
2930 (bus_activation_service_created): set sender of the message
2932 2003-04-01 Havoc Pennington <hp@redhat.com>
2934 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
2935 <includedir> (at least mostly)
2937 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
2938 first, then the user ID
2940 2003-04-01 Havoc Pennington <hp@pobox.com>
2942 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
2945 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
2947 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
2949 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
2950 socket 0777, and unlink any existing socket.
2952 * bus/bus.c (bus_context_new): change our UID/GID and fork if
2953 the configuration file so specifies; set up auth mechanism
2956 * bus/config-parser.c (bus_config_parser_content): add support
2957 for <fork> option and fill in code for <auth>
2959 * bus/system.conf.in: add <fork/> to default configuration,
2960 and limit auth mechanisms to EXTERNAL
2962 * doc/config-file.txt (Elements): add <fork>
2964 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
2965 (_dbus_change_identity): new function
2967 2003-03-31 Havoc Pennington <hp@redhat.com>
2969 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
2970 (_dbus_listen_unix_socket): fix off-by-one error in null
2971 termination spotted by Nalin
2973 2003-03-31 Havoc Pennington <hp@redhat.com>
2975 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
2976 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
2977 having a real home directory available.
2979 2003-03-31 Havoc Pennington <hp@redhat.com>
2981 * bus/Makefile.am (install-data-hook): create /var/run/dbus
2983 * bus/messagebus.in: add init script for Red Hat /etc/init.d
2985 * configure.in: add support for specifying a style of init script
2988 2003-03-31 Havoc Pennington <hp@redhat.com>
2990 Fix some annoying DBusString API and fix all affected code.
2992 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
2994 (_dbus_string_get_data): change to return string instead of using
2996 (_dbus_string_get_const_data): ditto
2997 (_dbus_string_get_data_len): ditto
2998 (_dbus_string_get_const_data_len): ditto
3000 2003-03-31 Havoc Pennington <hp@redhat.com>
3002 * bus/main.c (main): fix up the command line arguments to be nicer
3004 2003-03-31 Havoc Pennington <hp@redhat.com>
3006 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3007 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3008 final location that lands in the config file
3010 * bus/config-loader-expat.c (bus_config_load): fix type of
3013 * doc/TODO: remove TODO item for dbus_bus_get()
3015 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3017 2003-03-31 Havoc Pennington <hp@pobox.com>
3019 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3020 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3021 argument since they are always client side
3023 * dbus/dbus-server.c (dbus_server_get_address): new function
3025 * bus/main.c (main): take the configuration file as an argument.
3027 * test/data/valid-config-files/debug-allow-all.conf: new file to
3028 use with dispatch.c tests for example
3030 * bus/test-main.c (main): require test data dir
3032 * bus/bus.c (bus_context_new): change this to take a
3033 configuration file name as argument
3035 * doc/config-file.txt (Elements): add <servicedir>
3037 * bus/system.conf, bus/session.conf: new files
3039 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3040 well-known socket if none set
3042 * configure.in: create system.conf and session.conf
3044 2003-03-30 Havoc Pennington <hp@pobox.com>
3046 * bus/config-parser.c: hacking
3048 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3049 to shut down, since it could cause weirdness with the DBusList
3052 * dbus/dbus-list.c (_dbus_list_test): add tests for the
3053 link-oriented stack routines
3054 (alloc_link): free the mempool if the first alloc from it fails
3056 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3058 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3060 (_dbus_string_skip_white): new
3062 * doc/config-file.txt (Elements): add <includedir>
3064 2003-03-28 Havoc Pennington <hp@pobox.com>
3066 * dbus/dbus-string.c (_dbus_string_copy_data_len)
3067 (_dbus_string_copy_data): new functions
3069 2003-03-28 Anders Carlsson <andersca@codefactory.se>
3071 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3075 * dbus/dbus-memory.c:
3078 2003-03-28 Havoc Pennington <hp@pobox.com>
3080 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3081 I think it may have just been superstition. Not sure.
3083 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3084 failures that were not being handled.
3086 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3088 * dbus/dbus-memory.c: add ability to set number of mallocs in a
3089 row that will fail on out-of-memory.
3091 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3092 function for testing out-of-memory handling.
3094 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3095 allocation functions, they do map exactly to the expat ones.
3097 2003-03-27 Havoc Pennington <hp@redhat.com>
3099 * bus/config-loader-libxml.c (bus_config_load): add another error
3102 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3105 Add note about automatic service activation.
3107 * doc/dbus-specification.sgml:
3108 Rename the specification and clarify a few things.
3110 2003-03-26 Anders Carlsson <andersca@codefactory.se>
3113 * dbus/dbus-address.c:
3115 * dbus/dbus-marshal.c:
3116 * dbus/dbus-server-debug-pipe.c:
3117 * dbus/dbus-transport-unix.c:
3118 Fix documentation warnings.
3120 2003-03-26 Havoc Pennington <hp@pobox.com>
3122 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3123 after every test so it's quick and easy to see which leaked, and
3124 so we test multiple dbus_shutdown() calls
3126 * configure.in: change configure.in XML stuff to also support
3129 * config-loader-libxml.c: some hacking
3131 * config-loader-expat.c: some hacking
3133 * config-parser.c: some hacking, plus tests
3135 2003-03-25 Havoc Pennington <hp@redhat.com>
3137 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3139 * configure.in: add --with-xml option to specify XML library,
3140 right now only libxml is supported.
3142 * bus/config-loader-libxml.c, config-parser.c: sync some minor
3143 nonworking code between home and work, still just stubs
3145 2003-03-24 Havoc Pennington <hp@redhat.com>
3147 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3150 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3151 NULL argument for "message" if the error is a well-known one,
3152 fill in a generic message in this case.
3154 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3157 * bus/test.c (bus_test_flush_bus): add
3159 * bus/policy.c (bus_policy_test): test code stub
3161 2003-03-24 Havoc Pennington <hp@pobox.com>
3163 * bus/connection.c (bus_connections_setup_connection): set up
3164 the "can this user connect" function, but it always returns
3165 TRUE until we have a config file parser so we can have a config
3166 file that allows connections.
3168 2003-03-23 Havoc Pennington <hp@pobox.com>
3170 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3171 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3172 the mutex, so we can check for proper memory management
3175 * dbus/dbus-dataslot.c: remove the mutex from
3176 DBusDataSlotAllocator and lock it manually when using it,
3177 to simplify fitting it into the global slots framework.
3179 * dbus/dbus-threads.c (init_static_locks): rework how we're
3180 handling global locks so they are easily shut down.
3182 * bus/policy.c (bus_policy_append_rule): fix
3184 * bus/test-main.c (main): check for memleaks
3186 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3187 test suite check for memleaks
3189 * dbus/dbus-memory.c: add support in test mode for tracking
3190 number of outstanding blocks
3192 2003-03-23 Havoc Pennington <hp@pobox.com>
3194 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3197 * dbus/dbus-hash.h: add ULONG hash keys
3199 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3200 (_dbus_get_group_id): new function
3202 2003-03-20 Havoc Pennington <hp@redhat.com>
3204 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3206 (dbus_connection_get_unix_user): new function
3208 2003-03-20 Havoc Pennington <hp@pobox.com>
3210 * bus/connection.c (bus_connection_send_oom_error): assert that
3211 message has a sender
3212 (connection_execute_transaction): ditto
3213 (bus_connection_preallocate_oom_error): fix to set the sender, and
3214 set recipient to the destination service, not the bus driver
3216 * bus/policy.c: hacking
3218 * dbus/dbus-message.c (dbus_message_service_is): new function
3219 (dbus_message_sender_is): new
3221 2003-03-19 Havoc Pennington <hp@redhat.com>
3223 * bus/policy.c: start sketching code for policy restrictions on
3224 what connections can do.
3226 2003-03-18 Havoc Pennington <hp@redhat.com>
3228 * doc/TODO: some notes on high-level todo items. Little nitpick
3229 stuff is all in @todo, so no need to add it here.
3231 * doc/config-file.txt: some notes on how config file might look
3233 2003-03-18 Anders Carlsson <andersca@codefactory.se>
3239 2003-03-17 Havoc Pennington <hp@redhat.com>
3241 * dbus/dbus-internals.h: add gcc attributes so that
3242 our printf-style functions warn on bad arguments to
3245 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3248 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3251 2003-03-17 Havoc Pennington <hp@redhat.com>
3253 * bus/test-main.c (main): make it print something as it runs
3254 so make check doesn't look stuck
3256 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3257 from CVS, now obsolete
3259 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3261 * bus/dispatch.c: (bus_dispatch):
3262 Refetch the service name since it may have been reallocated
3263 when dbus_message_set_sender was called.
3265 * dbus/dbus-sysdeps.c: (_dbus_accept):
3266 Add address and address length variables and use them to stop
3267 valgrind from complaining.
3269 2003-03-17 Havoc Pennington <hp@pobox.com>
3271 All tests pass, no memleaks, no valgrind complaints.
3273 * bus/test.c: refcount handler_slot
3275 * bus/connection.c (bus_connections_new): refcount
3276 connection_data_slot
3278 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3279 bytes so that auth scripts pass.
3281 * bus/dispatch.c: init message_handler_slot so it gets allocated
3284 * bus/dispatch.c (message_handler_slot_ref): fix memleak
3286 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3287 dealloc server_pipe_hash when no longer used for benefit of
3290 * dbus/dbus-auth.c (process_command): memleak fix
3292 * bus/dispatch.c (check_hello_message): memleak fix
3294 2003-03-16 Havoc Pennington <hp@pobox.com>
3296 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
3298 2003-03-17 Anders Carlsson <andersca@codefactory.se>
3300 * bus/activation.c (bus_activation_activate_service): Append
3301 the pending activation entry to the list of pending activations.
3303 2003-03-16 Havoc Pennington <hp@pobox.com>
3305 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
3308 * dbus/dbus-address.c (create_entry): fix OOM handling when
3309 failing to alloc entry->method
3311 2003-03-16 Havoc Pennington <hp@pobox.com>
3313 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
3316 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3317 add some missing dbus_set_result
3319 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
3320 alloc the DBusMessageHandler
3322 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
3323 the transport here, since we call this from the finalizer; it
3324 resulted in a double-finalize.
3326 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
3327 where we tried to use transport->connection that was NULL,
3328 happened when transport was disconnected early on due to OOM
3330 * bus/*.c: adapt to handle OOM for watches/timeouts
3332 * dbus/dbus-transport-unix.c: port to handle OOM during
3335 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
3336 reference to unused bytes instead of a copy
3338 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
3341 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
3344 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
3347 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3349 * doc/dbus-specification.sgml:
3350 Document reply message for ActivateService.
3352 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3354 * bus/activation.c: (bus_pending_activation_entry_free),
3355 (bus_pending_activation_free), (bus_activation_new),
3356 (bus_activation_unref), (bus_activation_service_created),
3357 (bus_activation_activate_service):
3359 * bus/bus.c: (bus_context_new):
3360 * bus/desktop-file.c: (new_section):
3361 * bus/driver.c: (bus_driver_send_service_deleted),
3362 (bus_driver_handle_activate_service):
3363 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
3365 * dbus/dbus-connection.c:
3366 (dbus_connection_send_with_reply_and_block):
3367 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3368 * dbus/dbus-protocol.h:
3369 Make activation work better. Now pending activations will be queued
3370 and the daemon won't try to activate services that are already registered.
3372 2003-03-16 Havoc Pennington <hp@pobox.com>
3374 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
3377 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
3378 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
3380 2003-03-16 Havoc Pennington <hp@pobox.com>
3382 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
3383 this. always run the test suite before commit...
3385 * bus/*: adapt to DBusConnection API changes
3387 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
3388 requires renaming stuff to avoid dbus_connection_dispatch name
3391 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
3394 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3395 separate from _dbus_message_loader_return_buffer()
3397 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
3398 this, because it's now always broken to use; the number of
3399 messages in queue vs. the number still buffered by the message
3400 loader is undefined/meaningless. Should use
3401 dbus_connection_get_dispatch_state().
3402 (dbus_connection_dispatch): rename from
3403 dbus_connection_dispatch_message
3405 2003-03-16 Havoc Pennington <hp@pobox.com>
3407 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
3410 2003-03-16 Anders Carlsson <andersca@codefactory.se>
3412 * dbus/dbus-connection.c:
3413 (dbus_connection_send_with_reply_and_block):
3414 Decrease connection->n_incoming when removing an entry
3416 * dbus/dbus-dict.c: (dbus_dict_entry_free),
3417 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3418 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3419 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
3420 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
3421 (dbus_dict_get_byte_array):
3422 Handle NULL arrays and strings. Also add support for byte arrays.
3424 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
3425 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
3426 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3427 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3428 (_dbus_demarshal_dict), (demarshal_and_validate_len),
3429 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
3430 * dbus/dbus-marshal.h:
3431 Add support for marshalling and demarshalling empty arrays and strings.
3433 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3434 (dbus_message_append_string_array),
3435 (dbus_message_iter_get_boolean),
3436 (dbus_message_iter_get_boolean_array),
3437 (dbus_message_iter_get_int32_array),
3438 (dbus_message_iter_get_uint32_array),
3439 (dbus_message_iter_get_double_array),
3440 (dbus_message_iter_get_byte_array),
3441 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
3442 (check_message_handling):
3443 Add support for getting empty arrays and dicts.
3445 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
3446 Don't do any validation at all for now, that's better than just checking
3449 * test/data/valid-messages/emptiness.message:
3450 New test message with lots of empty arrays.
3452 2003-03-16 Havoc Pennington <hp@pobox.com>
3454 * dbus/dbus-connection.c
3455 (_dbus_connection_queue_received_message_link): new function that
3456 can't fail due to OOM
3458 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
3459 new function pops a message together with a list link
3462 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
3463 message queuing functions to avoid needing to alloc memory
3465 2003-03-16 Havoc Pennington <hp@pobox.com>
3467 Oops - test code was only testing failure of around 30 of the
3468 mallocs in the test path, but it turns out there are 500+
3469 mallocs. I believe this was due to misguided linking setup such
3470 that there was one copy of dbus_malloc etc. in the daemon and one
3471 in the shared lib, and only daemon mallocs were tested. In any
3472 case, the test case now tests all 500+ mallocs, and doesn't pass
3473 yet, though there are lots of fixes in this patch.
3475 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
3476 this so that it doesn't need to allocate memory, since it
3477 has no way of indicating failure due to OOM (and would be
3478 annoying if it did).
3480 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
3482 * bus/Makefile.am: rearrange to create two self-contained
3483 libraries, to avoid having libraries with overlapping symbols.
3484 that was resulting in weirdness, e.g. I'm pretty sure there
3485 were two copies of global static variables.
3487 * dbus/dbus-internals.c: move the malloc debug stuff to
3490 * dbus/dbus-list.c (free_link): free list mempool if it becomes
3493 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
3495 * dbus/dbus-address.c (dbus_parse_address): free list nodes
3498 * bus/dispatch.c (bus_dispatch_add_connection): free
3499 message_handler_slot when no longer using it, so
3500 memory leak checkers are happy for the test suite.
3502 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
3504 * bus/bus.c (new_connection_callback): disconnect in here if
3505 bus_connections_setup_connection fails.
3507 * bus/connection.c (bus_connections_unref): fix to free the
3509 (bus_connections_setup_connection): if this fails, don't
3510 disconnect the connection, just be sure there are no side
3513 * dbus/dbus-string.c (undo_alignment): unbreak this
3515 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
3517 (_dbus_auth_new): fix the order in which we free strings
3520 * bus/connection.c (bus_connection_disconnected): fix to
3521 not send ServiceDeleted multiple times in case of memory
3524 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
3525 get the base service name
3526 (dbus_bus_register_client): don't return base service name,
3527 instead store it on the DBusConnection and have an accessor
3529 (dbus_bus_register_client): rename dbus_bus_register()
3531 * bus/dispatch.c (check_hello_message): verify that other
3532 connections on the bus also got the correct results, not
3533 just the one sending hello
3535 2003-03-15 Havoc Pennington <hp@pobox.com>
3537 Make it pass the Hello handling test including all OOM codepaths.
3538 Now to do other messages...
3540 * bus/services.c (bus_service_remove_owner): fix crash when
3541 removing owner from an empty list of owners
3542 (bus_registry_ensure): don't leave service in the list of
3543 a connection's owned services if we fail to put the service
3546 * bus/connection.c (bus_connection_preallocate_oom_error): set
3547 error flag on the OOM error.
3549 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3550 handle _dbus_transport_set_connection failure
3552 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
3553 to create watches up front and simply enable/disable them as
3555 (unix_connection_set): this can now fail on OOM
3557 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
3558 of enabling/disabling a watch or timeout.
3560 * bus/loop.c (bus_loop_iterate): don't touch disabled
3563 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
3565 2003-03-15 Havoc Pennington <hp@pobox.com>
3567 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
3568 write useful test code, after all that futzing around ;-)
3570 Test does not yet pass because we can't handle OOM in
3571 _dbus_transport_messages_pending (basically,
3572 dbus_connection_preallocate_send() does not prealloc the write
3573 watch). To fix this, I think we need to add new stuff to
3574 set_watch_functions, namely a SetEnabled function so we can alloc
3575 the watch earlier, then enable it later.
3577 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
3578 dbus-memory.c to the convenience lib
3580 * bus/test.c: rename some static functions to keep them clearly
3581 distinct from stuff in connection.c. Handle client disconnection.
3583 2003-03-14 Havoc Pennington <hp@pobox.com>
3585 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
3586 transport, tests more of the real codepath. Set up clients
3587 with bus_setup_debug_client.
3589 * bus/test.c (bus_setup_debug_client): function to set up debug
3590 "clients" on the main loop
3592 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
3595 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
3598 * dbus/dbus-server-debug.c: support a debug server based on pipes
3600 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
3601 (_dbus_close): new function
3603 * configure.in: check for socketpair
3605 2003-03-14 Havoc Pennington <hp@redhat.com>
3607 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
3610 * dbus/dbus-transport-debug.c: rework this a good bit to be
3611 less complicated. hopefully still works.
3613 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
3616 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
3619 * dbus/dbus-message.c (dbus_message_copy): rename from
3620 dbus_message_new_from_message, fix it up to copy
3621 all the message fields, add test case
3623 * bus/dispatch.c (bus_dispatch_test): add some more test code,
3624 not quite passing yet
3626 2003-03-14 Havoc Pennington <hp@pobox.com>
3628 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
3629 until no work remains" in test code. (the large diff here
3630 is just code movement, no actual changes)
3632 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
3633 1, no point waiting around for test code.
3634 (_dbus_server_debug_accept_transport): unref the timeout
3635 after adding it (right?)
3637 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
3639 2003-03-13 Havoc Pennington <hp@redhat.com>
3641 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
3644 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
3647 * dbus/dbus-connection.h: Make AddWatchFunction and
3648 AddTimeoutFunction return a bool so they can fail on out-of-memory
3650 * bus/bus.c (bus_context_new): set up timeout handlers
3652 * bus/connection.c (bus_connections_setup_connection): set up
3655 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
3658 * bus/bus.c (bus_context_new): adapt to changes
3660 * bus/connection.c: adapt to changes
3662 * test/watch.c: adapt to DBusWatch changes
3664 * bus/dispatch.c (bus_dispatch_test): started adding this but
3667 2003-03-14 Anders Carlsson <andersca@codefactory.se>
3669 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
3671 2003-03-13 Havoc Pennington <hp@pobox.com>
3673 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
3674 set up a test framework as for the library
3676 2003-03-12 Havoc Pennington <hp@pobox.com>
3678 Throughout: purge global variables, introduce BusActivation,
3679 BusConnections, BusRegistry, etc. objects instead.
3681 * bus/bus.h, bus/bus.c: introduce BusContext as a global
3684 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
3685 going to redo this a bit differently I think
3687 2003-03-12 Havoc Pennington <hp@redhat.com>
3689 Mega-patch that gets the message bus daemon initially handling
3690 out-of-memory. Work still needed. Also lots of random
3691 moving stuff to DBusError instead of ResultCode.
3693 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
3695 * dbus/dbus-connection.c
3696 (dbus_connection_send_with_reply_and_block): use DBusError
3698 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
3701 * dbus/dbus-connection.c (dbus_connection_send): drop the result
3702 code here, as the only failure possible is OOM.
3704 * bus/connection.c (bus_connection_disconnect):
3705 rename bus_connection_disconnected as it's a notification only
3707 * bus/driver.c (bus_driver_handle_acquire_service): don't free
3708 "name" on get_args failure, should be done by get_args;
3709 don't disconnect client for bad args, just return an error.
3710 (bus_driver_handle_service_exists): ditto
3712 * bus/services.c (bus_services_list): NULL-terminate returned array
3714 * bus/driver.c (bus_driver_send_service_lost)
3715 (bus_driver_send_service_acquired): send messages from driver to a
3716 specific client to the client's unique name, not to the broadcast
3719 * dbus/dbus-message.c (decode_header_data): reject messages that
3720 contain no name field
3721 (_dbus_message_get_client_serial): rename to
3722 dbus_message_get_serial and make public
3723 (_dbus_message_set_serial): rename from set_client_serial
3724 (_dbus_message_set_reply_serial): make public
3725 (_dbus_message_get_reply_serial): make public
3727 * bus/connection.c (bus_connection_foreach): allow stopping
3728 iteration by returning FALSE from foreach function.
3730 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
3731 (dbus_connection_free_preallocated_send)
3732 (dbus_connection_preallocate_send): new API for sending a message
3733 without possibility of malloc failure.
3734 (dbus_connection_send_message): rename to just
3735 dbus_connection_send (and same for whole function family)
3737 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
3739 * dbus/dbus-sysdeps.c (_dbus_exit): new function
3741 * bus/activation.c: handle/return errors
3743 * dbus/dbus-errors.h: add more DBUS_ERROR #define
3745 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
3746 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
3747 (_dbus_result_from_errno): move to this file
3749 2003-03-10 Anders Carlsson <andersca@codefactory.se>
3751 * dbus/dbus-marshal.c:
3752 (_dbus_marshal_set_string):
3753 Take a length argument so we can marshal the correct string
3756 (_dbus_marshal_dict), (_dbus_demarshal_dict),
3757 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
3758 (_dbus_marshal_test):
3759 * dbus/dbus-marshal.h:
3760 Add support for marshalling and demarshalling dicts.
3762 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3763 Add support for TYPE DICT.
3765 * dbus/dbus-message.c: (set_string_field):
3766 Adjust header padding.
3768 (dbus_message_append_args_valist), (dbus_message_append_dict),
3769 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
3770 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
3771 (check_message_handling), (check_have_valid_message):
3772 * dbus/dbus-message.h:
3773 Add functions for setting and getting dicts.
3775 * dbus/dbus-protocol.h:
3781 * doc/dbus-specification.sgml:
3782 Add information about how dicts are marshalled.
3784 * test/data/invalid-messages/dict-with-nil-value.message:
3785 * test/data/invalid-messages/too-short-dict.message:
3786 * test/data/valid-messages/dict-simple.message:
3787 * test/data/valid-messages/dict.message:
3788 Add sample messages containing dicts.
3790 2003-03-08 Anders Carlsson <andersca@codefactory.se>
3792 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
3794 2003-03-07 Anders Carlsson <andersca@codefactory.se>
3797 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
3798 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
3799 (dbus_dict_set_int32), (dbus_dict_set_uint32),
3800 (dbus_dict_set_double), (dbus_dict_set_string),
3801 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3802 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3803 (dbus_dict_set_string_array), (_dbus_dict_test):
3805 Fix according to comments from Havoc.
3807 2003-03-06 Michael Meeks <michael@server.home>
3809 * configure.in: if we don't have kde-config, disable have_qt.
3811 2003-03-07 Anders Carlsson <andersca@codefactory.se>
3816 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
3817 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
3818 (dbus_dict_remove), (dbus_dict_get_value_type),
3819 (dbus_dict_get_keys), (dbus_dict_put_boolean),
3820 (dbus_dict_put_int32), (dbus_dict_put_uint32),
3821 (dbus_dict_put_double), (dbus_dict_put_string),
3822 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
3823 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
3824 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
3825 (dbus_dict_get_int32), (dbus_dict_get_uint32),
3826 (dbus_dict_get_double), (dbus_dict_get_string),
3827 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
3828 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
3829 (dbus_dict_get_string_array), (_dbus_dict_test):
3831 Add DBusDict implementation
3833 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
3837 2003-03-04 Havoc Pennington <hp@pobox.com>
3839 * test/data/auth/*: adapt to changes
3841 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
3842 USERID_BASE64 and change USERNAME_BASE64 to put in username not
3845 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
3846 more stuff from being in a context name, to make the protocol
3847 simpler to deal with
3849 * dbus/dbus-errors.c (dbus_error_has_name): new function
3850 (dbus_error_is_set): new function
3852 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
3853 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
3855 * dbus/dbus-connection.c (dbus_connection_flush): also read
3856 messages during a flush operation
3858 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
3860 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3862 * configure.in: Check for gethostbyname on Solaris.
3864 * dbus/dbus-transport.c: (_dbus_transport_open):
3865 Remove duplicate "tcp" entry.
3867 * doc/dbus-specification.sgml:
3868 Clarify some things.
3870 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3872 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
3873 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
3874 (_dbus_keyring_test):
3875 * dbus/dbus-md5.c: (_dbus_md5_compute):
3876 * dbus/dbus-sha.c: (_dbus_sha_compute):
3879 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3881 * README: Add some things.
3883 2003-03-04 Anders Carlsson <andersca@codefactory.se>
3885 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
3886 after case DBUS_TYPE_BOOELAN.
3888 2003-03-02 Havoc Pennington <hp@pobox.com>
3890 * test/break-loader.c (randomly_set_extreme_ints): add test that
3891 sets really huge and small integers
3893 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
3894 that length of boolean array fits in the string, and that
3895 string has room for boolean value in single-bool case.
3897 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
3898 optional value to "ALIGN" command which is what to fill the
3901 * test/data/valid-messages/no-padding.message: add regression
3902 test for the message padding problem
3904 2003-03-02 Havoc Pennington <hp@pobox.com>
3906 * dbus/dbus-message.c (decode_header_data): fix to always init
3907 message_padding, from Benjamin Dauvergne
3909 2003-03-02 Havoc Pennington <hp@pobox.com>
3915 2003-03-01 Joe Shaw <joe@assbarn.com>
3917 * configure.in: Check for "struct cmsgcred" and try to access its
3918 members for BSD-like unices.
3920 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
3921 _dbus_read_credentials_unix_socket().
3922 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
3923 read() for reading the credential byte off the unix socket. Use
3924 struct cmsgcred on systems that support it.
3926 2003-02-27 Alexander Larsson <alexl@redhat.com>
3930 Make gthreads-2.0 dependency optional. Don't build thread test if
3933 2003-02-27 Havoc Pennington <hp@pobox.com>
3935 * dbus/dbus-connection.c
3936 (dbus_connection_send_message_with_reply_and_block): fix doh!
3937 doh! doh! bug that resulted in never removing a reply from the
3938 queue, no wonder we called get_reply_serial so much ;-)
3940 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
3941 and client serial instead of demarshaling them every time
3943 2003-02-27 Havoc Pennington <hp@pobox.com>
3945 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
3946 more inlined, using dbus-string-private.h, speeds things up
3949 * dbus/dbus-string.c (_dbus_string_free): apply align offset
3950 when freeing the string
3951 (_dbus_string_steal_data): fix for align offset
3952 (undo_alignment): new function
3954 2003-02-26 Havoc Pennington <hp@redhat.com>
3956 All kinds of audit fixes from Owen, plus initial attempt to
3957 handle unaligned memory returned from malloc.
3959 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
3960 leave room for align_offset and nul byte
3961 (fixup_alignment): function to track an align_offset and
3962 ensure real->str is aligned
3963 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
3964 to allow a nul byte plus align offset
3965 (_dbus_string_lock): fix overflow issue
3966 (_dbus_string_init_const_len): add assertions on sanity of len,
3967 assign allocated to be ALLOCATION_PADDING larger than len
3968 (set_length): fixup the overflow handling
3969 (_dbus_string_get_data_len): fix overflow in assertion
3970 (open_gap): detect overflow in size of gap to be opened
3971 (_dbus_string_lengthen): add overflow check
3972 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
3973 (_dbus_string_append): add overflow check
3974 (_dbus_string_append_unichar): overflow
3975 (_dbus_string_delete): fix overflow in assertion
3976 (_dbus_string_copy_len): overflow in assertion
3977 (_dbus_string_replace_len): overflows in assertions
3978 (_dbus_string_find): change to implement in terms of
3979 _dbus_string_find_to
3980 (_dbus_string_find_to): assorted fixage
3981 (_dbus_string_equal_c_str): assert c_str != NULL,
3982 fix logic so the function works
3983 (_dbus_string_ends_with_c_str): fix overflow thingy
3984 (_dbus_string_base64_encode): overflow fix
3985 (_dbus_string_validate_ascii): overflow
3986 (_dbus_string_validate_nul): overflow
3988 2003-02-26 Havoc Pennington <hp@redhat.com>
3990 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
3992 2003-02-26 Alexander Larsson <alexl@redhat.com>
3995 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
3997 * dbus/dbus-connection.c:
3998 * dbus/dbus-connection.h:
3999 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4000 Add dbus_connection_set_wakeup_main_function and use it when queueing
4001 incoming and outgoing messages.
4004 * dbus/dbus-dataslot.c:
4005 Threadsafe usage of DBusDataSlotAllocator
4007 * dbus/dbus-message.c: (dbus_message_get_args_iter):
4010 * dbus/dbus-server-unix.c:
4013 * glib/dbus-gmain.c:
4014 Implement the new wakeup functions for glib.
4017 * glib/test-thread-client.c:
4018 * glib/test-thread-server.c:
4019 * glib/test-thread.h:
4020 Initial cut at some thread test code. Not really done yet.
4022 2003-02-26 Havoc Pennington <hp@pobox.com>
4024 * dbus/dbus-connection.c
4025 (dbus_connection_send_message_with_reply_and_block): fix crash
4026 where we ref'd the outgoing message instead of the returned reply
4028 * dbus/dbus-transport-unix.c (do_authentication): check read watch
4029 at the end of this function, so if we didn't need to read for
4030 authentication, we reinstall it for receiving messages
4032 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4033 a NULL sender for peer-to-peer case
4035 * dbus/dbus-transport-unix.c (check_read_watch): handle
4036 !authenticated case correctly
4038 * glib/dbus-gmain.c: add support for DBusServer
4040 * dbus/dbus-server.c: add data slot support
4042 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4043 return values and handle errors
4045 * dbus/dbus-dataslot.c: factor out the data slot stuff from
4048 * Doxyfile.in (INPUT): add glib subdir
4050 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4051 setup_with_g_main instead of hookup_with_g_main; write docs
4053 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4055 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4056 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4057 * dbus/dbus-message.c: (dbus_message_append_boolean),
4058 (dbus_message_append_boolean_array),
4059 (dbus_message_get_args_valist), (_dbus_message_test):
4060 * dbus/dbus-message.h:
4061 * doc/dbus-specification.sgml:
4062 Various fixes as pointed out by Havoc.
4064 * test/data/invalid-messages/bad-boolean-array.message:
4065 * test/data/invalid-messages/bad-boolean.message:
4066 Add invalid boolean value test cases.
4068 2003-02-24 Anders Carlsson <andersca@codefactory.se>
4070 * dbus/dbus-internals.c: (_dbus_type_to_string):
4071 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4072 (_dbus_marshal_validate_arg):
4073 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4074 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4075 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4076 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4077 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4078 (dbus_message_iter_get_double),
4079 (dbus_message_iter_get_boolean_array), (message_iter_test):
4080 * dbus/dbus-message.h:
4081 * dbus/dbus-protocol.h:
4082 * doc/dbus-specification.sgml:
4083 * test/data/valid-messages/lots-of-arguments.message:
4084 Add support for boolean and boolean array types.
4086 2003-02-23 Havoc Pennington <hp@pobox.com>
4088 * dbus/dbus-keyring.c: finish most of this implementation and
4091 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4092 these barf if the error isn't cleared to NULL
4094 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4095 (_dbus_create_directory): new function
4097 * dbus/dbus-errors.c (dbus_set_error): fix warning
4099 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4100 (_dbus_string_hex_decode): new function
4101 (test_hex_roundtrip): test code
4103 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4105 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4107 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4108 the save-to-temp/rename trick to atomically write the new file
4109 (_dbus_string_parse_uint): new function
4111 2003-02-22 Havoc Pennington <hp@pobox.com>
4113 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4115 2003-02-22 Havoc Pennington <hp@pobox.com>
4117 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4118 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4120 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4122 * dbus/test/data/sha-1: add US government test suite for SHA-1
4124 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4126 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4127 Make string arrays NULL-terminated.
4129 * dbus/dbus-memory.c: (dbus_free_string_array):
4130 * dbus/dbus-memory.h:
4131 New function for freeing NULL-terminated string arrays.
4133 * dbus/dbus-message-builder.c: (append_quoted_string),
4134 (_dbus_message_data_load):
4135 Add support for array types.
4137 * dbus/dbus-message.c: (check_message_handling):
4138 Add more types as test cases.
4140 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4141 (_dbus_string_parse_double):
4142 Add the start offset to the end offset.
4144 * test/data/valid-messages/lots-of-arguments.message:
4145 New test message with lots of arguments.
4147 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4149 * dbus/dbus-message.c: (dbus_message_append_nil),
4150 (dbus_message_append_int32), (dbus_message_append_uint32),
4151 (dbus_message_append_double), (dbus_message_append_string),
4152 (dbus_message_append_int32_array),
4153 (dbus_message_append_uint32_array),
4154 (dbus_message_append_double_array),
4155 (dbus_message_append_byte_array),
4156 (dbus_message_append_string_array):
4157 Fix all out-of-memory handling in these functions.
4159 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4161 * dbus/dbus-message.c: (dbus_message_append_nil):
4164 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4166 * dbus/dbus-message.c: (dbus_message_append_args_valist),
4167 (dbus_message_append_nil), (dbus_message_append_int32_array),
4168 (dbus_message_append_uint32_array),
4169 (dbus_message_append_double_array),
4170 (dbus_message_append_byte_array),
4171 (dbus_message_append_string_array), (dbus_message_get_args_valist),
4172 (dbus_message_iter_get_int32_array),
4173 (dbus_message_iter_get_uint32_array),
4174 (dbus_message_iter_get_double_array),
4175 (dbus_message_iter_get_byte_array),
4176 (dbus_message_iter_get_string_array):
4178 * dbus/dbus-message.h:
4179 Add functions for appending and getting arrays.
4181 2003-02-21 Anders Carlsson <andersca@codefactory.se>
4183 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4184 element size at least 8 bytes, fixes mempool tests on
4187 2003-02-20 Alexander Larsson <alexl@redhat.com>
4189 * dbus/dbus-transport-unix.c (unix_do_iteration):
4190 Unlock the connection mutex during a blocking select call.
4191 Add todo about how we need a way to wake up the select.
4193 * dbus/dbus-connection-internal.h:
4194 * dbus/dbus-connection.c:
4195 Add _dbus_connection_lock and _dbus_connection_unlock.
4197 2003-02-19 Havoc Pennington <hp@pobox.com>
4199 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4200 Doxyfile.in, not Doxyfile
4202 * dbus/dbus-keyring.c: do some hacking on this
4204 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4206 * dbus/dbus-errors.c (dbus_set_error_const): do not call
4208 (dbus_set_error): remove dbus_error_init, check for message ==
4209 NULL *before* we sprintf into it, and add @todo about including
4210 system headers in this file
4212 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4214 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4216 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4217 get various bits of user information based on either username
4219 (_dbus_homedir_from_username): new function
4221 2003-02-19 Anders Carlsson <andersca@codefactory.se>
4224 Add check for nonposix getpwnam_r
4226 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4227 Align the pool element size to a sizeof (void *) boundary.
4229 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4230 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4231 General Solaris fixes.
4233 * test/data/valid-messages/simplest-manual.message:
4234 Explicitly state that we want little-endian packing.
4236 2003-02-19 Mikael Hallendal <micke@codefactory.se>
4238 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4240 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4241 Added to create a transport connecting using a tcp/ip socket.
4243 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4244 to a tcp socket at given host and port.
4245 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4248 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4250 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4251 Added to create a server listening on a TCP/IP socket.
4253 2003-02-19 Havoc Pennington <hp@pobox.com>
4255 Throughout: mop up all the Doxygen warnings and undocumented
4258 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4259 to search any paths.
4261 * dbus/dbus-threads.c: move global mutex initializers to
4262 dbus-internals.h, multiple prototypes was confusing doxygen
4263 besides being kind of ugly
4265 * Doxyfile (PREDEFINED): have Doxygen define
4266 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4267 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4268 (do not abuse the feature! it's for stuff like the autogenerated
4269 macros in dbus-md5.c, not just for things you don't feel like
4272 2003-02-18 Havoc Pennington <hp@pobox.com>
4274 * dbus/dbus-string.c (_dbus_string_zero): new function
4276 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4277 wrap it in some dbus-friendly API
4279 * dbus/dbus-types.h: add 16-bit types
4281 2003-02-18 Joe Shaw <joe@assbarn.com>
4283 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4284 credentials from our currently running process.
4285 (get_word): Fix a buglet where we were copying the entire length
4286 instead of relative to our position.
4288 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4289 keys on the stack... it's 640k of data.
4291 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4292 read the credentials byte off the socket, even if we don't have
4294 (_dbus_poll): Implement poll() using select() for systems which
4297 * glib/test-dbus-glib.c (main): Print out an error if no
4298 parameters are given.
4300 * test/data/auth/fallback.auth-script: Added. Tests that a client
4301 can fallback to a secondary auth mechanism if the first fails.
4303 2003-02-18 Havoc Pennington <hp@pobox.com>
4307 2003-02-17 Havoc Pennington <hp@pobox.com>
4309 * doc/dbus-specification.sgml: lots of cosmetic
4310 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
4311 env variable to DBUS_BUS_ADDRESS, s/client/application/,
4312 s/server/bus/ (except in authentication section). Add a section
4313 "Message Bus Message Routing"
4315 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
4321 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4323 * doc/dbus-specification.sgml:
4324 Specification updates.
4326 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4328 * bus/activation.c: (bus_activation_init), (child_setup),
4329 (bus_activation_activate_service):
4331 * bus/main.c: (main):
4332 Set DBUS_ADDRESS environment variable.
4334 * dbus/dbus-errors.c: (dbus_set_error):
4335 Don't use va_copy since that's a C99 feature.
4337 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
4338 (_dbus_spawn_async):
4339 * dbus/dbus-sysdeps.h:
4340 Add child_setup_func to _dbus_spawn_async.
4342 * doc/dbus-specification.sgml:
4343 Update specification.
4345 * test/spawn-test.c: (setup_func), (main):
4348 2003-02-17 Alexander Larsson <alexl@redhat.com>
4350 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
4353 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4357 * doc/dbus-test-plan.sgml:
4358 Add test plan document.
4363 2003-02-17 Anders Carlsson <andersca@codefactory.se>
4365 * dbus/dbus-message.c: (decode_header_data),
4366 (_dbus_message_loader_return_buffer):
4367 Set the header padding amount when loading a message.
4369 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4371 * bus/dispatch.c: (send_one_message):
4372 Only send broadcast messages to registered connections.
4374 * dbus/dbus-message.c: (dbus_message_name_is):
4375 * dbus/dbus-message.h:
4376 New convenience function.
4378 * dbus/dbus-transport-debug.c: (do_reading):
4379 Only dispatch one message per run.
4382 * test/bus-test.c: (new_connection_callback), (die),
4383 (test_hello_client1_handler), (test_hello_client2_handler),
4384 (test_hello_replies), (main):
4386 * test/bus-test-loop.[ch]:
4389 2003-02-16 Havoc Pennington <hp@pobox.com>
4391 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4392 backward conditional
4394 2003-02-16 Alexander Larsson <alexl@redhat.com>
4396 * dbus/dbus-connection.c:
4397 Implement sent_message_with_reply. (with_reply_and block is still
4399 Made dispatch_message not lose message if OOM.
4401 * dbus/dbus-errors.h:
4402 Add NoReply error (for reply timeouts).
4404 2003-02-16 Alexander Larsson <alexl@redhat.com>
4406 * dbus/dbus-hash.c (_dbus_hash_table_unref):
4407 Actually free keys and values when destroying hashtable.
4409 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4411 * dbus/dbus-auth.c: (client_try_next_mechanism):
4414 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
4415 Return TRUE if there's no thread implementation around.
4417 * glib/dbus-gmain.c: (free_source),
4418 (dbus_connection_hookup_with_g_main):
4419 Make sure to remove the GSource when the connection is finalized.
4421 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4423 * bus/dispatch.c: (bus_dispatch_message_handler):
4424 * dbus/dbus-errors.h:
4425 Return an error if someone tries to send a message to a service
4428 2003-02-16 Anders Carlsson <andersca@codefactory.se>
4430 * bus/activation.c: (load_directory), (bus_activation_init),
4431 (bus_activation_activate_service):
4434 (bus_driver_handle_activate_service), (bus_driver_handle_message):
4435 More work on the activation handling.
4437 * dbus/dbus-errors.h:
4438 Add some error messages
4440 * dbus/dbus-message.c: (dbus_message_new_error_reply):
4441 * dbus/dbus-message.h:
4442 New function that creates an error message.
4444 * dbus/dbus-protocol.h:
4445 Add ACTIVATE_SERVER message.
4447 * dbus/dbus-server-unix.c: (unix_handle_watch),
4448 (_dbus_server_new_for_domain_socket):
4449 Call _dbus_fd_set_close_on_exec.
4451 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
4452 (_dbus_spawn_async), (_dbus_disable_sigpipe),
4453 (_dbus_fd_set_close_on_exec):
4454 * dbus/dbus-sysdeps.h:
4455 Add _dbus_fd_set_close_on exec function. Also add function that checks
4456 that all open fds are set to close-on-exec and warns otherwise.
4458 * dbus/dbus-transport-unix.c:
4459 (_dbus_transport_new_for_domain_socket):
4460 Call _dbus_fd_set_close_on_exec.
4462 2003-02-16 Havoc Pennington <hp@pobox.com>
4464 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
4465 allow people to avoid setting SIGPIPE to SIG_IGN
4466 (_dbus_connection_new_for_transport): disable SIGPIPE unless
4467 we've been asked not to
4469 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4471 * dbus/dbus-list.c: (_dbus_list_append_link),
4472 (_dbus_list_prepend_link):
4473 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
4477 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4480 * bus/activation.c: (bus_activation_entry_free),
4481 (add_desktop_file_entry), (load_directory), (bus_activation_init):
4483 * bus/main.c: (main):
4484 Add simple activation support, doesn't work yet though.
4486 2003-02-15 Zack Rusin <zack@kde.org>
4488 * qt/dbus-qthread.cpp: small casting fix
4490 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4492 * dbus/dbus-errors.c: (dbus_set_error):
4493 * dbus/dbus-errors.h:
4494 Add a few errors and make dbus_set_error void.
4496 * dbus/dbus-sysdeps.c:
4497 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
4498 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
4499 * dbus/dbus-sysdeps.h:
4500 Add _dbus_spawn_async.
4502 * test/spawn-test.c: (main):
4503 Test for _dbus_spawn_async.
4505 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4507 * dbus/dbus-internals.h:
4508 Fix build without tests.
4510 * dbus/dbus-list.c: (alloc_link):
4511 Fix a segfault when a malloc fails.
4513 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
4514 (dbus_malloc0), (dbus_realloc):
4515 Add support for malloc debugging.
4517 2003-02-15 Alexander Larsson <alexl@redhat.com>
4519 * dbus/dbus-threads.c:
4520 * dbus/dbus-threads.h:
4521 Add condvars. Remove static mutext from API.
4522 Implement static mutexes by initializing them from threads_init.
4524 * glib/dbus-gthread.c:
4525 * qt/dbus-qthread.cpp:
4526 Update with the thread api changes.
4531 Turn StaticMutex into normal mutex + init function.
4532 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
4533 _dbus_list_append_link, _dbus_list_prepend_link
4536 * dbus/dbus-sysdeps.c:
4537 * dbus/dbus-sysdeps.h:
4538 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
4539 _dbus_atomic_dec. Only slow fallback implementation at the moment.
4541 * dbus/dbus-protocol.h:
4542 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
4544 * dbus/dbus-message.c:
4545 Make ref/unref atomic.
4548 * dbus/dbus-connection-internal.h:
4549 * dbus/dbus-connection.c:
4550 * dbus/dbus-connection.h:
4552 Change _peek to _borrow,_return & _steal_borrowed.
4553 Change disconnect callback to event.
4554 Make dbus_connection_dispatch_messages reentrant.
4556 * dbus/dbus-transport.c:
4557 Don't ref the connection on calls to the transport
4560 * dbus/dbus-message-handler.c:
4563 * glib/dbus-gmain.c:
4564 Don't use peek_message anymore
4567 * test/debug-thread.c:
4568 * test/debug-thread.h:
4569 Simple thread implementation that asserts() on deadlocks in
4570 single-threaded code.
4573 (main) Call debug_threads_init.
4576 Use disconnect message instead of disconnect callback.
4580 Don't call dbus_connection_set_disconnect_function. Instead export
4581 bus_connection_disconnect.
4584 Call bus_connection_disconnect when we get a disconnected message.
4586 2003-02-15 Havoc Pennington <hp@pobox.com>
4588 * dbus/dbus-message.c (dbus_message_new): fool around with the
4591 2003-02-14 Havoc Pennington <hp@pobox.com>
4593 * dbus/dbus-mempool.c: fail if the debug functions so indicate
4595 * dbus/dbus-memory.c: fail if the debug functions indicate we
4598 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
4599 (_dbus_decrement_fail_alloc_counter): debug functions to
4600 simulate memory allocation failures
4602 2003-02-14 Havoc Pennington <hp@pobox.com>
4604 * dbus/dbus-errors.h (struct DBusError): add a word of padding
4607 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4609 * bus/driver.c: (bus_driver_handle_hello):
4611 * bus/services.c: (bus_service_lookup):
4612 Reorder message sending so we get a more sane order.
4614 * test/bus-test.c: (message_handler):
4617 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4619 * bus/driver.c: (bus_driver_send_service_deleted),
4620 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4621 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4622 (bus_driver_send_welcome_message),
4623 (bus_driver_handle_list_services),
4624 (bus_driver_handle_acquire_service),
4625 (bus_driver_handle_service_exists):
4626 * dbus/dbus-bus.c: (dbus_bus_register_client),
4627 (dbus_bus_acquire_service), (dbus_bus_service_exists):
4628 * dbus/dbus-errors.c: (dbus_result_to_string):
4629 * dbus/dbus-errors.h:
4630 * dbus/dbus-message.c: (dbus_message_append_args),
4631 (dbus_message_append_args_valist), (dbus_message_get_args),
4632 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
4633 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
4634 (dbus_message_iter_get_byte_array),
4635 (dbus_message_iter_get_string_array), (message_iter_test),
4636 (check_message_handling), (_dbus_message_test):
4637 * dbus/dbus-message.h:
4638 * test/bus-test.c: (main):
4639 Change fields to arguments in messages, so that they won't be
4640 confused with header fields.
4642 * glib/test-dbus-glib.c: (main):
4643 Remove append_fields from hello message.
4645 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4647 * dbus/dbus-errors.c:
4648 * dbus/dbus-message.c:
4649 * dbus/dbus-string.c:
4650 Documentation fixes.
4652 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4654 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
4656 Implement support for timeouts in dbus-glib.
4658 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4660 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4661 * dbus/dbus-message.c: (process_test_subdir):
4662 * test/break-loader.c: (find_breaks_based_on):
4663 Plug some memory leaks.
4665 2003-02-13 Richard Hult <rhult@codefactory.se>
4667 * bus/main.c: Fix build.
4669 * dbus/dbus-errors.h:
4670 * dbus/dbus-errors.c: Fix copyright for Anders.
4672 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4677 * bus/connection.c: (bus_connection_foreach):
4680 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
4681 (unescape_string), (new_section), (parse_section_start),
4682 (parse_key_value), (report_error), (bus_desktop_file_load),
4683 (bus_desktop_file_get_string):
4684 * bus/desktop-file.h:
4685 Use DBusError for error reporting.
4687 * bus/dispatch.c: (send_one_message),
4688 (bus_dispatch_message_handler):
4689 * bus/driver.c: (bus_driver_send_service_deleted),
4690 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4691 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4692 (bus_driver_send_welcome_message),
4693 (bus_driver_handle_list_services),
4694 (bus_driver_handle_acquire_service),
4695 (bus_driver_handle_service_exists):
4696 * bus/loop.c: (bus_loop_run):
4698 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
4700 * bus/utils.c: (bus_wait_for_memory):
4702 New files with general utility functions.
4704 * dbus/dbus-internals.h:
4705 Remove _DBUS_HANDLE_OOM.
4707 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4709 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
4710 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
4711 * dbus/dbus-errors.h:
4712 Add DBusError structure.
4714 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4716 * test/data/valid-messages/standard-acquire-service.message:
4717 * test/data/valid-messages/standard-hello.message:
4718 * test/data/valid-messages/standard-list-services.message:
4719 * test/data/valid-messages/standard-service-exists.message:
4720 Add some standard messages.
4722 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4724 * bus/driver.c: (bus_driver_send_welcome_message),
4725 (bus_driver_handle_list_services),
4726 (bus_driver_handle_acquire_service),
4727 (bus_driver_handle_service_exists), (bus_driver_handle_message):
4728 Update for API changes in libdbus.
4730 * dbus/dbus-message.c: (dbus_message_new_reply):
4731 * dbus/dbus-message.h:
4732 Remove the name argument. The spec states that replies shouldn't
4735 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4737 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
4738 (report_error), (bus_desktop_file_load), (lookup_section),
4739 (lookup_line), (bus_desktop_file_get_raw),
4740 (bus_desktop_file_get_string):
4741 * bus/desktop-file.h:
4742 Some fixes, and new functions for getting a key value from a section.
4744 2003-02-13 Havoc Pennington <hp@pobox.com>
4746 * test/data/auth/fail-after-n-attempts.auth-script: new test
4748 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
4751 2003-02-13 Havoc Pennington <hp@pobox.com>
4753 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
4754 dbus_credentials_match were backward
4756 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
4757 NO_CREDENTIALS and ROOT_CREDENTIALS
4759 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
4760 into here. Never process more commands after we've reached an
4761 end state; store further data as unused bytes.
4763 * test/data/auth/*: add more auth tests
4765 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
4766 command to match exact string and EXPECT_UNUSED to match unused
4769 * test/Makefile.am (dist-hook): fix to dist all the test stuff
4771 2003-02-12 Havoc Pennington <hp@pobox.com>
4773 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
4774 \r off of popped lines
4776 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
4779 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
4782 2003-02-12 Havoc Pennington <hp@pobox.com>
4784 * dbus/Makefile.am: remove break-loader from the build, since it
4787 * configure.in: add --enable-gcov to turn on coverage profiling
4788 flags and disable optimization
4790 2003-02-10 Havoc Pennington <hp@pobox.com>
4792 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
4793 initial cut at test framework for DBusAuth from laptop.
4794 Doesn't quite work yet but it compiles and I need to get
4795 it off the 266mhz laptop. ;-)
4797 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
4798 fix a memleak in error case
4800 2003-02-12 Anders Carlsson <andersca@codefactory.se>
4803 * bus/desktop-file.c:
4804 * bus/desktop-file.h:
4805 Add a desktop file parser.
4807 2003-02-11 Zack Rusin <zack@kde.org>
4809 * qt/message.[h|cpp]: sample implementation
4810 of the KDE wrapper for DBusMessage
4812 2003-02-09 Zack Rusin <zack@kde.org>
4814 * test/bus-test.c: make_it_compile
4815 * doc/dbus-specification.sgml: minimal semantic fix
4817 2003-02-06 Anders Carlsson <andersca@codefactory.se>
4823 2003-02-06 Anders Carlsson <andersca@codefactory.se>
4826 * dbus/dbus-break-loader.c:
4828 * test/break-loader.c:
4829 Move dbus-break-loader to test/ and rename it to break-loader.
4831 2003-02-02 Havoc Pennington <hp@pobox.com>
4833 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
4834 for code to manage cookies in your home directory
4836 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
4838 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
4839 to authenticate, then disconnect the client.
4841 2003-02-03 Alexander Larsson <alexl@redhat.com>
4843 * dbus/dbus-message.c (dbus_message_append_fields):
4846 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4848 * doc/dbus-specification.sgml:
4849 Update address format section.
4851 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4854 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
4855 (message_handler), (new_connection_callback), (loop_quit),
4859 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4861 * bus/driver.c: (bus_driver_handle_service_exists):
4862 Simplify the code a bit.
4864 * dbus/dbus-bus.c: (dbus_bus_service_exists):
4867 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4870 Add libdbus-daemon.la and link to it.
4872 2003-02-01 James Willcox <jwillcox@gnome.org>
4874 * bus/driver.c: (bus_driver_handle_own_service):
4875 Actually include the service reply code in the message.
4877 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4879 * bus/driver.c: (bus_driver_handle_service_exists):
4880 Don't unref the incoming message.
4882 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4884 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
4886 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4888 * dbus/dbus-server.c: (dbus_server_listen):
4889 * dbus/dbus-transport.c: (_dbus_transport_open):
4890 ifdef out the calls to the debug transport and server.
4892 2003-02-02 Alexander Larsson <alexl@redhat.com>
4894 * dbus/dbus-watch.c (dbus_watch_get_flags):
4895 Add note in the docs that ERROR or HANGUP won't be returned
4896 and are assumed always on.
4898 * glib/dbus-gmain.c (add_watch):
4899 Always add IO_ERR | IO_HUP
4901 * dbus/dbus-message.h:
4902 Add semicolon after dbus_message_iter_get_string_array().
4903 Makes qt code build again
4905 2003-02-01 Anders Carlsson <andersca@codefactory.se>
4907 * bus/driver.c: (create_unique_client_name),
4908 (bus_driver_handle_hello):
4909 Don't take a name, just use a numeric id to identify
4913 * dbus/dbus-bus.c: (dbus_bus_register_client),
4914 (dbus_bus_acquire_service), (dbus_bus_service_exists):
4916 Add new convenience functions for communicating with the bus.
4918 * dbus/dbus-message.h:
4920 * dbus/dbus-protocol.h:
4923 2003-02-01 Alexander Larsson <alexl@redhat.com>
4925 * dbus/dbus-message.c (dbus_message_append_fields):
4926 Add some more doc comments.
4928 2003-02-01 Havoc Pennington <hp@pobox.com>
4930 * dbus/dbus-break-loader.c (randomly_modify_length): change
4931 a 4-byte value in the message as if it were a length
4933 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
4934 execute bit on saved files
4936 2003-02-01 Havoc Pennington <hp@pobox.com>
4938 * dbus/dbus-break-loader.c (main): new program to find messages
4939 that break the loader.
4941 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
4942 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
4944 * dbus/dbus-string.c (_dbus_string_set_byte): new
4946 2003-01-31 Havoc Pennington <hp@pobox.com>
4948 * dbus/dbus-message.c: refactor the test code to be more general,
4949 in preparation for writing a "randomly permute test cases to
4950 try to break the loader" program.
4952 2003-01-31 Havoc Pennington <hp@pobox.com>
4954 * doc/dbus-specification.sgml: work on the specification
4956 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
4957 the protocol version of the message.
4959 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
4960 no longer specifies that.
4961 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
4964 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
4965 "break" for DBUS_TYPE_NIL, remove @todo
4967 2003-01-31 Havoc Pennington <hp@pobox.com>
4969 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
4970 just set_is_error/get_is_error as this is a commonly-used
4971 function, and write docs.
4973 2003-01-31 Anders Carlsson <andersca@codefactory.se>
4975 * dbus/dbus-address.c: (dbus_address_entry_free):
4976 Free key and value lists.
4978 * dbus/dbus-internals.c: (_dbus_type_to_string):
4979 Add the types we didn't have.
4981 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4982 (_dbus_marshal_validate_arg):
4985 * dbus/dbus-message.c: (dbus_message_set_sender):
4986 Remove todo about being able to set sender to NULL.
4988 (dbus_message_set_is_error_reply),
4989 (dbus_message_get_is_error_reply):
4990 * dbus/dbus-message.h:
4993 * dbus/dbus-protocol.h:
4994 Add error reply flag.
4996 * test/data/valid-messages/opposite-endian.message:
4997 Add NIL type to test.
4999 2003-01-31 Havoc Pennington <hp@pobox.com>
5001 * doc/dbus-specification.sgml: fully specify the header. Add
5002 flags and major protocol version, and change header/body len to
5005 * dbus/dbus-message-builder.c (append_saved_length): append length
5008 * dbus/dbus-message.c (dbus_message_create_header): change header
5009 length and body length to unsigned. Add the new fields from the
5011 (_dbus_message_loader_return_buffer): unsigned header/body len
5013 2003-01-30 Havoc Pennington <hp@pobox.com>
5015 * dbus/dbus-auth.c: rework to use only REJECTED, no
5018 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5019 use REJECTED, suggested by Mark McLoughlin
5021 2003-01-30 Havoc Pennington <hp@pobox.com>
5023 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5024 a better way to report errors here. e.g. "unix address lacks
5025 path" or something. also "no such file" when the path doesn't
5028 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5030 (dbus_parse_address): add @todo about documenting address format,
5031 and allowing , and ; to be escaped
5033 2003-01-30 Anders Carlsson <andersca@codefactory.se>
5036 Add dbus-address.[ch]
5038 * dbus/dbus-address.c: (dbus_address_entry_free),
5039 (dbus_address_entries_free), (create_entry),
5040 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5041 (dbus_parse_address), (_dbus_address_test):
5042 * dbus/dbus-address.h:
5043 New files for dealing with address parsing.
5045 * dbus/dbus-connection.c:
5046 Document timeout functions.
5048 * dbus/dbus-message.c:
5049 Document dbus_message_new_from_message.
5051 * dbus/dbus-server-debug.c:
5054 * dbus/dbus-server.c: (dbus_server_listen):
5055 Parse address and use correct server implementation.
5057 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5058 * dbus/dbus-string.h:
5059 New function with test.
5061 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5065 * dbus/dbus-transport-debug.c:
5068 * dbus/dbus-transport.c: (_dbus_transport_open):
5069 Parse address and use correct transport implementation.
5071 2003-01-30 Havoc Pennington <hp@pobox.com>
5073 * dbus/dbus-message.c: use message->byte_order instead of
5074 DBUS_COMPILER_BYTE_ORDER throughout.
5075 (dbus_message_create_header): pad header to align the
5076 start of the body of the message to 8-byte boundary
5078 * dbus/dbus-marshal.h: make all the demarshalers take const
5079 DBusString arguments.
5081 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5082 validate message args here, so we don't have to do slow validation
5083 later, and so we catch bad messages as they are incoming. Also add
5084 better checks on header_len and body_len. Also fill in
5087 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5088 implemented properly)
5089 (_dbus_string_validate_nul): new function to check all-nul
5091 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5092 get_arg_end_pos and remove all validation
5093 (_dbus_marshal_validate_arg): actually do validation here.
5095 2003-01-29 Havoc Pennington <hp@pobox.com>
5097 * dbus/dbus-message.c (check_message_handling): fix assertion
5098 failure on set_client_serial
5100 2003-01-28 Havoc Pennington <hp@pobox.com>
5102 * dbus/dbus-server-debug.c: Add doc section comments
5104 * dbus/dbus-transport-debug.c: add doc section comments
5106 2003-01-28 Havoc Pennington <hp@redhat.com>
5108 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5109 the reverse order from how I had it
5110 (_dbus_string_base64_encode): reverse encoding order. I was
5111 basically byteswapping everything during encoding.
5113 2003-01-28 Anders Carlsson <andersca@codefactory.se>
5115 * dbus/dbus-connection-internal.h:
5116 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5117 (_dbus_connection_remove_timeout):
5118 Add functions for adding and removing timeouts.
5120 * dbus/dbus-message.c: (dbus_message_new_from_message):
5121 Add new function that takes a message and creates an exact
5122 copy of it, but with the refcount set to 1.
5123 (check_message_handling):
5126 * dbus/dbus-server-protected.h:
5127 * dbus/dbus-server.c: (_dbus_server_init_base),
5128 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5129 (dbus_server_set_timeout_functions):
5130 (_dbus_server_remove_timeout):
5131 New functions so that a server can add and remove timeouts.
5133 (dbus_server_listen):
5134 Add commented out call to dbus_server_debug_new.
5136 * dbus/dbus-timeout.c: (_dbus_timeout_new):
5137 Actually set the handler, doh.
5139 * dbus/dbus-transport.c: (_dbus_transport_open):
5140 Add commented out call to dbus_transport_debug_client_new.
5143 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5145 2003-01-28 Havoc Pennington <hp@pobox.com>
5147 * dbus/dbus-message.c (check_message_handling): function to check
5148 on the loaded message, iterates over it etc.
5150 2003-01-28 Havoc Pennington <hp@pobox.com>
5152 * test/Makefile.am (dist-hook): fix make distdir
5154 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5156 2003-01-27 Havoc Pennington <hp@pobox.com>
5158 * dbus/dbus-mempool.c (time_for_size): replace printf with
5161 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5162 empty lines; fix the SAVE_LENGTH stuff to be
5163 START_LENGTH/END_LENGTH so it actually works; couple other
5166 * test/Makefile.am (dist-hook): add dist-hook for .message files
5168 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5169 can be constant or locked.
5170 (_dbus_string_free): allow freeing a const string as
5173 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5175 * dbus/dbus-test-main.c (main): take an argument which is the
5176 directory containing test data
5178 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5179 argument to this and load all the messages in test/data/
5180 checking that they can be loaded or not loaded as appropriate.
5182 2003-01-27 Anders Carlsson <andersca@codefactory.se>
5184 * bus/dispatch.c: (bus_dispatch_message_handler):
5185 Dispatch messages sent to services.
5187 * bus/driver.c: (bus_driver_send_service_deleted),
5188 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5189 (bus_driver_send_service_acquired):
5190 Add helper functions for sending service related messages.
5192 (bus_driver_send_welcome_message):
5193 Send HELLO_REPLY instead of WELCOME.
5195 (bus_driver_handle_list_services):
5196 Send LIST_SERVICES_REPLY instead of SERVICES.
5198 (bus_driver_handle_own_service),
5199 (bus_driver_handle_service_exists):
5200 New message handlers.
5202 (bus_driver_handle_message):
5203 Invoke new message handlers.
5205 (bus_driver_remove_connection):
5206 Don't remove any services here since that's done automatically
5207 by bus_service_remove_owner now.
5210 New function signatures.
5212 * bus/services.c: (bus_service_add_owner):
5213 Send ServiceAcquired message if we're the only primary owner.
5215 (bus_service_remove_owner):
5216 Send ServiceAcquired/ServiceLost messages.
5218 (bus_service_set_prohibit_replacement),
5219 (bus_service_get_prohibit_replacement):
5220 Functions for setting prohibit replacement.
5222 (bus_service_has_owner):
5223 New function that checks if a connection is in the owner queue of
5227 Add new function signatures.
5229 * dbus/dbus-list.c: (_dbus_list_test):
5230 Add tests for _dbus_list_remove_last and traversing the list backwards.
5233 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5234 go any further, so return NULL then.
5236 * dbus/dbus-protocol.h:
5237 Add new messages, service flags and service replies.
5239 2003-01-26 Havoc Pennington <hp@pobox.com>
5241 * dbus/dbus-message-builder.c: implement, completely untested.
5243 * test/data/*: add data to be used in testing.
5244 ".message" files are our simple loadable text format.
5245 ".message-raw" will be binary dumps of messages.
5247 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5249 2003-01-26 Havoc Pennington <hp@pobox.com>
5251 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5253 * dbus/dbus-errors.c (dbus_result_to_string): add
5256 * dbus/dbus-message-builder.c: new file, will contain code to load
5257 up messages from files. Not implemented yet.
5259 2003-01-26 Havoc Pennington <hp@pobox.com>
5261 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5262 the sender by setting to NULL
5264 2003-01-26 Havoc Pennington <hp@pobox.com>
5266 The unit tests pass, but otherwise untested. If it breaks, the
5267 tests should have been better. ;-)
5269 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5272 * dbus/dbus-message.c: redo everything so we maintain
5273 message->header as the only copy of the various fields.
5274 This avoids the possibility of out-of-memory in some cases,
5275 for example dbus_message_lock() can't run out of memory anymore,
5276 and avoids extra copying. Figured I may as well go ahead and do
5277 this since it was busted for dbus_message_lock to not return
5278 failure on OOM, and dbus_message_write_header was totally
5279 unchecked for OOM. Also fixed some random other bugs.
5281 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5282 that strings are nul-terminated. Also, end_pos can be equal
5283 to string length just not greater than, I think.
5284 (_dbus_marshal_set_int32): new function
5285 (_dbus_marshal_set_uint32): new function
5286 (_dbus_marshal_set_string): new function
5288 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5289 a warning, init timeout_list to NULL
5290 (dbus_connection_send_message): don't use uninitialized variable
5293 * dbus/dbus-string.c (_dbus_string_replace_len): new function
5295 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5297 * bus/driver.c: (bus_driver_handle_hello),
5298 (bus_driver_send_welcome_message):
5301 2003-01-26 Anders Carlsson <andersca@codefactory.se>
5303 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
5304 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5305 (dbus_connection_unref):
5306 * dbus/dbus-marshal.c: (_dbus_marshal_test):
5307 * dbus/dbus-message.c: (dbus_message_unref),
5310 (dbus_message_get_fields):
5311 Remove debugging printout.
5313 (_dbus_message_loader_return_buffer):
5314 Don't store the header string.
5316 (_dbus_message_test):
5319 2003-01-26 Richard Hult <rhult@codefactory.se>
5321 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
5322 the file descriptor list, since it can change under us.
5324 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5326 * glib/dbus-gmain.c: (dbus_connection_prepare),
5327 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
5328 (remove_watch), (dbus_connection_hookup_with_g_main):
5329 Rewrite the glib handling to use its own GSource instead of a
5330 GIOChannel so we can catch messages put in the queue while waiting
5333 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5336 * bus/connection.c: (connection_disconnect_handler),
5337 (connection_watch_callback), (bus_connection_setup):
5338 * bus/dispatch.c: (send_one_message),
5339 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
5340 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
5342 * bus/driver.c: (bus_driver_send_service_deleted),
5343 (bus_driver_send_service_created), (bus_driver_handle_hello),
5344 (bus_driver_send_welcome_message),
5345 (bus_driver_handle_list_services), (bus_driver_remove_connection),
5346 (bus_driver_handle_message):
5348 Refactor code, put the message dispatching in its own file. Use
5349 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
5352 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5354 * dbus/dbus-internals.h:
5355 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
5357 * dbus/dbus-message.c: (dbus_message_get_sender):
5358 * dbus/dbus-message.h:
5359 Implement dbus_message_get_sender.
5361 * dbus/dbus-protocol.h:
5362 Add message and service defines.
5364 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5366 * dbus/dbus-connection.c: (dbus_connection_send_message):
5367 * dbus/dbus-message-internal.h:
5368 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
5369 (dbus_message_write_header):
5370 Remove _dbus_messag_unlock and don't set the client serial on a
5371 message if one already exists.
5373 2003-01-24 Havoc Pennington <hp@pobox.com>
5375 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
5378 * bus/driver.c (bus_driver_handle_list_services): fix a leak
5381 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5383 * dbus/dbus-list.c: (alloc_link), (free_link):
5384 Use a memory pool for the links.
5386 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5388 * bus/connection.c: (bus_connection_foreach):
5390 Add new bus_connection_foreach function.
5392 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
5393 Add function that broadcasts a message to all clients.
5395 (bus_driver_send_service_created), (bus_driver_handle_hello),
5396 (bus_driver_send_welcome_message),
5397 (bus_driver_handle_list_services), (bus_driver_message_handler):
5398 Implement functions that take care of listing services, and notifying
5399 clients when new services are created.
5401 * bus/services.c: (bus_services_list):
5403 Add new function that returns an array of strings with the currently
5404 registered services.
5407 * glib/dbus-gmain.c:
5408 Update copyright year.
5410 2003-01-25 Anders Carlsson <andersca@codefactory.se>
5412 * dbus/dbus-connection.c: (dbus_connection_send_message):
5413 Unlock the message in case it was sent earlier.
5415 (dbus_connection_send_message_with_reply_and_block):
5416 Remove the reply message from the list.
5418 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5419 Set array_len and new_pos correctly.
5421 (_dbus_marshal_test):
5422 Remove debug output.
5424 * dbus/dbus-message-internal.h:
5425 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
5426 New function that returns the reply serial.
5428 (_dbus_message_unlock):
5429 New function that unlocks a message and resets its header.
5431 (dbus_message_append_string_array),
5432 (dbus_message_get_fields_valist),
5433 (dbus_message_iter_get_field_type),
5434 (dbus_message_iter_get_string_array),
5435 (dbus_message_get_fields),
5436 (dbus_message_append_fields_valist):
5437 Handle string arrays.
5439 (dbus_message_set_sender):
5440 Make this function public since the bus daemon needs it.
5442 (decode_header_data):
5443 Set the reply serial to -1 initially.
5445 * dbus/dbus-message.h:
5446 Add dbus_message_set_sender.
5448 2003-01-24 Havoc Pennington <hp@pobox.com>
5450 * doc/dbus-specification.sgml: add some stuff
5452 2003-01-22 Havoc Pennington <hp@pobox.com>
5454 * doc/dbus-specification.sgml: Start to document the protocol.
5456 2003-01-22 Havoc Pennington <hp@pobox.com>
5458 * dbus/dbus-connection.c
5459 (dbus_connection_send_message_with_reply_and_block): add some @todo
5461 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
5463 2003-01-21 Havoc Pennington <hp@pobox.com>
5465 (patch untested because can't compile)
5467 * bus/driver.c (create_unique_client_name): make this function
5468 never recycle client names. Also, caller should initialize
5471 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
5473 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5475 * dbus/dbus-marshal.c: (_dbus_marshal_double),
5476 (_dbus_marshal_int32), (_dbus_marshal_uint32),
5477 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
5478 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
5479 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5480 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5481 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
5482 * dbus/dbus-marshal.h:
5483 * dbus/dbus-protocol.h:
5484 Add support for marshalling and demarshalling integer, double
5487 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5492 * bus/connection.c: (connection_disconnect_handler):
5493 Remove the connection from the bus driver's list.
5495 (connection_watch_callback): Dispatch messages.
5497 (free_connection_data): Free connection name.
5499 (bus_connection_setup): Add connection to the bus driver's list.
5500 (bus_connection_remove_owned_service):
5501 (bus_connection_set_name), (bus_connection_get_name):
5502 Add functions for setting and getting the connection's name.
5505 Add function headers.
5507 * bus/driver.c: (create_unique_client_name),
5508 (bus_driver_handle_hello_message),
5509 (bus_driver_send_welcome_message), (bus_driver_message_handler),
5510 (bus_driver_add_connection), (bus_driver_remove_connection):
5513 * bus/services.c: (bus_service_free):
5515 New file that handles communication and registreation with the bus
5518 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5520 * dbus/dbus-connection.c: (dbus_connection_send_message):
5521 Add a new client_serial parameter.
5523 (dbus_connection_send_message_with_reply):
5524 Remove a @todo since we've implemented the blocking function.
5526 (dbus_connection_send_message_with_reply_and_block):
5527 New function that sends a message and waits for a reply and
5528 then returns the reply.
5530 * dbus/dbus-connection.h:
5533 * dbus/dbus-errors.c: (dbus_result_to_string):
5534 * dbus/dbus-errors.h:
5535 Add new DBUS_RESULT.
5537 * dbus/dbus-message-internal.h:
5538 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
5539 (_dbus_message_set_sender), (dbus_message_write_header),
5540 (dbus_message_new_reply), (decode_header_data),
5541 (_dbus_message_loader_return_buffer), (_dbus_message_test):
5542 * dbus/dbus-message.h:
5543 Add new functions that set the reply serial and sender.
5544 Also marshal and demarshal them correctly and add test.
5546 * dbus/dbus-protocol.h:
5547 Add new DBUS_MESSAGE_TYPE_SENDER.
5550 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
5551 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
5552 (dbus_connection_hookup_with_g_main):
5553 * glib/test-dbus-glib.c: (main):
5554 Rewrite to use GIOChannel and remove the GSource crack.
5556 * test/echo-client.c: (main):
5557 * test/watch.c: (check_messages):
5558 Update for changed APIs
5560 2003-01-19 Anders Carlsson <andersca@codefactory.se>
5562 * dbus/Makefile.am: Add dbus-timeout.[cħ]
5564 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
5565 Create a DBusTimeoutList.
5566 (dbus_connection_set_timeout_functions): Add new function to
5567 set timeout callbacks
5569 * dbus/dbus-connection.h: Add public DBusTimeout API.
5571 * dbus/dbus-message.c: (dbus_message_get_service):
5572 * dbus/dbus-message.h: New function.
5574 * dbus/dbus-server.c: Fix small doc typo.
5576 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
5578 2003-01-19 Anders Carlsson <andersca@codefactory.se>
5580 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
5581 of the string, just as long as specified.
5583 2003-01-19 Havoc Pennington <hp@pobox.com>
5585 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
5588 * dbus/dbus-server.c (dbus_server_set_max_connections)
5589 (dbus_server_get_max_connections, dbus_server_get_n_connections):
5590 keep track of current number of connections, and add API for
5591 setting a max (but haven't implemented enforcing the max yet)
5593 2003-01-18 Havoc Pennington <hp@pobox.com>
5595 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
5596 reading/writing if read_watch != NULL or write_watch != NULL.
5598 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
5599 the message loader code to actually load message->header and
5600 message->body into the newly-created message.
5602 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
5605 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
5606 (dbus_connection_get_max_message_size)
5607 (dbus_connection_set_max_live_messages_size)
5608 (dbus_connection_get_max_live_messages_size): implement some
5609 resource limitation functions
5611 * dbus/dbus-resources.c: new file implementing some of the
5612 resource limits stuff
5614 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
5615 missing docs, add @todo to handle OOM etc.
5617 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
5620 2003-01-18 Havoc Pennington <hp@pobox.com>
5622 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
5623 connection if it hasn't been already.
5625 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
5626 replace with DisconnectFunction.
5628 2003-01-18 Havoc Pennington <hp@pobox.com>
5630 Building --disable-verbose-mode --disable-asserts --disable-tests
5631 cuts the library from 112K to 45K or so
5633 * configure.in: check for varargs macro support,
5634 add --enable-verbose-mode, --enable-asserts.
5636 * dbus/dbus-internals.h (_dbus_assert): support
5638 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
5640 2003-01-18 Havoc Pennington <hp@pobox.com>
5642 * dbus/dbus-test.c: include config.h so that tests actually run
5644 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
5645 so the failure mode when that assumption fails will be plenty
5648 2003-01-18 Havoc Pennington <hp@pobox.com>
5650 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
5652 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
5655 * test/Makefile.am: don't use special variable "TESTS" for echo-*
5656 since we don't want to use those in make check
5658 2003-01-15 Havoc Pennington <hp@redhat.com>
5664 2003-01-15 Havoc Pennington <hp@redhat.com>
5666 * test/Makefile.am: fix so that test source code ends up in the
5667 distribution on make distcheck
5669 2003-01-15 Havoc Pennington <hp@redhat.com>
5675 2003-01-15 Havoc Pennington <hp@redhat.com>
5677 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
5678 fix build when --disable-tests
5680 * Makefile.am (EXTRA_DIST): put HACKING in here
5682 * HACKING: document procedure for making a tarball release.
5684 2003-01-14 Anders Carlsson <andersca@codefactory.se>
5686 * bus/connection.c: (connection_error_handler),
5687 (bus_connection_setup):
5688 * bus/main.c: (main):
5689 Make sure that the DBusConnectionData struct is NULLed
5690 out to prevent a segfault.
5692 * dbus/dbus-errors.c: (dbus_result_to_string):
5693 * dbus/dbus-errors.h:
5694 * dbus/dbus-message.c: (dbus_message_get_fields),
5695 (dbus_message_get_fields_valist), (_dbus_message_test):
5696 * dbus/dbus-message.h:
5697 Make dbus_message_get_fields return a result code so we can
5698 track invalid fields as well as oom.
5700 2003-01-11 Havoc Pennington <hp@pobox.com>
5702 * configure.in: change --enable-test/--enable-ansi action-if-given
5703 to enable_foo=$enableval instead of enable_foo=yes
5705 2003-01-08 Havoc Pennington <hp@pobox.com>
5707 * dbus/dbus-string.c (_dbus_string_align_length): new function
5709 * dbus/dbus-test-main.c: move main() for test app here
5711 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
5712 symbol to run tests, because dbus-test isn't in the main
5715 Code review nitpicks.
5717 * dbus/dbus-message.c (dbus_message_write_header): add newlines
5718 for people with narrow emacs ;-). Assert client_serial was filled
5719 in. Assert message->name != NULL.
5720 (dbus_message_append_fields): have "first_field_type" arg separate
5721 from va list, needed for C++ binding that also uses varargs IIRC
5722 and helps with type safety
5723 (dbus_message_new): add @todo about using DBusString to store
5724 service/name internally
5725 (dbus_message_new): don't leak ->service and ->name on OOM later
5727 (dbus_message_unref): free the service name
5728 (dbus_message_get_fields): same change to varargs
5729 i.e. first_field_type
5730 (_dbus_message_loader_return_buffer): assert that the message data
5731 is aligned (if not it's a bug in our code). Put in verbose griping
5732 about why we set corrupted = TRUE.
5733 (decode_header_data): add FIXME that char* is evil. Was going to
5734 add FIXME about evil locale-specific string.h strncmp, but just
5735 switched to wacky string-as-uint32 optimization. Move check for
5736 "no room for field name" above get_const_data_len() to avoid
5737 assertion failure in get_const_data_len if we have trailing 2
5738 bytes or the like. Check for service and name fields being
5739 provided twice. Don't leak service/name on error. Require field
5740 names to be aligned to 4 bytes.
5742 * dbus/dbus-marshal.c: move byte swap stuff to header
5743 (_dbus_pack_int32): uscore-prefix
5744 (_dbus_unpack_int32): uscore-prefix
5745 (_dbus_unpack_uint32): export
5746 (_dbus_demarshal_string): add @todo complaining about use of
5748 (_dbus_marshal_get_field_end_pos): add @todo about bad error
5749 handling allowing corrupt data to go unchecked
5751 2003-01-08 Havoc Pennington <hp@redhat.com>
5753 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
5754 to the select() as needed for authentication. (should be using
5755 _dbus_poll() not select, but for another day)
5757 * dbus/dbus.h: include dbus/dbus-protocol.h
5759 2003-01-08 Anders Carlsson <andersca@codefactory.se>
5761 * dbus/Makefile.am (dbusinclude_HEADERS): Install
5764 2003-01-08 Anders Carlsson <andersca@codefactory.se>
5766 * dbus/dbus-internals.c: (_dbus_type_to_string):
5767 New function that returns a string describing a type.
5769 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
5770 * dbus/dbus-marshal.h:
5771 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
5772 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
5773 (dbus_message_iter_get_byte_array):
5774 * dbus/dbus-message.h:
5775 Add new convenience functions for appending and getting message fields.
5776 Also add demarshalling routines for byte arrays.
5778 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5780 * dbus/dbus-connection-internal.h:
5781 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5782 (_dbus_connection_get_next_client_serial),
5783 (dbus_connection_send_message):
5784 * dbus/dbus-internals.h:
5785 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
5786 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
5787 (_dbus_marshal_uint32), (_dbus_demarshal_double),
5788 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
5789 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
5790 (_dbus_verbose_bytes), (_dbus_marshal_test):
5791 * dbus/dbus-marshal.h:
5792 * dbus/dbus-message-internal.h:
5793 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
5794 (dbus_message_write_header), (_dbus_message_lock),
5795 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
5796 (dbus_message_get_name), (dbus_message_append_int32),
5797 (dbus_message_append_uint32), (dbus_message_append_double),
5798 (dbus_message_append_string), (dbus_message_append_byte_array),
5799 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
5800 (dbus_message_iter_unref), (dbus_message_iter_has_next),
5801 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
5802 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
5803 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
5804 (decode_header_data), (_dbus_message_loader_return_buffer),
5805 (message_iter_test), (_dbus_message_test):
5806 * dbus/dbus-message.h:
5807 * dbus/dbus-protocol.h:
5808 * dbus/dbus-test.c: (main):
5810 * glib/test-dbus-glib.c: (message_handler), (main):
5811 * test/echo-client.c: (main):
5812 * test/watch.c: (check_messages):
5813 Make messages sendable and receivable for real.
5815 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5817 * dbus/dbus-marshal.c: (_dbus_marshal_double),
5818 (_dbus_marshal_string), (_dbus_marshal_byte_array):
5819 * dbus/dbus-message.c: (dbus_message_append_int32),
5820 (dbus_message_append_uint32), (dbus_message_append_double),
5821 (dbus_message_append_string), (dbus_message_append_byte_array):
5822 Handle OOM restoration.
5824 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5826 * dbus/dbus-marshal.c: (_dbus_marshal_string),
5827 (_dbus_demarshal_string), (_dbus_marshal_test):
5828 * dbus/dbus-marshal.h:
5829 * dbus/dbus-message.c: (dbus_message_get_name),
5830 Document these functions.
5832 (dbus_message_append_int32), (dbus_message_append_uint32),
5833 (dbus_message_append_double), (dbus_message_append_string),
5834 (dbus_message_append_byte_array):
5835 * dbus/dbus-message.h:
5836 Add functions for adding message fields of different types.
5838 * dbus/dbus-protocol.h:
5839 Add the different types.
5841 2003-01-05 Havoc Pennington <hp@pobox.com>
5843 * bus/connection.c: implement routines for handling connections,
5844 first thing is keeping a list of owned services on each connection
5845 and setting up watches etc.
5847 * bus/services.c: implement a mapping from service names to lists
5850 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
5852 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
5853 to use static mutexes for global data
5855 * dbus/dbus-connection.c (dbus_connection_set_data): add new
5856 collection of functions to set/get application-specific data
5857 on the DBusConnection.
5859 2003-01-04 Havoc Pennington <hp@pobox.com>
5861 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
5862 (_dbus_poll): new function
5864 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
5867 * bus/loop.c: initial code for the daemon main loop
5869 2003-01-04 Havoc Pennington <hp@pobox.com>
5871 * test/watch.c (error_handler): make it safe if the error handler
5872 is called multiple times (if we s/error handler/disconnect
5873 handler/ we should just guarantee it's called only once)
5875 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
5876 error handler on disconnect (it's quite possible we should
5877 just change the error handler to a "disconnect handler," I'm
5878 not sure we have any other meaningful errors)
5880 * configure.in: check for getpwnam_r
5882 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5883 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
5884 mechanism as in SASL spec, using socket credentials
5886 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
5887 (_dbus_send_credentials_unix_socket): new function
5889 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
5891 (_dbus_write): only check errno if <0 returned
5892 (_dbus_write_two): ditto
5894 2003-01-02 Anders Carlsson <andersca@codefactory.se>
5896 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
5897 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
5898 (_dbus_marshal_test):
5899 * dbus/dbus-marshal.h:
5900 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
5901 to _dbus_marshal_utf8_string. Also fix some tests.
5903 2002-12-28 Harri Porten <porten@kde.org>
5905 * configure.in: added check for C++ compiler and a very cheesy
5906 check for the Qt integration
5908 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
5910 * qt/Makefile.am: added
5912 * qt/.cvsignore: added
5914 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
5915 latter, added #ifdef QT_THREAD_SUPPORT guard.
5917 * dbus/Makefile.am: added missing headers for make dist
5919 2002-12-28 Kristian Rietveld <kris@gtk.org>
5921 * dbus/Makefile.am: fixup export-symbols-regex.
5923 2002-12-27 Anders Carlsson <andersca@codefactory.se>
5925 * acinclude.m4: Add this file and put the
5926 PKG_CHECK_MODULE macro in it.
5928 2002-12-27 Anders Carlsson <andersca@codefactory.se>
5930 * dbus/dbus-marshal.c: (_dbus_marshal_string),
5931 (_dbus_demarshal_double), (_dbus_demarshal_int32),
5932 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
5933 (_dbus_marshal_test):
5934 Make the demarshalling routines align the pos argument.
5935 Add string marshalling tests and fix the obvious bugs
5938 2002-12-26 Havoc Pennington <hp@pobox.com>
5940 * dbus/dbus-auth.c: fixes fixes fixes
5942 * dbus/dbus-transport-unix.c: wire up support for
5943 encoding/decoding data on the wire
5945 * dbus/dbus-auth.c (_dbus_auth_encode_data)
5946 (_dbus_auth_decode_data): append to target string
5947 instead of nuking it.
5949 2002-12-26 Havoc Pennington <hp@pobox.com>
5951 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
5952 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
5955 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
5956 avoid swap_bytes() overhead (ignoring possible assembly stuff for
5957 now). Main point is because I wanted unpack_uint32 to implement
5959 (_dbus_verbose_bytes): new function
5961 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
5963 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
5964 mechanism to handle a corrupt message stream
5965 (_dbus_message_loader_new): fix preallocation to only prealloc,
5968 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
5969 (_dbus_string_test): enhance tests for copy/move and fix the
5972 * dbus/dbus-transport-unix.c: Hold references in more places to
5973 avoid reentrancy problems
5975 * dbus/dbus-transport.c: ditto
5977 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
5978 leak reference count in no-message case
5980 * test/watch.c (do_mainloop): handle adding/removing watches
5981 during iteration over the watches. Also, ref the connection/server
5982 stored on a watch, so we don't try to mangle a destroyed one.
5984 * dbus/dbus-transport-unix.c (do_authentication): perform
5987 * dbus/dbus-auth.c (get_state): add a state
5988 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
5989 (_dbus_auth_get_unused_bytes): append the unused bytes
5990 to the passed in string, rather than prepend
5992 * dbus/dbus-transport.c (_dbus_transport_init_base): create
5993 the auth conversation DBusAuth
5995 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
5996 (_dbus_transport_new_for_domain_socket): when creating a
5997 transport, pass in whether it's a client-side or server-side
5998 transport so we know which DBusAuth to create
6000 2002-12-03 Havoc Pennington <hp@pobox.com>
6002 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6003 _after_ finalizing the derived members
6004 (unix_connection_set): unref watch if we fail to add it
6006 * dbus/dbus-connection.c (dbus_connection_unref): delete the
6007 transport first, so that the connection owned by the
6008 transport will be valid as the transport finalizes.
6010 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6011 if necessary, and remove watches from the connection.
6013 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6015 2002-12-26 Anders Carlsson <andersca@codefactory.se>
6017 * dbus/dbus-marshal.c: (_dbus_marshal_string),
6018 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6019 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6020 (_dbus_marshal_test):
6021 * dbus/dbus-marshal.h:
6022 Add string marshal functions and have the demarshal functions
6023 return the new position.
6025 2002-12-25 Havoc Pennington <hp@pobox.com>
6027 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6028 it is a simple protocol that just maps directly to SASL.
6030 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6031 initial implementation, not actually used yet.
6033 * dbus/dbus-string.c (_dbus_string_find): new function
6034 (_dbus_string_equal): new function
6035 (_dbus_string_base64_encode): new function
6036 (_dbus_string_base64_decode): new function
6038 2002-12-25 Anders Carlsson <andersca@codefactory.se>
6041 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6042 (_dbus_marshal_int32), (_dbus_marshal_uint32),
6043 (_dbus_demarshal_double), (_dbus_demarshal_int32),
6044 (_dbus_demarshal_uint32), (_dbus_marshal_test):
6045 * dbus/dbus-marshal.h:
6046 * dbus/dbus-protocol.h:
6047 * dbus/dbus-test.c: (main):
6049 Add un-optimized marshalling/demarshalling routines.
6051 2002-12-25 Harri Porten <porten@kde.org>
6053 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6055 2002-12-24 Zack Rusin <zack@kde.org>
6057 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6058 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6061 2002-12-24 Havoc Pennington <hp@pobox.com>
6063 * glib/dbus-gthread.c: fix include
6065 * glib/dbus-glib.h: rename DBusMessageHandler for now.
6066 I think glib API needs to change, though, as you don't
6067 want to use DBusMessageFunction, you want to use the
6068 DBusMessageHandler object. Probably
6069 dbus_connection_open_with_g_main_loop()
6070 and dbus_connection_setup_g_main_loop() or something like that
6071 (but think of better names...) that just create a connection
6072 that has watch/timeout functions etc. already set up.
6074 * dbus/dbus-connection.c
6075 (dbus_connection_send_message_with_reply): new function just to
6076 show how the message handler helps us deal with replies.
6078 * dbus/dbus-list.c (_dbus_list_remove_last): new function
6080 * dbus/dbus-string.c (_dbus_string_test): free a string that
6083 * dbus/dbus-hash.c: use memory pools for the hash entries
6084 (rebuild_table): be more paranoid about overflow, and
6085 shrink table when we can
6086 (_dbus_hash_test): reduce number of sprintfs and write
6087 valid C89. Add tests for case where we grow and then
6088 shrink the hash table.
6090 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6092 * dbus/dbus-connection.c (dbus_connection_register_handler)
6093 (dbus_connection_unregister_handler): new functions
6095 * dbus/dbus-message.c (dbus_message_get_name): new
6097 * dbus/dbus-list.c: fix docs typo
6099 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6100 an object representing a handler for messages.
6102 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6105 * glib/dbus-gthread.c: (dbus_gthread_init):
6106 Don't use the gdbus prefix for public functions.
6108 2002-12-16 Anders Carlsson <andersca@codefactory.se>
6112 Add GLib checks and fixup .pc files
6116 * glib/dbus-gmain.c: (gdbus_connection_prepare),
6117 (gdbus_connection_check), (gdbus_connection_dispatch),
6118 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6119 (dbus_connection_gsource_new):
6120 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6121 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6122 * glib/test-dbus-glib.c: (message_handler), (main):
6125 2002-12-15 Harri Porten <porten@kde.org>
6127 * autogen.sh: check for libtoolize before attempting to use it
6129 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6132 * .cvsignore: ignore more stamp files
6134 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6136 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6137 without make install.
6139 2002-12-15 Havoc Pennington <hp@pobox.com>
6141 * dbus/dbus-threads.c: add thread stubs that a higher library
6142 layer can fill in. e.g. the GLib wrapper might fill them in with
6143 GThread stuff. We still need to use this thread API to
6144 thread-safe-ize the library.
6146 2002-12-12 Havoc Pennington <hp@pobox.com>
6148 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6149 below new interfaces and include fewer system headers.
6151 * dbus/dbus-sysdeps.c (_dbus_read): new function
6152 (_dbus_write): new function
6153 (_dbus_write_two): new function
6154 (_dbus_connect_unix_socket): new function
6155 (_dbus_listen_unix_socket): new function
6157 * dbus/dbus-message-internal.h: change interfaces to use
6160 2002-12-11 Havoc Pennington <hp@pobox.com>
6162 * dbus/dbus-types.h: add dbus_unichar
6164 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6166 * dbus/dbus-connection.c (dbus_connection_send_message): return
6169 * dbus/dbus-transport.c: include dbus-watch.h
6171 * dbus/dbus-connection.c: include dbus-message-internal.h
6173 * HACKING: add file with coding guidelines stuff.
6175 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6176 handling here, for security purposes (as in vsftpd). Not actually
6177 using this class yet.
6179 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6180 system/libc usage here, as in vsftpd, for ease of auditing (and
6181 should also simplify portability). Haven't actually moved all the
6182 system/libc usage into here yet.
6184 2002-11-25 Havoc Pennington <hp@pobox.com>
6186 * dbus/dbus-internals.c (_dbus_verbose): fix to not
6187 always print the first verbose message.
6189 2002-11-24 Havoc Pennington <hp@pobox.com>
6191 * test/echo-client.c, test/echo-server.c: cheesy test
6194 * configure.in (AC_CHECK_FUNCS): check for writev
6196 * dbus/dbus-message.c (_dbus_message_get_network_data): new
6199 * dbus/dbus-list.c (_dbus_list_foreach): new function
6201 * dbus/dbus-internals.c (_dbus_verbose): new function
6203 * dbus/dbus-server.c, dbus/dbus-server.h: public object
6204 representing a server that listens for connections.
6206 * dbus/.cvsignore: create
6208 * dbus/dbus-errors.h, dbus/dbus-errors.c:
6209 public API for reporting errors
6211 * dbus/dbus-connection.h, dbus/dbus-connection.c:
6212 public object representing a connection that
6213 sends/receives messages. (Same object used for
6214 both client and server.)
6216 * dbus/dbus-transport.h, dbus/dbus-transport.c:
6217 Basic abstraction for different kinds of stream
6218 that we might read/write messages from.
6220 2002-11-23 Havoc Pennington <hp@pobox.com>
6222 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6225 * dbus/dbus-test.c (main): add list test, and include
6226 dbus-test.h as intended
6228 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6229 (_dbus_hash_table_remove_int): return value indicates
6230 whether the entry existed to remove
6232 * dbus/dbus-list.c: add linked list utility class,
6235 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6238 2002-11-23 Havoc Pennington <hp@pobox.com>
6240 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6241 DBUS_END_DECLS to nothing, that should fix this once and for all
6243 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6245 * dbus/dbus-message.c, dbus/dbus-hash.c:
6246 add some missing @brief
6248 2002-11-23 Havoc Pennington <hp@pobox.com>
6250 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6251 to avoid confusing Doxygen
6253 * dbus/dbus-hash.c: @} not }@
6255 * dbus/dbus-message.c (struct DBusMessage): split out
6258 2002-11-23 Havoc Pennington <hp@pobox.com>
6260 * configure.in: pile on more warning flags if using gcc
6262 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6263 to document static functions
6265 * configure.in: add summary to end of configure so it
6266 looks nice and attractive
6268 * dbus/dbus-hash.c: finish implementation and write unit
6271 * configure.in: add --enable-tests to enable unit tests
6273 * dbus/dbus-test.c: test program to run unit tests
6274 for all files in dbus/*, initially runs a test for
6277 * dbus/dbus-internals.h: file to hold some internal utility stuff
6279 2002-11-22 Havoc Pennington <hp@redhat.com>
6281 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6282 "ported" away from Tcl
6284 * dbus/dbus-types.h: header for types such as dbus_bool_t
6286 2002-11-22 Havoc Pennington <hp@redhat.com>
6288 * dbus/dbus.h: fixups for doc warnings
6290 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6292 (QUIET): make it quiet so we can see warnings
6294 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
6296 2002-11-22 Havoc Pennington <hp@redhat.com>
6298 * Makefile.am: include "Doxyfile" target in all-local
6300 * configure.in: generate the Doxyfile
6302 * Doxyfile.in: move Doxyfile here, so we can use
6303 configure to generate a Doxyfile with the right
6306 2002-11-22 Havoc Pennington <hp@redhat.com>
6308 * dbus/dbus-message.c: move inline docs into .c file
6310 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
6311 so all docs are under doc/
6312 (MAN_EXTENSION): generate man pages. Use extension
6313 ".3dbus" which matches ".3qt" on my system,
6314 I guess this is OK, I don't know really.
6315 (FILE_PATTERNS): look for .c files not .h, makes sense
6318 2002-11-22 Havoc Pennington <hp@pobox.com>
6320 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
6321 because any app can be a server, and any app can be a client,
6322 the bus is a special kind of server.
6324 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
6326 * Doxyfile : adding. Still needs Makefile rules to be generated
6327 automatically (just run "doxygen" in the toplevel dir for now to
6330 * dbus/dbus-message.h : Adding sample docs (javadoc since
6331 resembles gtk-doc a little more)
6333 * dbus/dbus.h : Adding sample docs
6335 2002-11-21 Havoc Pennington <hp@redhat.com>
6337 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
6338 so we can allow ourselves to include files directly,
6339 instead of having to use dbus.h
6341 * dbus/dbus.h: fill in
6343 * dbus/dbus-message.h: sketch out a sample header file.
6344 Include griping if you include it directly instead of
6347 * dbus/dbus-macros.h: new file with macros for extern "C",
6348 TRUE/FALSE, NULL, etc.
6350 * doc/file-boilerplate.c: put include guards in here
6352 2002-11-21 Havoc Pennington <hp@redhat.com>
6354 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
6356 * COPYING: include the GPL as well, and license code
6357 under both AFL and GPL.
6359 2002-11-21 Havoc Pennington <hp@redhat.com>
6361 * acconfig.h: get rid of this
6363 * autogen.sh (run_configure): add --no-configure option
6365 * configure.in: remove AC_ARG_PROGRAM to make
6366 autoconf complain less. add AC_PREREQ.
6367 add AC_DEFINE third arg.
6369 2002-11-21 Anders Carlsson <andersca@codefactory.se>
6372 Fix references so we can distcheck.
6374 2002-11-21 Havoc Pennington <hp@redhat.com>
6376 * Initial module creation