1 2003-10-09 Havoc Pennington <hp@redhat.com>
3 Make matching rules theoretically work (add parser).
5 * bus/bus.c (bus_context_check_security_policy): fix up to handle
6 the case where destination is explicitly specified as bus driver
7 and someone else is eavesdropping.
9 * bus/policy.c (bus_client_policy_check_can_receive): fix up
10 definition of eavesdropping and assertion
12 * tools/dbus-send.c (main): use dbus_message_type_from_string
14 * bus/signals.c (bus_match_rule_parse): implement
16 * dbus/dbus-message.c (dbus_message_type_from_string): new
18 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
20 2003-10-02 Havoc Pennington <hp@pobox.com>
22 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
23 dbus_gproxy_oneway_call
25 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
26 (dbus_server_setup_with_g_main): fix to allow calling them more
27 than once on the same args
28 (dbus_bus_get_with_g_main): new function
30 2003-10-02 Havoc Pennington <hp@redhat.com>
32 * doc/dbus-tutorial.xml: write some stuff
34 2003-09-29 Havoc Pennington <hp@pobox.com>
36 * configure.in: split checks for Doxygen from XML docs, check for
39 * doc/Makefile.am: XML-ify all the docs, and add a blank
42 2003-09-29 Havoc Pennington <hp@pobox.com>
44 * Merge dbus-object-names branch. To see the entire patch
45 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
47 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
49 2003-09-28 Havoc Pennington <hp@pobox.com>
51 * HACKING: update to reflect new server
53 2003-09-26 Seth Nickell <seth@gnome.org>
56 * python/examples/example-signals.py:
58 Start implementing some notions of signals. The API
59 is really terrible, but they sort of work (with the
60 exception of being able to filter by service, and to
61 transmit signals *as* a particular service). Need to
62 figure out how to make messages come from the service
65 * python/dbus_bindings.pyx.in:
67 Removed duplicate message_handler callbacks.
69 2003-09-25 Havoc Pennington <hp@redhat.com>
71 * bus/session.conf.in: fix my mess
73 2003-09-25 Havoc Pennington <hp@pobox.com>
75 * bus/session.conf.in: fix security policy, reported by Seth Nickell
77 2003-09-25 Seth Nickell <seth@gnome.org>
79 * python/examples/example-service.py:
81 Johan notices complete wrong code in example-service, but
82 completely wrong in a way that works exactly the same (!).
83 Johan is confused, how could this possibly work? Example
84 code fails to serve purpose of making things clear.
87 2003-09-25 Mark McLoughlin <mark@skynet.ie>
89 * doc/dbus-specification.sgml: don't require header fields
90 to be 4-byte aligned and specify that fields should be
91 distinguished from padding by the fact that zero is not
94 * doc/TODO: remove re-alignment item and add item to doc
97 * dbus/dbus-message.c:
98 (HeaderField): rename the original member to value_offset
99 and introduce a name_offset member to keep track of where
100 the field actually begins.
101 (adjust_field_offsets): remove.
102 (append_int_field), (append_uint_field),
103 (append_string_field): don't align the start of the header
104 field to a 4-byte boundary.
105 (get_next_field): impl finding the next marhsalled field
107 (re_align_field_recurse): impl re-aligning a number of
108 already marshalled fields.
109 (delete_field): impl deleting a field of any type and
110 re-aligning any following fields.
111 (delete_int_or_uint_field), (delete_string_field): remove.
112 (set_int_field), (set_uint_field): no need to re-check
113 that we have the correct type for the field.
114 (set_string_field): ditto and impl re-aligning any
116 (decode_header_data): update to take into account that
117 the fields aren't 4-byte aligned any more and the new
118 way to distinguish padding from header fields. Also,
119 don't exit when there is too much header padding.
120 (process_test_subdir): print the directory.
121 (_dbus_message_test): add test to make sure a following
122 field is re-aligned correctly after field deletion.
124 * dbus/dbus-string.[ch]:
125 (_dbus_string_insert_bytes): rename from insert_byte and
126 allow the insert of multiple bytes.
127 (_dbus_string_test): test inserting multiple bytes.
129 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
130 warning note to docs about having to re-align any
131 marshalled values following the string.
133 * dbus/dbus-message-builder.c:
134 (append_string_field), (_dbus_message_data_load):
135 don't align the header field.
137 * dbus/dbus-auth.c: (process_test_subdir): print the
140 * test/break-loader.c: (randomly_add_one_byte): upd. for
143 * test/data/invalid-messages/bad-header-field-alignment.message:
146 * test/data/valid-messages/unknown-header-field.message: shove
147 a dict in the unknown field.
149 2003-09-25 Seth Nickell <seth@gnome.org>
152 * python/dbus_bindings.pyx.in:
154 Handle return values.
156 * python/examples/example-client.py:
157 * python/examples/example-service.py:
159 Pass back return values from the service to the client.
161 2003-09-24 Seth Nickell <seth@gnome.org>
165 Connect Object methods (when you are sharing an object) up... pass
166 in a list of methods to be shared. Sharing all the methods just
167 worked out too weird. You can now create nice Services over the
170 * python/dbus_bindings.pyx.in:
172 Keep references to user_data tuples passed into C functions so
173 Python doesn't garbage collect on us.
175 Implement MethodReturn and Error subclasses of Message for creating
176 DBusMessage's of those types.
178 * python/examples/example-client.py:
179 * python/examples/example-service.py:
181 Simple example code showing both how create DBus services and objects,
184 2003-09-23 Havoc Pennington <hp@pobox.com>
186 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
188 2003-09-23 Havoc Pennington <hp@redhat.com>
190 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
191 (dbus_gproxy_disconnect_signal): implement
192 (dbus_gproxy_manager_remove_signal_match): implement
193 (dbus_gproxy_manager_add_signal_match): implement
194 (dbus_gproxy_oneway_call): implement
196 2003-09-23 Havoc Pennington <hp@pobox.com>
198 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
199 subclass. This means dropping the transparent thread safety of the
200 proxy; you now need a separate proxy per-thread, or your own
201 locking on the proxy. Probably right anyway.
202 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
204 2003-09-22 Havoc Pennington <hp@redhat.com>
206 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
208 2003-09-21 Seth Nickell <seth@gnome.org>
210 First checkin of the Python bindings.
213 * python/Makefile.am:
214 * python/dbus_bindings.pyx.in:
215 * python/dbus_h_wrapper.h:
217 Pieces for Pyrex to operate on, building a dbus_bindings.so
218 python module for low-level access to the DBus APIs.
222 High-level Python module for accessing DBus objects.
227 Build stuff for the python bindings.
231 Extra macro needed for finding the Python C header files.
233 2003-09-21 Havoc Pennington <hp@pobox.com>
235 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
236 implementing the proxy manager, didn't get very far.
238 * dbus/dbus-bus.c (dbus_bus_add_match): new
239 (dbus_bus_remove_match): new
241 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
242 path_name argument; adjust the other not-yet-implemented
243 gproxy constructors to be what I think they should be.
245 2003-09-21 Havoc Pennington <hp@pobox.com>
247 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
248 by default for message bus connections.
250 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
251 exit_on_disconnect flag is set and we process the disconnected
253 (dbus_connection_set_exit_on_disconnect): new function
255 2003-09-21 Havoc Pennington <hp@pobox.com>
257 Get matching rules mostly working in the bus; only actually
258 parsing the rule text remains. However, the client side of
259 "signal connections" hasn't been started, this patch is only the
262 * dbus/dispatch.c: fix for the matching rules changes
264 * bus/driver.c (bus_driver_handle_remove_match)
265 (bus_driver_handle_add_match): send an ack reply from these
268 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
269 arguments, reported by Seth Nickell
271 * bus/config-parser.c (append_rule_from_element): support
272 eavesdrop=true|false attribute on policies so match rules
273 can be prevented from snooping on the system bus.
275 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
276 and "destination" in attribute names; fix some docs bugs;
277 add eavesdrop=true|false attribute
279 * bus/driver.c (bus_driver_handle_add_match)
280 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
283 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
284 rid of broadcast service concept, signals are just always broadcast
286 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
287 mostly implement matching rules stuff (currently only exposed as signal
290 2003-09-21 Mark McLoughlin <mark@skynet.ie>
292 * doc/dbus-specification.sgml: Change the header field name
293 to be an enum and update the rest of the spec to reference
294 the fields using the conventinal name.
296 * dbus/dbus-protocol.h: update to reflect the spec.
298 * doc/TODO: add item to remove the 4 byte alignment requirement.
300 * dbus/dbus-message.c: Remove the code to generalise the
301 header/body length and serial number header fields as named
302 header fields so we can reference field names using the
304 (append_int_field), (append_uint_field), (append_string_field):
305 Append the field name as a byte rather than four chars.
306 (delete_int_or_uint_field), (delete_string_field): reflect the
307 fact that the field name and typecode now occupy 4 bytes instead
309 (decode_string_field), (decode_header_data): update to reflect
310 protocol changes and move the field specific encoding from
311 decode_string_field() back into decode_header_data().
313 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
314 Add utility to aid debugging.
316 * dbus/dbus-message-builder.c:
317 (append_string_field), (_dbus_message_data_load): Update to
318 reflect protocol changes; Change the FIELD_NAME directive
319 to HEADER_FIELD and allow it to take the field's conventional
320 name rather than the actual value.
322 * test/data/*/*.message: Update to use HEADER_FIELD instead
323 of FIELD_NAME; Always align the header on an 8 byte boundary
324 *before* updating the header length.
326 2003-09-15 Havoc Pennington <hp@pobox.com>
328 * dbus/dbus-pending-call.c: add the get/set object data
329 boilerplate as for DBusConnection, etc. Use generic object data
330 for the notify callback.
332 * glib/dbus-gparser.c (parse_node): parse child nodes
334 * tools/dbus-viewer.c: more hacking on the dbus-viewer
336 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
337 contain functions shared between the convenience lib and the
340 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
341 -export-symbols-regex to the GLib library
343 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
344 fix the locking in here, and add a default handler for
345 Introspect() that just returns sub-nodes.
347 2003-09-14 Havoc Pennington <hp@pobox.com>
349 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
350 rather than gfoo consistent
352 * glib/dbus-gproxy.h: delete for now, move contents to
353 dbus-glib.h, because the include files don't work right since we
354 aren't in the dbus/ subdir.
356 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
357 (dbus_gproxy_end_call): finish
358 (dbus_gproxy_begin_call): finish
360 * glib/dbus-gmain.c (dbus_set_g_error): new
362 * glib/dbus-gobject.c (handle_introspect): include information
363 about child nodes in the introspection
365 * dbus/dbus-connection.c (dbus_connection_list_registered): new
366 function to help in implementation of introspection
368 * dbus/dbus-object-tree.c
369 (_dbus_object_tree_list_registered_and_unlock): new function
371 2003-09-12 Havoc Pennington <hp@pobox.com>
373 * glib/dbus-gidl.h: add common base class for all the foo_info
376 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
379 * test/Makefile.am: try test srcdir -ef . in addition to test
380 srcdir = ., one of them should work (yeah lame)
382 * glib/Makefile.am: build the "idl" parser stuff as a convenience
385 * glib/dbus-gparser.h: make description_load routines return
386 NodeInfo* not Parser*
388 * Makefile.am (SUBDIRS): build test dir after all library dirs
390 * configure.in: add GTK+ detection
392 2003-09-07 Havoc Pennington <hp@pobox.com>
394 * Make Doxygen contented.
396 2003-09-07 Havoc Pennington <hp@pobox.com>
398 * doc/dbus-specification.sgml: more updates
400 2003-09-06 Havoc Pennington <hp@pobox.com>
402 * doc/dbus-specification.sgml: partial updates
404 * bus/dbus-daemon-1.1.in: fix the config file docs for the
405 zillionth time; hopefully I edited the right file this time.
407 * bus/config-parser.c (append_rule_from_element): support
408 send_type, send_path, receive_type, receive_path
410 * bus/policy.c: add message type and path to the list of things
411 that can be "firewalled"
413 2003-09-06 Havoc Pennington <hp@pobox.com>
415 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
416 (dbus_connection_register_object_path): make this not handle
417 messages to paths below the given path
419 2003-09-03 Havoc Pennington <hp@pobox.com>
421 * test/glib/Makefile.am: add this with random glib-linked test
424 * glib/Makefile.am: remove the random test programs from here,
425 leave only the unit tests
427 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
428 uscore/javacaps conversion, and fix
429 (get_object_property, set_object_property): change to .NET
430 convention for mapping props to methods, set_FooBar/get_FooBar,
431 since one language has such a convention we may as well copy it.
432 Plus real methods in either getFooBar or get_foo_bar style won't
433 collide with this convention.
435 2003-09-01 Havoc Pennington <hp@pobox.com>
437 * glib/dbus-gparser.c: implement
439 * glib/dbus-gobject.c: start implementing skeletons support
441 * configure.in: when disabling checks/assert, also define
442 G_DISABLE_ASSERT and G_DISABLE_CHECKS
444 2003-09-01 Havoc Pennington <hp@pobox.com>
446 * glib/Makefile.am: rearrange a bunch of files and get "make
447 check" framework set up
449 2003-08-31 Havoc Pennington <hp@pobox.com>
451 * fix build with --disable-tests
453 2003-08-30 Havoc Pennington <hp@pobox.com>
455 * dbus/dbus-connection.c: purge DBusMessageHandler
457 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
458 use callbacks everywhere
460 2003-08-30 Havoc Pennington <hp@pobox.com>
462 * test/data/valid-config-files/system.d/test.conf: change to
463 root for the user so warnings don't get printed
465 * dbus/dbus-message.c: add dbus_message_get_path,
466 dbus_message_set_path
468 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
469 dispatching to a path
471 * dbus/dbus-string.c (_dbus_string_validate_path): add
473 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
474 (_dbus_marshal_object_path): implement
476 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
477 to contain the path to the target object
478 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
479 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
481 2003-08-30 Havoc Pennington <hp@pobox.com>
483 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
485 2003-08-29 Havoc Pennington <hp@pobox.com>
487 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
489 (struct DBusObjectSubtree): shrink this
490 a lot, since we may have a lot of them
491 (_dbus_object_tree_free_all_unlocked): implement
492 (_dbus_object_tree_dispatch_and_unlock): implement
494 2003-08-29 Havoc Pennington <hp@pobox.com>
496 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
498 2003-08-28 Havoc Pennington <hp@pobox.com>
502 * dbus/dbus-connection.c: port to no ObjectID, create a
503 DBusObjectTree, rename ObjectTree to ObjectPath in public API
505 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
506 everything except UnregisterFunction and MessageFunction
508 * dbus/dbus-marshal.c: port away from DBusObjectID,
509 add DBUS_TYPE_OBJECT_PATH
511 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
512 dbus/dbus-objectid.[hc]: remove these, we are moving to
513 path-based object IDs
515 2003-08-25 Havoc Pennington <hp@pobox.com>
517 Just noticed that dbus_message_test is hosed, I wonder when I
518 broke that. I thought make check was passing earlier...
520 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
521 container tree, will replace most of dbus-object-registry
523 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
526 2003-08-19 Havoc Pennington <hp@pobox.com>
528 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
529 (dbus_message_is_error): fix this function
531 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
534 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
535 reflect clarified man page
536 (bus_client_policy_check_can_send): ditto
538 * bus/session.conf.in: fixup
540 * bus/system.conf.in: fixup
542 2003-08-18 Havoc Pennington <hp@redhat.com>
544 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
546 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
547 dumb bug created earlier (wrong order of args to
548 decode_header_data())
550 * tools/dbus-send.c: port
552 * tools/dbus-print-message.c (print_message): port
554 * test/data/*messages: port all messages over
556 * dbus/dbus-message-builder.c: support including
559 * bus/driver.c: port over
561 * bus/dispatch.c: port over to new stuff
563 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
564 rename disconnect signal to "Disconnected"
566 2003-08-17 Havoc Pennington <hp@pobox.com>
568 This doesn't compile yet, but syncing up so I can hack on it from
569 work. What are branches for if not broken code? ;-)
571 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
572 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
573 DBUS_HEADER_FIELD_ERROR_NAME
575 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
576 for the interface+member pairs
577 (string_hash): change to use g_str_hash algorithm
578 (find_direct_function, find_string_function): refactor these to
581 * dbus/dbus-message.c: port all of this over to support
582 interface/member fields instead of name field
584 * dbus/dbus-object-registry.c: port over
586 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
587 from _dbus_string_validate_name
589 * bus/dbus-daemon-1.1: change file format for the
590 <deny>/<allow> stuff to match new message naming scheme
592 * bus/policy.c: port over
594 * bus/config-parser.c: parse new format
596 2003-08-16 Havoc Pennington <hp@pobox.com>
598 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
601 * glib/dbus-gproxy.c: some hacking
603 2003-08-15 Havoc Pennington <hp@redhat.com>
605 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
607 * dbus/dbus-connection.c
608 (dbus_connection_send_with_reply_and_block): factor out internals;
609 change to convert any error replies to DBusError instead of
610 returning them as a message
612 2003-08-15 Havoc Pennington <hp@pobox.com>
614 * dbus/dbus-connection.c,
615 dbus/dbus-pending-call.c: Finish the pending call stuff
617 2003-08-14 Havoc Pennington <hp@redhat.com>
619 * dbus/dbus-pending-call.c: start on new object that will replace
620 DBusMessageHandler and ReplyHandlerData for tracking outstanding
623 * dbus/dbus-gproxy.c: start on proxy object used to communicate
624 with remote interfaces
626 * dbus/dbus-gidl.c: do the boring boilerplate in here
628 2003-08-12 Havoc Pennington <hp@pobox.com>
630 * bus/dispatch.c (bus_dispatch): make this return proper
631 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
633 * dbus/dbus-errors.c (dbus_set_error): use
634 _dbus_string_append_printf_valist
636 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
637 (_dbus_string_append_printf): new
639 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
642 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
643 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
644 message is unhandled.
646 2003-08-11 Havoc Pennington <hp@pobox.com>
648 * bus/test.c (client_disconnect_handler): change to return
649 HANDLED (would have been REMOVE_MESSAGE)
651 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
652 HANDLED/NOT_YET_HANDLED instead of
653 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
656 2003-08-10 Havoc Pennington <hp@pobox.com>
658 * tools/dbus-send.c (main): add --type argument, for now
659 supporting only method_call and signal types.
661 * tools/dbus-print-message.c: print message type
663 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
664 init connection->objects
666 * doc/dbus-specification.sgml: fix sgml
668 * bus/*.c: port over to object-instance API changes
670 * test/test-service.c: ditto
672 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
673 name, we will have to fix up the rest of the code to also handle
675 (dbus_message_new): generic message-creation call
676 (set_string_field): allow appending name field
678 2003-08-06 Havoc Pennington <hp@pobox.com>
680 * dbus/dbus-object-registry.c: implement signal connection
683 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
685 * dbus/dbus-internals.c (_dbus_memdup): new function
687 2003-08-02 Havoc Pennington <hp@pobox.com>
689 * dbus/dbus-message.c (dbus_message_get_no_reply)
690 (dbus_message_set_no_reply): add these and remove
691 set_is_error/get_is_error
693 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
694 remove the ERROR flag, since there's now an ERROR type
696 2003-08-01 Havoc Pennington <hp@pobox.com>
698 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
701 * dbus/dbus-message.c (dbus_message_get_type): new function
703 * doc/dbus-specification.sgml: add "type" byte to messages
705 2003-08-01 Havoc Pennington <hp@pobox.com>
707 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
708 a message type enum to distinguish kinds of message
709 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
710 that need not be replied to
712 2003-08-01 Havoc Pennington <hp@pobox.com>
714 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
715 (unpack_8_octets): fix no-64-bit-int bug
717 * dbus/dbus-object-registry.c (validate_id): validate the
718 connection ID bits, not just the instance ID.
720 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
721 the connection-global 33 bits of the object ID
723 * dbus/dbus-object-registry.c (info_from_entry): fill in
724 object ID in the new way
726 * dbus/dbus-objectid.h: rather than high/low bits, specifically
727 define server/client/instance bits.
729 2003-07-30 Havoc Pennington <hp@pobox.com>
731 * dbus/dbus-connection.c (dbus_connection_register_object): fix
734 2003-07-13 Havoc Pennington <hp@pobox.com>
736 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
737 fields to DBusObjectVTable and DBusObjectInfo
739 2003-07-12 Havoc Pennington <hp@pobox.com>
741 * dbus/dbus-object-registry.c: implement unit test,
742 fix bugs discovered in process
744 * dbus/dbus-connection.c: remove handler_table and
745 register_handler(), add DBusObjectRegistry usage
747 * dbus/dbus-objectid.c (dbus_object_id_is_null)
748 (dbus_object_id_set_null): new functions
750 2003-07-08 Havoc Pennington <hp@pobox.com>
752 * dbus/dbus-object.c: implement some of this
754 * dbus/dbus-object-registry.c
755 (_dbus_object_registry_add_and_unlock): fill in the object_id out
757 (_dbus_object_registry_new): handle OOM
759 2003-07-08 Havoc Pennington <hp@pobox.com>
761 * dbus/dbus-object.h: sketch out an API for registering objects
762 with a connection, that allows us to use as little as 24 bytes
763 per object and lets application code represent an object in
766 * dbus/dbus-object-registry.c: implement the hard bits of the
767 DBusConnection aspect of object API. Not yet wired up.
769 2003-07-06 Havoc Pennington <hp@pobox.com>
771 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
772 (_dbus_marshal_object_id): new
773 (_dbus_demarshal_object_id): new
774 (_dbus_marshal_get_arg_end_pos): support object ID type, and
775 consolidate identical switch cases. Don't conditionalize handling
776 of DBUS_TYPE_UINT64, need to handle the type always.
777 (_dbus_marshal_validate_arg): consolidate identical cases, and
778 handle DBUS_TYPE_OBJECT_ID
780 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
782 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
784 2003-09-28 Havoc Pennington <hp@pobox.com>
788 2003-09-28 Havoc Pennington <hp@pobox.com>
790 * doc/Makefile.am (dbus-specification.html): testing a funky hack
791 to work with Debian db2html
793 2003-09-28 Havoc Pennington <hp@pobox.com>
797 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
798 stylesheet-images for benefit of Debian
800 Change back to using filesystem-linked sockets for the system
801 bus, so only root can create the default system bus address.
803 * bus/system.conf.in: change to use
804 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
806 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
809 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
810 here, and AC_DEFINE DBUS_SYSTEM_PATH
812 2003-08-09 Anders Carlsson <andersca@codefactory.se>
818 2003-08-09 Anders Carlsson <andersca@codefactory.se>
820 * doc/dbus-specification.sgml:
821 Add activation reply values.
823 2003-08-05 Havoc Pennington <hp@redhat.com>
827 2003-08-05 Anders Carlsson <andersca@codefactory.se>
829 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
830 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
831 (add_watch), (remove_watch), (create_source):
832 Refcount fds, fixes some reentrancy issues.
834 2003-07-30 Havoc Pennington <hp@redhat.com>
836 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
837 bus address to be abstract if we have abstract sockets
841 2003-07-28 Havoc Pennington <hp@redhat.com>
843 * bus/messagebus.in: fix to avoid processname/servicename
844 confusion, from Michael Kearey
845 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
847 2003-07-23 Havoc Pennington <hp@pobox.com>
849 * dbus/dbus-message.c (dbus_message_iter_get_named):
850 fix from Andy Hanton to remove broken "+1"
852 2003-07-16 Havoc Pennington <hp@pobox.com>
854 * tools/dbus-launch.c (babysit): close stdout/stderr in the
855 babysitter process, as suggested by Thomas Leonard, so
856 an "eval `dbus-launch --exit-with-session`" will actually
859 2003-07-16 Havoc Pennington <hp@pobox.com>
861 * configure.in: print out EXPANDED_* variables in the summary at
862 the end; clean up the code that computes EXPANDED_ variables and
863 get the ones using exec_prefix right. Should make things work
864 when you build without --prefix
866 2003-06-29 Havoc Pennington <hp@pobox.com>
868 * mono/Test.cs (class Test): fire up a main loop and run it
870 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
871 done once, the app has to do it
873 2003-06-26 Havoc Pennington <hp@pobox.com>
875 * mono/Connection.cs: set up connection with the glib main loop
877 2003-07-01 Havoc Pennington <hp@redhat.com>
879 * doc/dbus-specification.sgml: clarify the format of a type code,
880 change suggested by Jim Blandy
882 2003-06-29 Miloslav Trmac <mitr@volny.cz>
885 * tools/Makefile.am: Don't assume srcdir == builddir.
887 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
889 (_dbus_memory_test): New function.
890 * dbus/dbus-test.h: Add _dbus_memory_test ().
891 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
893 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
895 (dbus_message_new): Remove obsolete @todo.
897 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
898 (_dbus_marshal_set_uint64): Fix comment.
900 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
901 hardcode FIELD_REPLY_SERIAL.
903 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
904 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
906 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
907 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
909 2003-06-24 Havoc Pennington <hp@pobox.com>
911 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
913 2003-06-23 Anders Carlsson <andersca@codefactory.se>
919 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
920 * gcj/org/.cvsignore:
921 * gcj/org/Makefile.am:
922 * gcj/org/freedesktop/.cvsignore:
923 * gcj/org/freedesktop/Makefile.am:
924 * gcj/org/freedesktop/dbus/.cvsignore:
925 * gcj/org/freedesktop/dbus/Makefile.am:
926 * gcj/org/freedesktop/dbus/Message.java: (Message),
928 * gcj/org/freedesktop/dbus/natMessage.cc:
929 Fix the build system.
931 2003-06-22 Havoc Pennington <hp@pobox.com>
933 * mono/Connection.cs: add more bindings
935 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
938 2003-06-22 Havoc Pennington <hp@pobox.com>
940 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
941 Start wrapping more stuff.
943 2003-06-22 Havoc Pennington <hp@pobox.com>
945 * mono/Message.cs: implement Message.Wrap() that ensures we only
946 have a single C# wrapper per DBusMessage, assuming it works which
949 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
950 (dbus_message_free_data_slot): new
951 (dbus_message_set_data): new
952 (dbus_message_get_data): new
954 2003-06-22 Havoc Pennington <hp@pobox.com>
956 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
957 (_dbus_data_slot_allocator_alloc): rework these to keep a
958 reference count on each slot and automatically manage a global
959 slot ID variable passed in by address
961 * bus/bus.c: convert to new dataslot API
963 * dbus/dbus-bus.c: convert to new dataslot API
965 * dbus/dbus-connection.c: convert to new dataslot API
967 * dbus/dbus-server.c: convert to new dataslot API
969 * glib/dbus-gmain.c: ditto
973 * bus/connection.c: ditto
975 2003-06-22 Anders Carlsson <andersca@codefactory.se>
977 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
978 after the gcj checks so that the correct configuration tags
979 will be added to libtool.
981 * dbus-glib-1.pc.in: No need to specify any includes since
982 dbus-1.pc.in has those.
984 2003-06-22 Havoc Pennington <hp@pobox.com>
986 * mono/*, gcj/*, configure.in, Makefile.am:
987 Check in makefiles and subdirs for mono and gcj bindings.
988 Neither binding actually exists, just trying to get through
989 all the build and other boring bits.
991 2003-06-21 Philip Blundell <philb@gnu.org>
993 * tools/dbus-monitor.1: Updated.
995 * tools/dbus-send.1: Likewise.
997 2003-06-20 Anders Carlsson <andersca@codefactory.se>
999 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
1000 for hangup and error after checking read so we won't discard
1001 pending data if both hangup and read are set.
1003 2003-06-19 Philip Blundell <philb@gnu.org>
1005 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
1007 * tools/dbus-send.c: Accept both --system and --session.
1009 * tools/dbus-monitor.c: Same here.
1011 2003-06-19 Anders Carlsson <andersca@codefactory.se>
1013 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
1014 from C++ (Patch by Miloslav Trmac).
1016 2003-06-15 Joe Shaw <joe@assbarn.com>
1018 * configure.in: Check for socklen_t.
1020 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
1022 * test/test-segfault.c: Add #include <sys/time.h>
1024 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
1025 dbus-launch needs it.
1027 2003-06-09 Havoc Pennington <hp@redhat.com>
1029 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
1030 SUN_LEN, it breaks abstract socket usage
1032 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
1035 2003-06-04 Havoc Pennington <hp@pobox.com>
1037 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
1038 using unix:abstract=/foo, and when listening in a tmpdir
1039 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
1041 * dbus/dbus-transport.c (_dbus_transport_open): support
1044 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1045 support abstract sockets
1047 * dbus/dbus-transport-unix.c
1048 (_dbus_transport_new_for_domain_socket): support abstract sockets
1050 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
1051 toggle as an argument, implement abstract namespace support
1052 (_dbus_listen_unix_socket): ditto
1054 * configure.in: add --enable-abstract-sockets and implement
1055 a configure check for autodetection of the right value.
1057 2003-06-01 Havoc Pennington <hp@pobox.com>
1059 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
1060 in /tmp (though on Linux this will end up being useless,
1061 when we add abstract namespace support)
1063 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
1066 2003-05-28 Colin Walters <walters@verbum.org>
1068 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
1070 2003-05-18 Anders Carlsson <andersca@codefactory.se>
1072 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
1074 2003-05-17 Colin Walters <walters@gnu.org>
1076 * tools/dbus-send.c: Don't exit with an error code if --help was
1077 passed. Default to using the session bus instead of the system
1080 * tools/dbus-launch.c: Ditto.
1082 * tools/dbus-monitor.c: Ditto.
1084 * tools/dbus-send.1: Update with new arguments.
1086 * tools/dbus-launch.c: Emit code to export variables. New
1087 arguments -s and -c to specify shell syntax, and a bit of code to
1088 autodetect syntax. Also, allow specifying a program to run.
1090 * tools/dbus-launch.1: Update with new arguments.
1092 * tools/dbus-send.1: Ditto.
1094 * tools/dbus-monitor.1: Ditto.
1096 2003-05-17 Havoc Pennington <hp@pobox.com>
1098 * bus/config-parser.c (merge_included): merge in policies from
1099 child configuration file.
1101 * bus/policy.c (bus_policy_merge): function to merge two policies
1104 2003-05-16 Havoc Pennington <hp@redhat.com>
1106 * dbus/dbus-connection.c: disable verbose lock spew
1108 * tools/dbus-send.c: add --print-reply command line option
1110 * tools/dbus-print-message.h (print_message): new util function
1111 shared by dbus-send and dbus-monitor
1113 * tools/dbus-monitor.c (handler_func): exit on disconnect
1115 * dbus/dbus-transport-unix.c (do_reading): if the transport is
1116 disconnected, don't try to use the read_watch
1118 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
1119 so we can find this bug more easily
1121 2003-05-16 Havoc Pennington <hp@redhat.com>
1123 * bus/policy.c (free_rule_list_func): avoid a crash when passed
1124 NULL as DBusHashTable is annoyingly likely to do.
1126 2003-05-16 Colin Walters <walters@verbum.org>
1128 * tools/dbus-monitor.c: Add --session argument and usage()
1131 * tools/dbus-monitor.1: Update with new --session arg.
1133 * bus/Makefile.am (install-data-hook): Create
1134 $(libdir)/dbus-1.0/services so that the session bus is happy.
1136 2003-05-15 Havoc Pennington <hp@redhat.com>
1138 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
1139 on non-x86. ifdef's are evil.
1141 2003-05-15 Havoc Pennington <hp@redhat.com>
1143 * configure.in: 0.11
1147 * bus/Makefile.am (initddir): apparently we are supposed to put
1148 init scripts in /etc/rc.d/init.d not /etc/init.d
1150 * bus/Makefile.am: remove the "you must --enable-tests to make
1151 check" as it broke distcheck
1153 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
1155 2003-05-13 James Willcox <jwillcox@gnome.org>
1158 * bus/activation.c: (bus_activation_service_created),
1159 (bus_activation_activate_service):
1160 * bus/driver.c: (bus_driver_send_service_deleted),
1161 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1162 (bus_driver_send_service_acquired),
1163 (bus_driver_send_welcome_message),
1164 (bus_driver_handle_list_services):
1165 * bus/session.conf.in:
1166 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
1167 (dbus_bus_service_exists), (dbus_bus_activate_service):
1170 Add some convenience API which lets you activate a service, and did a
1171 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
1172 and dbus_message_get_args()
1174 2003-05-11 Havoc Pennington <hp@pobox.com>
1176 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
1177 calling _dbus_marshal_validate_arg() for every byte in a byte
1180 * dbus/dbus-message-handler.c: use atomic reference counting to
1181 reduce number of locks slightly; the global lock in here sucks
1183 * dbus/dbus-connection.c
1184 (_dbus_connection_update_dispatch_status_and_unlock): variant of
1185 update_dispatch_status that can be called with lock held; then use
1186 in a couple places to reduce locking/unlocking
1187 (dbus_connection_send): hold the lock over the whole function
1188 instead of acquiring it twice.
1190 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
1192 * bus/connection.c (bus_connections_setup_connection): fix access
1193 to already-freed memory.
1195 * dbus/dbus-connection.c: keep a little cache of linked list
1196 nodes, to avoid using the global linked list alloc lock in the
1197 normal send-message case. Instead we just use the connection lock
1198 that we already have to take.
1200 * dbus/dbus-list.c (_dbus_list_find_last): new function
1202 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
1203 change to use a struct for the atomic type; fix docs,
1204 they return value before increment, not after increment.
1206 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
1207 (_dbus_string_append_8_aligned): new functions to try to
1208 microoptimize this operation.
1209 (reallocate_for_length): break this out of set_length(), to
1210 improve profile info, and also so we can consider inlining the
1213 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
1214 strings with some preallocation, cuts down on our calls to realloc
1215 a fair bit. Though if we can get the "move entire string to empty
1216 string" optimization below to kick in here, it would be better.
1218 * dbus/dbus-string.c (_dbus_string_move): just call
1219 _dbus_string_move_len
1220 (_dbus_string_move_len): add a special case for moving
1221 an entire string into an empty string; we can just
1222 swap the string data instead of doing any reallocs.
1223 (_dbus_string_init_preallocated): new function
1225 2003-05-11 Havoc Pennington <hp@pobox.com>
1227 Write a "test-profile" that does echo client-server with threads;
1228 profile reveals lock contention, memcpy/realloc of buffers, and
1229 UTF-8 validation as hot spots. 20% of lock contention eliminated
1230 with dbus_atomic_inc/dec implementation on x86. Much remaining
1231 contention is global mempool locks for GList and DBusList.
1233 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
1236 * dbus/dbus-connection.c (struct DBusConnection): use
1237 dbus_atomic_t for the reference count
1239 * dbus/dbus-message.c (struct DBusMessage): declare
1240 dbus_atomic_t values as volatile
1242 * configure.in: code to detect ability to use atomic integer
1243 operations in assembly, from GLib patch
1245 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
1246 time, tired of it being wrong in threads and forked processes
1248 * glib/test-profile.c: a little program to bounce messages back
1249 and forth between threads and eat CPU
1251 * dbus/dbus-connection.c: add debug spew macros for debugging
1252 thread locks; include config.h at top; fix deadlock in
1253 dbus_connection_flush()
1255 2003-05-08 Havoc Pennington <hp@pobox.com>
1257 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
1258 data from getting written, and there wasn't a good reason to
1261 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
1262 dbus_verbose lines in test coverage
1263 (main): add list of functions sorted by # of untested blocks
1264 to the coverage report
1266 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
1268 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
1270 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
1271 extend test coverage
1273 * test/data/auth/cancel.auth-script: test canceling an
1276 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
1277 aren't used. in CVS history if we end up needing them.
1279 2003-05-04 Havoc Pennington <hp@pobox.com>
1281 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
1284 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
1285 function, which assumed length was in # of strings, not bytes
1287 * dbus/dbus-message.c (_dbus_message_test): add tests for some
1290 * dbus/dbus-connection.c
1291 (_dbus_connection_queue_received_message): disable function for
1292 now, we are only using it in test mode
1294 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1295 remove a mistaken FIXME
1297 2003-05-04 Havoc Pennington <hp@pobox.com>
1299 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
1300 unlock mutex on successful return, patch from Anders Gustafsson
1302 2003-05-04 Havoc Pennington <hp@pobox.com>
1304 * dbus-glib-1.pc.in (Requires): fix dependencies, from
1307 2003-05-04 Havoc Pennington <hp@pobox.com>
1309 * tools/dbus-launch.c: implement
1311 * bus/main.c (main), bus/bus.c (bus_context_new):
1312 implement --print-pid and --fork
1314 2003-05-03 Havoc Pennington <hp@redhat.com>
1316 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
1317 the address had no value, and add to test suite. Fix and
1318 regression test from Miloslav Trmac
1320 2003-05-03 Havoc Pennington <hp@pobox.com>
1322 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
1323 watch is invalid when handled
1325 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
1326 dbus-launch utility to launch the bus from a shell script. Didn't
1327 actually implement dbus-launch yet, it's just a placeholder still.
1329 2003-05-03 Havoc Pennington <hp@pobox.com>
1331 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
1332 daemon; also documents daemon config file, so replaces
1333 doc/config-file.txt. Corrected some stuff from config-file.txt in
1334 the process of moving it.
1336 2003-05-03 Havoc Pennington <hp@pobox.com>
1338 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
1341 2003-05-03 Colin Walters <walters@verbum.org>
1343 * dbus/dbus-sysdeps.c (fill_user_info): Test against
1344 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
1346 * Makefile.am: Update to use new .pc versioning scheme.
1348 2003-05-02 Havoc Pennington <hp@redhat.com>
1350 * bus/system.conf.in: allow send/receive to/from message bus
1353 2003-04-30 Havoc Pennington <hp@redhat.com>
1355 * configure.in: print a note when building with unit tests and
1358 2003-04-30 Havoc Pennington <hp@redhat.com>
1360 * Makefile.am: add a check-local that complains if you didn't
1361 configure with --enable-tests
1363 2003-04-29 Havoc Pennington <hp@redhat.com>
1365 * glib/dbus-gmain.c: docs cleanups
1367 * dbus/dbus-types.h: add docs on int64 types
1369 * dbus/dbus-memory.c: fix docs to avoid putting private API in
1370 public API docs section
1372 2003-04-29 Havoc Pennington <hp@redhat.com>
1374 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
1375 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
1376 parallel install API version, not with the D-BUS package version.
1378 * HACKING: move some of README over here
1380 * README: updates, and document API/ABI policy
1382 * configure.in: reindentation
1384 2003-04-29 Havoc Pennington <hp@redhat.com>
1386 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
1387 to use this library" to be sure people have the right
1390 2003-04-28 Havoc Pennington <hp@redhat.com>
1392 * configure.in: add --enable-docs which by default is auto yes if
1393 doxygen and db2html found, no otherwise; but can be forced on/off
1395 * doc/Makefile.am: conditionalize whether to build docs on
1398 2003-04-28 Havoc Pennington <hp@redhat.com>
1400 * configure.in: 0.10
1404 * bus/system.conf.in: add <includedir>system.d</includedir>
1406 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
1407 username was provided but not uid
1409 * bus/config-parser.c (struct BusConfigParser): keep track of
1410 whether the parser is toplevel or was included; change some
1411 of the error handling if it's included.
1413 2003-04-27 Havoc Pennington <hp@pobox.com>
1417 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
1418 report correct status if we finish processing authentication
1419 inside this function.
1421 * bus/activation.c (try_send_activation_failure): use
1422 bus_transaction_send_error_reply
1424 * bus/connection.c (bus_connection_get_groups): return an error
1425 explaining the problem
1427 * bus/bus.c (bus_context_check_security_policy): implement
1428 restriction here that inactive connections can only send the
1429 hello message. Also, allow bus driver to send anything to
1432 * bus/connection.c (bus_connection_complete): create the
1433 BusClientPolicy here instead of on-demand.
1434 (bus_connection_get_policy): don't return an error
1436 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
1437 sender field in message being replied to
1439 * bus/bus.c (bus_context_check_security_policy): fix silly typo
1440 causing it to return FALSE always
1442 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
1443 we checked sender rather than destination
1445 2003-04-25 Havoc Pennington <hp@redhat.com>
1447 test suite is slightly hosed at the moment, will fix soon
1449 * bus/connection.c (bus_connections_expire_incomplete): fix to
1450 properly disable the timeout when required
1451 (bus_connection_set_name): check whether we can remove incomplete
1452 connections timeout after we complete each connection.
1454 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
1455 probably still broken.
1457 * bus/services.c (bus_registry_acquire_service): implement max
1458 number of services owned, and honor allow/deny rules on which
1459 services a connection can own.
1461 * bus/connection.c (bus_connection_get_policy): report errors here
1463 * bus/activation.c: implement limit on number of pending
1466 2003-04-25 Havoc Pennington <hp@redhat.com>
1468 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
1469 where we used >= 0 instead of != DBUS_UID_UNSET.
1471 2003-04-25 Havoc Pennington <hp@redhat.com>
1473 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
1474 were toggled without add/remove, fix from Anders Gustafsson
1476 2003-04-24 Havoc Pennington <hp@redhat.com>
1478 * test/data/valid-config-files/basic.conf: add <limit> tags to
1481 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
1482 <limit> tag in configuration file.
1484 2003-04-24 Havoc Pennington <hp@redhat.com>
1486 * bus/dispatch.c: somehow missed some name_is
1488 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
1489 (_dbus_timeout_set_interval): new
1491 * bus/connection.c (bus_connections_setup_connection): record time
1492 when each connection is first set up, and expire them after the
1493 auth timeout passes.
1495 2003-04-24 Havoc Pennington <hp@redhat.com>
1497 * dbus/dbus-message.c (dbus_message_name_is): rename
1498 (dbus_message_service_is): rename
1499 (dbus_message_sender_is): rename
1500 (dbus_message_get_service): rename
1502 2003-04-24 Havoc Pennington <hp@redhat.com>
1504 * configure.in: add --enable-checks
1506 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
1508 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
1509 to use thread locks.
1510 (_dbus_connection_handler_destroyed_locked): move some private
1511 functions into proper docs group
1513 * dbus/dbus-internals.h: add _dbus_return_if_fail,
1514 _dbus_return_val_if_fail
1516 Throughout: use dbus_return_if_fail
1518 2003-04-23 James Willcox <jwillcox@gnome.org>
1521 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
1522 (dbus_connection_setup_with_g_main),
1523 (dbus_server_setup_with_g_main):
1524 * glib/test-dbus-glib.c: (main):
1525 * glib/test-thread-client.c: (main):
1526 * glib/test-thread-server.c: (new_connection_callback), (main):
1527 * tools/dbus-monitor.c: (main):
1529 Added a GMainContext argument to dbus_connection_setup_with_g_main()
1530 and dbus_server_setup_with_g_main().
1532 2003-04-20 Havoc Pennington <hp@pobox.com>
1534 * doc/dbus-specification.sgml: document the restrictions on
1535 message and service names
1537 2003-04-22 Havoc Pennington <hp@redhat.com>
1539 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
1540 support, and do some code cleanups to share more code and
1541 speed up array marshal/demarshal.
1543 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
1545 * configure.in: generate dbus-arch-deps.h
1547 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
1550 2003-04-22 Havoc Pennington <hp@redhat.com>
1552 * test/data/valid-messages/opposite-endian.message: fix test
1553 to use proper type for rply field
1555 * test/data/invalid-messages: add tests for below validation
1557 * dbus/dbus-message.c (decode_header_data): validate field types,
1558 and validate that named fields are valid names
1559 (decode_name_field): consider messages in the
1560 org.freedesktop.Local. namespace to be invalid.
1562 * dbus/dbus-string.c (_dbus_string_validate_name): new
1564 2003-04-19 Havoc Pennington <hp@pobox.com>
1566 * bus/driver.c (bus_driver_handle_hello): check limits and
1567 return an error if they are exceeded.
1569 * bus/connection.c: maintain separate lists of active and inactive
1570 connections, and a count of each. Maintain count of completed
1571 connections per user. Implement code to check connection limits.
1573 * dbus/dbus-list.c (_dbus_list_unlink): export
1575 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
1576 number of bytes in the message queue for a connection
1578 2003-04-18 Havoc Pennington <hp@pobox.com>
1580 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
1582 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
1585 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
1586 on realloc be sure to update the pointer in the keyring
1588 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
1589 offset to avoid writing to unallocated memory
1591 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
1592 try the next mechanism, so we properly handle OOM
1594 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
1596 (_dbus_keyring_new): fix OOM bug
1597 (_dbus_keyring_new_homedir): always set error; impose a maximum
1598 number of keys we'll load from the file, mostly to speed up the
1599 test suite and make its OOM checks more useful, but also for
1602 * dbus/dbus-auth.c (process_error_server): reject authentication
1603 if we get an error from the client
1604 (process_cancel): on cancel, send REJECTED, per the spec
1605 (process_error_client): send CANCEL if we get an error from the
1608 2003-04-18 Havoc Pennington <hp@pobox.com>
1610 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
1613 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
1616 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
1617 about DBUS_TEST_HOMEDIR once
1619 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
1622 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
1623 config file so we test the right thing
1625 Throughout: assorted docs improvements
1627 2003-04-18 Havoc Pennington <hp@pobox.com>
1629 * glib/dbus-gmain.c: adapt to watch changes
1631 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
1633 * dbus/dbus-server.h: remove dbus_server_handle_watch
1635 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
1637 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
1638 like DBusTimeout, so we don't need dbus_connection_handle_watch
1641 2003-04-17 Havoc Pennington <hp@redhat.com>
1643 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
1644 database usage so it all goes via the DBusUserDatabase cache.
1646 2003-04-17 Havoc Pennington <hp@redhat.com>
1648 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
1649 there was an OOM watch we skipped, we always return TRUE so we
1650 iterate again to have a look at it again. Fixes test suite hang.
1651 Code rearrangement also lets us lose some memset and only iterate
1652 over callbacks once.
1654 * bus/driver.c (bus_driver_handle_message): sense of test for
1657 2003-04-16 Havoc Pennington <hp@pobox.com>
1659 * doc/dbus-specification.sgml: make spec say serials are unsigned
1661 * dbus/dbus-message.h: change message serials to unsigned
1663 * dbus/dbus-connection.c: adapt to message serials being unsigned
1665 2003-04-15 Havoc Pennington <hp@pobox.com>
1667 * bus/bus.c: create and keep around a shared DBusUserDatabase
1670 * bus/connection.c (bus_connection_get_groups): don't cache
1671 groups for user in the connection object, since user database
1672 object now does that.
1674 2003-04-16 Havoc Pennington <hp@redhat.com>
1676 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
1677 list of size counters
1678 (_dbus_message_loader_putback_message_link): put back a popped link
1680 * dbus/dbus-connection.c
1681 (dbus_connection_set_max_live_messages_size): rename
1683 (dbus_connection_get_outgoing_size): get size of outgoing
1685 (_dbus_connection_set_connection_counter): remove this cruft
1687 2003-04-14 Havoc Pennington <hp@redhat.com>
1689 * dbus/dbus-userdb.c: user database abstraction, mostly to get
1690 caching, but at some point we might want to be able to use a
1693 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
1694 SHA1 conf file to test the sha1 auth mechanism, since the regular
1695 test always uses EXTERNAL when available.
1698 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
1699 add conf file that requires use of sha1 auth
1701 2003-04-13 Havoc Pennington <hp@pobox.com>
1703 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
1704 from Philip Blundell to send messages and monitor them.
1706 2003-04-13 Havoc Pennington <hp@pobox.com>
1708 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
1711 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
1714 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
1715 fix to only recover unused bytes if we're already authenticated
1716 (_dbus_transport_get_is_authenticated): fix to still mark us
1717 authenticated if there are unused bytes.
1719 * bus/dispatch.c: implement security policy checking
1721 * bus/connection.c (bus_transaction_send_from_driver): new
1723 * bus/bus.c (bus_context_check_security_policy): new
1725 * bus/dispatch.c (send_service_nonexistent_error): delete this,
1726 now we just set the DBusError and it gets converted to an error
1729 * bus/connection.c (allow_user_function): enable code using actual
1730 data from the config file
1732 * bus/policy.c (list_allows_user): handle wildcard rules for
1733 user/group connection perms
1735 2003-04-13 Havoc Pennington <hp@pobox.com>
1737 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
1739 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
1741 * bus/policy.c (bus_policy_append_mandatory_rule)
1742 (bus_policy_append_default_rule, bus_policy_append_user_rule)
1743 (bus_policy_append_group_rule): new functions
1745 2003-04-12 Havoc Pennington <hp@pobox.com>
1747 * bus/config-parser.c (bus_config_parser_new): fix a memleak
1749 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
1750 the pid/gid/uid, just for paranoia.
1752 * test/break-loader.c (randomly_do_n_things): find a byte
1753 containing a type code, and randomly change it to a different
1756 2003-04-12 Havoc Pennington <hp@pobox.com>
1758 * bus/policy.h: change BusPolicy to be the thing from the config
1759 file, and rename old BusPolicy to BusClientPolicy
1761 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
1762 match change in how policy works
1764 * dbus/dbus-internals.h: mark assert_not_reached as
1765 __attribute((noreturn))__
1767 2003-04-11 Havoc Pennington <hp@redhat.com>
1769 * doc/dbus-specification.sgml: fix a spot with the wrong name for
1770 the broadcast service. Use boolean return for ServiceExists.
1772 2003-04-11 Havoc Pennington <hp@redhat.com>
1774 * configure.in: add another directory to look for qt in.
1776 2003-04-11 Havoc Pennington <hp@redhat.com>
1778 * AUTHORS: add Colin Walters
1780 2003-04-11 Havoc Pennington <hp@redhat.com>
1786 2003-04-11 Havoc Pennington <hp@redhat.com>
1788 * bus/messagebus.in: remove pid file when stopping the
1789 message bus, since the bus won't have privileges to remove it
1792 2003-04-11 Havoc Pennington <hp@redhat.com>
1794 * bus/bus.c (bus_context_new): move credentials change after
1797 2003-04-11 Havoc Pennington <hp@pobox.com>
1799 * test/decode-gcov.c: add "below average functions" to the
1800 coverage report, and change how some of the code works.
1802 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
1803 not in the coverage stats.
1805 * test/test-service.c (main): use _dbus_verbose not fprintf in a
1806 couple places so running the test suite doesn't result in megaspam.
1808 2003-04-11 Havoc Pennington <hp@pobox.com>
1810 * bus/dispatch.c (check_existent_service_activation): accept a no
1811 memory error in a place we didn't before
1813 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
1814 in case the first one failed," since the test suite is less
1817 2003-04-10 Havoc Pennington <hp@pobox.com>
1819 * bus/dispatch.c (check_segfault_service_activation): add test
1820 for launching an executable that just crashes.
1822 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
1823 don't leave a million cores. We'll see how portable this is.
1825 2003-04-10 Havoc Pennington <hp@pobox.com>
1827 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
1828 the possible parent failures before we fork, so that we don't
1829 fail to create a babysitter after creating the child.
1831 * bus/activation.c (bus_activation_activate_service): kill child
1832 if we don't successfully complete the activation.
1834 2003-04-10 Havoc Pennington <hp@redhat.com>
1836 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
1837 the connection if it's disconnected
1839 * bus/activation.c (bus_activation_service_created): use new
1840 transaction features to roll back removal of pending activation if
1841 we don't successfully create the service after all. Don't remove
1842 pending activation if the function fails.
1844 * dbus/dbus-list.c (_dbus_list_insert_before_link)
1845 (_dbus_list_insert_after_link): new code to facilitate
1848 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
1849 new functionality, so we can preallocate the ability to insert
1852 * bus/connection.c (bus_transaction_add_cancel_hook): new function
1853 allowing us to put custom hooks in a transaction to be used for
1854 cancelling said transaction
1856 * doc/dbus-specification.sgml: add some discussion of secondary
1857 service owners, and disallow zero-length service names
1859 * bus/services.c (bus_registry_acquire_service): new function,
1860 splits out part of bus_driver_handle_acquire_service() and fixes
1861 a bug where we didn't remove the service doing the acquiring
1862 from the secondary queue if we failed to remove the current owner
1863 from the front of the queue.
1865 2003-04-10 Alexander Larsson <alexl@redhat.com>
1867 * doc/dbus-specification.sgml:
1868 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
1870 2003-04-10 Alexander Larsson <alexl@redhat.com>
1875 Added files to cvsignore
1877 * dbus/dbus-message.h:
1878 * dbus/dbus-message.c: (dbus_message_iter_get_named):
1879 Make get_named() take two out argument and return a boolean.
1880 (dbus_message_iter_get_args_valist):
1881 Update usage of get_named().
1882 (dbus_message_iter_append_byte):
1884 (dbus_message_iter_append_named)
1886 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
1889 2003-04-10 Alexander Larsson <alexl@redhat.com>
1891 * dbus/dbus-marshal.[ch]:
1892 Add array_type_pos argument to _dbus_marshal_validate_arg.
1893 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
1895 * dbus/dbus-message.[ch]:
1896 Multi-dimensional arrays have full type specification in the
1897 outermost array. Iter code re-arranged to handle this.
1898 Added some more iter tests.
1900 * doc/dbus-specification.sgml:
1903 Update new array encoding description.
1904 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
1906 * test/data/invalid-messages/array-with-mixed-types.message:
1907 * test/data/valid-messages/array-of-array-of-uint32.message:
1908 Change to the new array format.
1910 * test/data/invalid-messages/too-short-dict.message:
1913 * test/data/valid-messages/recursive-types.message:
1914 Fix up and extend test.
1916 2003-04-10 Havoc Pennington <hp@pobox.com>
1918 * bus/dispatch.c: lots of fixes
1920 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
1921 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
1922 that was crack, broke the test service.
1924 * dbus/dbus-transport.c (_dbus_transport_open): fix error
1925 handling to avoid piling up errors if we get a failure on the
1928 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
1929 pid in assertion failures.
1931 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
1932 to some fixed size of file descriptor array. Don't return TRUE
1933 anytime a timeout exists, that led to lots of busy loop silliness
1936 2003-04-09 Havoc Pennington <hp@redhat.com>
1938 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
1939 I'd checked this in earlier but hadn't.
1941 2003-04-09 Havoc Pennington <hp@redhat.com>
1943 * bus/dispatch.c (bus_dispatch_test): get a bit further through
1944 the activation test (man this is getting old!)
1946 2003-04-09 Havoc Pennington <hp@redhat.com>
1948 * test/test-utils.c: use dispatch status function to fix this up
1950 * bus/connection.c (connection_watch_callback): don't dispatch
1952 (connection_timeout_callback): don't dispatch from here
1953 (bus_connections_setup_connection): set the dispatch status function
1954 (bus_connection_disconnected): unset it
1956 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
1957 used to add a connection to be dispatched
1958 (_dbus_loop_iterate): do the dispatching at the end of each
1961 * dbus/dbus-connection.c
1962 (dbus_connection_set_dispatch_status_function): new function
1963 allowing us to fix up main loop usage
1964 (_dbus_connection_last_unref): free all the various function
1966 (dbus_connection_dispatch): call the DispatchStatusFunction
1967 whenever this function returns
1968 (dbus_connection_handle_watch): call DispatchStatusFunction
1969 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
1970 (reply_handler_timeout): call DispatchStatusFunction
1971 (dbus_connection_flush): call DispatchStatusFunction
1973 2003-04-09 Havoc Pennington <hp@redhat.com>
1975 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
1978 * bus/dispatch.c (check_service_activated): fix bug in test
1980 * dbus/dbus-mainloop.c (check_timeout): fix this up
1982 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
1983 verbose output so we can sort out output from different processes,
1984 e.g. in the activation case.
1986 2003-04-08 Colin Walters <walters@gnu.org>
1988 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
1990 (bus_context_new): Set it.
1991 (bus_context_unref): Use it to delete the pid file.
1993 2003-04-08 Havoc Pennington <hp@redhat.com>
1995 * test/data/invalid-messages/array-with-mixed-types.message:
1996 regression test that fails for the moment
1998 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
1999 tests for convenience
2001 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
2002 array of nil, it broke things.
2004 * test/data/invalid-messages/array-of-nil.message: regression test
2006 * test/data/valid-messages/array-of-array-of-uint32.message:
2007 happened to write this so added it to suite
2009 2003-04-08 Havoc Pennington <hp@redhat.com>
2011 * bus/driver.c (bus_driver_handle_acquire_service): init
2012 retval/reply before checking name
2014 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
2015 recursion depth argument
2017 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
2018 in the public struct for future extension
2020 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
2023 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
2026 * doc/dbus-specification.sgml: fix typo
2028 2003-04-08 Alexander Larsson <alexl@redhat.com>
2030 Implemented recursive types, named types and new-style iters
2033 * glib/test-thread-client.c: (thread_func):
2034 * glib/test-thread-server.c: (handle_test_message):
2035 * test/test-service.c: (handle_echo):
2044 * dbus/dbus-internals.c: (_dbus_type_to_string):
2045 Update for new types.
2047 * dbus/dbus-marshal.[ch]:
2048 Implement recursive types and the new marshalling format.
2049 Remove hardcoded dict marshalling.
2050 Marshal named types.
2052 * dbus/dbus-message-builder.c:
2054 Remove references to old types
2056 * dbus/dbus-message.[ch]:
2057 New non-refcounted iter API that supports recursive iters.
2058 Use iters for appending, including support for recursive
2060 Add byte and named type support.
2061 Update everything to new marshalling formats.
2062 Add tests for new API.
2064 * dbus/dbus-protocol.h:
2065 Remove old array types.
2066 Add types: BYTE, ARRAY, DICT, NAMED
2068 * dbus/dbus-string.c:
2069 * dbus/dbus-sysdeps.c:
2070 Make parse_double locale safe.
2072 * dbus/dbus-test-main.c:
2078 * doc/dbus-specification.sgml:
2081 * test/data/incomplete-messages/missing-body.message:
2082 * test/data/invalid-messages/bad-boolean.message:
2083 * test/data/invalid-messages/bad-boolean-array.message:
2084 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
2085 * test/data/invalid-messages/boolean-has-no-value.message-raw:
2086 * test/data/invalid-messages/too-short-dict.message:
2087 * test/data/valid-messages/dict-simple.message:
2088 * test/data/valid-messages/dict.message:
2089 * test/data/valid-messages/emptiness.message:
2090 * test/data/valid-messages/lots-of-arguments.message:
2091 * test/data/valid-messages/no-padding.message:
2092 * test/data/valid-messages/recursive-types.message:
2093 Add missing NAME fields
2094 Fix up dicts & arrays
2096 * test/data/invalid-messages/dict-with-nil-value.message:
2097 Removed, this is not invalid anymore.
2099 * test/data/valid-messages/recursive-types.message:
2100 Add new test for deeply recursive types.
2102 2003-04-07 Havoc Pennington <hp@pobox.com>
2104 * bus/driver.c (bus_driver_handle_acquire_service): return an
2105 error if you try to acquire a service that starts with ':'
2107 2003-04-07 Havoc Pennington <hp@redhat.com>
2109 * doc/dbus-specification.sgml: require that base service names
2110 start with ':' and that the base service is created/deleted
2111 as first and last things a connection does on the bus
2113 * bus/dispatch.c (check_existent_service_activation): lots more
2114 work on the activation test; it doesn't fully pass yet...
2116 * test/test-service.c (main): fix so we don't memleak the
2117 connection to the message bus
2118 (filter_func): accept a message asking us to exit
2120 2003-04-06 Havoc Pennington <hp@pobox.com>
2122 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
2125 * configure.in: fixes to Qt detection from Colin Walters
2127 * doc/Makefile.am: Only remove generated docbook dirs if they
2128 exist, from Colin Walters
2130 * dbus/dbus-bus.c: change how we set well-known connections to
2131 NULL, so that it works if a single connection is stored in
2132 two well-known array slots.
2134 * test/Makefile.am: remove a lot of stuff that isn't immediately
2135 useful, it's in CVS history if we want it.
2137 * test/test-service.c: use dbus-mainloop instead of that
2140 2003-04-06 Havoc Pennington <hp@pobox.com>
2142 * dbus/Makefile.am: split lists of sources into stuff that goes in
2143 the library, util functions that go in the lib and are also used
2144 elsewhere, and util functions that are used in tests/daemon but
2145 don't go in the lib.
2147 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
2148 here so it can be used in test binaries also
2150 2003-04-06 Havoc Pennington <hp@pobox.com>
2152 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
2153 here in the parent process, so we can return an error if it
2154 fails. Also, move some of the code into the child so the parent
2155 is less hosed if we fail midway through.
2157 * bus/bus.c (bus_context_new): move pidfile detection further up
2158 in the function, before we start overwriting sockets and such.
2160 * bus/messagebus.in: adjust this a bit, not sure if it will work.
2162 * configure.in: add --with-system-pid-file and --with-system-socket
2164 2003-04-06 Colin Walters <walters@verbum.org>
2166 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
2168 * bus/system.conf.in: Declare a pidfile.
2170 * bus/bus.c (bus_context_new): Test for an existing pid file, and
2171 create one (if appropriate).
2173 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
2174 (struct BusConfigParser) [pidfile]: New.
2175 (element_type_to_name, merge_included, start_busconfig_child)
2176 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
2177 (bus_config_parser_unref): Free it.
2178 (bus_config_parser_get_pidfile): New function.
2180 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
2182 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
2184 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
2186 * dbus/dbus-sysdeps.h: Prototype it.
2188 2003-04-06 Havoc Pennington <hp@pobox.com>
2190 * bus/bus.c (bus_context_new): print the address in here, rather
2191 than in main(), because we need to do it before forking the daemon
2193 * bus/dispatch.c (send_service_nonexistent_error): set the sender
2194 on the service nonexistent error
2196 * bus/driver.c (bus_driver_handle_acquire_service): set the
2197 sender on the AcquireService reply
2199 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
2200 server also listen on a UNIX socket so services can connect to it.
2202 2003-04-06 Havoc Pennington <hp@pobox.com>
2204 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
2205 so it detects deadlocks and also we actually init threads when
2208 2003-04-06 Havoc Pennington <hp@pobox.com>
2210 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2211 save the domain socket name, and unlink it when we disconnect the
2212 server. Means that at least when we exit normally, we won't leave
2213 a bunch of junk in /tmp
2215 * dbus/dbus-transport-unix.c
2216 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
2217 memory management). (I was making a real change here but then
2220 2003-04-06 Havoc Pennington <hp@pobox.com>
2222 * bus/bus.c (bus_context_new): fix wrong handling of
2223 server_data_slot_unref() in the error case.
2225 * dbus/dbus-internals.h (_dbus_assert): change so it passes
2226 "(condition) != 0" to _dbus_real_assert so that
2227 "_dbus_assert (pointer)" doesn't cause a warning
2229 * bus/main.c (main): accept --print-address option to print out
2230 the message bus address
2232 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
2234 * dbus/dbus-transport.c (_dbus_transport_open): special error for
2235 "tmpdir" option to unix: address on client side
2237 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
2240 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
2241 we can use to create sockets in the test suite.
2243 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
2244 cleanly. To be used for testing.
2246 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
2248 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
2250 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
2251 handle trying to call this when there's no servers active
2253 2003-04-05 Havoc Pennington <hp@pobox.com>
2259 2003-04-05 Havoc Pennington <hp@pobox.com>
2261 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
2262 crash on startup. Need to get "try starting the daemon"
2263 in the test suite I guess. ;-)
2265 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
2266 tracked the number of open connections; it's better done in
2267 application-specific code as you want it to span all servers etc.
2269 2003-04-05 Havoc Pennington <hp@pobox.com>
2271 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
2272 patch from Colin Walters
2274 2003-04-05 Havoc Pennington <hp@pobox.com>
2276 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
2277 reality; in fact multiple mechanisms are allowed.
2279 * dbus/dbus-internals.c (_dbus_real_assert)
2280 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
2281 _dbus_assert_not_reached() into functions, so that they don't show
2282 up in basic block counts for test coverage, and don't use up as
2283 much disk space. Does mean slower execution speed though, so
2284 assumes --disable-asserts is the normal production case.
2286 2003-04-05 Havoc Pennington <hp@pobox.com>
2288 * test/Makefile.am (dist-hook): also dist *.in files
2294 2003-04-05 Havoc Pennington <hp@pobox.com>
2296 * dbus/dbus-string.c: docs warning
2298 * dbus/dbus-spawn.c: missing docs
2300 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
2302 2003-04-05 Havoc Pennington <hp@pobox.com>
2304 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
2307 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
2308 to -1 once we've reaped the babysitter
2309 (_dbus_babysitter_handle_watch): do as much work as we can, not
2312 * bus/activation.c: add code using DBusBabysitter so that we
2313 handle it when a service fails to start up properly.
2314 (bus_activation_service_created): don't remove the activation
2315 entries as we go, just let them get removed when we free the pending
2316 activation. Unref reply messages after sending them.
2318 2003-04-05 Havoc Pennington <hp@pobox.com>
2320 * test/decode-gcov.c (main): print per-directory stats in the report
2322 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
2324 2003-04-05 Havoc Pennington <hp@pobox.com>
2326 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
2328 * test/decode-gcov.c: hack up a little program to suck data
2329 out of gcov files. Yes this is sort of silly.
2331 * configure.in: define something in config.h and do an
2332 AM_CONDITIONAL when gcov is enabled
2334 2003-04-04 Havoc Pennington <hp@redhat.com>
2336 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
2337 return a "babysitter" object that is used to monitor the status of
2338 the spawned process and reap it when required.
2340 * test/test-segfault.c, test/test-exit.c,
2341 test/test-sleep-forever.c: binaries that do various lame things,
2342 used in the test suite.
2344 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
2346 2003-04-03 Havoc Pennington <hp@pobox.com>
2348 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
2349 in preparation for modifying it, dbus-sysdeps is getting
2352 2003-04-03 Havoc Pennington <hp@redhat.com>
2354 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
2357 * bus/*.[hc]: adapt to mainloop change
2359 2003-04-03 Havoc Pennington <hp@redhat.com>
2361 * bus/activation.c (load_directory): fix up memleaks
2362 (bus_activation_entry_free): free the entry
2364 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
2365 we get one from the message bus; fix memleaks.
2367 * dbus/dbus-message.c (dbus_set_error_from_message): new function
2369 2003-04-03 Havoc Pennington <hp@pobox.com>
2371 * bus/config-parser.c (bus_config_parser_unref): free
2372 list of mechanisms, bug discovered by test suite enhancements
2373 (putting system.conf and session.conf into suite)
2375 * test/Makefile.am, test/test-service.c: add placeholder for a
2376 test service that we'll activate as part of test suite. Doesn't
2379 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
2380 setting NULL value, and use system malloc not dbus_malloc()
2381 when we have unavoidable memleakage.
2383 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
2384 didn't work, and support DBUS_BUS_ACTIVATION.
2386 * bus/activation.c (child_setup): pass our well-known bus type to
2389 * bus/config-parser.c: support <type> to specify well-known type
2391 * doc/dbus-specification.sgml: document the env variables to
2392 locate well-known buses and find service activator
2394 2003-04-02 Havoc Pennington <hp@redhat.com>
2396 * test/Makefile.am (all-local): add a rule to copy tests to
2397 builddir, so we can have generated tests. Use this to remove the
2398 silly hack for testing system.conf and session.conf. Will use this
2399 shortly to generate .service files pointing to test binaries.
2401 2003-04-02 Havoc Pennington <hp@redhat.com>
2403 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
2404 current alloc and needed new length, not max of the doubled
2405 allocation and needed new length. Also, when building tests,
2406 don't do the double-allocation stuff, just realloc every time.
2408 2003-04-02 Havoc Pennington <hp@redhat.com>
2410 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
2412 (_dbus_string_get_dirname): new
2413 (_dbus_sysdeps_test): new
2414 (_dbus_directory_open): include dirnames in error messages
2416 * bus/config-parser.c: interpret <include> and <includedir> and
2417 <servicedir> relative to config file location if the given
2418 filename is not absolute.
2420 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
2422 2003-04-02 Havoc Pennington <hp@redhat.com>
2424 * bus/connection.c (bus_transaction_send_error_reply): set sender
2425 service for the error, and unref the reply on success
2427 * bus/activation.c: convert to use BusTransaction so OOM can be
2429 (bus_activation_service_created): set sender of the message
2431 2003-04-01 Havoc Pennington <hp@redhat.com>
2433 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
2434 <includedir> (at least mostly)
2436 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
2437 first, then the user ID
2439 2003-04-01 Havoc Pennington <hp@pobox.com>
2441 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
2444 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
2446 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
2448 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
2449 socket 0777, and unlink any existing socket.
2451 * bus/bus.c (bus_context_new): change our UID/GID and fork if
2452 the configuration file so specifies; set up auth mechanism
2455 * bus/config-parser.c (bus_config_parser_content): add support
2456 for <fork> option and fill in code for <auth>
2458 * bus/system.conf.in: add <fork/> to default configuration,
2459 and limit auth mechanisms to EXTERNAL
2461 * doc/config-file.txt (Elements): add <fork>
2463 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
2464 (_dbus_change_identity): new function
2466 2003-03-31 Havoc Pennington <hp@redhat.com>
2468 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
2469 (_dbus_listen_unix_socket): fix off-by-one error in null
2470 termination spotted by Nalin
2472 2003-03-31 Havoc Pennington <hp@redhat.com>
2474 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
2475 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
2476 having a real home directory available.
2478 2003-03-31 Havoc Pennington <hp@redhat.com>
2480 * bus/Makefile.am (install-data-hook): create /var/run/dbus
2482 * bus/messagebus.in: add init script for Red Hat /etc/init.d
2484 * configure.in: add support for specifying a style of init script
2487 2003-03-31 Havoc Pennington <hp@redhat.com>
2489 Fix some annoying DBusString API and fix all affected code.
2491 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
2493 (_dbus_string_get_data): change to return string instead of using
2495 (_dbus_string_get_const_data): ditto
2496 (_dbus_string_get_data_len): ditto
2497 (_dbus_string_get_const_data_len): ditto
2499 2003-03-31 Havoc Pennington <hp@redhat.com>
2501 * bus/main.c (main): fix up the command line arguments to be nicer
2503 2003-03-31 Havoc Pennington <hp@redhat.com>
2505 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
2506 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
2507 final location that lands in the config file
2509 * bus/config-loader-expat.c (bus_config_load): fix type of
2512 * doc/TODO: remove TODO item for dbus_bus_get()
2514 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
2516 2003-03-31 Havoc Pennington <hp@pobox.com>
2518 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
2519 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
2520 argument since they are always client side
2522 * dbus/dbus-server.c (dbus_server_get_address): new function
2524 * bus/main.c (main): take the configuration file as an argument.
2526 * test/data/valid-config-files/debug-allow-all.conf: new file to
2527 use with dispatch.c tests for example
2529 * bus/test-main.c (main): require test data dir
2531 * bus/bus.c (bus_context_new): change this to take a
2532 configuration file name as argument
2534 * doc/config-file.txt (Elements): add <servicedir>
2536 * bus/system.conf, bus/session.conf: new files
2538 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
2539 well-known socket if none set
2541 * configure.in: create system.conf and session.conf
2543 2003-03-30 Havoc Pennington <hp@pobox.com>
2545 * bus/config-parser.c: hacking
2547 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
2548 to shut down, since it could cause weirdness with the DBusList
2551 * dbus/dbus-list.c (_dbus_list_test): add tests for the
2552 link-oriented stack routines
2553 (alloc_link): free the mempool if the first alloc from it fails
2555 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
2557 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
2559 (_dbus_string_skip_white): new
2561 * doc/config-file.txt (Elements): add <includedir>
2563 2003-03-28 Havoc Pennington <hp@pobox.com>
2565 * dbus/dbus-string.c (_dbus_string_copy_data_len)
2566 (_dbus_string_copy_data): new functions
2568 2003-03-28 Anders Carlsson <andersca@codefactory.se>
2570 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
2574 * dbus/dbus-memory.c:
2577 2003-03-28 Havoc Pennington <hp@pobox.com>
2579 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
2580 I think it may have just been superstition. Not sure.
2582 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
2583 failures that were not being handled.
2585 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
2587 * dbus/dbus-memory.c: add ability to set number of mallocs in a
2588 row that will fail on out-of-memory.
2590 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
2591 function for testing out-of-memory handling.
2593 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
2594 allocation functions, they do map exactly to the expat ones.
2596 2003-03-27 Havoc Pennington <hp@redhat.com>
2598 * bus/config-loader-libxml.c (bus_config_load): add another error
2601 2003-03-26 Anders Carlsson <andersca@codefactory.se>
2604 Add note about automatic service activation.
2606 * doc/dbus-specification.sgml:
2607 Rename the specification and clarify a few things.
2609 2003-03-26 Anders Carlsson <andersca@codefactory.se>
2612 * dbus/dbus-address.c:
2614 * dbus/dbus-marshal.c:
2615 * dbus/dbus-server-debug-pipe.c:
2616 * dbus/dbus-transport-unix.c:
2617 Fix documentation warnings.
2619 2003-03-26 Havoc Pennington <hp@pobox.com>
2621 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
2622 after every test so it's quick and easy to see which leaked, and
2623 so we test multiple dbus_shutdown() calls
2625 * configure.in: change configure.in XML stuff to also support
2628 * config-loader-libxml.c: some hacking
2630 * config-loader-expat.c: some hacking
2632 * config-parser.c: some hacking, plus tests
2634 2003-03-25 Havoc Pennington <hp@redhat.com>
2636 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
2638 * configure.in: add --with-xml option to specify XML library,
2639 right now only libxml is supported.
2641 * bus/config-loader-libxml.c, config-parser.c: sync some minor
2642 nonworking code between home and work, still just stubs
2644 2003-03-24 Havoc Pennington <hp@redhat.com>
2646 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
2649 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
2650 NULL argument for "message" if the error is a well-known one,
2651 fill in a generic message in this case.
2653 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
2656 * bus/test.c (bus_test_flush_bus): add
2658 * bus/policy.c (bus_policy_test): test code stub
2660 2003-03-24 Havoc Pennington <hp@pobox.com>
2662 * bus/connection.c (bus_connections_setup_connection): set up
2663 the "can this user connect" function, but it always returns
2664 TRUE until we have a config file parser so we can have a config
2665 file that allows connections.
2667 2003-03-23 Havoc Pennington <hp@pobox.com>
2669 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
2670 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
2671 the mutex, so we can check for proper memory management
2674 * dbus/dbus-dataslot.c: remove the mutex from
2675 DBusDataSlotAllocator and lock it manually when using it,
2676 to simplify fitting it into the global slots framework.
2678 * dbus/dbus-threads.c (init_static_locks): rework how we're
2679 handling global locks so they are easily shut down.
2681 * bus/policy.c (bus_policy_append_rule): fix
2683 * bus/test-main.c (main): check for memleaks
2685 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
2686 test suite check for memleaks
2688 * dbus/dbus-memory.c: add support in test mode for tracking
2689 number of outstanding blocks
2691 2003-03-23 Havoc Pennington <hp@pobox.com>
2693 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
2696 * dbus/dbus-hash.h: add ULONG hash keys
2698 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
2699 (_dbus_get_group_id): new function
2701 2003-03-20 Havoc Pennington <hp@redhat.com>
2703 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
2705 (dbus_connection_get_unix_user): new function
2707 2003-03-20 Havoc Pennington <hp@pobox.com>
2709 * bus/connection.c (bus_connection_send_oom_error): assert that
2710 message has a sender
2711 (connection_execute_transaction): ditto
2712 (bus_connection_preallocate_oom_error): fix to set the sender, and
2713 set recipient to the destination service, not the bus driver
2715 * bus/policy.c: hacking
2717 * dbus/dbus-message.c (dbus_message_service_is): new function
2718 (dbus_message_sender_is): new
2720 2003-03-19 Havoc Pennington <hp@redhat.com>
2722 * bus/policy.c: start sketching code for policy restrictions on
2723 what connections can do.
2725 2003-03-18 Havoc Pennington <hp@redhat.com>
2727 * doc/TODO: some notes on high-level todo items. Little nitpick
2728 stuff is all in @todo, so no need to add it here.
2730 * doc/config-file.txt: some notes on how config file might look
2732 2003-03-18 Anders Carlsson <andersca@codefactory.se>
2738 2003-03-17 Havoc Pennington <hp@redhat.com>
2740 * dbus/dbus-internals.h: add gcc attributes so that
2741 our printf-style functions warn on bad arguments to
2744 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
2747 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2750 2003-03-17 Havoc Pennington <hp@redhat.com>
2752 * bus/test-main.c (main): make it print something as it runs
2753 so make check doesn't look stuck
2755 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
2756 from CVS, now obsolete
2758 2003-03-17 Anders Carlsson <andersca@codefactory.se>
2760 * bus/dispatch.c: (bus_dispatch):
2761 Refetch the service name since it may have been reallocated
2762 when dbus_message_set_sender was called.
2764 * dbus/dbus-sysdeps.c: (_dbus_accept):
2765 Add address and address length variables and use them to stop
2766 valgrind from complaining.
2768 2003-03-17 Havoc Pennington <hp@pobox.com>
2770 All tests pass, no memleaks, no valgrind complaints.
2772 * bus/test.c: refcount handler_slot
2774 * bus/connection.c (bus_connections_new): refcount
2775 connection_data_slot
2777 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
2778 bytes so that auth scripts pass.
2780 * bus/dispatch.c: init message_handler_slot so it gets allocated
2783 * bus/dispatch.c (message_handler_slot_ref): fix memleak
2785 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
2786 dealloc server_pipe_hash when no longer used for benefit of
2789 * dbus/dbus-auth.c (process_command): memleak fix
2791 * bus/dispatch.c (check_hello_message): memleak fix
2793 2003-03-16 Havoc Pennington <hp@pobox.com>
2795 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
2797 2003-03-17 Anders Carlsson <andersca@codefactory.se>
2799 * bus/activation.c (bus_activation_activate_service): Append
2800 the pending activation entry to the list of pending activations.
2802 2003-03-16 Havoc Pennington <hp@pobox.com>
2804 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
2807 * dbus/dbus-address.c (create_entry): fix OOM handling when
2808 failing to alloc entry->method
2810 2003-03-16 Havoc Pennington <hp@pobox.com>
2812 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
2815 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
2816 add some missing dbus_set_result
2818 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
2819 alloc the DBusMessageHandler
2821 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
2822 the transport here, since we call this from the finalizer; it
2823 resulted in a double-finalize.
2825 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
2826 where we tried to use transport->connection that was NULL,
2827 happened when transport was disconnected early on due to OOM
2829 * bus/*.c: adapt to handle OOM for watches/timeouts
2831 * dbus/dbus-transport-unix.c: port to handle OOM during
2834 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
2835 reference to unused bytes instead of a copy
2837 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
2840 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
2843 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
2846 2003-03-16 Anders Carlsson <andersca@codefactory.se>
2848 * doc/dbus-specification.sgml:
2849 Document reply message for ActivateService.
2851 2003-03-16 Anders Carlsson <andersca@codefactory.se>
2853 * bus/activation.c: (bus_pending_activation_entry_free),
2854 (bus_pending_activation_free), (bus_activation_new),
2855 (bus_activation_unref), (bus_activation_service_created),
2856 (bus_activation_activate_service):
2858 * bus/bus.c: (bus_context_new):
2859 * bus/desktop-file.c: (new_section):
2860 * bus/driver.c: (bus_driver_send_service_deleted),
2861 (bus_driver_handle_activate_service):
2862 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
2864 * dbus/dbus-connection.c:
2865 (dbus_connection_send_with_reply_and_block):
2866 * dbus/dbus-message.c: (dbus_message_append_args_valist):
2867 * dbus/dbus-protocol.h:
2868 Make activation work better. Now pending activations will be queued
2869 and the daemon won't try to activate services that are already registered.
2871 2003-03-16 Havoc Pennington <hp@pobox.com>
2873 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
2876 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
2877 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
2879 2003-03-16 Havoc Pennington <hp@pobox.com>
2881 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
2882 this. always run the test suite before commit...
2884 * bus/*: adapt to DBusConnection API changes
2886 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
2887 requires renaming stuff to avoid dbus_connection_dispatch name
2890 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
2893 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2894 separate from _dbus_message_loader_return_buffer()
2896 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
2897 this, because it's now always broken to use; the number of
2898 messages in queue vs. the number still buffered by the message
2899 loader is undefined/meaningless. Should use
2900 dbus_connection_get_dispatch_state().
2901 (dbus_connection_dispatch): rename from
2902 dbus_connection_dispatch_message
2904 2003-03-16 Havoc Pennington <hp@pobox.com>
2906 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
2909 2003-03-16 Anders Carlsson <andersca@codefactory.se>
2911 * dbus/dbus-connection.c:
2912 (dbus_connection_send_with_reply_and_block):
2913 Decrease connection->n_incoming when removing an entry
2915 * dbus/dbus-dict.c: (dbus_dict_entry_free),
2916 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
2917 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
2918 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
2919 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
2920 (dbus_dict_get_byte_array):
2921 Handle NULL arrays and strings. Also add support for byte arrays.
2923 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
2924 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
2925 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2926 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2927 (_dbus_demarshal_dict), (demarshal_and_validate_len),
2928 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
2929 * dbus/dbus-marshal.h:
2930 Add support for marshalling and demarshalling empty arrays and strings.
2932 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2933 (dbus_message_append_string_array),
2934 (dbus_message_iter_get_boolean),
2935 (dbus_message_iter_get_boolean_array),
2936 (dbus_message_iter_get_int32_array),
2937 (dbus_message_iter_get_uint32_array),
2938 (dbus_message_iter_get_double_array),
2939 (dbus_message_iter_get_byte_array),
2940 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
2941 (check_message_handling):
2942 Add support for getting empty arrays and dicts.
2944 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
2945 Don't do any validation at all for now, that's better than just checking
2948 * test/data/valid-messages/emptiness.message:
2949 New test message with lots of empty arrays.
2951 2003-03-16 Havoc Pennington <hp@pobox.com>
2953 * dbus/dbus-connection.c
2954 (_dbus_connection_queue_received_message_link): new function that
2955 can't fail due to OOM
2957 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
2958 new function pops a message together with a list link
2961 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
2962 message queuing functions to avoid needing to alloc memory
2964 2003-03-16 Havoc Pennington <hp@pobox.com>
2966 Oops - test code was only testing failure of around 30 of the
2967 mallocs in the test path, but it turns out there are 500+
2968 mallocs. I believe this was due to misguided linking setup such
2969 that there was one copy of dbus_malloc etc. in the daemon and one
2970 in the shared lib, and only daemon mallocs were tested. In any
2971 case, the test case now tests all 500+ mallocs, and doesn't pass
2972 yet, though there are lots of fixes in this patch.
2974 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2975 this so that it doesn't need to allocate memory, since it
2976 has no way of indicating failure due to OOM (and would be
2977 annoying if it did).
2979 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
2981 * bus/Makefile.am: rearrange to create two self-contained
2982 libraries, to avoid having libraries with overlapping symbols.
2983 that was resulting in weirdness, e.g. I'm pretty sure there
2984 were two copies of global static variables.
2986 * dbus/dbus-internals.c: move the malloc debug stuff to
2989 * dbus/dbus-list.c (free_link): free list mempool if it becomes
2992 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
2994 * dbus/dbus-address.c (dbus_parse_address): free list nodes
2997 * bus/dispatch.c (bus_dispatch_add_connection): free
2998 message_handler_slot when no longer using it, so
2999 memory leak checkers are happy for the test suite.
3001 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
3003 * bus/bus.c (new_connection_callback): disconnect in here if
3004 bus_connections_setup_connection fails.
3006 * bus/connection.c (bus_connections_unref): fix to free the
3008 (bus_connections_setup_connection): if this fails, don't
3009 disconnect the connection, just be sure there are no side
3012 * dbus/dbus-string.c (undo_alignment): unbreak this
3014 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
3016 (_dbus_auth_new): fix the order in which we free strings
3019 * bus/connection.c (bus_connection_disconnected): fix to
3020 not send ServiceDeleted multiple times in case of memory
3023 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
3024 get the base service name
3025 (dbus_bus_register_client): don't return base service name,
3026 instead store it on the DBusConnection and have an accessor
3028 (dbus_bus_register_client): rename dbus_bus_register()
3030 * bus/dispatch.c (check_hello_message): verify that other
3031 connections on the bus also got the correct results, not
3032 just the one sending hello
3034 2003-03-15 Havoc Pennington <hp@pobox.com>
3036 Make it pass the Hello handling test including all OOM codepaths.
3037 Now to do other messages...
3039 * bus/services.c (bus_service_remove_owner): fix crash when
3040 removing owner from an empty list of owners
3041 (bus_registry_ensure): don't leave service in the list of
3042 a connection's owned services if we fail to put the service
3045 * bus/connection.c (bus_connection_preallocate_oom_error): set
3046 error flag on the OOM error.
3048 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3049 handle _dbus_transport_set_connection failure
3051 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
3052 to create watches up front and simply enable/disable them as
3054 (unix_connection_set): this can now fail on OOM
3056 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
3057 of enabling/disabling a watch or timeout.
3059 * bus/loop.c (bus_loop_iterate): don't touch disabled
3062 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
3064 2003-03-15 Havoc Pennington <hp@pobox.com>
3066 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
3067 write useful test code, after all that futzing around ;-)
3069 Test does not yet pass because we can't handle OOM in
3070 _dbus_transport_messages_pending (basically,
3071 dbus_connection_preallocate_send() does not prealloc the write
3072 watch). To fix this, I think we need to add new stuff to
3073 set_watch_functions, namely a SetEnabled function so we can alloc
3074 the watch earlier, then enable it later.
3076 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
3077 dbus-memory.c to the convenience lib
3079 * bus/test.c: rename some static functions to keep them clearly
3080 distinct from stuff in connection.c. Handle client disconnection.
3082 2003-03-14 Havoc Pennington <hp@pobox.com>
3084 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
3085 transport, tests more of the real codepath. Set up clients
3086 with bus_setup_debug_client.
3088 * bus/test.c (bus_setup_debug_client): function to set up debug
3089 "clients" on the main loop
3091 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
3094 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
3097 * dbus/dbus-server-debug.c: support a debug server based on pipes
3099 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
3100 (_dbus_close): new function
3102 * configure.in: check for socketpair
3104 2003-03-14 Havoc Pennington <hp@redhat.com>
3106 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
3109 * dbus/dbus-transport-debug.c: rework this a good bit to be
3110 less complicated. hopefully still works.
3112 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
3115 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
3118 * dbus/dbus-message.c (dbus_message_copy): rename from
3119 dbus_message_new_from_message, fix it up to copy
3120 all the message fields, add test case
3122 * bus/dispatch.c (bus_dispatch_test): add some more test code,
3123 not quite passing yet
3125 2003-03-14 Havoc Pennington <hp@pobox.com>
3127 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
3128 until no work remains" in test code. (the large diff here
3129 is just code movement, no actual changes)
3131 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
3132 1, no point waiting around for test code.
3133 (_dbus_server_debug_accept_transport): unref the timeout
3134 after adding it (right?)
3136 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
3138 2003-03-13 Havoc Pennington <hp@redhat.com>
3140 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
3143 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
3146 * dbus/dbus-connection.h: Make AddWatchFunction and
3147 AddTimeoutFunction return a bool so they can fail on out-of-memory
3149 * bus/bus.c (bus_context_new): set up timeout handlers
3151 * bus/connection.c (bus_connections_setup_connection): set up
3154 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
3157 * bus/bus.c (bus_context_new): adapt to changes
3159 * bus/connection.c: adapt to changes
3161 * test/watch.c: adapt to DBusWatch changes
3163 * bus/dispatch.c (bus_dispatch_test): started adding this but
3166 2003-03-14 Anders Carlsson <andersca@codefactory.se>
3168 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
3170 2003-03-13 Havoc Pennington <hp@pobox.com>
3172 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
3173 set up a test framework as for the library
3175 2003-03-12 Havoc Pennington <hp@pobox.com>
3177 Throughout: purge global variables, introduce BusActivation,
3178 BusConnections, BusRegistry, etc. objects instead.
3180 * bus/bus.h, bus/bus.c: introduce BusContext as a global
3183 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
3184 going to redo this a bit differently I think
3186 2003-03-12 Havoc Pennington <hp@redhat.com>
3188 Mega-patch that gets the message bus daemon initially handling
3189 out-of-memory. Work still needed. Also lots of random
3190 moving stuff to DBusError instead of ResultCode.
3192 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
3194 * dbus/dbus-connection.c
3195 (dbus_connection_send_with_reply_and_block): use DBusError
3197 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
3200 * dbus/dbus-connection.c (dbus_connection_send): drop the result
3201 code here, as the only failure possible is OOM.
3203 * bus/connection.c (bus_connection_disconnect):
3204 rename bus_connection_disconnected as it's a notification only
3206 * bus/driver.c (bus_driver_handle_acquire_service): don't free
3207 "name" on get_args failure, should be done by get_args;
3208 don't disconnect client for bad args, just return an error.
3209 (bus_driver_handle_service_exists): ditto
3211 * bus/services.c (bus_services_list): NULL-terminate returned array
3213 * bus/driver.c (bus_driver_send_service_lost)
3214 (bus_driver_send_service_acquired): send messages from driver to a
3215 specific client to the client's unique name, not to the broadcast
3218 * dbus/dbus-message.c (decode_header_data): reject messages that
3219 contain no name field
3220 (_dbus_message_get_client_serial): rename to
3221 dbus_message_get_serial and make public
3222 (_dbus_message_set_serial): rename from set_client_serial
3223 (_dbus_message_set_reply_serial): make public
3224 (_dbus_message_get_reply_serial): make public
3226 * bus/connection.c (bus_connection_foreach): allow stopping
3227 iteration by returning FALSE from foreach function.
3229 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
3230 (dbus_connection_free_preallocated_send)
3231 (dbus_connection_preallocate_send): new API for sending a message
3232 without possibility of malloc failure.
3233 (dbus_connection_send_message): rename to just
3234 dbus_connection_send (and same for whole function family)
3236 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
3238 * dbus/dbus-sysdeps.c (_dbus_exit): new function
3240 * bus/activation.c: handle/return errors
3242 * dbus/dbus-errors.h: add more DBUS_ERROR #define
3244 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
3245 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
3246 (_dbus_result_from_errno): move to this file
3248 2003-03-10 Anders Carlsson <andersca@codefactory.se>
3250 * dbus/dbus-marshal.c:
3251 (_dbus_marshal_set_string):
3252 Take a length argument so we can marshal the correct string
3255 (_dbus_marshal_dict), (_dbus_demarshal_dict),
3256 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
3257 (_dbus_marshal_test):
3258 * dbus/dbus-marshal.h:
3259 Add support for marshalling and demarshalling dicts.
3261 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3262 Add support for TYPE DICT.
3264 * dbus/dbus-message.c: (set_string_field):
3265 Adjust header padding.
3267 (dbus_message_append_args_valist), (dbus_message_append_dict),
3268 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
3269 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
3270 (check_message_handling), (check_have_valid_message):
3271 * dbus/dbus-message.h:
3272 Add functions for setting and getting dicts.
3274 * dbus/dbus-protocol.h:
3280 * doc/dbus-specification.sgml:
3281 Add information about how dicts are marshalled.
3283 * test/data/invalid-messages/dict-with-nil-value.message:
3284 * test/data/invalid-messages/too-short-dict.message:
3285 * test/data/valid-messages/dict-simple.message:
3286 * test/data/valid-messages/dict.message:
3287 Add sample messages containing dicts.
3289 2003-03-08 Anders Carlsson <andersca@codefactory.se>
3291 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
3293 2003-03-07 Anders Carlsson <andersca@codefactory.se>
3296 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
3297 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
3298 (dbus_dict_set_int32), (dbus_dict_set_uint32),
3299 (dbus_dict_set_double), (dbus_dict_set_string),
3300 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3301 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3302 (dbus_dict_set_string_array), (_dbus_dict_test):
3304 Fix according to comments from Havoc.
3306 2003-03-06 Michael Meeks <michael@server.home>
3308 * configure.in: if we don't have kde-config, disable have_qt.
3310 2003-03-07 Anders Carlsson <andersca@codefactory.se>
3315 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
3316 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
3317 (dbus_dict_remove), (dbus_dict_get_value_type),
3318 (dbus_dict_get_keys), (dbus_dict_put_boolean),
3319 (dbus_dict_put_int32), (dbus_dict_put_uint32),
3320 (dbus_dict_put_double), (dbus_dict_put_string),
3321 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
3322 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
3323 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
3324 (dbus_dict_get_int32), (dbus_dict_get_uint32),
3325 (dbus_dict_get_double), (dbus_dict_get_string),
3326 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
3327 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
3328 (dbus_dict_get_string_array), (_dbus_dict_test):
3330 Add DBusDict implementation
3332 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
3336 2003-03-04 Havoc Pennington <hp@pobox.com>
3338 * test/data/auth/*: adapt to changes
3340 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
3341 USERID_BASE64 and change USERNAME_BASE64 to put in username not
3344 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
3345 more stuff from being in a context name, to make the protocol
3346 simpler to deal with
3348 * dbus/dbus-errors.c (dbus_error_has_name): new function
3349 (dbus_error_is_set): new function
3351 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
3352 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
3354 * dbus/dbus-connection.c (dbus_connection_flush): also read
3355 messages during a flush operation
3357 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
3359 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3361 * configure.in: Check for gethostbyname on Solaris.
3363 * dbus/dbus-transport.c: (_dbus_transport_open):
3364 Remove duplicate "tcp" entry.
3366 * doc/dbus-specification.sgml:
3367 Clarify some things.
3369 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3371 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
3372 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
3373 (_dbus_keyring_test):
3374 * dbus/dbus-md5.c: (_dbus_md5_compute):
3375 * dbus/dbus-sha.c: (_dbus_sha_compute):
3378 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3380 * README: Add some things.
3382 2003-03-04 Anders Carlsson <andersca@codefactory.se>
3384 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
3385 after case DBUS_TYPE_BOOELAN.
3387 2003-03-02 Havoc Pennington <hp@pobox.com>
3389 * test/break-loader.c (randomly_set_extreme_ints): add test that
3390 sets really huge and small integers
3392 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
3393 that length of boolean array fits in the string, and that
3394 string has room for boolean value in single-bool case.
3396 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
3397 optional value to "ALIGN" command which is what to fill the
3400 * test/data/valid-messages/no-padding.message: add regression
3401 test for the message padding problem
3403 2003-03-02 Havoc Pennington <hp@pobox.com>
3405 * dbus/dbus-message.c (decode_header_data): fix to always init
3406 message_padding, from Benjamin Dauvergne
3408 2003-03-02 Havoc Pennington <hp@pobox.com>
3414 2003-03-01 Joe Shaw <joe@assbarn.com>
3416 * configure.in: Check for "struct cmsgcred" and try to access its
3417 members for BSD-like unices.
3419 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
3420 _dbus_read_credentials_unix_socket().
3421 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
3422 read() for reading the credential byte off the unix socket. Use
3423 struct cmsgcred on systems that support it.
3425 2003-02-27 Alexander Larsson <alexl@redhat.com>
3429 Make gthreads-2.0 dependency optional. Don't build thread test if
3432 2003-02-27 Havoc Pennington <hp@pobox.com>
3434 * dbus/dbus-connection.c
3435 (dbus_connection_send_message_with_reply_and_block): fix doh!
3436 doh! doh! bug that resulted in never removing a reply from the
3437 queue, no wonder we called get_reply_serial so much ;-)
3439 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
3440 and client serial instead of demarshaling them every time
3442 2003-02-27 Havoc Pennington <hp@pobox.com>
3444 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
3445 more inlined, using dbus-string-private.h, speeds things up
3448 * dbus/dbus-string.c (_dbus_string_free): apply align offset
3449 when freeing the string
3450 (_dbus_string_steal_data): fix for align offset
3451 (undo_alignment): new function
3453 2003-02-26 Havoc Pennington <hp@redhat.com>
3455 All kinds of audit fixes from Owen, plus initial attempt to
3456 handle unaligned memory returned from malloc.
3458 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
3459 leave room for align_offset and nul byte
3460 (fixup_alignment): function to track an align_offset and
3461 ensure real->str is aligned
3462 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
3463 to allow a nul byte plus align offset
3464 (_dbus_string_lock): fix overflow issue
3465 (_dbus_string_init_const_len): add assertions on sanity of len,
3466 assign allocated to be ALLOCATION_PADDING larger than len
3467 (set_length): fixup the overflow handling
3468 (_dbus_string_get_data_len): fix overflow in assertion
3469 (open_gap): detect overflow in size of gap to be opened
3470 (_dbus_string_lengthen): add overflow check
3471 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
3472 (_dbus_string_append): add overflow check
3473 (_dbus_string_append_unichar): overflow
3474 (_dbus_string_delete): fix overflow in assertion
3475 (_dbus_string_copy_len): overflow in assertion
3476 (_dbus_string_replace_len): overflows in assertions
3477 (_dbus_string_find): change to implement in terms of
3478 _dbus_string_find_to
3479 (_dbus_string_find_to): assorted fixage
3480 (_dbus_string_equal_c_str): assert c_str != NULL,
3481 fix logic so the function works
3482 (_dbus_string_ends_with_c_str): fix overflow thingy
3483 (_dbus_string_base64_encode): overflow fix
3484 (_dbus_string_validate_ascii): overflow
3485 (_dbus_string_validate_nul): overflow
3487 2003-02-26 Havoc Pennington <hp@redhat.com>
3489 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
3491 2003-02-26 Alexander Larsson <alexl@redhat.com>
3494 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
3496 * dbus/dbus-connection.c:
3497 * dbus/dbus-connection.h:
3498 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
3499 Add dbus_connection_set_wakeup_main_function and use it when queueing
3500 incoming and outgoing messages.
3503 * dbus/dbus-dataslot.c:
3504 Threadsafe usage of DBusDataSlotAllocator
3506 * dbus/dbus-message.c: (dbus_message_get_args_iter):
3509 * dbus/dbus-server-unix.c:
3512 * glib/dbus-gmain.c:
3513 Implement the new wakeup functions for glib.
3516 * glib/test-thread-client.c:
3517 * glib/test-thread-server.c:
3518 * glib/test-thread.h:
3519 Initial cut at some thread test code. Not really done yet.
3521 2003-02-26 Havoc Pennington <hp@pobox.com>
3523 * dbus/dbus-connection.c
3524 (dbus_connection_send_message_with_reply_and_block): fix crash
3525 where we ref'd the outgoing message instead of the returned reply
3527 * dbus/dbus-transport-unix.c (do_authentication): check read watch
3528 at the end of this function, so if we didn't need to read for
3529 authentication, we reinstall it for receiving messages
3531 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
3532 a NULL sender for peer-to-peer case
3534 * dbus/dbus-transport-unix.c (check_read_watch): handle
3535 !authenticated case correctly
3537 * glib/dbus-gmain.c: add support for DBusServer
3539 * dbus/dbus-server.c: add data slot support
3541 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
3542 return values and handle errors
3544 * dbus/dbus-dataslot.c: factor out the data slot stuff from
3547 * Doxyfile.in (INPUT): add glib subdir
3549 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
3550 setup_with_g_main instead of hookup_with_g_main; write docs
3552 2003-02-24 Anders Carlsson <andersca@codefactory.se>
3554 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
3555 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3556 * dbus/dbus-message.c: (dbus_message_append_boolean),
3557 (dbus_message_append_boolean_array),
3558 (dbus_message_get_args_valist), (_dbus_message_test):
3559 * dbus/dbus-message.h:
3560 * doc/dbus-specification.sgml:
3561 Various fixes as pointed out by Havoc.
3563 * test/data/invalid-messages/bad-boolean-array.message:
3564 * test/data/invalid-messages/bad-boolean.message:
3565 Add invalid boolean value test cases.
3567 2003-02-24 Anders Carlsson <andersca@codefactory.se>
3569 * dbus/dbus-internals.c: (_dbus_type_to_string):
3570 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
3571 (_dbus_marshal_validate_arg):
3572 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3573 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3574 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
3575 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
3576 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
3577 (dbus_message_iter_get_double),
3578 (dbus_message_iter_get_boolean_array), (message_iter_test):
3579 * dbus/dbus-message.h:
3580 * dbus/dbus-protocol.h:
3581 * doc/dbus-specification.sgml:
3582 * test/data/valid-messages/lots-of-arguments.message:
3583 Add support for boolean and boolean array types.
3585 2003-02-23 Havoc Pennington <hp@pobox.com>
3587 * dbus/dbus-keyring.c: finish most of this implementation and
3590 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
3591 these barf if the error isn't cleared to NULL
3593 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
3594 (_dbus_create_directory): new function
3596 * dbus/dbus-errors.c (dbus_set_error): fix warning
3598 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
3599 (_dbus_string_hex_decode): new function
3600 (test_hex_roundtrip): test code
3602 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
3604 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
3606 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
3607 the save-to-temp/rename trick to atomically write the new file
3608 (_dbus_string_parse_uint): new function
3610 2003-02-22 Havoc Pennington <hp@pobox.com>
3612 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
3614 2003-02-22 Havoc Pennington <hp@pobox.com>
3616 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
3617 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
3619 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
3621 * dbus/test/data/sha-1: add US government test suite for SHA-1
3623 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3625 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3626 Make string arrays NULL-terminated.
3628 * dbus/dbus-memory.c: (dbus_free_string_array):
3629 * dbus/dbus-memory.h:
3630 New function for freeing NULL-terminated string arrays.
3632 * dbus/dbus-message-builder.c: (append_quoted_string),
3633 (_dbus_message_data_load):
3634 Add support for array types.
3636 * dbus/dbus-message.c: (check_message_handling):
3637 Add more types as test cases.
3639 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
3640 (_dbus_string_parse_double):
3641 Add the start offset to the end offset.
3643 * test/data/valid-messages/lots-of-arguments.message:
3644 New test message with lots of arguments.
3646 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3648 * dbus/dbus-message.c: (dbus_message_append_nil),
3649 (dbus_message_append_int32), (dbus_message_append_uint32),
3650 (dbus_message_append_double), (dbus_message_append_string),
3651 (dbus_message_append_int32_array),
3652 (dbus_message_append_uint32_array),
3653 (dbus_message_append_double_array),
3654 (dbus_message_append_byte_array),
3655 (dbus_message_append_string_array):
3656 Fix all out-of-memory handling in these functions.
3658 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3660 * dbus/dbus-message.c: (dbus_message_append_nil):
3663 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3665 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3666 (dbus_message_append_nil), (dbus_message_append_int32_array),
3667 (dbus_message_append_uint32_array),
3668 (dbus_message_append_double_array),
3669 (dbus_message_append_byte_array),
3670 (dbus_message_append_string_array), (dbus_message_get_args_valist),
3671 (dbus_message_iter_get_int32_array),
3672 (dbus_message_iter_get_uint32_array),
3673 (dbus_message_iter_get_double_array),
3674 (dbus_message_iter_get_byte_array),
3675 (dbus_message_iter_get_string_array):
3677 * dbus/dbus-message.h:
3678 Add functions for appending and getting arrays.
3680 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3682 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
3683 element size at least 8 bytes, fixes mempool tests on
3686 2003-02-20 Alexander Larsson <alexl@redhat.com>
3688 * dbus/dbus-transport-unix.c (unix_do_iteration):
3689 Unlock the connection mutex during a blocking select call.
3690 Add todo about how we need a way to wake up the select.
3692 * dbus/dbus-connection-internal.h:
3693 * dbus/dbus-connection.c:
3694 Add _dbus_connection_lock and _dbus_connection_unlock.
3696 2003-02-19 Havoc Pennington <hp@pobox.com>
3698 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
3699 Doxyfile.in, not Doxyfile
3701 * dbus/dbus-keyring.c: do some hacking on this
3703 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
3705 * dbus/dbus-errors.c (dbus_set_error_const): do not call
3707 (dbus_set_error): remove dbus_error_init, check for message ==
3708 NULL *before* we sprintf into it, and add @todo about including
3709 system headers in this file
3711 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
3713 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
3715 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
3716 get various bits of user information based on either username
3718 (_dbus_homedir_from_username): new function
3720 2003-02-19 Anders Carlsson <andersca@codefactory.se>
3723 Add check for nonposix getpwnam_r
3725 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
3726 Align the pool element size to a sizeof (void *) boundary.
3728 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
3729 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
3730 General Solaris fixes.
3732 * test/data/valid-messages/simplest-manual.message:
3733 Explicitly state that we want little-endian packing.
3735 2003-02-19 Mikael Hallendal <micke@codefactory.se>
3737 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
3739 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
3740 Added to create a transport connecting using a tcp/ip socket.
3742 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
3743 to a tcp socket at given host and port.
3744 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
3747 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
3749 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
3750 Added to create a server listening on a TCP/IP socket.
3752 2003-02-19 Havoc Pennington <hp@pobox.com>
3754 Throughout: mop up all the Doxygen warnings and undocumented
3757 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
3758 to search any paths.
3760 * dbus/dbus-threads.c: move global mutex initializers to
3761 dbus-internals.h, multiple prototypes was confusing doxygen
3762 besides being kind of ugly
3764 * Doxyfile (PREDEFINED): have Doxygen define
3765 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
3766 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
3767 (do not abuse the feature! it's for stuff like the autogenerated
3768 macros in dbus-md5.c, not just for things you don't feel like
3771 2003-02-18 Havoc Pennington <hp@pobox.com>
3773 * dbus/dbus-string.c (_dbus_string_zero): new function
3775 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
3776 wrap it in some dbus-friendly API
3778 * dbus/dbus-types.h: add 16-bit types
3780 2003-02-18 Joe Shaw <joe@assbarn.com>
3782 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
3783 credentials from our currently running process.
3784 (get_word): Fix a buglet where we were copying the entire length
3785 instead of relative to our position.
3787 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
3788 keys on the stack... it's 640k of data.
3790 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
3791 read the credentials byte off the socket, even if we don't have
3793 (_dbus_poll): Implement poll() using select() for systems which
3796 * glib/test-dbus-glib.c (main): Print out an error if no
3797 parameters are given.
3799 * test/data/auth/fallback.auth-script: Added. Tests that a client
3800 can fallback to a secondary auth mechanism if the first fails.
3802 2003-02-18 Havoc Pennington <hp@pobox.com>
3806 2003-02-17 Havoc Pennington <hp@pobox.com>
3808 * doc/dbus-specification.sgml: lots of cosmetic
3809 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
3810 env variable to DBUS_BUS_ADDRESS, s/client/application/,
3811 s/server/bus/ (except in authentication section). Add a section
3812 "Message Bus Message Routing"
3814 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
3820 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3822 * doc/dbus-specification.sgml:
3823 Specification updates.
3825 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3827 * bus/activation.c: (bus_activation_init), (child_setup),
3828 (bus_activation_activate_service):
3830 * bus/main.c: (main):
3831 Set DBUS_ADDRESS environment variable.
3833 * dbus/dbus-errors.c: (dbus_set_error):
3834 Don't use va_copy since that's a C99 feature.
3836 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
3837 (_dbus_spawn_async):
3838 * dbus/dbus-sysdeps.h:
3839 Add child_setup_func to _dbus_spawn_async.
3841 * doc/dbus-specification.sgml:
3842 Update specification.
3844 * test/spawn-test.c: (setup_func), (main):
3847 2003-02-17 Alexander Larsson <alexl@redhat.com>
3849 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
3852 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3856 * doc/dbus-test-plan.sgml:
3857 Add test plan document.
3862 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3864 * dbus/dbus-message.c: (decode_header_data),
3865 (_dbus_message_loader_return_buffer):
3866 Set the header padding amount when loading a message.
3868 2003-02-16 Anders Carlsson <andersca@codefactory.se>
3870 * bus/dispatch.c: (send_one_message):
3871 Only send broadcast messages to registered connections.
3873 * dbus/dbus-message.c: (dbus_message_name_is):
3874 * dbus/dbus-message.h:
3875 New convenience function.
3877 * dbus/dbus-transport-debug.c: (do_reading):
3878 Only dispatch one message per run.
3881 * test/bus-test.c: (new_connection_callback), (die),
3882 (test_hello_client1_handler), (test_hello_client2_handler),
3883 (test_hello_replies), (main):
3885 * test/bus-test-loop.[ch]:
3888 2003-02-16 Havoc Pennington <hp@pobox.com>
3890 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
3891 backward conditional
3893 2003-02-16 Alexander Larsson <alexl@redhat.com>
3895 * dbus/dbus-connection.c:
3896 Implement sent_message_with_reply. (with_reply_and block is still
3898 Made dispatch_message not lose message if OOM.
3900 * dbus/dbus-errors.h:
3901 Add NoReply error (for reply timeouts).
3903 2003-02-16 Alexander Larsson <alexl@redhat.com>
3905 * dbus/dbus-hash.c (_dbus_hash_table_unref):
3906 Actually free keys and values when destroying hashtable.
3908 2003-02-16 Anders Carlsson <andersca@codefactory.se>
3910 * dbus/dbus-auth.c: (client_try_next_mechanism):
3913 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
3914 Return TRUE if there's no thread implementation around.
3916 * glib/dbus-gmain.c: (free_source),
3917 (dbus_connection_hookup_with_g_main):
3918 Make sure to remove the GSource when the connection is finalized.
3920 2003-02-16 Anders Carlsson <andersca@codefactory.se>
3922 * bus/dispatch.c: (bus_dispatch_message_handler):
3923 * dbus/dbus-errors.h:
3924 Return an error if someone tries to send a message to a service
3927 2003-02-16 Anders Carlsson <andersca@codefactory.se>
3929 * bus/activation.c: (load_directory), (bus_activation_init),
3930 (bus_activation_activate_service):
3933 (bus_driver_handle_activate_service), (bus_driver_handle_message):
3934 More work on the activation handling.
3936 * dbus/dbus-errors.h:
3937 Add some error messages
3939 * dbus/dbus-message.c: (dbus_message_new_error_reply):
3940 * dbus/dbus-message.h:
3941 New function that creates an error message.
3943 * dbus/dbus-protocol.h:
3944 Add ACTIVATE_SERVER message.
3946 * dbus/dbus-server-unix.c: (unix_handle_watch),
3947 (_dbus_server_new_for_domain_socket):
3948 Call _dbus_fd_set_close_on_exec.
3950 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
3951 (_dbus_spawn_async), (_dbus_disable_sigpipe),
3952 (_dbus_fd_set_close_on_exec):
3953 * dbus/dbus-sysdeps.h:
3954 Add _dbus_fd_set_close_on exec function. Also add function that checks
3955 that all open fds are set to close-on-exec and warns otherwise.
3957 * dbus/dbus-transport-unix.c:
3958 (_dbus_transport_new_for_domain_socket):
3959 Call _dbus_fd_set_close_on_exec.
3961 2003-02-16 Havoc Pennington <hp@pobox.com>
3963 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
3964 allow people to avoid setting SIGPIPE to SIG_IGN
3965 (_dbus_connection_new_for_transport): disable SIGPIPE unless
3966 we've been asked not to
3968 2003-02-15 Anders Carlsson <andersca@codefactory.se>
3970 * dbus/dbus-list.c: (_dbus_list_append_link),
3971 (_dbus_list_prepend_link):
3972 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
3976 2003-02-15 Anders Carlsson <andersca@codefactory.se>
3979 * bus/activation.c: (bus_activation_entry_free),
3980 (add_desktop_file_entry), (load_directory), (bus_activation_init):
3982 * bus/main.c: (main):
3983 Add simple activation support, doesn't work yet though.
3985 2003-02-15 Zack Rusin <zack@kde.org>
3987 * qt/dbus-qthread.cpp: small casting fix
3989 2003-02-15 Anders Carlsson <andersca@codefactory.se>
3991 * dbus/dbus-errors.c: (dbus_set_error):
3992 * dbus/dbus-errors.h:
3993 Add a few errors and make dbus_set_error void.
3995 * dbus/dbus-sysdeps.c:
3996 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
3997 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
3998 * dbus/dbus-sysdeps.h:
3999 Add _dbus_spawn_async.
4001 * test/spawn-test.c: (main):
4002 Test for _dbus_spawn_async.
4004 2003-02-15 Anders Carlsson <andersca@codefactory.se>
4006 * dbus/dbus-internals.h:
4007 Fix build without tests.
4009 * dbus/dbus-list.c: (alloc_link):
4010 Fix a segfault when a malloc fails.
4012 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
4013 (dbus_malloc0), (dbus_realloc):
4014 Add support for malloc debugging.
4016 2003-02-15 Alexander Larsson <alexl@redhat.com>
4018 * dbus/dbus-threads.c:
4019 * dbus/dbus-threads.h:
4020 Add condvars. Remove static mutext from API.
4021 Implement static mutexes by initializing them from threads_init.
4023 * glib/dbus-gthread.c:
4024 * qt/dbus-qthread.cpp:
4025 Update with the thread api changes.
4030 Turn StaticMutex into normal mutex + init function.
4031 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
4032 _dbus_list_append_link, _dbus_list_prepend_link
4035 * dbus/dbus-sysdeps.c:
4036 * dbus/dbus-sysdeps.h:
4037 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
4038 _dbus_atomic_dec. Only slow fallback implementation at the moment.
4040 * dbus/dbus-protocol.h:
4041 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
4043 * dbus/dbus-message.c:
4044 Make ref/unref atomic.
4047 * dbus/dbus-connection-internal.h:
4048 * dbus/dbus-connection.c:
4049 * dbus/dbus-connection.h:
4051 Change _peek to _borrow,_return & _steal_borrowed.
4052 Change disconnect callback to event.
4053 Make dbus_connection_dispatch_messages reentrant.
4055 * dbus/dbus-transport.c:
4056 Don't ref the connection on calls to the transport
4059 * dbus/dbus-message-handler.c:
4062 * glib/dbus-gmain.c:
4063 Don't use peek_message anymore
4066 * test/debug-thread.c:
4067 * test/debug-thread.h:
4068 Simple thread implementation that asserts() on deadlocks in
4069 single-threaded code.
4072 (main) Call debug_threads_init.
4075 Use disconnect message instead of disconnect callback.
4079 Don't call dbus_connection_set_disconnect_function. Instead export
4080 bus_connection_disconnect.
4083 Call bus_connection_disconnect when we get a disconnected message.
4085 2003-02-15 Havoc Pennington <hp@pobox.com>
4087 * dbus/dbus-message.c (dbus_message_new): fool around with the
4090 2003-02-14 Havoc Pennington <hp@pobox.com>
4092 * dbus/dbus-mempool.c: fail if the debug functions so indicate
4094 * dbus/dbus-memory.c: fail if the debug functions indicate we
4097 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
4098 (_dbus_decrement_fail_alloc_counter): debug functions to
4099 simulate memory allocation failures
4101 2003-02-14 Havoc Pennington <hp@pobox.com>
4103 * dbus/dbus-errors.h (struct DBusError): add a word of padding
4106 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4108 * bus/driver.c: (bus_driver_handle_hello):
4110 * bus/services.c: (bus_service_lookup):
4111 Reorder message sending so we get a more sane order.
4113 * test/bus-test.c: (message_handler):
4116 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4118 * bus/driver.c: (bus_driver_send_service_deleted),
4119 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4120 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4121 (bus_driver_send_welcome_message),
4122 (bus_driver_handle_list_services),
4123 (bus_driver_handle_acquire_service),
4124 (bus_driver_handle_service_exists):
4125 * dbus/dbus-bus.c: (dbus_bus_register_client),
4126 (dbus_bus_acquire_service), (dbus_bus_service_exists):
4127 * dbus/dbus-errors.c: (dbus_result_to_string):
4128 * dbus/dbus-errors.h:
4129 * dbus/dbus-message.c: (dbus_message_append_args),
4130 (dbus_message_append_args_valist), (dbus_message_get_args),
4131 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
4132 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
4133 (dbus_message_iter_get_byte_array),
4134 (dbus_message_iter_get_string_array), (message_iter_test),
4135 (check_message_handling), (_dbus_message_test):
4136 * dbus/dbus-message.h:
4137 * test/bus-test.c: (main):
4138 Change fields to arguments in messages, so that they won't be
4139 confused with header fields.
4141 * glib/test-dbus-glib.c: (main):
4142 Remove append_fields from hello message.
4144 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4146 * dbus/dbus-errors.c:
4147 * dbus/dbus-message.c:
4148 * dbus/dbus-string.c:
4149 Documentation fixes.
4151 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4153 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
4155 Implement support for timeouts in dbus-glib.
4157 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4159 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4160 * dbus/dbus-message.c: (process_test_subdir):
4161 * test/break-loader.c: (find_breaks_based_on):
4162 Plug some memory leaks.
4164 2003-02-13 Richard Hult <rhult@codefactory.se>
4166 * bus/main.c: Fix build.
4168 * dbus/dbus-errors.h:
4169 * dbus/dbus-errors.c: Fix copyright for Anders.
4171 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4176 * bus/connection.c: (bus_connection_foreach):
4179 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
4180 (unescape_string), (new_section), (parse_section_start),
4181 (parse_key_value), (report_error), (bus_desktop_file_load),
4182 (bus_desktop_file_get_string):
4183 * bus/desktop-file.h:
4184 Use DBusError for error reporting.
4186 * bus/dispatch.c: (send_one_message),
4187 (bus_dispatch_message_handler):
4188 * bus/driver.c: (bus_driver_send_service_deleted),
4189 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4190 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4191 (bus_driver_send_welcome_message),
4192 (bus_driver_handle_list_services),
4193 (bus_driver_handle_acquire_service),
4194 (bus_driver_handle_service_exists):
4195 * bus/loop.c: (bus_loop_run):
4197 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
4199 * bus/utils.c: (bus_wait_for_memory):
4201 New files with general utility functions.
4203 * dbus/dbus-internals.h:
4204 Remove _DBUS_HANDLE_OOM.
4206 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4208 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
4209 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
4210 * dbus/dbus-errors.h:
4211 Add DBusError structure.
4213 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4215 * test/data/valid-messages/standard-acquire-service.message:
4216 * test/data/valid-messages/standard-hello.message:
4217 * test/data/valid-messages/standard-list-services.message:
4218 * test/data/valid-messages/standard-service-exists.message:
4219 Add some standard messages.
4221 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4223 * bus/driver.c: (bus_driver_send_welcome_message),
4224 (bus_driver_handle_list_services),
4225 (bus_driver_handle_acquire_service),
4226 (bus_driver_handle_service_exists), (bus_driver_handle_message):
4227 Update for API changes in libdbus.
4229 * dbus/dbus-message.c: (dbus_message_new_reply):
4230 * dbus/dbus-message.h:
4231 Remove the name argument. The spec states that replies shouldn't
4234 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4236 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
4237 (report_error), (bus_desktop_file_load), (lookup_section),
4238 (lookup_line), (bus_desktop_file_get_raw),
4239 (bus_desktop_file_get_string):
4240 * bus/desktop-file.h:
4241 Some fixes, and new functions for getting a key value from a section.
4243 2003-02-13 Havoc Pennington <hp@pobox.com>
4245 * test/data/auth/fail-after-n-attempts.auth-script: new test
4247 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
4250 2003-02-13 Havoc Pennington <hp@pobox.com>
4252 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
4253 dbus_credentials_match were backward
4255 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
4256 NO_CREDENTIALS and ROOT_CREDENTIALS
4258 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
4259 into here. Never process more commands after we've reached an
4260 end state; store further data as unused bytes.
4262 * test/data/auth/*: add more auth tests
4264 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
4265 command to match exact string and EXPECT_UNUSED to match unused
4268 * test/Makefile.am (dist-hook): fix to dist all the test stuff
4270 2003-02-12 Havoc Pennington <hp@pobox.com>
4272 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
4273 \r off of popped lines
4275 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
4278 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
4281 2003-02-12 Havoc Pennington <hp@pobox.com>
4283 * dbus/Makefile.am: remove break-loader from the build, since it
4286 * configure.in: add --enable-gcov to turn on coverage profiling
4287 flags and disable optimization
4289 2003-02-10 Havoc Pennington <hp@pobox.com>
4291 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
4292 initial cut at test framework for DBusAuth from laptop.
4293 Doesn't quite work yet but it compiles and I need to get
4294 it off the 266mhz laptop. ;-)
4296 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
4297 fix a memleak in error case
4299 2003-02-12 Anders Carlsson <andersca@codefactory.se>
4302 * bus/desktop-file.c:
4303 * bus/desktop-file.h:
4304 Add a desktop file parser.
4306 2003-02-11 Zack Rusin <zack@kde.org>
4308 * qt/message.[h|cpp]: sample implementation
4309 of the KDE wrapper for DBusMessage
4311 2003-02-09 Zack Rusin <zack@kde.org>
4313 * test/bus-test.c: make_it_compile
4314 * doc/dbus-specification.sgml: minimal semantic fix
4316 2003-02-06 Anders Carlsson <andersca@codefactory.se>
4322 2003-02-06 Anders Carlsson <andersca@codefactory.se>
4325 * dbus/dbus-break-loader.c:
4327 * test/break-loader.c:
4328 Move dbus-break-loader to test/ and rename it to break-loader.
4330 2003-02-02 Havoc Pennington <hp@pobox.com>
4332 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
4333 for code to manage cookies in your home directory
4335 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
4337 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
4338 to authenticate, then disconnect the client.
4340 2003-02-03 Alexander Larsson <alexl@redhat.com>
4342 * dbus/dbus-message.c (dbus_message_append_fields):
4345 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4347 * doc/dbus-specification.sgml:
4348 Update address format section.
4350 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4353 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
4354 (message_handler), (new_connection_callback), (loop_quit),
4358 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4360 * bus/driver.c: (bus_driver_handle_service_exists):
4361 Simplify the code a bit.
4363 * dbus/dbus-bus.c: (dbus_bus_service_exists):
4366 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4369 Add libdbus-daemon.la and link to it.
4371 2003-02-01 James Willcox <jwillcox@gnome.org>
4373 * bus/driver.c: (bus_driver_handle_own_service):
4374 Actually include the service reply code in the message.
4376 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4378 * bus/driver.c: (bus_driver_handle_service_exists):
4379 Don't unref the incoming message.
4381 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4383 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
4385 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4387 * dbus/dbus-server.c: (dbus_server_listen):
4388 * dbus/dbus-transport.c: (_dbus_transport_open):
4389 ifdef out the calls to the debug transport and server.
4391 2003-02-02 Alexander Larsson <alexl@redhat.com>
4393 * dbus/dbus-watch.c (dbus_watch_get_flags):
4394 Add note in the docs that ERROR or HANGUP won't be returned
4395 and are assumed always on.
4397 * glib/dbus-gmain.c (add_watch):
4398 Always add IO_ERR | IO_HUP
4400 * dbus/dbus-message.h:
4401 Add semicolon after dbus_message_iter_get_string_array().
4402 Makes qt code build again
4404 2003-02-01 Anders Carlsson <andersca@codefactory.se>
4406 * bus/driver.c: (create_unique_client_name),
4407 (bus_driver_handle_hello):
4408 Don't take a name, just use a numeric id to identify
4412 * dbus/dbus-bus.c: (dbus_bus_register_client),
4413 (dbus_bus_acquire_service), (dbus_bus_service_exists):
4415 Add new convenience functions for communicating with the bus.
4417 * dbus/dbus-message.h:
4419 * dbus/dbus-protocol.h:
4422 2003-02-01 Alexander Larsson <alexl@redhat.com>
4424 * dbus/dbus-message.c (dbus_message_append_fields):
4425 Add some more doc comments.
4427 2003-02-01 Havoc Pennington <hp@pobox.com>
4429 * dbus/dbus-break-loader.c (randomly_modify_length): change
4430 a 4-byte value in the message as if it were a length
4432 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
4433 execute bit on saved files
4435 2003-02-01 Havoc Pennington <hp@pobox.com>
4437 * dbus/dbus-break-loader.c (main): new program to find messages
4438 that break the loader.
4440 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
4441 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
4443 * dbus/dbus-string.c (_dbus_string_set_byte): new
4445 2003-01-31 Havoc Pennington <hp@pobox.com>
4447 * dbus/dbus-message.c: refactor the test code to be more general,
4448 in preparation for writing a "randomly permute test cases to
4449 try to break the loader" program.
4451 2003-01-31 Havoc Pennington <hp@pobox.com>
4453 * doc/dbus-specification.sgml: work on the specification
4455 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
4456 the protocol version of the message.
4458 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
4459 no longer specifies that.
4460 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
4463 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
4464 "break" for DBUS_TYPE_NIL, remove @todo
4466 2003-01-31 Havoc Pennington <hp@pobox.com>
4468 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
4469 just set_is_error/get_is_error as this is a commonly-used
4470 function, and write docs.
4472 2003-01-31 Anders Carlsson <andersca@codefactory.se>
4474 * dbus/dbus-address.c: (dbus_address_entry_free):
4475 Free key and value lists.
4477 * dbus/dbus-internals.c: (_dbus_type_to_string):
4478 Add the types we didn't have.
4480 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4481 (_dbus_marshal_validate_arg):
4484 * dbus/dbus-message.c: (dbus_message_set_sender):
4485 Remove todo about being able to set sender to NULL.
4487 (dbus_message_set_is_error_reply),
4488 (dbus_message_get_is_error_reply):
4489 * dbus/dbus-message.h:
4492 * dbus/dbus-protocol.h:
4493 Add error reply flag.
4495 * test/data/valid-messages/opposite-endian.message:
4496 Add NIL type to test.
4498 2003-01-31 Havoc Pennington <hp@pobox.com>
4500 * doc/dbus-specification.sgml: fully specify the header. Add
4501 flags and major protocol version, and change header/body len to
4504 * dbus/dbus-message-builder.c (append_saved_length): append length
4507 * dbus/dbus-message.c (dbus_message_create_header): change header
4508 length and body length to unsigned. Add the new fields from the
4510 (_dbus_message_loader_return_buffer): unsigned header/body len
4512 2003-01-30 Havoc Pennington <hp@pobox.com>
4514 * dbus/dbus-auth.c: rework to use only REJECTED, no
4517 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
4518 use REJECTED, suggested by Mark McLoughlin
4520 2003-01-30 Havoc Pennington <hp@pobox.com>
4522 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
4523 a better way to report errors here. e.g. "unix address lacks
4524 path" or something. also "no such file" when the path doesn't
4527 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
4529 (dbus_parse_address): add @todo about documenting address format,
4530 and allowing , and ; to be escaped
4532 2003-01-30 Anders Carlsson <andersca@codefactory.se>
4535 Add dbus-address.[ch]
4537 * dbus/dbus-address.c: (dbus_address_entry_free),
4538 (dbus_address_entries_free), (create_entry),
4539 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
4540 (dbus_parse_address), (_dbus_address_test):
4541 * dbus/dbus-address.h:
4542 New files for dealing with address parsing.
4544 * dbus/dbus-connection.c:
4545 Document timeout functions.
4547 * dbus/dbus-message.c:
4548 Document dbus_message_new_from_message.
4550 * dbus/dbus-server-debug.c:
4553 * dbus/dbus-server.c: (dbus_server_listen):
4554 Parse address and use correct server implementation.
4556 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
4557 * dbus/dbus-string.h:
4558 New function with test.
4560 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
4564 * dbus/dbus-transport-debug.c:
4567 * dbus/dbus-transport.c: (_dbus_transport_open):
4568 Parse address and use correct transport implementation.
4570 2003-01-30 Havoc Pennington <hp@pobox.com>
4572 * dbus/dbus-message.c: use message->byte_order instead of
4573 DBUS_COMPILER_BYTE_ORDER throughout.
4574 (dbus_message_create_header): pad header to align the
4575 start of the body of the message to 8-byte boundary
4577 * dbus/dbus-marshal.h: make all the demarshalers take const
4578 DBusString arguments.
4580 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
4581 validate message args here, so we don't have to do slow validation
4582 later, and so we catch bad messages as they are incoming. Also add
4583 better checks on header_len and body_len. Also fill in
4586 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
4587 implemented properly)
4588 (_dbus_string_validate_nul): new function to check all-nul
4590 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
4591 get_arg_end_pos and remove all validation
4592 (_dbus_marshal_validate_arg): actually do validation here.
4594 2003-01-29 Havoc Pennington <hp@pobox.com>
4596 * dbus/dbus-message.c (check_message_handling): fix assertion
4597 failure on set_client_serial
4599 2003-01-28 Havoc Pennington <hp@pobox.com>
4601 * dbus/dbus-server-debug.c: Add doc section comments
4603 * dbus/dbus-transport-debug.c: add doc section comments
4605 2003-01-28 Havoc Pennington <hp@redhat.com>
4607 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
4608 the reverse order from how I had it
4609 (_dbus_string_base64_encode): reverse encoding order. I was
4610 basically byteswapping everything during encoding.
4612 2003-01-28 Anders Carlsson <andersca@codefactory.se>
4614 * dbus/dbus-connection-internal.h:
4615 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
4616 (_dbus_connection_remove_timeout):
4617 Add functions for adding and removing timeouts.
4619 * dbus/dbus-message.c: (dbus_message_new_from_message):
4620 Add new function that takes a message and creates an exact
4621 copy of it, but with the refcount set to 1.
4622 (check_message_handling):
4625 * dbus/dbus-server-protected.h:
4626 * dbus/dbus-server.c: (_dbus_server_init_base),
4627 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
4628 (dbus_server_set_timeout_functions):
4629 (_dbus_server_remove_timeout):
4630 New functions so that a server can add and remove timeouts.
4632 (dbus_server_listen):
4633 Add commented out call to dbus_server_debug_new.
4635 * dbus/dbus-timeout.c: (_dbus_timeout_new):
4636 Actually set the handler, doh.
4638 * dbus/dbus-transport.c: (_dbus_transport_open):
4639 Add commented out call to dbus_transport_debug_client_new.
4642 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
4644 2003-01-28 Havoc Pennington <hp@pobox.com>
4646 * dbus/dbus-message.c (check_message_handling): function to check
4647 on the loaded message, iterates over it etc.
4649 2003-01-28 Havoc Pennington <hp@pobox.com>
4651 * test/Makefile.am (dist-hook): fix make distdir
4653 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
4655 2003-01-27 Havoc Pennington <hp@pobox.com>
4657 * dbus/dbus-mempool.c (time_for_size): replace printf with
4660 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
4661 empty lines; fix the SAVE_LENGTH stuff to be
4662 START_LENGTH/END_LENGTH so it actually works; couple other
4665 * test/Makefile.am (dist-hook): add dist-hook for .message files
4667 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
4668 can be constant or locked.
4669 (_dbus_string_free): allow freeing a const string as
4672 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
4674 * dbus/dbus-test-main.c (main): take an argument which is the
4675 directory containing test data
4677 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
4678 argument to this and load all the messages in test/data/
4679 checking that they can be loaded or not loaded as appropriate.
4681 2003-01-27 Anders Carlsson <andersca@codefactory.se>
4683 * bus/dispatch.c: (bus_dispatch_message_handler):
4684 Dispatch messages sent to services.
4686 * bus/driver.c: (bus_driver_send_service_deleted),
4687 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4688 (bus_driver_send_service_acquired):
4689 Add helper functions for sending service related messages.
4691 (bus_driver_send_welcome_message):
4692 Send HELLO_REPLY instead of WELCOME.
4694 (bus_driver_handle_list_services):
4695 Send LIST_SERVICES_REPLY instead of SERVICES.
4697 (bus_driver_handle_own_service),
4698 (bus_driver_handle_service_exists):
4699 New message handlers.
4701 (bus_driver_handle_message):
4702 Invoke new message handlers.
4704 (bus_driver_remove_connection):
4705 Don't remove any services here since that's done automatically
4706 by bus_service_remove_owner now.
4709 New function signatures.
4711 * bus/services.c: (bus_service_add_owner):
4712 Send ServiceAcquired message if we're the only primary owner.
4714 (bus_service_remove_owner):
4715 Send ServiceAcquired/ServiceLost messages.
4717 (bus_service_set_prohibit_replacement),
4718 (bus_service_get_prohibit_replacement):
4719 Functions for setting prohibit replacement.
4721 (bus_service_has_owner):
4722 New function that checks if a connection is in the owner queue of
4726 Add new function signatures.
4728 * dbus/dbus-list.c: (_dbus_list_test):
4729 Add tests for _dbus_list_remove_last and traversing the list backwards.
4732 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
4733 go any further, so return NULL then.
4735 * dbus/dbus-protocol.h:
4736 Add new messages, service flags and service replies.
4738 2003-01-26 Havoc Pennington <hp@pobox.com>
4740 * dbus/dbus-message-builder.c: implement, completely untested.
4742 * test/data/*: add data to be used in testing.
4743 ".message" files are our simple loadable text format.
4744 ".message-raw" will be binary dumps of messages.
4746 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
4748 2003-01-26 Havoc Pennington <hp@pobox.com>
4750 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
4752 * dbus/dbus-errors.c (dbus_result_to_string): add
4755 * dbus/dbus-message-builder.c: new file, will contain code to load
4756 up messages from files. Not implemented yet.
4758 2003-01-26 Havoc Pennington <hp@pobox.com>
4760 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
4761 the sender by setting to NULL
4763 2003-01-26 Havoc Pennington <hp@pobox.com>
4765 The unit tests pass, but otherwise untested. If it breaks, the
4766 tests should have been better. ;-)
4768 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
4771 * dbus/dbus-message.c: redo everything so we maintain
4772 message->header as the only copy of the various fields.
4773 This avoids the possibility of out-of-memory in some cases,
4774 for example dbus_message_lock() can't run out of memory anymore,
4775 and avoids extra copying. Figured I may as well go ahead and do
4776 this since it was busted for dbus_message_lock to not return
4777 failure on OOM, and dbus_message_write_header was totally
4778 unchecked for OOM. Also fixed some random other bugs.
4780 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
4781 that strings are nul-terminated. Also, end_pos can be equal
4782 to string length just not greater than, I think.
4783 (_dbus_marshal_set_int32): new function
4784 (_dbus_marshal_set_uint32): new function
4785 (_dbus_marshal_set_string): new function
4787 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
4788 a warning, init timeout_list to NULL
4789 (dbus_connection_send_message): don't use uninitialized variable
4792 * dbus/dbus-string.c (_dbus_string_replace_len): new function
4794 2003-01-26 Anders Carlsson <andersca@codefactory.se>
4796 * bus/driver.c: (bus_driver_handle_hello),
4797 (bus_driver_send_welcome_message):
4800 2003-01-26 Anders Carlsson <andersca@codefactory.se>
4802 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
4803 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
4804 (dbus_connection_unref):
4805 * dbus/dbus-marshal.c: (_dbus_marshal_test):
4806 * dbus/dbus-message.c: (dbus_message_unref),
4809 (dbus_message_get_fields):
4810 Remove debugging printout.
4812 (_dbus_message_loader_return_buffer):
4813 Don't store the header string.
4815 (_dbus_message_test):
4818 2003-01-26 Richard Hult <rhult@codefactory.se>
4820 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
4821 the file descriptor list, since it can change under us.
4823 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4825 * glib/dbus-gmain.c: (dbus_connection_prepare),
4826 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
4827 (remove_watch), (dbus_connection_hookup_with_g_main):
4828 Rewrite the glib handling to use its own GSource instead of a
4829 GIOChannel so we can catch messages put in the queue while waiting
4832 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4835 * bus/connection.c: (connection_disconnect_handler),
4836 (connection_watch_callback), (bus_connection_setup):
4837 * bus/dispatch.c: (send_one_message),
4838 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
4839 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
4841 * bus/driver.c: (bus_driver_send_service_deleted),
4842 (bus_driver_send_service_created), (bus_driver_handle_hello),
4843 (bus_driver_send_welcome_message),
4844 (bus_driver_handle_list_services), (bus_driver_remove_connection),
4845 (bus_driver_handle_message):
4847 Refactor code, put the message dispatching in its own file. Use
4848 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
4851 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4853 * dbus/dbus-internals.h:
4854 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
4856 * dbus/dbus-message.c: (dbus_message_get_sender):
4857 * dbus/dbus-message.h:
4858 Implement dbus_message_get_sender.
4860 * dbus/dbus-protocol.h:
4861 Add message and service defines.
4863 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4865 * dbus/dbus-connection.c: (dbus_connection_send_message):
4866 * dbus/dbus-message-internal.h:
4867 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
4868 (dbus_message_write_header):
4869 Remove _dbus_messag_unlock and don't set the client serial on a
4870 message if one already exists.
4872 2003-01-24 Havoc Pennington <hp@pobox.com>
4874 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
4877 * bus/driver.c (bus_driver_handle_list_services): fix a leak
4880 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4882 * dbus/dbus-list.c: (alloc_link), (free_link):
4883 Use a memory pool for the links.
4885 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4887 * bus/connection.c: (bus_connection_foreach):
4889 Add new bus_connection_foreach function.
4891 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
4892 Add function that broadcasts a message to all clients.
4894 (bus_driver_send_service_created), (bus_driver_handle_hello),
4895 (bus_driver_send_welcome_message),
4896 (bus_driver_handle_list_services), (bus_driver_message_handler):
4897 Implement functions that take care of listing services, and notifying
4898 clients when new services are created.
4900 * bus/services.c: (bus_services_list):
4902 Add new function that returns an array of strings with the currently
4903 registered services.
4906 * glib/dbus-gmain.c:
4907 Update copyright year.
4909 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4911 * dbus/dbus-connection.c: (dbus_connection_send_message):
4912 Unlock the message in case it was sent earlier.
4914 (dbus_connection_send_message_with_reply_and_block):
4915 Remove the reply message from the list.
4917 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4918 Set array_len and new_pos correctly.
4920 (_dbus_marshal_test):
4921 Remove debug output.
4923 * dbus/dbus-message-internal.h:
4924 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
4925 New function that returns the reply serial.
4927 (_dbus_message_unlock):
4928 New function that unlocks a message and resets its header.
4930 (dbus_message_append_string_array),
4931 (dbus_message_get_fields_valist),
4932 (dbus_message_iter_get_field_type),
4933 (dbus_message_iter_get_string_array),
4934 (dbus_message_get_fields),
4935 (dbus_message_append_fields_valist):
4936 Handle string arrays.
4938 (dbus_message_set_sender):
4939 Make this function public since the bus daemon needs it.
4941 (decode_header_data):
4942 Set the reply serial to -1 initially.
4944 * dbus/dbus-message.h:
4945 Add dbus_message_set_sender.
4947 2003-01-24 Havoc Pennington <hp@pobox.com>
4949 * doc/dbus-specification.sgml: add some stuff
4951 2003-01-22 Havoc Pennington <hp@pobox.com>
4953 * doc/dbus-specification.sgml: Start to document the protocol.
4955 2003-01-22 Havoc Pennington <hp@pobox.com>
4957 * dbus/dbus-connection.c
4958 (dbus_connection_send_message_with_reply_and_block): add some @todo
4960 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
4962 2003-01-21 Havoc Pennington <hp@pobox.com>
4964 (patch untested because can't compile)
4966 * bus/driver.c (create_unique_client_name): make this function
4967 never recycle client names. Also, caller should initialize
4970 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
4972 2003-01-21 Anders Carlsson <andersca@codefactory.se>
4974 * dbus/dbus-marshal.c: (_dbus_marshal_double),
4975 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4976 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
4977 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
4978 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4979 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4980 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
4981 * dbus/dbus-marshal.h:
4982 * dbus/dbus-protocol.h:
4983 Add support for marshalling and demarshalling integer, double
4986 2003-01-21 Anders Carlsson <andersca@codefactory.se>
4991 * bus/connection.c: (connection_disconnect_handler):
4992 Remove the connection from the bus driver's list.
4994 (connection_watch_callback): Dispatch messages.
4996 (free_connection_data): Free connection name.
4998 (bus_connection_setup): Add connection to the bus driver's list.
4999 (bus_connection_remove_owned_service):
5000 (bus_connection_set_name), (bus_connection_get_name):
5001 Add functions for setting and getting the connection's name.
5004 Add function headers.
5006 * bus/driver.c: (create_unique_client_name),
5007 (bus_driver_handle_hello_message),
5008 (bus_driver_send_welcome_message), (bus_driver_message_handler),
5009 (bus_driver_add_connection), (bus_driver_remove_connection):
5012 * bus/services.c: (bus_service_free):
5014 New file that handles communication and registreation with the bus
5017 2003-01-21 Anders Carlsson <andersca@codefactory.se>
5019 * dbus/dbus-connection.c: (dbus_connection_send_message):
5020 Add a new client_serial parameter.
5022 (dbus_connection_send_message_with_reply):
5023 Remove a @todo since we've implemented the blocking function.
5025 (dbus_connection_send_message_with_reply_and_block):
5026 New function that sends a message and waits for a reply and
5027 then returns the reply.
5029 * dbus/dbus-connection.h:
5032 * dbus/dbus-errors.c: (dbus_result_to_string):
5033 * dbus/dbus-errors.h:
5034 Add new DBUS_RESULT.
5036 * dbus/dbus-message-internal.h:
5037 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
5038 (_dbus_message_set_sender), (dbus_message_write_header),
5039 (dbus_message_new_reply), (decode_header_data),
5040 (_dbus_message_loader_return_buffer), (_dbus_message_test):
5041 * dbus/dbus-message.h:
5042 Add new functions that set the reply serial and sender.
5043 Also marshal and demarshal them correctly and add test.
5045 * dbus/dbus-protocol.h:
5046 Add new DBUS_MESSAGE_TYPE_SENDER.
5049 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
5050 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
5051 (dbus_connection_hookup_with_g_main):
5052 * glib/test-dbus-glib.c: (main):
5053 Rewrite to use GIOChannel and remove the GSource crack.
5055 * test/echo-client.c: (main):
5056 * test/watch.c: (check_messages):
5057 Update for changed APIs
5059 2003-01-19 Anders Carlsson <andersca@codefactory.se>
5061 * dbus/Makefile.am: Add dbus-timeout.[cħ]
5063 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
5064 Create a DBusTimeoutList.
5065 (dbus_connection_set_timeout_functions): Add new function to
5066 set timeout callbacks
5068 * dbus/dbus-connection.h: Add public DBusTimeout API.
5070 * dbus/dbus-message.c: (dbus_message_get_service):
5071 * dbus/dbus-message.h: New function.
5073 * dbus/dbus-server.c: Fix small doc typo.
5075 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
5077 2003-01-19 Anders Carlsson <andersca@codefactory.se>
5079 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
5080 of the string, just as long as specified.
5082 2003-01-19 Havoc Pennington <hp@pobox.com>
5084 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
5087 * dbus/dbus-server.c (dbus_server_set_max_connections)
5088 (dbus_server_get_max_connections, dbus_server_get_n_connections):
5089 keep track of current number of connections, and add API for
5090 setting a max (but haven't implemented enforcing the max yet)
5092 2003-01-18 Havoc Pennington <hp@pobox.com>
5094 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
5095 reading/writing if read_watch != NULL or write_watch != NULL.
5097 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
5098 the message loader code to actually load message->header and
5099 message->body into the newly-created message.
5101 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
5104 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
5105 (dbus_connection_get_max_message_size)
5106 (dbus_connection_set_max_live_messages_size)
5107 (dbus_connection_get_max_live_messages_size): implement some
5108 resource limitation functions
5110 * dbus/dbus-resources.c: new file implementing some of the
5111 resource limits stuff
5113 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
5114 missing docs, add @todo to handle OOM etc.
5116 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
5119 2003-01-18 Havoc Pennington <hp@pobox.com>
5121 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
5122 connection if it hasn't been already.
5124 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
5125 replace with DisconnectFunction.
5127 2003-01-18 Havoc Pennington <hp@pobox.com>
5129 Building --disable-verbose-mode --disable-asserts --disable-tests
5130 cuts the library from 112K to 45K or so
5132 * configure.in: check for varargs macro support,
5133 add --enable-verbose-mode, --enable-asserts.
5135 * dbus/dbus-internals.h (_dbus_assert): support
5137 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
5139 2003-01-18 Havoc Pennington <hp@pobox.com>
5141 * dbus/dbus-test.c: include config.h so that tests actually run
5143 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
5144 so the failure mode when that assumption fails will be plenty
5147 2003-01-18 Havoc Pennington <hp@pobox.com>
5149 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
5151 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
5154 * test/Makefile.am: don't use special variable "TESTS" for echo-*
5155 since we don't want to use those in make check
5157 2003-01-15 Havoc Pennington <hp@redhat.com>
5163 2003-01-15 Havoc Pennington <hp@redhat.com>
5165 * test/Makefile.am: fix so that test source code ends up in the
5166 distribution on make distcheck
5168 2003-01-15 Havoc Pennington <hp@redhat.com>
5174 2003-01-15 Havoc Pennington <hp@redhat.com>
5176 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
5177 fix build when --disable-tests
5179 * Makefile.am (EXTRA_DIST): put HACKING in here
5181 * HACKING: document procedure for making a tarball release.
5183 2003-01-14 Anders Carlsson <andersca@codefactory.se>
5185 * bus/connection.c: (connection_error_handler),
5186 (bus_connection_setup):
5187 * bus/main.c: (main):
5188 Make sure that the DBusConnectionData struct is NULLed
5189 out to prevent a segfault.
5191 * dbus/dbus-errors.c: (dbus_result_to_string):
5192 * dbus/dbus-errors.h:
5193 * dbus/dbus-message.c: (dbus_message_get_fields),
5194 (dbus_message_get_fields_valist), (_dbus_message_test):
5195 * dbus/dbus-message.h:
5196 Make dbus_message_get_fields return a result code so we can
5197 track invalid fields as well as oom.
5199 2003-01-11 Havoc Pennington <hp@pobox.com>
5201 * configure.in: change --enable-test/--enable-ansi action-if-given
5202 to enable_foo=$enableval instead of enable_foo=yes
5204 2003-01-08 Havoc Pennington <hp@pobox.com>
5206 * dbus/dbus-string.c (_dbus_string_align_length): new function
5208 * dbus/dbus-test-main.c: move main() for test app here
5210 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
5211 symbol to run tests, because dbus-test isn't in the main
5214 Code review nitpicks.
5216 * dbus/dbus-message.c (dbus_message_write_header): add newlines
5217 for people with narrow emacs ;-). Assert client_serial was filled
5218 in. Assert message->name != NULL.
5219 (dbus_message_append_fields): have "first_field_type" arg separate
5220 from va list, needed for C++ binding that also uses varargs IIRC
5221 and helps with type safety
5222 (dbus_message_new): add @todo about using DBusString to store
5223 service/name internally
5224 (dbus_message_new): don't leak ->service and ->name on OOM later
5226 (dbus_message_unref): free the service name
5227 (dbus_message_get_fields): same change to varargs
5228 i.e. first_field_type
5229 (_dbus_message_loader_return_buffer): assert that the message data
5230 is aligned (if not it's a bug in our code). Put in verbose griping
5231 about why we set corrupted = TRUE.
5232 (decode_header_data): add FIXME that char* is evil. Was going to
5233 add FIXME about evil locale-specific string.h strncmp, but just
5234 switched to wacky string-as-uint32 optimization. Move check for
5235 "no room for field name" above get_const_data_len() to avoid
5236 assertion failure in get_const_data_len if we have trailing 2
5237 bytes or the like. Check for service and name fields being
5238 provided twice. Don't leak service/name on error. Require field
5239 names to be aligned to 4 bytes.
5241 * dbus/dbus-marshal.c: move byte swap stuff to header
5242 (_dbus_pack_int32): uscore-prefix
5243 (_dbus_unpack_int32): uscore-prefix
5244 (_dbus_unpack_uint32): export
5245 (_dbus_demarshal_string): add @todo complaining about use of
5247 (_dbus_marshal_get_field_end_pos): add @todo about bad error
5248 handling allowing corrupt data to go unchecked
5250 2003-01-08 Havoc Pennington <hp@redhat.com>
5252 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
5253 to the select() as needed for authentication. (should be using
5254 _dbus_poll() not select, but for another day)
5256 * dbus/dbus.h: include dbus/dbus-protocol.h
5258 2003-01-08 Anders Carlsson <andersca@codefactory.se>
5260 * dbus/Makefile.am (dbusinclude_HEADERS): Install
5263 2003-01-08 Anders Carlsson <andersca@codefactory.se>
5265 * dbus/dbus-internals.c: (_dbus_type_to_string):
5266 New function that returns a string describing a type.
5268 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
5269 * dbus/dbus-marshal.h:
5270 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
5271 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
5272 (dbus_message_iter_get_byte_array):
5273 * dbus/dbus-message.h:
5274 Add new convenience functions for appending and getting message fields.
5275 Also add demarshalling routines for byte arrays.
5277 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5279 * dbus/dbus-connection-internal.h:
5280 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5281 (_dbus_connection_get_next_client_serial),
5282 (dbus_connection_send_message):
5283 * dbus/dbus-internals.h:
5284 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
5285 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
5286 (_dbus_marshal_uint32), (_dbus_demarshal_double),
5287 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
5288 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
5289 (_dbus_verbose_bytes), (_dbus_marshal_test):
5290 * dbus/dbus-marshal.h:
5291 * dbus/dbus-message-internal.h:
5292 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
5293 (dbus_message_write_header), (_dbus_message_lock),
5294 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
5295 (dbus_message_get_name), (dbus_message_append_int32),
5296 (dbus_message_append_uint32), (dbus_message_append_double),
5297 (dbus_message_append_string), (dbus_message_append_byte_array),
5298 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
5299 (dbus_message_iter_unref), (dbus_message_iter_has_next),
5300 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
5301 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
5302 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
5303 (decode_header_data), (_dbus_message_loader_return_buffer),
5304 (message_iter_test), (_dbus_message_test):
5305 * dbus/dbus-message.h:
5306 * dbus/dbus-protocol.h:
5307 * dbus/dbus-test.c: (main):
5309 * glib/test-dbus-glib.c: (message_handler), (main):
5310 * test/echo-client.c: (main):
5311 * test/watch.c: (check_messages):
5312 Make messages sendable and receivable for real.
5314 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5316 * dbus/dbus-marshal.c: (_dbus_marshal_double),
5317 (_dbus_marshal_string), (_dbus_marshal_byte_array):
5318 * dbus/dbus-message.c: (dbus_message_append_int32),
5319 (dbus_message_append_uint32), (dbus_message_append_double),
5320 (dbus_message_append_string), (dbus_message_append_byte_array):
5321 Handle OOM restoration.
5323 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5325 * dbus/dbus-marshal.c: (_dbus_marshal_string),
5326 (_dbus_demarshal_string), (_dbus_marshal_test):
5327 * dbus/dbus-marshal.h:
5328 * dbus/dbus-message.c: (dbus_message_get_name),
5329 Document these functions.
5331 (dbus_message_append_int32), (dbus_message_append_uint32),
5332 (dbus_message_append_double), (dbus_message_append_string),
5333 (dbus_message_append_byte_array):
5334 * dbus/dbus-message.h:
5335 Add functions for adding message fields of different types.
5337 * dbus/dbus-protocol.h:
5338 Add the different types.
5340 2003-01-05 Havoc Pennington <hp@pobox.com>
5342 * bus/connection.c: implement routines for handling connections,
5343 first thing is keeping a list of owned services on each connection
5344 and setting up watches etc.
5346 * bus/services.c: implement a mapping from service names to lists
5349 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
5351 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
5352 to use static mutexes for global data
5354 * dbus/dbus-connection.c (dbus_connection_set_data): add new
5355 collection of functions to set/get application-specific data
5356 on the DBusConnection.
5358 2003-01-04 Havoc Pennington <hp@pobox.com>
5360 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
5361 (_dbus_poll): new function
5363 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
5366 * bus/loop.c: initial code for the daemon main loop
5368 2003-01-04 Havoc Pennington <hp@pobox.com>
5370 * test/watch.c (error_handler): make it safe if the error handler
5371 is called multiple times (if we s/error handler/disconnect
5372 handler/ we should just guarantee it's called only once)
5374 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
5375 error handler on disconnect (it's quite possible we should
5376 just change the error handler to a "disconnect handler," I'm
5377 not sure we have any other meaningful errors)
5379 * configure.in: check for getpwnam_r
5381 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5382 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
5383 mechanism as in SASL spec, using socket credentials
5385 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
5386 (_dbus_send_credentials_unix_socket): new function
5388 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
5390 (_dbus_write): only check errno if <0 returned
5391 (_dbus_write_two): ditto
5393 2003-01-02 Anders Carlsson <andersca@codefactory.se>
5395 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
5396 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
5397 (_dbus_marshal_test):
5398 * dbus/dbus-marshal.h:
5399 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
5400 to _dbus_marshal_utf8_string. Also fix some tests.
5402 2002-12-28 Harri Porten <porten@kde.org>
5404 * configure.in: added check for C++ compiler and a very cheesy
5405 check for the Qt integration
5407 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
5409 * qt/Makefile.am: added
5411 * qt/.cvsignore: added
5413 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
5414 latter, added #ifdef QT_THREAD_SUPPORT guard.
5416 * dbus/Makefile.am: added missing headers for make dist
5418 2002-12-28 Kristian Rietveld <kris@gtk.org>
5420 * dbus/Makefile.am: fixup export-symbols-regex.
5422 2002-12-27 Anders Carlsson <andersca@codefactory.se>
5424 * acinclude.m4: Add this file and put the
5425 PKG_CHECK_MODULE macro in it.
5427 2002-12-27 Anders Carlsson <andersca@codefactory.se>
5429 * dbus/dbus-marshal.c: (_dbus_marshal_string),
5430 (_dbus_demarshal_double), (_dbus_demarshal_int32),
5431 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
5432 (_dbus_marshal_test):
5433 Make the demarshalling routines align the pos argument.
5434 Add string marshalling tests and fix the obvious bugs
5437 2002-12-26 Havoc Pennington <hp@pobox.com>
5439 * dbus/dbus-auth.c: fixes fixes fixes
5441 * dbus/dbus-transport-unix.c: wire up support for
5442 encoding/decoding data on the wire
5444 * dbus/dbus-auth.c (_dbus_auth_encode_data)
5445 (_dbus_auth_decode_data): append to target string
5446 instead of nuking it.
5448 2002-12-26 Havoc Pennington <hp@pobox.com>
5450 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
5451 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
5454 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
5455 avoid swap_bytes() overhead (ignoring possible assembly stuff for
5456 now). Main point is because I wanted unpack_uint32 to implement
5458 (_dbus_verbose_bytes): new function
5460 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
5462 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
5463 mechanism to handle a corrupt message stream
5464 (_dbus_message_loader_new): fix preallocation to only prealloc,
5467 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
5468 (_dbus_string_test): enhance tests for copy/move and fix the
5471 * dbus/dbus-transport-unix.c: Hold references in more places to
5472 avoid reentrancy problems
5474 * dbus/dbus-transport.c: ditto
5476 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
5477 leak reference count in no-message case
5479 * test/watch.c (do_mainloop): handle adding/removing watches
5480 during iteration over the watches. Also, ref the connection/server
5481 stored on a watch, so we don't try to mangle a destroyed one.
5483 * dbus/dbus-transport-unix.c (do_authentication): perform
5486 * dbus/dbus-auth.c (get_state): add a state
5487 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
5488 (_dbus_auth_get_unused_bytes): append the unused bytes
5489 to the passed in string, rather than prepend
5491 * dbus/dbus-transport.c (_dbus_transport_init_base): create
5492 the auth conversation DBusAuth
5494 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
5495 (_dbus_transport_new_for_domain_socket): when creating a
5496 transport, pass in whether it's a client-side or server-side
5497 transport so we know which DBusAuth to create
5499 2002-12-03 Havoc Pennington <hp@pobox.com>
5501 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
5502 _after_ finalizing the derived members
5503 (unix_connection_set): unref watch if we fail to add it
5505 * dbus/dbus-connection.c (dbus_connection_unref): delete the
5506 transport first, so that the connection owned by the
5507 transport will be valid as the transport finalizes.
5509 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
5510 if necessary, and remove watches from the connection.
5512 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
5514 2002-12-26 Anders Carlsson <andersca@codefactory.se>
5516 * dbus/dbus-marshal.c: (_dbus_marshal_string),
5517 (_dbus_demarshal_double), (_dbus_demarshal_int32),
5518 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
5519 (_dbus_marshal_test):
5520 * dbus/dbus-marshal.h:
5521 Add string marshal functions and have the demarshal functions
5522 return the new position.
5524 2002-12-25 Havoc Pennington <hp@pobox.com>
5526 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
5527 it is a simple protocol that just maps directly to SASL.
5529 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
5530 initial implementation, not actually used yet.
5532 * dbus/dbus-string.c (_dbus_string_find): new function
5533 (_dbus_string_equal): new function
5534 (_dbus_string_base64_encode): new function
5535 (_dbus_string_base64_decode): new function
5537 2002-12-25 Anders Carlsson <andersca@codefactory.se>
5540 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
5541 (_dbus_marshal_int32), (_dbus_marshal_uint32),
5542 (_dbus_demarshal_double), (_dbus_demarshal_int32),
5543 (_dbus_demarshal_uint32), (_dbus_marshal_test):
5544 * dbus/dbus-marshal.h:
5545 * dbus/dbus-protocol.h:
5546 * dbus/dbus-test.c: (main):
5548 Add un-optimized marshalling/demarshalling routines.
5550 2002-12-25 Harri Porten <porten@kde.org>
5552 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
5554 2002-12-24 Zack Rusin <zack@kde.org>
5556 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
5557 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
5560 2002-12-24 Havoc Pennington <hp@pobox.com>
5562 * glib/dbus-gthread.c: fix include
5564 * glib/dbus-glib.h: rename DBusMessageHandler for now.
5565 I think glib API needs to change, though, as you don't
5566 want to use DBusMessageFunction, you want to use the
5567 DBusMessageHandler object. Probably
5568 dbus_connection_open_with_g_main_loop()
5569 and dbus_connection_setup_g_main_loop() or something like that
5570 (but think of better names...) that just create a connection
5571 that has watch/timeout functions etc. already set up.
5573 * dbus/dbus-connection.c
5574 (dbus_connection_send_message_with_reply): new function just to
5575 show how the message handler helps us deal with replies.
5577 * dbus/dbus-list.c (_dbus_list_remove_last): new function
5579 * dbus/dbus-string.c (_dbus_string_test): free a string that
5582 * dbus/dbus-hash.c: use memory pools for the hash entries
5583 (rebuild_table): be more paranoid about overflow, and
5584 shrink table when we can
5585 (_dbus_hash_test): reduce number of sprintfs and write
5586 valid C89. Add tests for case where we grow and then
5587 shrink the hash table.
5589 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
5591 * dbus/dbus-connection.c (dbus_connection_register_handler)
5592 (dbus_connection_unregister_handler): new functions
5594 * dbus/dbus-message.c (dbus_message_get_name): new
5596 * dbus/dbus-list.c: fix docs typo
5598 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
5599 an object representing a handler for messages.
5601 2002-12-16 Anders Carlsson <andersca@codefactory.se>
5604 * glib/dbus-gthread.c: (dbus_gthread_init):
5605 Don't use the gdbus prefix for public functions.
5607 2002-12-16 Anders Carlsson <andersca@codefactory.se>
5611 Add GLib checks and fixup .pc files
5615 * glib/dbus-gmain.c: (gdbus_connection_prepare),
5616 (gdbus_connection_check), (gdbus_connection_dispatch),
5617 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
5618 (dbus_connection_gsource_new):
5619 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
5620 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
5621 * glib/test-dbus-glib.c: (message_handler), (main):
5624 2002-12-15 Harri Porten <porten@kde.org>
5626 * autogen.sh: check for libtoolize before attempting to use it
5628 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
5631 * .cvsignore: ignore more stamp files
5633 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
5635 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
5636 without make install.
5638 2002-12-15 Havoc Pennington <hp@pobox.com>
5640 * dbus/dbus-threads.c: add thread stubs that a higher library
5641 layer can fill in. e.g. the GLib wrapper might fill them in with
5642 GThread stuff. We still need to use this thread API to
5643 thread-safe-ize the library.
5645 2002-12-12 Havoc Pennington <hp@pobox.com>
5647 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
5648 below new interfaces and include fewer system headers.
5650 * dbus/dbus-sysdeps.c (_dbus_read): new function
5651 (_dbus_write): new function
5652 (_dbus_write_two): new function
5653 (_dbus_connect_unix_socket): new function
5654 (_dbus_listen_unix_socket): new function
5656 * dbus/dbus-message-internal.h: change interfaces to use
5659 2002-12-11 Havoc Pennington <hp@pobox.com>
5661 * dbus/dbus-types.h: add dbus_unichar
5663 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
5665 * dbus/dbus-connection.c (dbus_connection_send_message): return
5668 * dbus/dbus-transport.c: include dbus-watch.h
5670 * dbus/dbus-connection.c: include dbus-message-internal.h
5672 * HACKING: add file with coding guidelines stuff.
5674 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
5675 handling here, for security purposes (as in vsftpd). Not actually
5676 using this class yet.
5678 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
5679 system/libc usage here, as in vsftpd, for ease of auditing (and
5680 should also simplify portability). Haven't actually moved all the
5681 system/libc usage into here yet.
5683 2002-11-25 Havoc Pennington <hp@pobox.com>
5685 * dbus/dbus-internals.c (_dbus_verbose): fix to not
5686 always print the first verbose message.
5688 2002-11-24 Havoc Pennington <hp@pobox.com>
5690 * test/echo-client.c, test/echo-server.c: cheesy test
5693 * configure.in (AC_CHECK_FUNCS): check for writev
5695 * dbus/dbus-message.c (_dbus_message_get_network_data): new
5698 * dbus/dbus-list.c (_dbus_list_foreach): new function
5700 * dbus/dbus-internals.c (_dbus_verbose): new function
5702 * dbus/dbus-server.c, dbus/dbus-server.h: public object
5703 representing a server that listens for connections.
5705 * dbus/.cvsignore: create
5707 * dbus/dbus-errors.h, dbus/dbus-errors.c:
5708 public API for reporting errors
5710 * dbus/dbus-connection.h, dbus/dbus-connection.c:
5711 public object representing a connection that
5712 sends/receives messages. (Same object used for
5713 both client and server.)
5715 * dbus/dbus-transport.h, dbus/dbus-transport.c:
5716 Basic abstraction for different kinds of stream
5717 that we might read/write messages from.
5719 2002-11-23 Havoc Pennington <hp@pobox.com>
5721 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
5724 * dbus/dbus-test.c (main): add list test, and include
5725 dbus-test.h as intended
5727 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
5728 (_dbus_hash_table_remove_int): return value indicates
5729 whether the entry existed to remove
5731 * dbus/dbus-list.c: add linked list utility class,
5734 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
5737 2002-11-23 Havoc Pennington <hp@pobox.com>
5739 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
5740 DBUS_END_DECLS to nothing, that should fix this once and for all
5742 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
5744 * dbus/dbus-message.c, dbus/dbus-hash.c:
5745 add some missing @brief
5747 2002-11-23 Havoc Pennington <hp@pobox.com>
5749 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
5750 to avoid confusing Doxygen
5752 * dbus/dbus-hash.c: @} not }@
5754 * dbus/dbus-message.c (struct DBusMessage): split out
5757 2002-11-23 Havoc Pennington <hp@pobox.com>
5759 * configure.in: pile on more warning flags if using gcc
5761 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
5762 to document static functions
5764 * configure.in: add summary to end of configure so it
5765 looks nice and attractive
5767 * dbus/dbus-hash.c: finish implementation and write unit
5770 * configure.in: add --enable-tests to enable unit tests
5772 * dbus/dbus-test.c: test program to run unit tests
5773 for all files in dbus/*, initially runs a test for
5776 * dbus/dbus-internals.h: file to hold some internal utility stuff
5778 2002-11-22 Havoc Pennington <hp@redhat.com>
5780 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
5781 "ported" away from Tcl
5783 * dbus/dbus-types.h: header for types such as dbus_bool_t
5785 2002-11-22 Havoc Pennington <hp@redhat.com>
5787 * dbus/dbus.h: fixups for doc warnings
5789 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
5791 (QUIET): make it quiet so we can see warnings
5793 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
5795 2002-11-22 Havoc Pennington <hp@redhat.com>
5797 * Makefile.am: include "Doxyfile" target in all-local
5799 * configure.in: generate the Doxyfile
5801 * Doxyfile.in: move Doxyfile here, so we can use
5802 configure to generate a Doxyfile with the right
5805 2002-11-22 Havoc Pennington <hp@redhat.com>
5807 * dbus/dbus-message.c: move inline docs into .c file
5809 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
5810 so all docs are under doc/
5811 (MAN_EXTENSION): generate man pages. Use extension
5812 ".3dbus" which matches ".3qt" on my system,
5813 I guess this is OK, I don't know really.
5814 (FILE_PATTERNS): look for .c files not .h, makes sense
5817 2002-11-22 Havoc Pennington <hp@pobox.com>
5819 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
5820 because any app can be a server, and any app can be a client,
5821 the bus is a special kind of server.
5823 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
5825 * Doxyfile : adding. Still needs Makefile rules to be generated
5826 automatically (just run "doxygen" in the toplevel dir for now to
5829 * dbus/dbus-message.h : Adding sample docs (javadoc since
5830 resembles gtk-doc a little more)
5832 * dbus/dbus.h : Adding sample docs
5834 2002-11-21 Havoc Pennington <hp@redhat.com>
5836 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
5837 so we can allow ourselves to include files directly,
5838 instead of having to use dbus.h
5840 * dbus/dbus.h: fill in
5842 * dbus/dbus-message.h: sketch out a sample header file.
5843 Include griping if you include it directly instead of
5846 * dbus/dbus-macros.h: new file with macros for extern "C",
5847 TRUE/FALSE, NULL, etc.
5849 * doc/file-boilerplate.c: put include guards in here
5851 2002-11-21 Havoc Pennington <hp@redhat.com>
5853 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
5855 * COPYING: include the GPL as well, and license code
5856 under both AFL and GPL.
5858 2002-11-21 Havoc Pennington <hp@redhat.com>
5860 * acconfig.h: get rid of this
5862 * autogen.sh (run_configure): add --no-configure option
5864 * configure.in: remove AC_ARG_PROGRAM to make
5865 autoconf complain less. add AC_PREREQ.
5866 add AC_DEFINE third arg.
5868 2002-11-21 Anders Carlsson <andersca@codefactory.se>
5871 Fix references so we can distcheck.
5873 2002-11-21 Havoc Pennington <hp@redhat.com>
5875 * Initial module creation