1 2003-09-25 Havoc Pennington <hp@redhat.com>
3 * bus/session.conf.in: fix my mess
5 2003-09-25 Havoc Pennington <hp@pobox.com>
7 * bus/session.conf.in: fix security policy, reported by Seth Nickell
9 2003-09-25 Seth Nickell <seth@gnome.org>
11 * python/examples/example-service.py:
13 Johan notices complete wrong code in example-service, but
14 completely wrong in a way that works exactly the same (!).
15 Johan is confused, how could this possibly work? Example
16 code fails to serve purpose of making things clear.
19 2003-09-25 Mark McLoughlin <mark@skynet.ie>
21 * doc/dbus-specification.sgml: don't require header fields
22 to be 4-byte aligned and specify that fields should be
23 distinguished from padding by the fact that zero is not
26 * doc/TODO: remove re-alignment item and add item to doc
29 * dbus/dbus-message.c:
30 (HeaderField): rename the original member to value_offset
31 and introduce a name_offset member to keep track of where
32 the field actually begins.
33 (adjust_field_offsets): remove.
34 (append_int_field), (append_uint_field),
35 (append_string_field): don't align the start of the header
36 field to a 4-byte boundary.
37 (get_next_field): impl finding the next marhsalled field
39 (re_align_field_recurse): impl re-aligning a number of
40 already marshalled fields.
41 (delete_field): impl deleting a field of any type and
42 re-aligning any following fields.
43 (delete_int_or_uint_field), (delete_string_field): remove.
44 (set_int_field), (set_uint_field): no need to re-check
45 that we have the correct type for the field.
46 (set_string_field): ditto and impl re-aligning any
48 (decode_header_data): update to take into account that
49 the fields aren't 4-byte aligned any more and the new
50 way to distinguish padding from header fields. Also,
51 don't exit when there is too much header padding.
52 (process_test_subdir): print the directory.
53 (_dbus_message_test): add test to make sure a following
54 field is re-aligned correctly after field deletion.
56 * dbus/dbus-string.[ch]:
57 (_dbus_string_insert_bytes): rename from insert_byte and
58 allow the insert of multiple bytes.
59 (_dbus_string_test): test inserting multiple bytes.
61 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
62 warning note to docs about having to re-align any
63 marshalled values following the string.
65 * dbus/dbus-message-builder.c:
66 (append_string_field), (_dbus_message_data_load):
67 don't align the header field.
69 * dbus/dbus-auth.c: (process_test_subdir): print the
72 * test/break-loader.c: (randomly_add_one_byte): upd. for
75 * test/data/invalid-messages/bad-header-field-alignment.message:
78 * test/data/valid-messages/unknown-header-field.message: shove
79 a dict in the unknown field.
81 2003-09-25 Seth Nickell <seth@gnome.org>
84 * python/dbus_bindings.pyx.in:
88 * python/examples/example-client.py:
89 * python/examples/example-service.py:
91 Pass back return values from the service to the client.
93 2003-09-24 Seth Nickell <seth@gnome.org>
97 Connect Object methods (when you are sharing an object) up... pass
98 in a list of methods to be shared. Sharing all the methods just
99 worked out too weird. You can now create nice Services over the
102 * python/dbus_bindings.pyx.in:
104 Keep references to user_data tuples passed into C functions so
105 Python doesn't garbage collect on us.
107 Implement MethodReturn and Error subclasses of Message for creating
108 DBusMessage's of those types.
110 * python/examples/example-client.py:
111 * python/examples/example-service.py:
113 Simple example code showing both how create DBus services and objects,
116 2003-09-23 Havoc Pennington <hp@pobox.com>
118 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
120 2003-09-23 Havoc Pennington <hp@redhat.com>
122 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
123 (dbus_gproxy_disconnect_signal): implement
124 (dbus_gproxy_manager_remove_signal_match): implement
125 (dbus_gproxy_manager_add_signal_match): implement
126 (dbus_gproxy_oneway_call): implement
128 2003-09-23 Havoc Pennington <hp@pobox.com>
130 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
131 subclass. This means dropping the transparent thread safety of the
132 proxy; you now need a separate proxy per-thread, or your own
133 locking on the proxy. Probably right anyway.
134 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
136 2003-09-22 Havoc Pennington <hp@redhat.com>
138 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
140 2003-09-21 Seth Nickell <seth@gnome.org>
142 First checkin of the Python bindings.
145 * python/Makefile.am:
146 * python/dbus_bindings.pyx.in:
147 * python/dbus_h_wrapper.h:
149 Pieces for Pyrex to operate on, building a dbus_bindings.so
150 python module for low-level access to the DBus APIs.
154 High-level Python module for accessing DBus objects.
159 Build stuff for the python bindings.
163 Extra macro needed for finding the Python C header files.
165 2003-09-21 Havoc Pennington <hp@pobox.com>
167 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
168 implementing the proxy manager, didn't get very far.
170 * dbus/dbus-bus.c (dbus_bus_add_match): new
171 (dbus_bus_remove_match): new
173 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
174 path_name argument; adjust the other not-yet-implemented
175 gproxy constructors to be what I think they should be.
177 2003-09-21 Havoc Pennington <hp@pobox.com>
179 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
180 by default for message bus connections.
182 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
183 exit_on_disconnect flag is set and we process the disconnected
185 (dbus_connection_set_exit_on_disconnect): new function
187 2003-09-21 Havoc Pennington <hp@pobox.com>
189 Get matching rules mostly working in the bus; only actually
190 parsing the rule text remains. However, the client side of
191 "signal connections" hasn't been started, this patch is only the
194 * dbus/dispatch.c: fix for the matching rules changes
196 * bus/driver.c (bus_driver_handle_remove_match)
197 (bus_driver_handle_add_match): send an ack reply from these
200 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
201 arguments, reported by Seth Nickell
203 * bus/config-parser.c (append_rule_from_element): support
204 eavesdrop=true|false attribute on policies so match rules
205 can be prevented from snooping on the system bus.
207 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
208 and "destination" in attribute names; fix some docs bugs;
209 add eavesdrop=true|false attribute
211 * bus/driver.c (bus_driver_handle_add_match)
212 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
215 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
216 rid of broadcast service concept, signals are just always broadcast
218 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
219 mostly implement matching rules stuff (currently only exposed as signal
222 2003-09-21 Mark McLoughlin <mark@skynet.ie>
224 * doc/dbus-specification.sgml: Change the header field name
225 to be an enum and update the rest of the spec to reference
226 the fields using the conventinal name.
228 * dbus/dbus-protocol.h: update to reflect the spec.
230 * doc/TODO: add item to remove the 4 byte alignment requirement.
232 * dbus/dbus-message.c: Remove the code to generalise the
233 header/body length and serial number header fields as named
234 header fields so we can reference field names using the
236 (append_int_field), (append_uint_field), (append_string_field):
237 Append the field name as a byte rather than four chars.
238 (delete_int_or_uint_field), (delete_string_field): reflect the
239 fact that the field name and typecode now occupy 4 bytes instead
241 (decode_string_field), (decode_header_data): update to reflect
242 protocol changes and move the field specific encoding from
243 decode_string_field() back into decode_header_data().
245 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
246 Add utility to aid debugging.
248 * dbus/dbus-message-builder.c:
249 (append_string_field), (_dbus_message_data_load): Update to
250 reflect protocol changes; Change the FIELD_NAME directive
251 to HEADER_FIELD and allow it to take the field's conventional
252 name rather than the actual value.
254 * test/data/*/*.message: Update to use HEADER_FIELD instead
255 of FIELD_NAME; Always align the header on an 8 byte boundary
256 *before* updating the header length.
258 2003-09-15 Havoc Pennington <hp@pobox.com>
260 * dbus/dbus-pending-call.c: add the get/set object data
261 boilerplate as for DBusConnection, etc. Use generic object data
262 for the notify callback.
264 * glib/dbus-gparser.c (parse_node): parse child nodes
266 * tools/dbus-viewer.c: more hacking on the dbus-viewer
268 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
269 contain functions shared between the convenience lib and the
272 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
273 -export-symbols-regex to the GLib library
275 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
276 fix the locking in here, and add a default handler for
277 Introspect() that just returns sub-nodes.
279 2003-09-14 Havoc Pennington <hp@pobox.com>
281 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
282 rather than gfoo consistent
284 * glib/dbus-gproxy.h: delete for now, move contents to
285 dbus-glib.h, because the include files don't work right since we
286 aren't in the dbus/ subdir.
288 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
289 (dbus_gproxy_end_call): finish
290 (dbus_gproxy_begin_call): finish
292 * glib/dbus-gmain.c (dbus_set_g_error): new
294 * glib/dbus-gobject.c (handle_introspect): include information
295 about child nodes in the introspection
297 * dbus/dbus-connection.c (dbus_connection_list_registered): new
298 function to help in implementation of introspection
300 * dbus/dbus-object-tree.c
301 (_dbus_object_tree_list_registered_and_unlock): new function
303 2003-09-12 Havoc Pennington <hp@pobox.com>
305 * glib/dbus-gidl.h: add common base class for all the foo_info
308 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
311 * test/Makefile.am: try test srcdir -ef . in addition to test
312 srcdir = ., one of them should work (yeah lame)
314 * glib/Makefile.am: build the "idl" parser stuff as a convenience
317 * glib/dbus-gparser.h: make description_load routines return
318 NodeInfo* not Parser*
320 * Makefile.am (SUBDIRS): build test dir after all library dirs
322 * configure.in: add GTK+ detection
324 2003-09-07 Havoc Pennington <hp@pobox.com>
326 * Make Doxygen contented.
328 2003-09-07 Havoc Pennington <hp@pobox.com>
330 * doc/dbus-specification.sgml: more updates
332 2003-09-06 Havoc Pennington <hp@pobox.com>
334 * doc/dbus-specification.sgml: partial updates
336 * bus/dbus-daemon-1.1.in: fix the config file docs for the
337 zillionth time; hopefully I edited the right file this time.
339 * bus/config-parser.c (append_rule_from_element): support
340 send_type, send_path, receive_type, receive_path
342 * bus/policy.c: add message type and path to the list of things
343 that can be "firewalled"
345 2003-09-06 Havoc Pennington <hp@pobox.com>
347 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
348 (dbus_connection_register_object_path): make this not handle
349 messages to paths below the given path
351 2003-09-03 Havoc Pennington <hp@pobox.com>
353 * test/glib/Makefile.am: add this with random glib-linked test
356 * glib/Makefile.am: remove the random test programs from here,
357 leave only the unit tests
359 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
360 uscore/javacaps conversion, and fix
361 (get_object_property, set_object_property): change to .NET
362 convention for mapping props to methods, set_FooBar/get_FooBar,
363 since one language has such a convention we may as well copy it.
364 Plus real methods in either getFooBar or get_foo_bar style won't
365 collide with this convention.
367 2003-09-01 Havoc Pennington <hp@pobox.com>
369 * glib/dbus-gparser.c: implement
371 * glib/dbus-gobject.c: start implementing skeletons support
373 * configure.in: when disabling checks/assert, also define
374 G_DISABLE_ASSERT and G_DISABLE_CHECKS
376 2003-09-01 Havoc Pennington <hp@pobox.com>
378 * glib/Makefile.am: rearrange a bunch of files and get "make
379 check" framework set up
381 2003-08-31 Havoc Pennington <hp@pobox.com>
383 * fix build with --disable-tests
385 2003-08-30 Havoc Pennington <hp@pobox.com>
387 * dbus/dbus-connection.c: purge DBusMessageHandler
389 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
390 use callbacks everywhere
392 2003-08-30 Havoc Pennington <hp@pobox.com>
394 * test/data/valid-config-files/system.d/test.conf: change to
395 root for the user so warnings don't get printed
397 * dbus/dbus-message.c: add dbus_message_get_path,
398 dbus_message_set_path
400 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
401 dispatching to a path
403 * dbus/dbus-string.c (_dbus_string_validate_path): add
405 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
406 (_dbus_marshal_object_path): implement
408 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
409 to contain the path to the target object
410 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
411 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
413 2003-08-30 Havoc Pennington <hp@pobox.com>
415 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
417 2003-08-29 Havoc Pennington <hp@pobox.com>
419 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
421 (struct DBusObjectSubtree): shrink this
422 a lot, since we may have a lot of them
423 (_dbus_object_tree_free_all_unlocked): implement
424 (_dbus_object_tree_dispatch_and_unlock): implement
426 2003-08-29 Havoc Pennington <hp@pobox.com>
428 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
430 2003-08-28 Havoc Pennington <hp@pobox.com>
434 * dbus/dbus-connection.c: port to no ObjectID, create a
435 DBusObjectTree, rename ObjectTree to ObjectPath in public API
437 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
438 everything except UnregisterFunction and MessageFunction
440 * dbus/dbus-marshal.c: port away from DBusObjectID,
441 add DBUS_TYPE_OBJECT_PATH
443 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
444 dbus/dbus-objectid.[hc]: remove these, we are moving to
445 path-based object IDs
447 2003-08-25 Havoc Pennington <hp@pobox.com>
449 Just noticed that dbus_message_test is hosed, I wonder when I
450 broke that. I thought make check was passing earlier...
452 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
453 container tree, will replace most of dbus-object-registry
455 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
458 2003-08-19 Havoc Pennington <hp@pobox.com>
460 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
461 (dbus_message_is_error): fix this function
463 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
466 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
467 reflect clarified man page
468 (bus_client_policy_check_can_send): ditto
470 * bus/session.conf.in: fixup
472 * bus/system.conf.in: fixup
474 2003-08-18 Havoc Pennington <hp@redhat.com>
476 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
478 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
479 dumb bug created earlier (wrong order of args to
480 decode_header_data())
482 * tools/dbus-send.c: port
484 * tools/dbus-print-message.c (print_message): port
486 * test/data/*messages: port all messages over
488 * dbus/dbus-message-builder.c: support including
491 * bus/driver.c: port over
493 * bus/dispatch.c: port over to new stuff
495 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
496 rename disconnect signal to "Disconnected"
498 2003-08-17 Havoc Pennington <hp@pobox.com>
500 This doesn't compile yet, but syncing up so I can hack on it from
501 work. What are branches for if not broken code? ;-)
503 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
504 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
505 DBUS_HEADER_FIELD_ERROR_NAME
507 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
508 for the interface+member pairs
509 (string_hash): change to use g_str_hash algorithm
510 (find_direct_function, find_string_function): refactor these to
513 * dbus/dbus-message.c: port all of this over to support
514 interface/member fields instead of name field
516 * dbus/dbus-object-registry.c: port over
518 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
519 from _dbus_string_validate_name
521 * bus/dbus-daemon-1.1: change file format for the
522 <deny>/<allow> stuff to match new message naming scheme
524 * bus/policy.c: port over
526 * bus/config-parser.c: parse new format
528 2003-08-16 Havoc Pennington <hp@pobox.com>
530 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
533 * glib/dbus-gproxy.c: some hacking
535 2003-08-15 Havoc Pennington <hp@redhat.com>
537 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
539 * dbus/dbus-connection.c
540 (dbus_connection_send_with_reply_and_block): factor out internals;
541 change to convert any error replies to DBusError instead of
542 returning them as a message
544 2003-08-15 Havoc Pennington <hp@pobox.com>
546 * dbus/dbus-connection.c,
547 dbus/dbus-pending-call.c: Finish the pending call stuff
549 2003-08-14 Havoc Pennington <hp@redhat.com>
551 * dbus/dbus-pending-call.c: start on new object that will replace
552 DBusMessageHandler and ReplyHandlerData for tracking outstanding
555 * dbus/dbus-gproxy.c: start on proxy object used to communicate
556 with remote interfaces
558 * dbus/dbus-gidl.c: do the boring boilerplate in here
560 2003-08-12 Havoc Pennington <hp@pobox.com>
562 * bus/dispatch.c (bus_dispatch): make this return proper
563 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
565 * dbus/dbus-errors.c (dbus_set_error): use
566 _dbus_string_append_printf_valist
568 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
569 (_dbus_string_append_printf): new
571 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
574 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
575 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
576 message is unhandled.
578 2003-08-11 Havoc Pennington <hp@pobox.com>
580 * bus/test.c (client_disconnect_handler): change to return
581 HANDLED (would have been REMOVE_MESSAGE)
583 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
584 HANDLED/NOT_YET_HANDLED instead of
585 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
588 2003-08-10 Havoc Pennington <hp@pobox.com>
590 * tools/dbus-send.c (main): add --type argument, for now
591 supporting only method_call and signal types.
593 * tools/dbus-print-message.c: print message type
595 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
596 init connection->objects
598 * doc/dbus-specification.sgml: fix sgml
600 * bus/*.c: port over to object-instance API changes
602 * test/test-service.c: ditto
604 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
605 name, we will have to fix up the rest of the code to also handle
607 (dbus_message_new): generic message-creation call
608 (set_string_field): allow appending name field
610 2003-08-06 Havoc Pennington <hp@pobox.com>
612 * dbus/dbus-object-registry.c: implement signal connection
615 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
617 * dbus/dbus-internals.c (_dbus_memdup): new function
619 2003-08-02 Havoc Pennington <hp@pobox.com>
621 * dbus/dbus-message.c (dbus_message_get_no_reply)
622 (dbus_message_set_no_reply): add these and remove
623 set_is_error/get_is_error
625 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
626 remove the ERROR flag, since there's now an ERROR type
628 2003-08-01 Havoc Pennington <hp@pobox.com>
630 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
633 * dbus/dbus-message.c (dbus_message_get_type): new function
635 * doc/dbus-specification.sgml: add "type" byte to messages
637 2003-08-01 Havoc Pennington <hp@pobox.com>
639 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
640 a message type enum to distinguish kinds of message
641 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
642 that need not be replied to
644 2003-08-01 Havoc Pennington <hp@pobox.com>
646 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
647 (unpack_8_octets): fix no-64-bit-int bug
649 * dbus/dbus-object-registry.c (validate_id): validate the
650 connection ID bits, not just the instance ID.
652 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
653 the connection-global 33 bits of the object ID
655 * dbus/dbus-object-registry.c (info_from_entry): fill in
656 object ID in the new way
658 * dbus/dbus-objectid.h: rather than high/low bits, specifically
659 define server/client/instance bits.
661 2003-07-30 Havoc Pennington <hp@pobox.com>
663 * dbus/dbus-connection.c (dbus_connection_register_object): fix
666 2003-07-13 Havoc Pennington <hp@pobox.com>
668 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
669 fields to DBusObjectVTable and DBusObjectInfo
671 2003-07-12 Havoc Pennington <hp@pobox.com>
673 * dbus/dbus-object-registry.c: implement unit test,
674 fix bugs discovered in process
676 * dbus/dbus-connection.c: remove handler_table and
677 register_handler(), add DBusObjectRegistry usage
679 * dbus/dbus-objectid.c (dbus_object_id_is_null)
680 (dbus_object_id_set_null): new functions
682 2003-07-08 Havoc Pennington <hp@pobox.com>
684 * dbus/dbus-object.c: implement some of this
686 * dbus/dbus-object-registry.c
687 (_dbus_object_registry_add_and_unlock): fill in the object_id out
689 (_dbus_object_registry_new): handle OOM
691 2003-07-08 Havoc Pennington <hp@pobox.com>
693 * dbus/dbus-object.h: sketch out an API for registering objects
694 with a connection, that allows us to use as little as 24 bytes
695 per object and lets application code represent an object in
698 * dbus/dbus-object-registry.c: implement the hard bits of the
699 DBusConnection aspect of object API. Not yet wired up.
701 2003-07-06 Havoc Pennington <hp@pobox.com>
703 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
704 (_dbus_marshal_object_id): new
705 (_dbus_demarshal_object_id): new
706 (_dbus_marshal_get_arg_end_pos): support object ID type, and
707 consolidate identical switch cases. Don't conditionalize handling
708 of DBUS_TYPE_UINT64, need to handle the type always.
709 (_dbus_marshal_validate_arg): consolidate identical cases, and
710 handle DBUS_TYPE_OBJECT_ID
712 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
714 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
716 2003-06-29 Havoc Pennington <hp@pobox.com>
718 * mono/Test.cs (class Test): fire up a main loop and run it
720 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
721 done once, the app has to do it
723 2003-06-26 Havoc Pennington <hp@pobox.com>
725 * mono/Connection.cs: set up connection with the glib main loop
727 2003-07-01 Havoc Pennington <hp@redhat.com>
729 * doc/dbus-specification.sgml: clarify the format of a type code,
730 change suggested by Jim Blandy
732 2003-06-29 Miloslav Trmac <mitr@volny.cz>
735 * tools/Makefile.am: Don't assume srcdir == builddir.
737 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
739 (_dbus_memory_test): New function.
740 * dbus/dbus-test.h: Add _dbus_memory_test ().
741 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
743 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
745 (dbus_message_new): Remove obsolete @todo.
747 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
748 (_dbus_marshal_set_uint64): Fix comment.
750 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
751 hardcode FIELD_REPLY_SERIAL.
753 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
754 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
756 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
757 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
759 2003-06-24 Havoc Pennington <hp@pobox.com>
761 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
763 2003-06-23 Anders Carlsson <andersca@codefactory.se>
769 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
770 * gcj/org/.cvsignore:
771 * gcj/org/Makefile.am:
772 * gcj/org/freedesktop/.cvsignore:
773 * gcj/org/freedesktop/Makefile.am:
774 * gcj/org/freedesktop/dbus/.cvsignore:
775 * gcj/org/freedesktop/dbus/Makefile.am:
776 * gcj/org/freedesktop/dbus/Message.java: (Message),
778 * gcj/org/freedesktop/dbus/natMessage.cc:
779 Fix the build system.
781 2003-06-22 Havoc Pennington <hp@pobox.com>
783 * mono/Connection.cs: add more bindings
785 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
788 2003-06-22 Havoc Pennington <hp@pobox.com>
790 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
791 Start wrapping more stuff.
793 2003-06-22 Havoc Pennington <hp@pobox.com>
795 * mono/Message.cs: implement Message.Wrap() that ensures we only
796 have a single C# wrapper per DBusMessage, assuming it works which
799 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
800 (dbus_message_free_data_slot): new
801 (dbus_message_set_data): new
802 (dbus_message_get_data): new
804 2003-06-22 Havoc Pennington <hp@pobox.com>
806 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
807 (_dbus_data_slot_allocator_alloc): rework these to keep a
808 reference count on each slot and automatically manage a global
809 slot ID variable passed in by address
811 * bus/bus.c: convert to new dataslot API
813 * dbus/dbus-bus.c: convert to new dataslot API
815 * dbus/dbus-connection.c: convert to new dataslot API
817 * dbus/dbus-server.c: convert to new dataslot API
819 * glib/dbus-gmain.c: ditto
823 * bus/connection.c: ditto
825 2003-06-22 Anders Carlsson <andersca@codefactory.se>
827 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
828 after the gcj checks so that the correct configuration tags
829 will be added to libtool.
831 * dbus-glib-1.pc.in: No need to specify any includes since
832 dbus-1.pc.in has those.
834 2003-06-22 Havoc Pennington <hp@pobox.com>
836 * mono/*, gcj/*, configure.in, Makefile.am:
837 Check in makefiles and subdirs for mono and gcj bindings.
838 Neither binding actually exists, just trying to get through
839 all the build and other boring bits.
841 2003-06-21 Philip Blundell <philb@gnu.org>
843 * tools/dbus-monitor.1: Updated.
845 * tools/dbus-send.1: Likewise.
847 2003-06-20 Anders Carlsson <andersca@codefactory.se>
849 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
850 for hangup and error after checking read so we won't discard
851 pending data if both hangup and read are set.
853 2003-06-19 Philip Blundell <philb@gnu.org>
855 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
857 * tools/dbus-send.c: Accept both --system and --session.
859 * tools/dbus-monitor.c: Same here.
861 2003-06-19 Anders Carlsson <andersca@codefactory.se>
863 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
864 from C++ (Patch by Miloslav Trmac).
866 2003-06-15 Joe Shaw <joe@assbarn.com>
868 * configure.in: Check for socklen_t.
870 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
872 * test/test-segfault.c: Add #include <sys/time.h>
874 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
875 dbus-launch needs it.
877 2003-06-09 Havoc Pennington <hp@redhat.com>
879 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
880 SUN_LEN, it breaks abstract socket usage
882 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
885 2003-06-04 Havoc Pennington <hp@pobox.com>
887 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
888 using unix:abstract=/foo, and when listening in a tmpdir
889 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
891 * dbus/dbus-transport.c (_dbus_transport_open): support
894 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
895 support abstract sockets
897 * dbus/dbus-transport-unix.c
898 (_dbus_transport_new_for_domain_socket): support abstract sockets
900 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
901 toggle as an argument, implement abstract namespace support
902 (_dbus_listen_unix_socket): ditto
904 * configure.in: add --enable-abstract-sockets and implement
905 a configure check for autodetection of the right value.
907 2003-06-01 Havoc Pennington <hp@pobox.com>
909 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
910 in /tmp (though on Linux this will end up being useless,
911 when we add abstract namespace support)
913 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
916 2003-05-28 Colin Walters <walters@verbum.org>
918 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
920 2003-05-18 Anders Carlsson <andersca@codefactory.se>
922 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
924 2003-05-17 Colin Walters <walters@gnu.org>
926 * tools/dbus-send.c: Don't exit with an error code if --help was
927 passed. Default to using the session bus instead of the system
930 * tools/dbus-launch.c: Ditto.
932 * tools/dbus-monitor.c: Ditto.
934 * tools/dbus-send.1: Update with new arguments.
936 * tools/dbus-launch.c: Emit code to export variables. New
937 arguments -s and -c to specify shell syntax, and a bit of code to
938 autodetect syntax. Also, allow specifying a program to run.
940 * tools/dbus-launch.1: Update with new arguments.
942 * tools/dbus-send.1: Ditto.
944 * tools/dbus-monitor.1: Ditto.
946 2003-05-17 Havoc Pennington <hp@pobox.com>
948 * bus/config-parser.c (merge_included): merge in policies from
949 child configuration file.
951 * bus/policy.c (bus_policy_merge): function to merge two policies
954 2003-05-16 Havoc Pennington <hp@redhat.com>
956 * dbus/dbus-connection.c: disable verbose lock spew
958 * tools/dbus-send.c: add --print-reply command line option
960 * tools/dbus-print-message.h (print_message): new util function
961 shared by dbus-send and dbus-monitor
963 * tools/dbus-monitor.c (handler_func): exit on disconnect
965 * dbus/dbus-transport-unix.c (do_reading): if the transport is
966 disconnected, don't try to use the read_watch
968 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
969 so we can find this bug more easily
971 2003-05-16 Havoc Pennington <hp@redhat.com>
973 * bus/policy.c (free_rule_list_func): avoid a crash when passed
974 NULL as DBusHashTable is annoyingly likely to do.
976 2003-05-16 Colin Walters <walters@verbum.org>
978 * tools/dbus-monitor.c: Add --session argument and usage()
981 * tools/dbus-monitor.1: Update with new --session arg.
983 * bus/Makefile.am (install-data-hook): Create
984 $(libdir)/dbus-1.0/services so that the session bus is happy.
986 2003-05-15 Havoc Pennington <hp@redhat.com>
988 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
989 on non-x86. ifdef's are evil.
991 2003-05-15 Havoc Pennington <hp@redhat.com>
997 * bus/Makefile.am (initddir): apparently we are supposed to put
998 init scripts in /etc/rc.d/init.d not /etc/init.d
1000 * bus/Makefile.am: remove the "you must --enable-tests to make
1001 check" as it broke distcheck
1003 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
1005 2003-05-13 James Willcox <jwillcox@gnome.org>
1008 * bus/activation.c: (bus_activation_service_created),
1009 (bus_activation_activate_service):
1010 * bus/driver.c: (bus_driver_send_service_deleted),
1011 (bus_driver_send_service_created), (bus_driver_send_service_lost),
1012 (bus_driver_send_service_acquired),
1013 (bus_driver_send_welcome_message),
1014 (bus_driver_handle_list_services):
1015 * bus/session.conf.in:
1016 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
1017 (dbus_bus_service_exists), (dbus_bus_activate_service):
1020 Add some convenience API which lets you activate a service, and did a
1021 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
1022 and dbus_message_get_args()
1024 2003-05-11 Havoc Pennington <hp@pobox.com>
1026 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
1027 calling _dbus_marshal_validate_arg() for every byte in a byte
1030 * dbus/dbus-message-handler.c: use atomic reference counting to
1031 reduce number of locks slightly; the global lock in here sucks
1033 * dbus/dbus-connection.c
1034 (_dbus_connection_update_dispatch_status_and_unlock): variant of
1035 update_dispatch_status that can be called with lock held; then use
1036 in a couple places to reduce locking/unlocking
1037 (dbus_connection_send): hold the lock over the whole function
1038 instead of acquiring it twice.
1040 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
1042 * bus/connection.c (bus_connections_setup_connection): fix access
1043 to already-freed memory.
1045 * dbus/dbus-connection.c: keep a little cache of linked list
1046 nodes, to avoid using the global linked list alloc lock in the
1047 normal send-message case. Instead we just use the connection lock
1048 that we already have to take.
1050 * dbus/dbus-list.c (_dbus_list_find_last): new function
1052 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
1053 change to use a struct for the atomic type; fix docs,
1054 they return value before increment, not after increment.
1056 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
1057 (_dbus_string_append_8_aligned): new functions to try to
1058 microoptimize this operation.
1059 (reallocate_for_length): break this out of set_length(), to
1060 improve profile info, and also so we can consider inlining the
1063 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
1064 strings with some preallocation, cuts down on our calls to realloc
1065 a fair bit. Though if we can get the "move entire string to empty
1066 string" optimization below to kick in here, it would be better.
1068 * dbus/dbus-string.c (_dbus_string_move): just call
1069 _dbus_string_move_len
1070 (_dbus_string_move_len): add a special case for moving
1071 an entire string into an empty string; we can just
1072 swap the string data instead of doing any reallocs.
1073 (_dbus_string_init_preallocated): new function
1075 2003-05-11 Havoc Pennington <hp@pobox.com>
1077 Write a "test-profile" that does echo client-server with threads;
1078 profile reveals lock contention, memcpy/realloc of buffers, and
1079 UTF-8 validation as hot spots. 20% of lock contention eliminated
1080 with dbus_atomic_inc/dec implementation on x86. Much remaining
1081 contention is global mempool locks for GList and DBusList.
1083 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
1086 * dbus/dbus-connection.c (struct DBusConnection): use
1087 dbus_atomic_t for the reference count
1089 * dbus/dbus-message.c (struct DBusMessage): declare
1090 dbus_atomic_t values as volatile
1092 * configure.in: code to detect ability to use atomic integer
1093 operations in assembly, from GLib patch
1095 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
1096 time, tired of it being wrong in threads and forked processes
1098 * glib/test-profile.c: a little program to bounce messages back
1099 and forth between threads and eat CPU
1101 * dbus/dbus-connection.c: add debug spew macros for debugging
1102 thread locks; include config.h at top; fix deadlock in
1103 dbus_connection_flush()
1105 2003-05-08 Havoc Pennington <hp@pobox.com>
1107 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
1108 data from getting written, and there wasn't a good reason to
1111 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
1112 dbus_verbose lines in test coverage
1113 (main): add list of functions sorted by # of untested blocks
1114 to the coverage report
1116 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
1118 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
1120 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
1121 extend test coverage
1123 * test/data/auth/cancel.auth-script: test canceling an
1126 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
1127 aren't used. in CVS history if we end up needing them.
1129 2003-05-04 Havoc Pennington <hp@pobox.com>
1131 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
1134 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
1135 function, which assumed length was in # of strings, not bytes
1137 * dbus/dbus-message.c (_dbus_message_test): add tests for some
1140 * dbus/dbus-connection.c
1141 (_dbus_connection_queue_received_message): disable function for
1142 now, we are only using it in test mode
1144 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1145 remove a mistaken FIXME
1147 2003-05-04 Havoc Pennington <hp@pobox.com>
1149 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
1150 unlock mutex on successful return, patch from Anders Gustafsson
1152 2003-05-04 Havoc Pennington <hp@pobox.com>
1154 * dbus-glib-1.pc.in (Requires): fix dependencies, from
1157 2003-05-04 Havoc Pennington <hp@pobox.com>
1159 * tools/dbus-launch.c: implement
1161 * bus/main.c (main), bus/bus.c (bus_context_new):
1162 implement --print-pid and --fork
1164 2003-05-03 Havoc Pennington <hp@redhat.com>
1166 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
1167 the address had no value, and add to test suite. Fix and
1168 regression test from Miloslav Trmac
1170 2003-05-03 Havoc Pennington <hp@pobox.com>
1172 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
1173 watch is invalid when handled
1175 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
1176 dbus-launch utility to launch the bus from a shell script. Didn't
1177 actually implement dbus-launch yet, it's just a placeholder still.
1179 2003-05-03 Havoc Pennington <hp@pobox.com>
1181 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
1182 daemon; also documents daemon config file, so replaces
1183 doc/config-file.txt. Corrected some stuff from config-file.txt in
1184 the process of moving it.
1186 2003-05-03 Havoc Pennington <hp@pobox.com>
1188 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
1191 2003-05-03 Colin Walters <walters@verbum.org>
1193 * dbus/dbus-sysdeps.c (fill_user_info): Test against
1194 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
1196 * Makefile.am: Update to use new .pc versioning scheme.
1198 2003-05-02 Havoc Pennington <hp@redhat.com>
1200 * bus/system.conf.in: allow send/receive to/from message bus
1203 2003-04-30 Havoc Pennington <hp@redhat.com>
1205 * configure.in: print a note when building with unit tests and
1208 2003-04-30 Havoc Pennington <hp@redhat.com>
1210 * Makefile.am: add a check-local that complains if you didn't
1211 configure with --enable-tests
1213 2003-04-29 Havoc Pennington <hp@redhat.com>
1215 * glib/dbus-gmain.c: docs cleanups
1217 * dbus/dbus-types.h: add docs on int64 types
1219 * dbus/dbus-memory.c: fix docs to avoid putting private API in
1220 public API docs section
1222 2003-04-29 Havoc Pennington <hp@redhat.com>
1224 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
1225 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
1226 parallel install API version, not with the D-BUS package version.
1228 * HACKING: move some of README over here
1230 * README: updates, and document API/ABI policy
1232 * configure.in: reindentation
1234 2003-04-29 Havoc Pennington <hp@redhat.com>
1236 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
1237 to use this library" to be sure people have the right
1240 2003-04-28 Havoc Pennington <hp@redhat.com>
1242 * configure.in: add --enable-docs which by default is auto yes if
1243 doxygen and db2html found, no otherwise; but can be forced on/off
1245 * doc/Makefile.am: conditionalize whether to build docs on
1248 2003-04-28 Havoc Pennington <hp@redhat.com>
1250 * configure.in: 0.10
1254 * bus/system.conf.in: add <includedir>system.d</includedir>
1256 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
1257 username was provided but not uid
1259 * bus/config-parser.c (struct BusConfigParser): keep track of
1260 whether the parser is toplevel or was included; change some
1261 of the error handling if it's included.
1263 2003-04-27 Havoc Pennington <hp@pobox.com>
1267 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
1268 report correct status if we finish processing authentication
1269 inside this function.
1271 * bus/activation.c (try_send_activation_failure): use
1272 bus_transaction_send_error_reply
1274 * bus/connection.c (bus_connection_get_groups): return an error
1275 explaining the problem
1277 * bus/bus.c (bus_context_check_security_policy): implement
1278 restriction here that inactive connections can only send the
1279 hello message. Also, allow bus driver to send anything to
1282 * bus/connection.c (bus_connection_complete): create the
1283 BusClientPolicy here instead of on-demand.
1284 (bus_connection_get_policy): don't return an error
1286 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
1287 sender field in message being replied to
1289 * bus/bus.c (bus_context_check_security_policy): fix silly typo
1290 causing it to return FALSE always
1292 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
1293 we checked sender rather than destination
1295 2003-04-25 Havoc Pennington <hp@redhat.com>
1297 test suite is slightly hosed at the moment, will fix soon
1299 * bus/connection.c (bus_connections_expire_incomplete): fix to
1300 properly disable the timeout when required
1301 (bus_connection_set_name): check whether we can remove incomplete
1302 connections timeout after we complete each connection.
1304 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
1305 probably still broken.
1307 * bus/services.c (bus_registry_acquire_service): implement max
1308 number of services owned, and honor allow/deny rules on which
1309 services a connection can own.
1311 * bus/connection.c (bus_connection_get_policy): report errors here
1313 * bus/activation.c: implement limit on number of pending
1316 2003-04-25 Havoc Pennington <hp@redhat.com>
1318 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
1319 where we used >= 0 instead of != DBUS_UID_UNSET.
1321 2003-04-25 Havoc Pennington <hp@redhat.com>
1323 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
1324 were toggled without add/remove, fix from Anders Gustafsson
1326 2003-04-24 Havoc Pennington <hp@redhat.com>
1328 * test/data/valid-config-files/basic.conf: add <limit> tags to
1331 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
1332 <limit> tag in configuration file.
1334 2003-04-24 Havoc Pennington <hp@redhat.com>
1336 * bus/dispatch.c: somehow missed some name_is
1338 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
1339 (_dbus_timeout_set_interval): new
1341 * bus/connection.c (bus_connections_setup_connection): record time
1342 when each connection is first set up, and expire them after the
1343 auth timeout passes.
1345 2003-04-24 Havoc Pennington <hp@redhat.com>
1347 * dbus/dbus-message.c (dbus_message_name_is): rename
1348 (dbus_message_service_is): rename
1349 (dbus_message_sender_is): rename
1350 (dbus_message_get_service): rename
1352 2003-04-24 Havoc Pennington <hp@redhat.com>
1354 * configure.in: add --enable-checks
1356 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
1358 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
1359 to use thread locks.
1360 (_dbus_connection_handler_destroyed_locked): move some private
1361 functions into proper docs group
1363 * dbus/dbus-internals.h: add _dbus_return_if_fail,
1364 _dbus_return_val_if_fail
1366 Throughout: use dbus_return_if_fail
1368 2003-04-23 James Willcox <jwillcox@gnome.org>
1371 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
1372 (dbus_connection_setup_with_g_main),
1373 (dbus_server_setup_with_g_main):
1374 * glib/test-dbus-glib.c: (main):
1375 * glib/test-thread-client.c: (main):
1376 * glib/test-thread-server.c: (new_connection_callback), (main):
1377 * tools/dbus-monitor.c: (main):
1379 Added a GMainContext argument to dbus_connection_setup_with_g_main()
1380 and dbus_server_setup_with_g_main().
1382 2003-04-20 Havoc Pennington <hp@pobox.com>
1384 * doc/dbus-specification.sgml: document the restrictions on
1385 message and service names
1387 2003-04-22 Havoc Pennington <hp@redhat.com>
1389 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
1390 support, and do some code cleanups to share more code and
1391 speed up array marshal/demarshal.
1393 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
1395 * configure.in: generate dbus-arch-deps.h
1397 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
1400 2003-04-22 Havoc Pennington <hp@redhat.com>
1402 * test/data/valid-messages/opposite-endian.message: fix test
1403 to use proper type for rply field
1405 * test/data/invalid-messages: add tests for below validation
1407 * dbus/dbus-message.c (decode_header_data): validate field types,
1408 and validate that named fields are valid names
1409 (decode_name_field): consider messages in the
1410 org.freedesktop.Local. namespace to be invalid.
1412 * dbus/dbus-string.c (_dbus_string_validate_name): new
1414 2003-04-19 Havoc Pennington <hp@pobox.com>
1416 * bus/driver.c (bus_driver_handle_hello): check limits and
1417 return an error if they are exceeded.
1419 * bus/connection.c: maintain separate lists of active and inactive
1420 connections, and a count of each. Maintain count of completed
1421 connections per user. Implement code to check connection limits.
1423 * dbus/dbus-list.c (_dbus_list_unlink): export
1425 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
1426 number of bytes in the message queue for a connection
1428 2003-04-18 Havoc Pennington <hp@pobox.com>
1430 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
1432 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
1435 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
1436 on realloc be sure to update the pointer in the keyring
1438 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
1439 offset to avoid writing to unallocated memory
1441 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
1442 try the next mechanism, so we properly handle OOM
1444 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
1446 (_dbus_keyring_new): fix OOM bug
1447 (_dbus_keyring_new_homedir): always set error; impose a maximum
1448 number of keys we'll load from the file, mostly to speed up the
1449 test suite and make its OOM checks more useful, but also for
1452 * dbus/dbus-auth.c (process_error_server): reject authentication
1453 if we get an error from the client
1454 (process_cancel): on cancel, send REJECTED, per the spec
1455 (process_error_client): send CANCEL if we get an error from the
1458 2003-04-18 Havoc Pennington <hp@pobox.com>
1460 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
1463 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
1466 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
1467 about DBUS_TEST_HOMEDIR once
1469 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
1472 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
1473 config file so we test the right thing
1475 Throughout: assorted docs improvements
1477 2003-04-18 Havoc Pennington <hp@pobox.com>
1479 * glib/dbus-gmain.c: adapt to watch changes
1481 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
1483 * dbus/dbus-server.h: remove dbus_server_handle_watch
1485 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
1487 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
1488 like DBusTimeout, so we don't need dbus_connection_handle_watch
1491 2003-04-17 Havoc Pennington <hp@redhat.com>
1493 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
1494 database usage so it all goes via the DBusUserDatabase cache.
1496 2003-04-17 Havoc Pennington <hp@redhat.com>
1498 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
1499 there was an OOM watch we skipped, we always return TRUE so we
1500 iterate again to have a look at it again. Fixes test suite hang.
1501 Code rearrangement also lets us lose some memset and only iterate
1502 over callbacks once.
1504 * bus/driver.c (bus_driver_handle_message): sense of test for
1507 2003-04-16 Havoc Pennington <hp@pobox.com>
1509 * doc/dbus-specification.sgml: make spec say serials are unsigned
1511 * dbus/dbus-message.h: change message serials to unsigned
1513 * dbus/dbus-connection.c: adapt to message serials being unsigned
1515 2003-04-15 Havoc Pennington <hp@pobox.com>
1517 * bus/bus.c: create and keep around a shared DBusUserDatabase
1520 * bus/connection.c (bus_connection_get_groups): don't cache
1521 groups for user in the connection object, since user database
1522 object now does that.
1524 2003-04-16 Havoc Pennington <hp@redhat.com>
1526 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
1527 list of size counters
1528 (_dbus_message_loader_putback_message_link): put back a popped link
1530 * dbus/dbus-connection.c
1531 (dbus_connection_set_max_live_messages_size): rename
1533 (dbus_connection_get_outgoing_size): get size of outgoing
1535 (_dbus_connection_set_connection_counter): remove this cruft
1537 2003-04-14 Havoc Pennington <hp@redhat.com>
1539 * dbus/dbus-userdb.c: user database abstraction, mostly to get
1540 caching, but at some point we might want to be able to use a
1543 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
1544 SHA1 conf file to test the sha1 auth mechanism, since the regular
1545 test always uses EXTERNAL when available.
1548 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
1549 add conf file that requires use of sha1 auth
1551 2003-04-13 Havoc Pennington <hp@pobox.com>
1553 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
1554 from Philip Blundell to send messages and monitor them.
1556 2003-04-13 Havoc Pennington <hp@pobox.com>
1558 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
1561 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
1564 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
1565 fix to only recover unused bytes if we're already authenticated
1566 (_dbus_transport_get_is_authenticated): fix to still mark us
1567 authenticated if there are unused bytes.
1569 * bus/dispatch.c: implement security policy checking
1571 * bus/connection.c (bus_transaction_send_from_driver): new
1573 * bus/bus.c (bus_context_check_security_policy): new
1575 * bus/dispatch.c (send_service_nonexistent_error): delete this,
1576 now we just set the DBusError and it gets converted to an error
1579 * bus/connection.c (allow_user_function): enable code using actual
1580 data from the config file
1582 * bus/policy.c (list_allows_user): handle wildcard rules for
1583 user/group connection perms
1585 2003-04-13 Havoc Pennington <hp@pobox.com>
1587 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
1589 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
1591 * bus/policy.c (bus_policy_append_mandatory_rule)
1592 (bus_policy_append_default_rule, bus_policy_append_user_rule)
1593 (bus_policy_append_group_rule): new functions
1595 2003-04-12 Havoc Pennington <hp@pobox.com>
1597 * bus/config-parser.c (bus_config_parser_new): fix a memleak
1599 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
1600 the pid/gid/uid, just for paranoia.
1602 * test/break-loader.c (randomly_do_n_things): find a byte
1603 containing a type code, and randomly change it to a different
1606 2003-04-12 Havoc Pennington <hp@pobox.com>
1608 * bus/policy.h: change BusPolicy to be the thing from the config
1609 file, and rename old BusPolicy to BusClientPolicy
1611 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
1612 match change in how policy works
1614 * dbus/dbus-internals.h: mark assert_not_reached as
1615 __attribute((noreturn))__
1617 2003-04-11 Havoc Pennington <hp@redhat.com>
1619 * doc/dbus-specification.sgml: fix a spot with the wrong name for
1620 the broadcast service. Use boolean return for ServiceExists.
1622 2003-04-11 Havoc Pennington <hp@redhat.com>
1624 * configure.in: add another directory to look for qt in.
1626 2003-04-11 Havoc Pennington <hp@redhat.com>
1628 * AUTHORS: add Colin Walters
1630 2003-04-11 Havoc Pennington <hp@redhat.com>
1636 2003-04-11 Havoc Pennington <hp@redhat.com>
1638 * bus/messagebus.in: remove pid file when stopping the
1639 message bus, since the bus won't have privileges to remove it
1642 2003-04-11 Havoc Pennington <hp@redhat.com>
1644 * bus/bus.c (bus_context_new): move credentials change after
1647 2003-04-11 Havoc Pennington <hp@pobox.com>
1649 * test/decode-gcov.c: add "below average functions" to the
1650 coverage report, and change how some of the code works.
1652 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
1653 not in the coverage stats.
1655 * test/test-service.c (main): use _dbus_verbose not fprintf in a
1656 couple places so running the test suite doesn't result in megaspam.
1658 2003-04-11 Havoc Pennington <hp@pobox.com>
1660 * bus/dispatch.c (check_existent_service_activation): accept a no
1661 memory error in a place we didn't before
1663 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
1664 in case the first one failed," since the test suite is less
1667 2003-04-10 Havoc Pennington <hp@pobox.com>
1669 * bus/dispatch.c (check_segfault_service_activation): add test
1670 for launching an executable that just crashes.
1672 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
1673 don't leave a million cores. We'll see how portable this is.
1675 2003-04-10 Havoc Pennington <hp@pobox.com>
1677 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
1678 the possible parent failures before we fork, so that we don't
1679 fail to create a babysitter after creating the child.
1681 * bus/activation.c (bus_activation_activate_service): kill child
1682 if we don't successfully complete the activation.
1684 2003-04-10 Havoc Pennington <hp@redhat.com>
1686 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
1687 the connection if it's disconnected
1689 * bus/activation.c (bus_activation_service_created): use new
1690 transaction features to roll back removal of pending activation if
1691 we don't successfully create the service after all. Don't remove
1692 pending activation if the function fails.
1694 * dbus/dbus-list.c (_dbus_list_insert_before_link)
1695 (_dbus_list_insert_after_link): new code to facilitate
1698 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
1699 new functionality, so we can preallocate the ability to insert
1702 * bus/connection.c (bus_transaction_add_cancel_hook): new function
1703 allowing us to put custom hooks in a transaction to be used for
1704 cancelling said transaction
1706 * doc/dbus-specification.sgml: add some discussion of secondary
1707 service owners, and disallow zero-length service names
1709 * bus/services.c (bus_registry_acquire_service): new function,
1710 splits out part of bus_driver_handle_acquire_service() and fixes
1711 a bug where we didn't remove the service doing the acquiring
1712 from the secondary queue if we failed to remove the current owner
1713 from the front of the queue.
1715 2003-04-10 Alexander Larsson <alexl@redhat.com>
1717 * doc/dbus-specification.sgml:
1718 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
1720 2003-04-10 Alexander Larsson <alexl@redhat.com>
1725 Added files to cvsignore
1727 * dbus/dbus-message.h:
1728 * dbus/dbus-message.c: (dbus_message_iter_get_named):
1729 Make get_named() take two out argument and return a boolean.
1730 (dbus_message_iter_get_args_valist):
1731 Update usage of get_named().
1732 (dbus_message_iter_append_byte):
1734 (dbus_message_iter_append_named)
1736 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
1739 2003-04-10 Alexander Larsson <alexl@redhat.com>
1741 * dbus/dbus-marshal.[ch]:
1742 Add array_type_pos argument to _dbus_marshal_validate_arg.
1743 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
1745 * dbus/dbus-message.[ch]:
1746 Multi-dimensional arrays have full type specification in the
1747 outermost array. Iter code re-arranged to handle this.
1748 Added some more iter tests.
1750 * doc/dbus-specification.sgml:
1753 Update new array encoding description.
1754 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
1756 * test/data/invalid-messages/array-with-mixed-types.message:
1757 * test/data/valid-messages/array-of-array-of-uint32.message:
1758 Change to the new array format.
1760 * test/data/invalid-messages/too-short-dict.message:
1763 * test/data/valid-messages/recursive-types.message:
1764 Fix up and extend test.
1766 2003-04-10 Havoc Pennington <hp@pobox.com>
1768 * bus/dispatch.c: lots of fixes
1770 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
1771 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
1772 that was crack, broke the test service.
1774 * dbus/dbus-transport.c (_dbus_transport_open): fix error
1775 handling to avoid piling up errors if we get a failure on the
1778 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
1779 pid in assertion failures.
1781 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
1782 to some fixed size of file descriptor array. Don't return TRUE
1783 anytime a timeout exists, that led to lots of busy loop silliness
1786 2003-04-09 Havoc Pennington <hp@redhat.com>
1788 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
1789 I'd checked this in earlier but hadn't.
1791 2003-04-09 Havoc Pennington <hp@redhat.com>
1793 * bus/dispatch.c (bus_dispatch_test): get a bit further through
1794 the activation test (man this is getting old!)
1796 2003-04-09 Havoc Pennington <hp@redhat.com>
1798 * test/test-utils.c: use dispatch status function to fix this up
1800 * bus/connection.c (connection_watch_callback): don't dispatch
1802 (connection_timeout_callback): don't dispatch from here
1803 (bus_connections_setup_connection): set the dispatch status function
1804 (bus_connection_disconnected): unset it
1806 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
1807 used to add a connection to be dispatched
1808 (_dbus_loop_iterate): do the dispatching at the end of each
1811 * dbus/dbus-connection.c
1812 (dbus_connection_set_dispatch_status_function): new function
1813 allowing us to fix up main loop usage
1814 (_dbus_connection_last_unref): free all the various function
1816 (dbus_connection_dispatch): call the DispatchStatusFunction
1817 whenever this function returns
1818 (dbus_connection_handle_watch): call DispatchStatusFunction
1819 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
1820 (reply_handler_timeout): call DispatchStatusFunction
1821 (dbus_connection_flush): call DispatchStatusFunction
1823 2003-04-09 Havoc Pennington <hp@redhat.com>
1825 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
1828 * bus/dispatch.c (check_service_activated): fix bug in test
1830 * dbus/dbus-mainloop.c (check_timeout): fix this up
1832 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
1833 verbose output so we can sort out output from different processes,
1834 e.g. in the activation case.
1836 2003-04-08 Colin Walters <walters@gnu.org>
1838 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
1840 (bus_context_new): Set it.
1841 (bus_context_unref): Use it to delete the pid file.
1843 2003-04-08 Havoc Pennington <hp@redhat.com>
1845 * test/data/invalid-messages/array-with-mixed-types.message:
1846 regression test that fails for the moment
1848 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
1849 tests for convenience
1851 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
1852 array of nil, it broke things.
1854 * test/data/invalid-messages/array-of-nil.message: regression test
1856 * test/data/valid-messages/array-of-array-of-uint32.message:
1857 happened to write this so added it to suite
1859 2003-04-08 Havoc Pennington <hp@redhat.com>
1861 * bus/driver.c (bus_driver_handle_acquire_service): init
1862 retval/reply before checking name
1864 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
1865 recursion depth argument
1867 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
1868 in the public struct for future extension
1870 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
1873 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
1876 * doc/dbus-specification.sgml: fix typo
1878 2003-04-08 Alexander Larsson <alexl@redhat.com>
1880 Implemented recursive types, named types and new-style iters
1883 * glib/test-thread-client.c: (thread_func):
1884 * glib/test-thread-server.c: (handle_test_message):
1885 * test/test-service.c: (handle_echo):
1894 * dbus/dbus-internals.c: (_dbus_type_to_string):
1895 Update for new types.
1897 * dbus/dbus-marshal.[ch]:
1898 Implement recursive types and the new marshalling format.
1899 Remove hardcoded dict marshalling.
1900 Marshal named types.
1902 * dbus/dbus-message-builder.c:
1904 Remove references to old types
1906 * dbus/dbus-message.[ch]:
1907 New non-refcounted iter API that supports recursive iters.
1908 Use iters for appending, including support for recursive
1910 Add byte and named type support.
1911 Update everything to new marshalling formats.
1912 Add tests for new API.
1914 * dbus/dbus-protocol.h:
1915 Remove old array types.
1916 Add types: BYTE, ARRAY, DICT, NAMED
1918 * dbus/dbus-string.c:
1919 * dbus/dbus-sysdeps.c:
1920 Make parse_double locale safe.
1922 * dbus/dbus-test-main.c:
1928 * doc/dbus-specification.sgml:
1931 * test/data/incomplete-messages/missing-body.message:
1932 * test/data/invalid-messages/bad-boolean.message:
1933 * test/data/invalid-messages/bad-boolean-array.message:
1934 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
1935 * test/data/invalid-messages/boolean-has-no-value.message-raw:
1936 * test/data/invalid-messages/too-short-dict.message:
1937 * test/data/valid-messages/dict-simple.message:
1938 * test/data/valid-messages/dict.message:
1939 * test/data/valid-messages/emptiness.message:
1940 * test/data/valid-messages/lots-of-arguments.message:
1941 * test/data/valid-messages/no-padding.message:
1942 * test/data/valid-messages/recursive-types.message:
1943 Add missing NAME fields
1944 Fix up dicts & arrays
1946 * test/data/invalid-messages/dict-with-nil-value.message:
1947 Removed, this is not invalid anymore.
1949 * test/data/valid-messages/recursive-types.message:
1950 Add new test for deeply recursive types.
1952 2003-04-07 Havoc Pennington <hp@pobox.com>
1954 * bus/driver.c (bus_driver_handle_acquire_service): return an
1955 error if you try to acquire a service that starts with ':'
1957 2003-04-07 Havoc Pennington <hp@redhat.com>
1959 * doc/dbus-specification.sgml: require that base service names
1960 start with ':' and that the base service is created/deleted
1961 as first and last things a connection does on the bus
1963 * bus/dispatch.c (check_existent_service_activation): lots more
1964 work on the activation test; it doesn't fully pass yet...
1966 * test/test-service.c (main): fix so we don't memleak the
1967 connection to the message bus
1968 (filter_func): accept a message asking us to exit
1970 2003-04-06 Havoc Pennington <hp@pobox.com>
1972 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
1975 * configure.in: fixes to Qt detection from Colin Walters
1977 * doc/Makefile.am: Only remove generated docbook dirs if they
1978 exist, from Colin Walters
1980 * dbus/dbus-bus.c: change how we set well-known connections to
1981 NULL, so that it works if a single connection is stored in
1982 two well-known array slots.
1984 * test/Makefile.am: remove a lot of stuff that isn't immediately
1985 useful, it's in CVS history if we want it.
1987 * test/test-service.c: use dbus-mainloop instead of that
1990 2003-04-06 Havoc Pennington <hp@pobox.com>
1992 * dbus/Makefile.am: split lists of sources into stuff that goes in
1993 the library, util functions that go in the lib and are also used
1994 elsewhere, and util functions that are used in tests/daemon but
1995 don't go in the lib.
1997 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
1998 here so it can be used in test binaries also
2000 2003-04-06 Havoc Pennington <hp@pobox.com>
2002 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
2003 here in the parent process, so we can return an error if it
2004 fails. Also, move some of the code into the child so the parent
2005 is less hosed if we fail midway through.
2007 * bus/bus.c (bus_context_new): move pidfile detection further up
2008 in the function, before we start overwriting sockets and such.
2010 * bus/messagebus.in: adjust this a bit, not sure if it will work.
2012 * configure.in: add --with-system-pid-file and --with-system-socket
2014 2003-04-06 Colin Walters <walters@verbum.org>
2016 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
2018 * bus/system.conf.in: Declare a pidfile.
2020 * bus/bus.c (bus_context_new): Test for an existing pid file, and
2021 create one (if appropriate).
2023 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
2024 (struct BusConfigParser) [pidfile]: New.
2025 (element_type_to_name, merge_included, start_busconfig_child)
2026 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
2027 (bus_config_parser_unref): Free it.
2028 (bus_config_parser_get_pidfile): New function.
2030 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
2032 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
2034 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
2036 * dbus/dbus-sysdeps.h: Prototype it.
2038 2003-04-06 Havoc Pennington <hp@pobox.com>
2040 * bus/bus.c (bus_context_new): print the address in here, rather
2041 than in main(), because we need to do it before forking the daemon
2043 * bus/dispatch.c (send_service_nonexistent_error): set the sender
2044 on the service nonexistent error
2046 * bus/driver.c (bus_driver_handle_acquire_service): set the
2047 sender on the AcquireService reply
2049 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
2050 server also listen on a UNIX socket so services can connect to it.
2052 2003-04-06 Havoc Pennington <hp@pobox.com>
2054 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
2055 so it detects deadlocks and also we actually init threads when
2058 2003-04-06 Havoc Pennington <hp@pobox.com>
2060 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2061 save the domain socket name, and unlink it when we disconnect the
2062 server. Means that at least when we exit normally, we won't leave
2063 a bunch of junk in /tmp
2065 * dbus/dbus-transport-unix.c
2066 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
2067 memory management). (I was making a real change here but then
2070 2003-04-06 Havoc Pennington <hp@pobox.com>
2072 * bus/bus.c (bus_context_new): fix wrong handling of
2073 server_data_slot_unref() in the error case.
2075 * dbus/dbus-internals.h (_dbus_assert): change so it passes
2076 "(condition) != 0" to _dbus_real_assert so that
2077 "_dbus_assert (pointer)" doesn't cause a warning
2079 * bus/main.c (main): accept --print-address option to print out
2080 the message bus address
2082 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
2084 * dbus/dbus-transport.c (_dbus_transport_open): special error for
2085 "tmpdir" option to unix: address on client side
2087 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
2090 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
2091 we can use to create sockets in the test suite.
2093 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
2094 cleanly. To be used for testing.
2096 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
2098 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
2100 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
2101 handle trying to call this when there's no servers active
2103 2003-04-05 Havoc Pennington <hp@pobox.com>
2109 2003-04-05 Havoc Pennington <hp@pobox.com>
2111 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
2112 crash on startup. Need to get "try starting the daemon"
2113 in the test suite I guess. ;-)
2115 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
2116 tracked the number of open connections; it's better done in
2117 application-specific code as you want it to span all servers etc.
2119 2003-04-05 Havoc Pennington <hp@pobox.com>
2121 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
2122 patch from Colin Walters
2124 2003-04-05 Havoc Pennington <hp@pobox.com>
2126 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
2127 reality; in fact multiple mechanisms are allowed.
2129 * dbus/dbus-internals.c (_dbus_real_assert)
2130 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
2131 _dbus_assert_not_reached() into functions, so that they don't show
2132 up in basic block counts for test coverage, and don't use up as
2133 much disk space. Does mean slower execution speed though, so
2134 assumes --disable-asserts is the normal production case.
2136 2003-04-05 Havoc Pennington <hp@pobox.com>
2138 * test/Makefile.am (dist-hook): also dist *.in files
2144 2003-04-05 Havoc Pennington <hp@pobox.com>
2146 * dbus/dbus-string.c: docs warning
2148 * dbus/dbus-spawn.c: missing docs
2150 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
2152 2003-04-05 Havoc Pennington <hp@pobox.com>
2154 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
2157 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
2158 to -1 once we've reaped the babysitter
2159 (_dbus_babysitter_handle_watch): do as much work as we can, not
2162 * bus/activation.c: add code using DBusBabysitter so that we
2163 handle it when a service fails to start up properly.
2164 (bus_activation_service_created): don't remove the activation
2165 entries as we go, just let them get removed when we free the pending
2166 activation. Unref reply messages after sending them.
2168 2003-04-05 Havoc Pennington <hp@pobox.com>
2170 * test/decode-gcov.c (main): print per-directory stats in the report
2172 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
2174 2003-04-05 Havoc Pennington <hp@pobox.com>
2176 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
2178 * test/decode-gcov.c: hack up a little program to suck data
2179 out of gcov files. Yes this is sort of silly.
2181 * configure.in: define something in config.h and do an
2182 AM_CONDITIONAL when gcov is enabled
2184 2003-04-04 Havoc Pennington <hp@redhat.com>
2186 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
2187 return a "babysitter" object that is used to monitor the status of
2188 the spawned process and reap it when required.
2190 * test/test-segfault.c, test/test-exit.c,
2191 test/test-sleep-forever.c: binaries that do various lame things,
2192 used in the test suite.
2194 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
2196 2003-04-03 Havoc Pennington <hp@pobox.com>
2198 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
2199 in preparation for modifying it, dbus-sysdeps is getting
2202 2003-04-03 Havoc Pennington <hp@redhat.com>
2204 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
2207 * bus/*.[hc]: adapt to mainloop change
2209 2003-04-03 Havoc Pennington <hp@redhat.com>
2211 * bus/activation.c (load_directory): fix up memleaks
2212 (bus_activation_entry_free): free the entry
2214 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
2215 we get one from the message bus; fix memleaks.
2217 * dbus/dbus-message.c (dbus_set_error_from_message): new function
2219 2003-04-03 Havoc Pennington <hp@pobox.com>
2221 * bus/config-parser.c (bus_config_parser_unref): free
2222 list of mechanisms, bug discovered by test suite enhancements
2223 (putting system.conf and session.conf into suite)
2225 * test/Makefile.am, test/test-service.c: add placeholder for a
2226 test service that we'll activate as part of test suite. Doesn't
2229 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
2230 setting NULL value, and use system malloc not dbus_malloc()
2231 when we have unavoidable memleakage.
2233 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
2234 didn't work, and support DBUS_BUS_ACTIVATION.
2236 * bus/activation.c (child_setup): pass our well-known bus type to
2239 * bus/config-parser.c: support <type> to specify well-known type
2241 * doc/dbus-specification.sgml: document the env variables to
2242 locate well-known buses and find service activator
2244 2003-04-02 Havoc Pennington <hp@redhat.com>
2246 * test/Makefile.am (all-local): add a rule to copy tests to
2247 builddir, so we can have generated tests. Use this to remove the
2248 silly hack for testing system.conf and session.conf. Will use this
2249 shortly to generate .service files pointing to test binaries.
2251 2003-04-02 Havoc Pennington <hp@redhat.com>
2253 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
2254 current alloc and needed new length, not max of the doubled
2255 allocation and needed new length. Also, when building tests,
2256 don't do the double-allocation stuff, just realloc every time.
2258 2003-04-02 Havoc Pennington <hp@redhat.com>
2260 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
2262 (_dbus_string_get_dirname): new
2263 (_dbus_sysdeps_test): new
2264 (_dbus_directory_open): include dirnames in error messages
2266 * bus/config-parser.c: interpret <include> and <includedir> and
2267 <servicedir> relative to config file location if the given
2268 filename is not absolute.
2270 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
2272 2003-04-02 Havoc Pennington <hp@redhat.com>
2274 * bus/connection.c (bus_transaction_send_error_reply): set sender
2275 service for the error, and unref the reply on success
2277 * bus/activation.c: convert to use BusTransaction so OOM can be
2279 (bus_activation_service_created): set sender of the message
2281 2003-04-01 Havoc Pennington <hp@redhat.com>
2283 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
2284 <includedir> (at least mostly)
2286 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
2287 first, then the user ID
2289 2003-04-01 Havoc Pennington <hp@pobox.com>
2291 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
2294 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
2296 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
2298 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
2299 socket 0777, and unlink any existing socket.
2301 * bus/bus.c (bus_context_new): change our UID/GID and fork if
2302 the configuration file so specifies; set up auth mechanism
2305 * bus/config-parser.c (bus_config_parser_content): add support
2306 for <fork> option and fill in code for <auth>
2308 * bus/system.conf.in: add <fork/> to default configuration,
2309 and limit auth mechanisms to EXTERNAL
2311 * doc/config-file.txt (Elements): add <fork>
2313 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
2314 (_dbus_change_identity): new function
2316 2003-03-31 Havoc Pennington <hp@redhat.com>
2318 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
2319 (_dbus_listen_unix_socket): fix off-by-one error in null
2320 termination spotted by Nalin
2322 2003-03-31 Havoc Pennington <hp@redhat.com>
2324 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
2325 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
2326 having a real home directory available.
2328 2003-03-31 Havoc Pennington <hp@redhat.com>
2330 * bus/Makefile.am (install-data-hook): create /var/run/dbus
2332 * bus/messagebus.in: add init script for Red Hat /etc/init.d
2334 * configure.in: add support for specifying a style of init script
2337 2003-03-31 Havoc Pennington <hp@redhat.com>
2339 Fix some annoying DBusString API and fix all affected code.
2341 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
2343 (_dbus_string_get_data): change to return string instead of using
2345 (_dbus_string_get_const_data): ditto
2346 (_dbus_string_get_data_len): ditto
2347 (_dbus_string_get_const_data_len): ditto
2349 2003-03-31 Havoc Pennington <hp@redhat.com>
2351 * bus/main.c (main): fix up the command line arguments to be nicer
2353 2003-03-31 Havoc Pennington <hp@redhat.com>
2355 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
2356 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
2357 final location that lands in the config file
2359 * bus/config-loader-expat.c (bus_config_load): fix type of
2362 * doc/TODO: remove TODO item for dbus_bus_get()
2364 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
2366 2003-03-31 Havoc Pennington <hp@pobox.com>
2368 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
2369 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
2370 argument since they are always client side
2372 * dbus/dbus-server.c (dbus_server_get_address): new function
2374 * bus/main.c (main): take the configuration file as an argument.
2376 * test/data/valid-config-files/debug-allow-all.conf: new file to
2377 use with dispatch.c tests for example
2379 * bus/test-main.c (main): require test data dir
2381 * bus/bus.c (bus_context_new): change this to take a
2382 configuration file name as argument
2384 * doc/config-file.txt (Elements): add <servicedir>
2386 * bus/system.conf, bus/session.conf: new files
2388 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
2389 well-known socket if none set
2391 * configure.in: create system.conf and session.conf
2393 2003-03-30 Havoc Pennington <hp@pobox.com>
2395 * bus/config-parser.c: hacking
2397 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
2398 to shut down, since it could cause weirdness with the DBusList
2401 * dbus/dbus-list.c (_dbus_list_test): add tests for the
2402 link-oriented stack routines
2403 (alloc_link): free the mempool if the first alloc from it fails
2405 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
2407 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
2409 (_dbus_string_skip_white): new
2411 * doc/config-file.txt (Elements): add <includedir>
2413 2003-03-28 Havoc Pennington <hp@pobox.com>
2415 * dbus/dbus-string.c (_dbus_string_copy_data_len)
2416 (_dbus_string_copy_data): new functions
2418 2003-03-28 Anders Carlsson <andersca@codefactory.se>
2420 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
2424 * dbus/dbus-memory.c:
2427 2003-03-28 Havoc Pennington <hp@pobox.com>
2429 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
2430 I think it may have just been superstition. Not sure.
2432 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
2433 failures that were not being handled.
2435 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
2437 * dbus/dbus-memory.c: add ability to set number of mallocs in a
2438 row that will fail on out-of-memory.
2440 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
2441 function for testing out-of-memory handling.
2443 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
2444 allocation functions, they do map exactly to the expat ones.
2446 2003-03-27 Havoc Pennington <hp@redhat.com>
2448 * bus/config-loader-libxml.c (bus_config_load): add another error
2451 2003-03-26 Anders Carlsson <andersca@codefactory.se>
2454 Add note about automatic service activation.
2456 * doc/dbus-specification.sgml:
2457 Rename the specification and clarify a few things.
2459 2003-03-26 Anders Carlsson <andersca@codefactory.se>
2462 * dbus/dbus-address.c:
2464 * dbus/dbus-marshal.c:
2465 * dbus/dbus-server-debug-pipe.c:
2466 * dbus/dbus-transport-unix.c:
2467 Fix documentation warnings.
2469 2003-03-26 Havoc Pennington <hp@pobox.com>
2471 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
2472 after every test so it's quick and easy to see which leaked, and
2473 so we test multiple dbus_shutdown() calls
2475 * configure.in: change configure.in XML stuff to also support
2478 * config-loader-libxml.c: some hacking
2480 * config-loader-expat.c: some hacking
2482 * config-parser.c: some hacking, plus tests
2484 2003-03-25 Havoc Pennington <hp@redhat.com>
2486 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
2488 * configure.in: add --with-xml option to specify XML library,
2489 right now only libxml is supported.
2491 * bus/config-loader-libxml.c, config-parser.c: sync some minor
2492 nonworking code between home and work, still just stubs
2494 2003-03-24 Havoc Pennington <hp@redhat.com>
2496 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
2499 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
2500 NULL argument for "message" if the error is a well-known one,
2501 fill in a generic message in this case.
2503 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
2506 * bus/test.c (bus_test_flush_bus): add
2508 * bus/policy.c (bus_policy_test): test code stub
2510 2003-03-24 Havoc Pennington <hp@pobox.com>
2512 * bus/connection.c (bus_connections_setup_connection): set up
2513 the "can this user connect" function, but it always returns
2514 TRUE until we have a config file parser so we can have a config
2515 file that allows connections.
2517 2003-03-23 Havoc Pennington <hp@pobox.com>
2519 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
2520 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
2521 the mutex, so we can check for proper memory management
2524 * dbus/dbus-dataslot.c: remove the mutex from
2525 DBusDataSlotAllocator and lock it manually when using it,
2526 to simplify fitting it into the global slots framework.
2528 * dbus/dbus-threads.c (init_static_locks): rework how we're
2529 handling global locks so they are easily shut down.
2531 * bus/policy.c (bus_policy_append_rule): fix
2533 * bus/test-main.c (main): check for memleaks
2535 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
2536 test suite check for memleaks
2538 * dbus/dbus-memory.c: add support in test mode for tracking
2539 number of outstanding blocks
2541 2003-03-23 Havoc Pennington <hp@pobox.com>
2543 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
2546 * dbus/dbus-hash.h: add ULONG hash keys
2548 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
2549 (_dbus_get_group_id): new function
2551 2003-03-20 Havoc Pennington <hp@redhat.com>
2553 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
2555 (dbus_connection_get_unix_user): new function
2557 2003-03-20 Havoc Pennington <hp@pobox.com>
2559 * bus/connection.c (bus_connection_send_oom_error): assert that
2560 message has a sender
2561 (connection_execute_transaction): ditto
2562 (bus_connection_preallocate_oom_error): fix to set the sender, and
2563 set recipient to the destination service, not the bus driver
2565 * bus/policy.c: hacking
2567 * dbus/dbus-message.c (dbus_message_service_is): new function
2568 (dbus_message_sender_is): new
2570 2003-03-19 Havoc Pennington <hp@redhat.com>
2572 * bus/policy.c: start sketching code for policy restrictions on
2573 what connections can do.
2575 2003-03-18 Havoc Pennington <hp@redhat.com>
2577 * doc/TODO: some notes on high-level todo items. Little nitpick
2578 stuff is all in @todo, so no need to add it here.
2580 * doc/config-file.txt: some notes on how config file might look
2582 2003-03-18 Anders Carlsson <andersca@codefactory.se>
2588 2003-03-17 Havoc Pennington <hp@redhat.com>
2590 * dbus/dbus-internals.h: add gcc attributes so that
2591 our printf-style functions warn on bad arguments to
2594 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
2597 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2600 2003-03-17 Havoc Pennington <hp@redhat.com>
2602 * bus/test-main.c (main): make it print something as it runs
2603 so make check doesn't look stuck
2605 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
2606 from CVS, now obsolete
2608 2003-03-17 Anders Carlsson <andersca@codefactory.se>
2610 * bus/dispatch.c: (bus_dispatch):
2611 Refetch the service name since it may have been reallocated
2612 when dbus_message_set_sender was called.
2614 * dbus/dbus-sysdeps.c: (_dbus_accept):
2615 Add address and address length variables and use them to stop
2616 valgrind from complaining.
2618 2003-03-17 Havoc Pennington <hp@pobox.com>
2620 All tests pass, no memleaks, no valgrind complaints.
2622 * bus/test.c: refcount handler_slot
2624 * bus/connection.c (bus_connections_new): refcount
2625 connection_data_slot
2627 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
2628 bytes so that auth scripts pass.
2630 * bus/dispatch.c: init message_handler_slot so it gets allocated
2633 * bus/dispatch.c (message_handler_slot_ref): fix memleak
2635 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
2636 dealloc server_pipe_hash when no longer used for benefit of
2639 * dbus/dbus-auth.c (process_command): memleak fix
2641 * bus/dispatch.c (check_hello_message): memleak fix
2643 2003-03-16 Havoc Pennington <hp@pobox.com>
2645 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
2647 2003-03-17 Anders Carlsson <andersca@codefactory.se>
2649 * bus/activation.c (bus_activation_activate_service): Append
2650 the pending activation entry to the list of pending activations.
2652 2003-03-16 Havoc Pennington <hp@pobox.com>
2654 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
2657 * dbus/dbus-address.c (create_entry): fix OOM handling when
2658 failing to alloc entry->method
2660 2003-03-16 Havoc Pennington <hp@pobox.com>
2662 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
2665 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
2666 add some missing dbus_set_result
2668 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
2669 alloc the DBusMessageHandler
2671 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
2672 the transport here, since we call this from the finalizer; it
2673 resulted in a double-finalize.
2675 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
2676 where we tried to use transport->connection that was NULL,
2677 happened when transport was disconnected early on due to OOM
2679 * bus/*.c: adapt to handle OOM for watches/timeouts
2681 * dbus/dbus-transport-unix.c: port to handle OOM during
2684 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
2685 reference to unused bytes instead of a copy
2687 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
2690 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
2693 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
2696 2003-03-16 Anders Carlsson <andersca@codefactory.se>
2698 * doc/dbus-specification.sgml:
2699 Document reply message for ActivateService.
2701 2003-03-16 Anders Carlsson <andersca@codefactory.se>
2703 * bus/activation.c: (bus_pending_activation_entry_free),
2704 (bus_pending_activation_free), (bus_activation_new),
2705 (bus_activation_unref), (bus_activation_service_created),
2706 (bus_activation_activate_service):
2708 * bus/bus.c: (bus_context_new):
2709 * bus/desktop-file.c: (new_section):
2710 * bus/driver.c: (bus_driver_send_service_deleted),
2711 (bus_driver_handle_activate_service):
2712 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
2714 * dbus/dbus-connection.c:
2715 (dbus_connection_send_with_reply_and_block):
2716 * dbus/dbus-message.c: (dbus_message_append_args_valist):
2717 * dbus/dbus-protocol.h:
2718 Make activation work better. Now pending activations will be queued
2719 and the daemon won't try to activate services that are already registered.
2721 2003-03-16 Havoc Pennington <hp@pobox.com>
2723 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
2726 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
2727 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
2729 2003-03-16 Havoc Pennington <hp@pobox.com>
2731 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
2732 this. always run the test suite before commit...
2734 * bus/*: adapt to DBusConnection API changes
2736 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
2737 requires renaming stuff to avoid dbus_connection_dispatch name
2740 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
2743 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2744 separate from _dbus_message_loader_return_buffer()
2746 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
2747 this, because it's now always broken to use; the number of
2748 messages in queue vs. the number still buffered by the message
2749 loader is undefined/meaningless. Should use
2750 dbus_connection_get_dispatch_state().
2751 (dbus_connection_dispatch): rename from
2752 dbus_connection_dispatch_message
2754 2003-03-16 Havoc Pennington <hp@pobox.com>
2756 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
2759 2003-03-16 Anders Carlsson <andersca@codefactory.se>
2761 * dbus/dbus-connection.c:
2762 (dbus_connection_send_with_reply_and_block):
2763 Decrease connection->n_incoming when removing an entry
2765 * dbus/dbus-dict.c: (dbus_dict_entry_free),
2766 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
2767 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
2768 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
2769 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
2770 (dbus_dict_get_byte_array):
2771 Handle NULL arrays and strings. Also add support for byte arrays.
2773 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
2774 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
2775 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
2776 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
2777 (_dbus_demarshal_dict), (demarshal_and_validate_len),
2778 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
2779 * dbus/dbus-marshal.h:
2780 Add support for marshalling and demarshalling empty arrays and strings.
2782 * dbus/dbus-message.c: (dbus_message_append_args_valist),
2783 (dbus_message_append_string_array),
2784 (dbus_message_iter_get_boolean),
2785 (dbus_message_iter_get_boolean_array),
2786 (dbus_message_iter_get_int32_array),
2787 (dbus_message_iter_get_uint32_array),
2788 (dbus_message_iter_get_double_array),
2789 (dbus_message_iter_get_byte_array),
2790 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
2791 (check_message_handling):
2792 Add support for getting empty arrays and dicts.
2794 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
2795 Don't do any validation at all for now, that's better than just checking
2798 * test/data/valid-messages/emptiness.message:
2799 New test message with lots of empty arrays.
2801 2003-03-16 Havoc Pennington <hp@pobox.com>
2803 * dbus/dbus-connection.c
2804 (_dbus_connection_queue_received_message_link): new function that
2805 can't fail due to OOM
2807 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
2808 new function pops a message together with a list link
2811 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
2812 message queuing functions to avoid needing to alloc memory
2814 2003-03-16 Havoc Pennington <hp@pobox.com>
2816 Oops - test code was only testing failure of around 30 of the
2817 mallocs in the test path, but it turns out there are 500+
2818 mallocs. I believe this was due to misguided linking setup such
2819 that there was one copy of dbus_malloc etc. in the daemon and one
2820 in the shared lib, and only daemon mallocs were tested. In any
2821 case, the test case now tests all 500+ mallocs, and doesn't pass
2822 yet, though there are lots of fixes in this patch.
2824 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2825 this so that it doesn't need to allocate memory, since it
2826 has no way of indicating failure due to OOM (and would be
2827 annoying if it did).
2829 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
2831 * bus/Makefile.am: rearrange to create two self-contained
2832 libraries, to avoid having libraries with overlapping symbols.
2833 that was resulting in weirdness, e.g. I'm pretty sure there
2834 were two copies of global static variables.
2836 * dbus/dbus-internals.c: move the malloc debug stuff to
2839 * dbus/dbus-list.c (free_link): free list mempool if it becomes
2842 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
2844 * dbus/dbus-address.c (dbus_parse_address): free list nodes
2847 * bus/dispatch.c (bus_dispatch_add_connection): free
2848 message_handler_slot when no longer using it, so
2849 memory leak checkers are happy for the test suite.
2851 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
2853 * bus/bus.c (new_connection_callback): disconnect in here if
2854 bus_connections_setup_connection fails.
2856 * bus/connection.c (bus_connections_unref): fix to free the
2858 (bus_connections_setup_connection): if this fails, don't
2859 disconnect the connection, just be sure there are no side
2862 * dbus/dbus-string.c (undo_alignment): unbreak this
2864 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
2866 (_dbus_auth_new): fix the order in which we free strings
2869 * bus/connection.c (bus_connection_disconnected): fix to
2870 not send ServiceDeleted multiple times in case of memory
2873 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
2874 get the base service name
2875 (dbus_bus_register_client): don't return base service name,
2876 instead store it on the DBusConnection and have an accessor
2878 (dbus_bus_register_client): rename dbus_bus_register()
2880 * bus/dispatch.c (check_hello_message): verify that other
2881 connections on the bus also got the correct results, not
2882 just the one sending hello
2884 2003-03-15 Havoc Pennington <hp@pobox.com>
2886 Make it pass the Hello handling test including all OOM codepaths.
2887 Now to do other messages...
2889 * bus/services.c (bus_service_remove_owner): fix crash when
2890 removing owner from an empty list of owners
2891 (bus_registry_ensure): don't leave service in the list of
2892 a connection's owned services if we fail to put the service
2895 * bus/connection.c (bus_connection_preallocate_oom_error): set
2896 error flag on the OOM error.
2898 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2899 handle _dbus_transport_set_connection failure
2901 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
2902 to create watches up front and simply enable/disable them as
2904 (unix_connection_set): this can now fail on OOM
2906 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
2907 of enabling/disabling a watch or timeout.
2909 * bus/loop.c (bus_loop_iterate): don't touch disabled
2912 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
2914 2003-03-15 Havoc Pennington <hp@pobox.com>
2916 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
2917 write useful test code, after all that futzing around ;-)
2919 Test does not yet pass because we can't handle OOM in
2920 _dbus_transport_messages_pending (basically,
2921 dbus_connection_preallocate_send() does not prealloc the write
2922 watch). To fix this, I think we need to add new stuff to
2923 set_watch_functions, namely a SetEnabled function so we can alloc
2924 the watch earlier, then enable it later.
2926 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
2927 dbus-memory.c to the convenience lib
2929 * bus/test.c: rename some static functions to keep them clearly
2930 distinct from stuff in connection.c. Handle client disconnection.
2932 2003-03-14 Havoc Pennington <hp@pobox.com>
2934 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
2935 transport, tests more of the real codepath. Set up clients
2936 with bus_setup_debug_client.
2938 * bus/test.c (bus_setup_debug_client): function to set up debug
2939 "clients" on the main loop
2941 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
2944 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
2947 * dbus/dbus-server-debug.c: support a debug server based on pipes
2949 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
2950 (_dbus_close): new function
2952 * configure.in: check for socketpair
2954 2003-03-14 Havoc Pennington <hp@redhat.com>
2956 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
2959 * dbus/dbus-transport-debug.c: rework this a good bit to be
2960 less complicated. hopefully still works.
2962 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
2965 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
2968 * dbus/dbus-message.c (dbus_message_copy): rename from
2969 dbus_message_new_from_message, fix it up to copy
2970 all the message fields, add test case
2972 * bus/dispatch.c (bus_dispatch_test): add some more test code,
2973 not quite passing yet
2975 2003-03-14 Havoc Pennington <hp@pobox.com>
2977 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
2978 until no work remains" in test code. (the large diff here
2979 is just code movement, no actual changes)
2981 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
2982 1, no point waiting around for test code.
2983 (_dbus_server_debug_accept_transport): unref the timeout
2984 after adding it (right?)
2986 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
2988 2003-03-13 Havoc Pennington <hp@redhat.com>
2990 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
2993 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
2996 * dbus/dbus-connection.h: Make AddWatchFunction and
2997 AddTimeoutFunction return a bool so they can fail on out-of-memory
2999 * bus/bus.c (bus_context_new): set up timeout handlers
3001 * bus/connection.c (bus_connections_setup_connection): set up
3004 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
3007 * bus/bus.c (bus_context_new): adapt to changes
3009 * bus/connection.c: adapt to changes
3011 * test/watch.c: adapt to DBusWatch changes
3013 * bus/dispatch.c (bus_dispatch_test): started adding this but
3016 2003-03-14 Anders Carlsson <andersca@codefactory.se>
3018 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
3020 2003-03-13 Havoc Pennington <hp@pobox.com>
3022 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
3023 set up a test framework as for the library
3025 2003-03-12 Havoc Pennington <hp@pobox.com>
3027 Throughout: purge global variables, introduce BusActivation,
3028 BusConnections, BusRegistry, etc. objects instead.
3030 * bus/bus.h, bus/bus.c: introduce BusContext as a global
3033 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
3034 going to redo this a bit differently I think
3036 2003-03-12 Havoc Pennington <hp@redhat.com>
3038 Mega-patch that gets the message bus daemon initially handling
3039 out-of-memory. Work still needed. Also lots of random
3040 moving stuff to DBusError instead of ResultCode.
3042 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
3044 * dbus/dbus-connection.c
3045 (dbus_connection_send_with_reply_and_block): use DBusError
3047 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
3050 * dbus/dbus-connection.c (dbus_connection_send): drop the result
3051 code here, as the only failure possible is OOM.
3053 * bus/connection.c (bus_connection_disconnect):
3054 rename bus_connection_disconnected as it's a notification only
3056 * bus/driver.c (bus_driver_handle_acquire_service): don't free
3057 "name" on get_args failure, should be done by get_args;
3058 don't disconnect client for bad args, just return an error.
3059 (bus_driver_handle_service_exists): ditto
3061 * bus/services.c (bus_services_list): NULL-terminate returned array
3063 * bus/driver.c (bus_driver_send_service_lost)
3064 (bus_driver_send_service_acquired): send messages from driver to a
3065 specific client to the client's unique name, not to the broadcast
3068 * dbus/dbus-message.c (decode_header_data): reject messages that
3069 contain no name field
3070 (_dbus_message_get_client_serial): rename to
3071 dbus_message_get_serial and make public
3072 (_dbus_message_set_serial): rename from set_client_serial
3073 (_dbus_message_set_reply_serial): make public
3074 (_dbus_message_get_reply_serial): make public
3076 * bus/connection.c (bus_connection_foreach): allow stopping
3077 iteration by returning FALSE from foreach function.
3079 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
3080 (dbus_connection_free_preallocated_send)
3081 (dbus_connection_preallocate_send): new API for sending a message
3082 without possibility of malloc failure.
3083 (dbus_connection_send_message): rename to just
3084 dbus_connection_send (and same for whole function family)
3086 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
3088 * dbus/dbus-sysdeps.c (_dbus_exit): new function
3090 * bus/activation.c: handle/return errors
3092 * dbus/dbus-errors.h: add more DBUS_ERROR #define
3094 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
3095 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
3096 (_dbus_result_from_errno): move to this file
3098 2003-03-10 Anders Carlsson <andersca@codefactory.se>
3100 * dbus/dbus-marshal.c:
3101 (_dbus_marshal_set_string):
3102 Take a length argument so we can marshal the correct string
3105 (_dbus_marshal_dict), (_dbus_demarshal_dict),
3106 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
3107 (_dbus_marshal_test):
3108 * dbus/dbus-marshal.h:
3109 Add support for marshalling and demarshalling dicts.
3111 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3112 Add support for TYPE DICT.
3114 * dbus/dbus-message.c: (set_string_field):
3115 Adjust header padding.
3117 (dbus_message_append_args_valist), (dbus_message_append_dict),
3118 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
3119 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
3120 (check_message_handling), (check_have_valid_message):
3121 * dbus/dbus-message.h:
3122 Add functions for setting and getting dicts.
3124 * dbus/dbus-protocol.h:
3130 * doc/dbus-specification.sgml:
3131 Add information about how dicts are marshalled.
3133 * test/data/invalid-messages/dict-with-nil-value.message:
3134 * test/data/invalid-messages/too-short-dict.message:
3135 * test/data/valid-messages/dict-simple.message:
3136 * test/data/valid-messages/dict.message:
3137 Add sample messages containing dicts.
3139 2003-03-08 Anders Carlsson <andersca@codefactory.se>
3141 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
3143 2003-03-07 Anders Carlsson <andersca@codefactory.se>
3146 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
3147 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
3148 (dbus_dict_set_int32), (dbus_dict_set_uint32),
3149 (dbus_dict_set_double), (dbus_dict_set_string),
3150 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3151 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3152 (dbus_dict_set_string_array), (_dbus_dict_test):
3154 Fix according to comments from Havoc.
3156 2003-03-06 Michael Meeks <michael@server.home>
3158 * configure.in: if we don't have kde-config, disable have_qt.
3160 2003-03-07 Anders Carlsson <andersca@codefactory.se>
3165 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
3166 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
3167 (dbus_dict_remove), (dbus_dict_get_value_type),
3168 (dbus_dict_get_keys), (dbus_dict_put_boolean),
3169 (dbus_dict_put_int32), (dbus_dict_put_uint32),
3170 (dbus_dict_put_double), (dbus_dict_put_string),
3171 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
3172 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
3173 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
3174 (dbus_dict_get_int32), (dbus_dict_get_uint32),
3175 (dbus_dict_get_double), (dbus_dict_get_string),
3176 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
3177 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
3178 (dbus_dict_get_string_array), (_dbus_dict_test):
3180 Add DBusDict implementation
3182 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
3186 2003-03-04 Havoc Pennington <hp@pobox.com>
3188 * test/data/auth/*: adapt to changes
3190 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
3191 USERID_BASE64 and change USERNAME_BASE64 to put in username not
3194 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
3195 more stuff from being in a context name, to make the protocol
3196 simpler to deal with
3198 * dbus/dbus-errors.c (dbus_error_has_name): new function
3199 (dbus_error_is_set): new function
3201 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
3202 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
3204 * dbus/dbus-connection.c (dbus_connection_flush): also read
3205 messages during a flush operation
3207 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
3209 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3211 * configure.in: Check for gethostbyname on Solaris.
3213 * dbus/dbus-transport.c: (_dbus_transport_open):
3214 Remove duplicate "tcp" entry.
3216 * doc/dbus-specification.sgml:
3217 Clarify some things.
3219 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3221 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
3222 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
3223 (_dbus_keyring_test):
3224 * dbus/dbus-md5.c: (_dbus_md5_compute):
3225 * dbus/dbus-sha.c: (_dbus_sha_compute):
3228 2003-03-05 Anders Carlsson <andersca@codefactory.se>
3230 * README: Add some things.
3232 2003-03-04 Anders Carlsson <andersca@codefactory.se>
3234 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
3235 after case DBUS_TYPE_BOOELAN.
3237 2003-03-02 Havoc Pennington <hp@pobox.com>
3239 * test/break-loader.c (randomly_set_extreme_ints): add test that
3240 sets really huge and small integers
3242 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
3243 that length of boolean array fits in the string, and that
3244 string has room for boolean value in single-bool case.
3246 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
3247 optional value to "ALIGN" command which is what to fill the
3250 * test/data/valid-messages/no-padding.message: add regression
3251 test for the message padding problem
3253 2003-03-02 Havoc Pennington <hp@pobox.com>
3255 * dbus/dbus-message.c (decode_header_data): fix to always init
3256 message_padding, from Benjamin Dauvergne
3258 2003-03-02 Havoc Pennington <hp@pobox.com>
3264 2003-03-01 Joe Shaw <joe@assbarn.com>
3266 * configure.in: Check for "struct cmsgcred" and try to access its
3267 members for BSD-like unices.
3269 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
3270 _dbus_read_credentials_unix_socket().
3271 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
3272 read() for reading the credential byte off the unix socket. Use
3273 struct cmsgcred on systems that support it.
3275 2003-02-27 Alexander Larsson <alexl@redhat.com>
3279 Make gthreads-2.0 dependency optional. Don't build thread test if
3282 2003-02-27 Havoc Pennington <hp@pobox.com>
3284 * dbus/dbus-connection.c
3285 (dbus_connection_send_message_with_reply_and_block): fix doh!
3286 doh! doh! bug that resulted in never removing a reply from the
3287 queue, no wonder we called get_reply_serial so much ;-)
3289 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
3290 and client serial instead of demarshaling them every time
3292 2003-02-27 Havoc Pennington <hp@pobox.com>
3294 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
3295 more inlined, using dbus-string-private.h, speeds things up
3298 * dbus/dbus-string.c (_dbus_string_free): apply align offset
3299 when freeing the string
3300 (_dbus_string_steal_data): fix for align offset
3301 (undo_alignment): new function
3303 2003-02-26 Havoc Pennington <hp@redhat.com>
3305 All kinds of audit fixes from Owen, plus initial attempt to
3306 handle unaligned memory returned from malloc.
3308 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
3309 leave room for align_offset and nul byte
3310 (fixup_alignment): function to track an align_offset and
3311 ensure real->str is aligned
3312 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
3313 to allow a nul byte plus align offset
3314 (_dbus_string_lock): fix overflow issue
3315 (_dbus_string_init_const_len): add assertions on sanity of len,
3316 assign allocated to be ALLOCATION_PADDING larger than len
3317 (set_length): fixup the overflow handling
3318 (_dbus_string_get_data_len): fix overflow in assertion
3319 (open_gap): detect overflow in size of gap to be opened
3320 (_dbus_string_lengthen): add overflow check
3321 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
3322 (_dbus_string_append): add overflow check
3323 (_dbus_string_append_unichar): overflow
3324 (_dbus_string_delete): fix overflow in assertion
3325 (_dbus_string_copy_len): overflow in assertion
3326 (_dbus_string_replace_len): overflows in assertions
3327 (_dbus_string_find): change to implement in terms of
3328 _dbus_string_find_to
3329 (_dbus_string_find_to): assorted fixage
3330 (_dbus_string_equal_c_str): assert c_str != NULL,
3331 fix logic so the function works
3332 (_dbus_string_ends_with_c_str): fix overflow thingy
3333 (_dbus_string_base64_encode): overflow fix
3334 (_dbus_string_validate_ascii): overflow
3335 (_dbus_string_validate_nul): overflow
3337 2003-02-26 Havoc Pennington <hp@redhat.com>
3339 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
3341 2003-02-26 Alexander Larsson <alexl@redhat.com>
3344 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
3346 * dbus/dbus-connection.c:
3347 * dbus/dbus-connection.h:
3348 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
3349 Add dbus_connection_set_wakeup_main_function and use it when queueing
3350 incoming and outgoing messages.
3353 * dbus/dbus-dataslot.c:
3354 Threadsafe usage of DBusDataSlotAllocator
3356 * dbus/dbus-message.c: (dbus_message_get_args_iter):
3359 * dbus/dbus-server-unix.c:
3362 * glib/dbus-gmain.c:
3363 Implement the new wakeup functions for glib.
3366 * glib/test-thread-client.c:
3367 * glib/test-thread-server.c:
3368 * glib/test-thread.h:
3369 Initial cut at some thread test code. Not really done yet.
3371 2003-02-26 Havoc Pennington <hp@pobox.com>
3373 * dbus/dbus-connection.c
3374 (dbus_connection_send_message_with_reply_and_block): fix crash
3375 where we ref'd the outgoing message instead of the returned reply
3377 * dbus/dbus-transport-unix.c (do_authentication): check read watch
3378 at the end of this function, so if we didn't need to read for
3379 authentication, we reinstall it for receiving messages
3381 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
3382 a NULL sender for peer-to-peer case
3384 * dbus/dbus-transport-unix.c (check_read_watch): handle
3385 !authenticated case correctly
3387 * glib/dbus-gmain.c: add support for DBusServer
3389 * dbus/dbus-server.c: add data slot support
3391 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
3392 return values and handle errors
3394 * dbus/dbus-dataslot.c: factor out the data slot stuff from
3397 * Doxyfile.in (INPUT): add glib subdir
3399 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
3400 setup_with_g_main instead of hookup_with_g_main; write docs
3402 2003-02-24 Anders Carlsson <andersca@codefactory.se>
3404 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
3405 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3406 * dbus/dbus-message.c: (dbus_message_append_boolean),
3407 (dbus_message_append_boolean_array),
3408 (dbus_message_get_args_valist), (_dbus_message_test):
3409 * dbus/dbus-message.h:
3410 * doc/dbus-specification.sgml:
3411 Various fixes as pointed out by Havoc.
3413 * test/data/invalid-messages/bad-boolean-array.message:
3414 * test/data/invalid-messages/bad-boolean.message:
3415 Add invalid boolean value test cases.
3417 2003-02-24 Anders Carlsson <andersca@codefactory.se>
3419 * dbus/dbus-internals.c: (_dbus_type_to_string):
3420 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
3421 (_dbus_marshal_validate_arg):
3422 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3423 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3424 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
3425 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
3426 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
3427 (dbus_message_iter_get_double),
3428 (dbus_message_iter_get_boolean_array), (message_iter_test):
3429 * dbus/dbus-message.h:
3430 * dbus/dbus-protocol.h:
3431 * doc/dbus-specification.sgml:
3432 * test/data/valid-messages/lots-of-arguments.message:
3433 Add support for boolean and boolean array types.
3435 2003-02-23 Havoc Pennington <hp@pobox.com>
3437 * dbus/dbus-keyring.c: finish most of this implementation and
3440 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
3441 these barf if the error isn't cleared to NULL
3443 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
3444 (_dbus_create_directory): new function
3446 * dbus/dbus-errors.c (dbus_set_error): fix warning
3448 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
3449 (_dbus_string_hex_decode): new function
3450 (test_hex_roundtrip): test code
3452 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
3454 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
3456 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
3457 the save-to-temp/rename trick to atomically write the new file
3458 (_dbus_string_parse_uint): new function
3460 2003-02-22 Havoc Pennington <hp@pobox.com>
3462 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
3464 2003-02-22 Havoc Pennington <hp@pobox.com>
3466 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
3467 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
3469 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
3471 * dbus/test/data/sha-1: add US government test suite for SHA-1
3473 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3475 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3476 Make string arrays NULL-terminated.
3478 * dbus/dbus-memory.c: (dbus_free_string_array):
3479 * dbus/dbus-memory.h:
3480 New function for freeing NULL-terminated string arrays.
3482 * dbus/dbus-message-builder.c: (append_quoted_string),
3483 (_dbus_message_data_load):
3484 Add support for array types.
3486 * dbus/dbus-message.c: (check_message_handling):
3487 Add more types as test cases.
3489 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
3490 (_dbus_string_parse_double):
3491 Add the start offset to the end offset.
3493 * test/data/valid-messages/lots-of-arguments.message:
3494 New test message with lots of arguments.
3496 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3498 * dbus/dbus-message.c: (dbus_message_append_nil),
3499 (dbus_message_append_int32), (dbus_message_append_uint32),
3500 (dbus_message_append_double), (dbus_message_append_string),
3501 (dbus_message_append_int32_array),
3502 (dbus_message_append_uint32_array),
3503 (dbus_message_append_double_array),
3504 (dbus_message_append_byte_array),
3505 (dbus_message_append_string_array):
3506 Fix all out-of-memory handling in these functions.
3508 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3510 * dbus/dbus-message.c: (dbus_message_append_nil):
3513 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3515 * dbus/dbus-message.c: (dbus_message_append_args_valist),
3516 (dbus_message_append_nil), (dbus_message_append_int32_array),
3517 (dbus_message_append_uint32_array),
3518 (dbus_message_append_double_array),
3519 (dbus_message_append_byte_array),
3520 (dbus_message_append_string_array), (dbus_message_get_args_valist),
3521 (dbus_message_iter_get_int32_array),
3522 (dbus_message_iter_get_uint32_array),
3523 (dbus_message_iter_get_double_array),
3524 (dbus_message_iter_get_byte_array),
3525 (dbus_message_iter_get_string_array):
3527 * dbus/dbus-message.h:
3528 Add functions for appending and getting arrays.
3530 2003-02-21 Anders Carlsson <andersca@codefactory.se>
3532 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
3533 element size at least 8 bytes, fixes mempool tests on
3536 2003-02-20 Alexander Larsson <alexl@redhat.com>
3538 * dbus/dbus-transport-unix.c (unix_do_iteration):
3539 Unlock the connection mutex during a blocking select call.
3540 Add todo about how we need a way to wake up the select.
3542 * dbus/dbus-connection-internal.h:
3543 * dbus/dbus-connection.c:
3544 Add _dbus_connection_lock and _dbus_connection_unlock.
3546 2003-02-19 Havoc Pennington <hp@pobox.com>
3548 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
3549 Doxyfile.in, not Doxyfile
3551 * dbus/dbus-keyring.c: do some hacking on this
3553 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
3555 * dbus/dbus-errors.c (dbus_set_error_const): do not call
3557 (dbus_set_error): remove dbus_error_init, check for message ==
3558 NULL *before* we sprintf into it, and add @todo about including
3559 system headers in this file
3561 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
3563 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
3565 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
3566 get various bits of user information based on either username
3568 (_dbus_homedir_from_username): new function
3570 2003-02-19 Anders Carlsson <andersca@codefactory.se>
3573 Add check for nonposix getpwnam_r
3575 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
3576 Align the pool element size to a sizeof (void *) boundary.
3578 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
3579 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
3580 General Solaris fixes.
3582 * test/data/valid-messages/simplest-manual.message:
3583 Explicitly state that we want little-endian packing.
3585 2003-02-19 Mikael Hallendal <micke@codefactory.se>
3587 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
3589 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
3590 Added to create a transport connecting using a tcp/ip socket.
3592 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
3593 to a tcp socket at given host and port.
3594 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
3597 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
3599 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
3600 Added to create a server listening on a TCP/IP socket.
3602 2003-02-19 Havoc Pennington <hp@pobox.com>
3604 Throughout: mop up all the Doxygen warnings and undocumented
3607 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
3608 to search any paths.
3610 * dbus/dbus-threads.c: move global mutex initializers to
3611 dbus-internals.h, multiple prototypes was confusing doxygen
3612 besides being kind of ugly
3614 * Doxyfile (PREDEFINED): have Doxygen define
3615 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
3616 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
3617 (do not abuse the feature! it's for stuff like the autogenerated
3618 macros in dbus-md5.c, not just for things you don't feel like
3621 2003-02-18 Havoc Pennington <hp@pobox.com>
3623 * dbus/dbus-string.c (_dbus_string_zero): new function
3625 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
3626 wrap it in some dbus-friendly API
3628 * dbus/dbus-types.h: add 16-bit types
3630 2003-02-18 Joe Shaw <joe@assbarn.com>
3632 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
3633 credentials from our currently running process.
3634 (get_word): Fix a buglet where we were copying the entire length
3635 instead of relative to our position.
3637 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
3638 keys on the stack... it's 640k of data.
3640 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
3641 read the credentials byte off the socket, even if we don't have
3643 (_dbus_poll): Implement poll() using select() for systems which
3646 * glib/test-dbus-glib.c (main): Print out an error if no
3647 parameters are given.
3649 * test/data/auth/fallback.auth-script: Added. Tests that a client
3650 can fallback to a secondary auth mechanism if the first fails.
3652 2003-02-18 Havoc Pennington <hp@pobox.com>
3656 2003-02-17 Havoc Pennington <hp@pobox.com>
3658 * doc/dbus-specification.sgml: lots of cosmetic
3659 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
3660 env variable to DBUS_BUS_ADDRESS, s/client/application/,
3661 s/server/bus/ (except in authentication section). Add a section
3662 "Message Bus Message Routing"
3664 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
3670 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3672 * doc/dbus-specification.sgml:
3673 Specification updates.
3675 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3677 * bus/activation.c: (bus_activation_init), (child_setup),
3678 (bus_activation_activate_service):
3680 * bus/main.c: (main):
3681 Set DBUS_ADDRESS environment variable.
3683 * dbus/dbus-errors.c: (dbus_set_error):
3684 Don't use va_copy since that's a C99 feature.
3686 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
3687 (_dbus_spawn_async):
3688 * dbus/dbus-sysdeps.h:
3689 Add child_setup_func to _dbus_spawn_async.
3691 * doc/dbus-specification.sgml:
3692 Update specification.
3694 * test/spawn-test.c: (setup_func), (main):
3697 2003-02-17 Alexander Larsson <alexl@redhat.com>
3699 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
3702 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3706 * doc/dbus-test-plan.sgml:
3707 Add test plan document.
3712 2003-02-17 Anders Carlsson <andersca@codefactory.se>
3714 * dbus/dbus-message.c: (decode_header_data),
3715 (_dbus_message_loader_return_buffer):
3716 Set the header padding amount when loading a message.
3718 2003-02-16 Anders Carlsson <andersca@codefactory.se>
3720 * bus/dispatch.c: (send_one_message):
3721 Only send broadcast messages to registered connections.
3723 * dbus/dbus-message.c: (dbus_message_name_is):
3724 * dbus/dbus-message.h:
3725 New convenience function.
3727 * dbus/dbus-transport-debug.c: (do_reading):
3728 Only dispatch one message per run.
3731 * test/bus-test.c: (new_connection_callback), (die),
3732 (test_hello_client1_handler), (test_hello_client2_handler),
3733 (test_hello_replies), (main):
3735 * test/bus-test-loop.[ch]:
3738 2003-02-16 Havoc Pennington <hp@pobox.com>
3740 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
3741 backward conditional
3743 2003-02-16 Alexander Larsson <alexl@redhat.com>
3745 * dbus/dbus-connection.c:
3746 Implement sent_message_with_reply. (with_reply_and block is still
3748 Made dispatch_message not lose message if OOM.
3750 * dbus/dbus-errors.h:
3751 Add NoReply error (for reply timeouts).
3753 2003-02-16 Alexander Larsson <alexl@redhat.com>
3755 * dbus/dbus-hash.c (_dbus_hash_table_unref):
3756 Actually free keys and values when destroying hashtable.
3758 2003-02-16 Anders Carlsson <andersca@codefactory.se>
3760 * dbus/dbus-auth.c: (client_try_next_mechanism):
3763 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
3764 Return TRUE if there's no thread implementation around.
3766 * glib/dbus-gmain.c: (free_source),
3767 (dbus_connection_hookup_with_g_main):
3768 Make sure to remove the GSource when the connection is finalized.
3770 2003-02-16 Anders Carlsson <andersca@codefactory.se>
3772 * bus/dispatch.c: (bus_dispatch_message_handler):
3773 * dbus/dbus-errors.h:
3774 Return an error if someone tries to send a message to a service
3777 2003-02-16 Anders Carlsson <andersca@codefactory.se>
3779 * bus/activation.c: (load_directory), (bus_activation_init),
3780 (bus_activation_activate_service):
3783 (bus_driver_handle_activate_service), (bus_driver_handle_message):
3784 More work on the activation handling.
3786 * dbus/dbus-errors.h:
3787 Add some error messages
3789 * dbus/dbus-message.c: (dbus_message_new_error_reply):
3790 * dbus/dbus-message.h:
3791 New function that creates an error message.
3793 * dbus/dbus-protocol.h:
3794 Add ACTIVATE_SERVER message.
3796 * dbus/dbus-server-unix.c: (unix_handle_watch),
3797 (_dbus_server_new_for_domain_socket):
3798 Call _dbus_fd_set_close_on_exec.
3800 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
3801 (_dbus_spawn_async), (_dbus_disable_sigpipe),
3802 (_dbus_fd_set_close_on_exec):
3803 * dbus/dbus-sysdeps.h:
3804 Add _dbus_fd_set_close_on exec function. Also add function that checks
3805 that all open fds are set to close-on-exec and warns otherwise.
3807 * dbus/dbus-transport-unix.c:
3808 (_dbus_transport_new_for_domain_socket):
3809 Call _dbus_fd_set_close_on_exec.
3811 2003-02-16 Havoc Pennington <hp@pobox.com>
3813 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
3814 allow people to avoid setting SIGPIPE to SIG_IGN
3815 (_dbus_connection_new_for_transport): disable SIGPIPE unless
3816 we've been asked not to
3818 2003-02-15 Anders Carlsson <andersca@codefactory.se>
3820 * dbus/dbus-list.c: (_dbus_list_append_link),
3821 (_dbus_list_prepend_link):
3822 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
3826 2003-02-15 Anders Carlsson <andersca@codefactory.se>
3829 * bus/activation.c: (bus_activation_entry_free),
3830 (add_desktop_file_entry), (load_directory), (bus_activation_init):
3832 * bus/main.c: (main):
3833 Add simple activation support, doesn't work yet though.
3835 2003-02-15 Zack Rusin <zack@kde.org>
3837 * qt/dbus-qthread.cpp: small casting fix
3839 2003-02-15 Anders Carlsson <andersca@codefactory.se>
3841 * dbus/dbus-errors.c: (dbus_set_error):
3842 * dbus/dbus-errors.h:
3843 Add a few errors and make dbus_set_error void.
3845 * dbus/dbus-sysdeps.c:
3846 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
3847 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
3848 * dbus/dbus-sysdeps.h:
3849 Add _dbus_spawn_async.
3851 * test/spawn-test.c: (main):
3852 Test for _dbus_spawn_async.
3854 2003-02-15 Anders Carlsson <andersca@codefactory.se>
3856 * dbus/dbus-internals.h:
3857 Fix build without tests.
3859 * dbus/dbus-list.c: (alloc_link):
3860 Fix a segfault when a malloc fails.
3862 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
3863 (dbus_malloc0), (dbus_realloc):
3864 Add support for malloc debugging.
3866 2003-02-15 Alexander Larsson <alexl@redhat.com>
3868 * dbus/dbus-threads.c:
3869 * dbus/dbus-threads.h:
3870 Add condvars. Remove static mutext from API.
3871 Implement static mutexes by initializing them from threads_init.
3873 * glib/dbus-gthread.c:
3874 * qt/dbus-qthread.cpp:
3875 Update with the thread api changes.
3880 Turn StaticMutex into normal mutex + init function.
3881 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
3882 _dbus_list_append_link, _dbus_list_prepend_link
3885 * dbus/dbus-sysdeps.c:
3886 * dbus/dbus-sysdeps.h:
3887 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
3888 _dbus_atomic_dec. Only slow fallback implementation at the moment.
3890 * dbus/dbus-protocol.h:
3891 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
3893 * dbus/dbus-message.c:
3894 Make ref/unref atomic.
3897 * dbus/dbus-connection-internal.h:
3898 * dbus/dbus-connection.c:
3899 * dbus/dbus-connection.h:
3901 Change _peek to _borrow,_return & _steal_borrowed.
3902 Change disconnect callback to event.
3903 Make dbus_connection_dispatch_messages reentrant.
3905 * dbus/dbus-transport.c:
3906 Don't ref the connection on calls to the transport
3909 * dbus/dbus-message-handler.c:
3912 * glib/dbus-gmain.c:
3913 Don't use peek_message anymore
3916 * test/debug-thread.c:
3917 * test/debug-thread.h:
3918 Simple thread implementation that asserts() on deadlocks in
3919 single-threaded code.
3922 (main) Call debug_threads_init.
3925 Use disconnect message instead of disconnect callback.
3929 Don't call dbus_connection_set_disconnect_function. Instead export
3930 bus_connection_disconnect.
3933 Call bus_connection_disconnect when we get a disconnected message.
3935 2003-02-15 Havoc Pennington <hp@pobox.com>
3937 * dbus/dbus-message.c (dbus_message_new): fool around with the
3940 2003-02-14 Havoc Pennington <hp@pobox.com>
3942 * dbus/dbus-mempool.c: fail if the debug functions so indicate
3944 * dbus/dbus-memory.c: fail if the debug functions indicate we
3947 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
3948 (_dbus_decrement_fail_alloc_counter): debug functions to
3949 simulate memory allocation failures
3951 2003-02-14 Havoc Pennington <hp@pobox.com>
3953 * dbus/dbus-errors.h (struct DBusError): add a word of padding
3956 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3958 * bus/driver.c: (bus_driver_handle_hello):
3960 * bus/services.c: (bus_service_lookup):
3961 Reorder message sending so we get a more sane order.
3963 * test/bus-test.c: (message_handler):
3966 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3968 * bus/driver.c: (bus_driver_send_service_deleted),
3969 (bus_driver_send_service_created), (bus_driver_send_service_lost),
3970 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
3971 (bus_driver_send_welcome_message),
3972 (bus_driver_handle_list_services),
3973 (bus_driver_handle_acquire_service),
3974 (bus_driver_handle_service_exists):
3975 * dbus/dbus-bus.c: (dbus_bus_register_client),
3976 (dbus_bus_acquire_service), (dbus_bus_service_exists):
3977 * dbus/dbus-errors.c: (dbus_result_to_string):
3978 * dbus/dbus-errors.h:
3979 * dbus/dbus-message.c: (dbus_message_append_args),
3980 (dbus_message_append_args_valist), (dbus_message_get_args),
3981 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
3982 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
3983 (dbus_message_iter_get_byte_array),
3984 (dbus_message_iter_get_string_array), (message_iter_test),
3985 (check_message_handling), (_dbus_message_test):
3986 * dbus/dbus-message.h:
3987 * test/bus-test.c: (main):
3988 Change fields to arguments in messages, so that they won't be
3989 confused with header fields.
3991 * glib/test-dbus-glib.c: (main):
3992 Remove append_fields from hello message.
3994 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3996 * dbus/dbus-errors.c:
3997 * dbus/dbus-message.c:
3998 * dbus/dbus-string.c:
3999 Documentation fixes.
4001 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4003 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
4005 Implement support for timeouts in dbus-glib.
4007 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4009 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4010 * dbus/dbus-message.c: (process_test_subdir):
4011 * test/break-loader.c: (find_breaks_based_on):
4012 Plug some memory leaks.
4014 2003-02-13 Richard Hult <rhult@codefactory.se>
4016 * bus/main.c: Fix build.
4018 * dbus/dbus-errors.h:
4019 * dbus/dbus-errors.c: Fix copyright for Anders.
4021 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4026 * bus/connection.c: (bus_connection_foreach):
4029 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
4030 (unescape_string), (new_section), (parse_section_start),
4031 (parse_key_value), (report_error), (bus_desktop_file_load),
4032 (bus_desktop_file_get_string):
4033 * bus/desktop-file.h:
4034 Use DBusError for error reporting.
4036 * bus/dispatch.c: (send_one_message),
4037 (bus_dispatch_message_handler):
4038 * bus/driver.c: (bus_driver_send_service_deleted),
4039 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4040 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4041 (bus_driver_send_welcome_message),
4042 (bus_driver_handle_list_services),
4043 (bus_driver_handle_acquire_service),
4044 (bus_driver_handle_service_exists):
4045 * bus/loop.c: (bus_loop_run):
4047 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
4049 * bus/utils.c: (bus_wait_for_memory):
4051 New files with general utility functions.
4053 * dbus/dbus-internals.h:
4054 Remove _DBUS_HANDLE_OOM.
4056 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4058 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
4059 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
4060 * dbus/dbus-errors.h:
4061 Add DBusError structure.
4063 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4065 * test/data/valid-messages/standard-acquire-service.message:
4066 * test/data/valid-messages/standard-hello.message:
4067 * test/data/valid-messages/standard-list-services.message:
4068 * test/data/valid-messages/standard-service-exists.message:
4069 Add some standard messages.
4071 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4073 * bus/driver.c: (bus_driver_send_welcome_message),
4074 (bus_driver_handle_list_services),
4075 (bus_driver_handle_acquire_service),
4076 (bus_driver_handle_service_exists), (bus_driver_handle_message):
4077 Update for API changes in libdbus.
4079 * dbus/dbus-message.c: (dbus_message_new_reply):
4080 * dbus/dbus-message.h:
4081 Remove the name argument. The spec states that replies shouldn't
4084 2003-02-13 Anders Carlsson <andersca@codefactory.se>
4086 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
4087 (report_error), (bus_desktop_file_load), (lookup_section),
4088 (lookup_line), (bus_desktop_file_get_raw),
4089 (bus_desktop_file_get_string):
4090 * bus/desktop-file.h:
4091 Some fixes, and new functions for getting a key value from a section.
4093 2003-02-13 Havoc Pennington <hp@pobox.com>
4095 * test/data/auth/fail-after-n-attempts.auth-script: new test
4097 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
4100 2003-02-13 Havoc Pennington <hp@pobox.com>
4102 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
4103 dbus_credentials_match were backward
4105 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
4106 NO_CREDENTIALS and ROOT_CREDENTIALS
4108 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
4109 into here. Never process more commands after we've reached an
4110 end state; store further data as unused bytes.
4112 * test/data/auth/*: add more auth tests
4114 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
4115 command to match exact string and EXPECT_UNUSED to match unused
4118 * test/Makefile.am (dist-hook): fix to dist all the test stuff
4120 2003-02-12 Havoc Pennington <hp@pobox.com>
4122 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
4123 \r off of popped lines
4125 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
4128 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
4131 2003-02-12 Havoc Pennington <hp@pobox.com>
4133 * dbus/Makefile.am: remove break-loader from the build, since it
4136 * configure.in: add --enable-gcov to turn on coverage profiling
4137 flags and disable optimization
4139 2003-02-10 Havoc Pennington <hp@pobox.com>
4141 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
4142 initial cut at test framework for DBusAuth from laptop.
4143 Doesn't quite work yet but it compiles and I need to get
4144 it off the 266mhz laptop. ;-)
4146 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
4147 fix a memleak in error case
4149 2003-02-12 Anders Carlsson <andersca@codefactory.se>
4152 * bus/desktop-file.c:
4153 * bus/desktop-file.h:
4154 Add a desktop file parser.
4156 2003-02-11 Zack Rusin <zack@kde.org>
4158 * qt/message.[h|cpp]: sample implementation
4159 of the KDE wrapper for DBusMessage
4161 2003-02-09 Zack Rusin <zack@kde.org>
4163 * test/bus-test.c: make_it_compile
4164 * doc/dbus-specification.sgml: minimal semantic fix
4166 2003-02-06 Anders Carlsson <andersca@codefactory.se>
4172 2003-02-06 Anders Carlsson <andersca@codefactory.se>
4175 * dbus/dbus-break-loader.c:
4177 * test/break-loader.c:
4178 Move dbus-break-loader to test/ and rename it to break-loader.
4180 2003-02-02 Havoc Pennington <hp@pobox.com>
4182 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
4183 for code to manage cookies in your home directory
4185 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
4187 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
4188 to authenticate, then disconnect the client.
4190 2003-02-03 Alexander Larsson <alexl@redhat.com>
4192 * dbus/dbus-message.c (dbus_message_append_fields):
4195 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4197 * doc/dbus-specification.sgml:
4198 Update address format section.
4200 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4203 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
4204 (message_handler), (new_connection_callback), (loop_quit),
4208 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4210 * bus/driver.c: (bus_driver_handle_service_exists):
4211 Simplify the code a bit.
4213 * dbus/dbus-bus.c: (dbus_bus_service_exists):
4216 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4219 Add libdbus-daemon.la and link to it.
4221 2003-02-01 James Willcox <jwillcox@gnome.org>
4223 * bus/driver.c: (bus_driver_handle_own_service):
4224 Actually include the service reply code in the message.
4226 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4228 * bus/driver.c: (bus_driver_handle_service_exists):
4229 Don't unref the incoming message.
4231 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4233 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
4235 2003-02-02 Anders Carlsson <andersca@codefactory.se>
4237 * dbus/dbus-server.c: (dbus_server_listen):
4238 * dbus/dbus-transport.c: (_dbus_transport_open):
4239 ifdef out the calls to the debug transport and server.
4241 2003-02-02 Alexander Larsson <alexl@redhat.com>
4243 * dbus/dbus-watch.c (dbus_watch_get_flags):
4244 Add note in the docs that ERROR or HANGUP won't be returned
4245 and are assumed always on.
4247 * glib/dbus-gmain.c (add_watch):
4248 Always add IO_ERR | IO_HUP
4250 * dbus/dbus-message.h:
4251 Add semicolon after dbus_message_iter_get_string_array().
4252 Makes qt code build again
4254 2003-02-01 Anders Carlsson <andersca@codefactory.se>
4256 * bus/driver.c: (create_unique_client_name),
4257 (bus_driver_handle_hello):
4258 Don't take a name, just use a numeric id to identify
4262 * dbus/dbus-bus.c: (dbus_bus_register_client),
4263 (dbus_bus_acquire_service), (dbus_bus_service_exists):
4265 Add new convenience functions for communicating with the bus.
4267 * dbus/dbus-message.h:
4269 * dbus/dbus-protocol.h:
4272 2003-02-01 Alexander Larsson <alexl@redhat.com>
4274 * dbus/dbus-message.c (dbus_message_append_fields):
4275 Add some more doc comments.
4277 2003-02-01 Havoc Pennington <hp@pobox.com>
4279 * dbus/dbus-break-loader.c (randomly_modify_length): change
4280 a 4-byte value in the message as if it were a length
4282 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
4283 execute bit on saved files
4285 2003-02-01 Havoc Pennington <hp@pobox.com>
4287 * dbus/dbus-break-loader.c (main): new program to find messages
4288 that break the loader.
4290 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
4291 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
4293 * dbus/dbus-string.c (_dbus_string_set_byte): new
4295 2003-01-31 Havoc Pennington <hp@pobox.com>
4297 * dbus/dbus-message.c: refactor the test code to be more general,
4298 in preparation for writing a "randomly permute test cases to
4299 try to break the loader" program.
4301 2003-01-31 Havoc Pennington <hp@pobox.com>
4303 * doc/dbus-specification.sgml: work on the specification
4305 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
4306 the protocol version of the message.
4308 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
4309 no longer specifies that.
4310 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
4313 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
4314 "break" for DBUS_TYPE_NIL, remove @todo
4316 2003-01-31 Havoc Pennington <hp@pobox.com>
4318 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
4319 just set_is_error/get_is_error as this is a commonly-used
4320 function, and write docs.
4322 2003-01-31 Anders Carlsson <andersca@codefactory.se>
4324 * dbus/dbus-address.c: (dbus_address_entry_free):
4325 Free key and value lists.
4327 * dbus/dbus-internals.c: (_dbus_type_to_string):
4328 Add the types we didn't have.
4330 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4331 (_dbus_marshal_validate_arg):
4334 * dbus/dbus-message.c: (dbus_message_set_sender):
4335 Remove todo about being able to set sender to NULL.
4337 (dbus_message_set_is_error_reply),
4338 (dbus_message_get_is_error_reply):
4339 * dbus/dbus-message.h:
4342 * dbus/dbus-protocol.h:
4343 Add error reply flag.
4345 * test/data/valid-messages/opposite-endian.message:
4346 Add NIL type to test.
4348 2003-01-31 Havoc Pennington <hp@pobox.com>
4350 * doc/dbus-specification.sgml: fully specify the header. Add
4351 flags and major protocol version, and change header/body len to
4354 * dbus/dbus-message-builder.c (append_saved_length): append length
4357 * dbus/dbus-message.c (dbus_message_create_header): change header
4358 length and body length to unsigned. Add the new fields from the
4360 (_dbus_message_loader_return_buffer): unsigned header/body len
4362 2003-01-30 Havoc Pennington <hp@pobox.com>
4364 * dbus/dbus-auth.c: rework to use only REJECTED, no
4367 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
4368 use REJECTED, suggested by Mark McLoughlin
4370 2003-01-30 Havoc Pennington <hp@pobox.com>
4372 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
4373 a better way to report errors here. e.g. "unix address lacks
4374 path" or something. also "no such file" when the path doesn't
4377 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
4379 (dbus_parse_address): add @todo about documenting address format,
4380 and allowing , and ; to be escaped
4382 2003-01-30 Anders Carlsson <andersca@codefactory.se>
4385 Add dbus-address.[ch]
4387 * dbus/dbus-address.c: (dbus_address_entry_free),
4388 (dbus_address_entries_free), (create_entry),
4389 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
4390 (dbus_parse_address), (_dbus_address_test):
4391 * dbus/dbus-address.h:
4392 New files for dealing with address parsing.
4394 * dbus/dbus-connection.c:
4395 Document timeout functions.
4397 * dbus/dbus-message.c:
4398 Document dbus_message_new_from_message.
4400 * dbus/dbus-server-debug.c:
4403 * dbus/dbus-server.c: (dbus_server_listen):
4404 Parse address and use correct server implementation.
4406 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
4407 * dbus/dbus-string.h:
4408 New function with test.
4410 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
4414 * dbus/dbus-transport-debug.c:
4417 * dbus/dbus-transport.c: (_dbus_transport_open):
4418 Parse address and use correct transport implementation.
4420 2003-01-30 Havoc Pennington <hp@pobox.com>
4422 * dbus/dbus-message.c: use message->byte_order instead of
4423 DBUS_COMPILER_BYTE_ORDER throughout.
4424 (dbus_message_create_header): pad header to align the
4425 start of the body of the message to 8-byte boundary
4427 * dbus/dbus-marshal.h: make all the demarshalers take const
4428 DBusString arguments.
4430 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
4431 validate message args here, so we don't have to do slow validation
4432 later, and so we catch bad messages as they are incoming. Also add
4433 better checks on header_len and body_len. Also fill in
4436 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
4437 implemented properly)
4438 (_dbus_string_validate_nul): new function to check all-nul
4440 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
4441 get_arg_end_pos and remove all validation
4442 (_dbus_marshal_validate_arg): actually do validation here.
4444 2003-01-29 Havoc Pennington <hp@pobox.com>
4446 * dbus/dbus-message.c (check_message_handling): fix assertion
4447 failure on set_client_serial
4449 2003-01-28 Havoc Pennington <hp@pobox.com>
4451 * dbus/dbus-server-debug.c: Add doc section comments
4453 * dbus/dbus-transport-debug.c: add doc section comments
4455 2003-01-28 Havoc Pennington <hp@redhat.com>
4457 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
4458 the reverse order from how I had it
4459 (_dbus_string_base64_encode): reverse encoding order. I was
4460 basically byteswapping everything during encoding.
4462 2003-01-28 Anders Carlsson <andersca@codefactory.se>
4464 * dbus/dbus-connection-internal.h:
4465 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
4466 (_dbus_connection_remove_timeout):
4467 Add functions for adding and removing timeouts.
4469 * dbus/dbus-message.c: (dbus_message_new_from_message):
4470 Add new function that takes a message and creates an exact
4471 copy of it, but with the refcount set to 1.
4472 (check_message_handling):
4475 * dbus/dbus-server-protected.h:
4476 * dbus/dbus-server.c: (_dbus_server_init_base),
4477 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
4478 (dbus_server_set_timeout_functions):
4479 (_dbus_server_remove_timeout):
4480 New functions so that a server can add and remove timeouts.
4482 (dbus_server_listen):
4483 Add commented out call to dbus_server_debug_new.
4485 * dbus/dbus-timeout.c: (_dbus_timeout_new):
4486 Actually set the handler, doh.
4488 * dbus/dbus-transport.c: (_dbus_transport_open):
4489 Add commented out call to dbus_transport_debug_client_new.
4492 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
4494 2003-01-28 Havoc Pennington <hp@pobox.com>
4496 * dbus/dbus-message.c (check_message_handling): function to check
4497 on the loaded message, iterates over it etc.
4499 2003-01-28 Havoc Pennington <hp@pobox.com>
4501 * test/Makefile.am (dist-hook): fix make distdir
4503 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
4505 2003-01-27 Havoc Pennington <hp@pobox.com>
4507 * dbus/dbus-mempool.c (time_for_size): replace printf with
4510 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
4511 empty lines; fix the SAVE_LENGTH stuff to be
4512 START_LENGTH/END_LENGTH so it actually works; couple other
4515 * test/Makefile.am (dist-hook): add dist-hook for .message files
4517 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
4518 can be constant or locked.
4519 (_dbus_string_free): allow freeing a const string as
4522 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
4524 * dbus/dbus-test-main.c (main): take an argument which is the
4525 directory containing test data
4527 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
4528 argument to this and load all the messages in test/data/
4529 checking that they can be loaded or not loaded as appropriate.
4531 2003-01-27 Anders Carlsson <andersca@codefactory.se>
4533 * bus/dispatch.c: (bus_dispatch_message_handler):
4534 Dispatch messages sent to services.
4536 * bus/driver.c: (bus_driver_send_service_deleted),
4537 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4538 (bus_driver_send_service_acquired):
4539 Add helper functions for sending service related messages.
4541 (bus_driver_send_welcome_message):
4542 Send HELLO_REPLY instead of WELCOME.
4544 (bus_driver_handle_list_services):
4545 Send LIST_SERVICES_REPLY instead of SERVICES.
4547 (bus_driver_handle_own_service),
4548 (bus_driver_handle_service_exists):
4549 New message handlers.
4551 (bus_driver_handle_message):
4552 Invoke new message handlers.
4554 (bus_driver_remove_connection):
4555 Don't remove any services here since that's done automatically
4556 by bus_service_remove_owner now.
4559 New function signatures.
4561 * bus/services.c: (bus_service_add_owner):
4562 Send ServiceAcquired message if we're the only primary owner.
4564 (bus_service_remove_owner):
4565 Send ServiceAcquired/ServiceLost messages.
4567 (bus_service_set_prohibit_replacement),
4568 (bus_service_get_prohibit_replacement):
4569 Functions for setting prohibit replacement.
4571 (bus_service_has_owner):
4572 New function that checks if a connection is in the owner queue of
4576 Add new function signatures.
4578 * dbus/dbus-list.c: (_dbus_list_test):
4579 Add tests for _dbus_list_remove_last and traversing the list backwards.
4582 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
4583 go any further, so return NULL then.
4585 * dbus/dbus-protocol.h:
4586 Add new messages, service flags and service replies.
4588 2003-01-26 Havoc Pennington <hp@pobox.com>
4590 * dbus/dbus-message-builder.c: implement, completely untested.
4592 * test/data/*: add data to be used in testing.
4593 ".message" files are our simple loadable text format.
4594 ".message-raw" will be binary dumps of messages.
4596 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
4598 2003-01-26 Havoc Pennington <hp@pobox.com>
4600 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
4602 * dbus/dbus-errors.c (dbus_result_to_string): add
4605 * dbus/dbus-message-builder.c: new file, will contain code to load
4606 up messages from files. Not implemented yet.
4608 2003-01-26 Havoc Pennington <hp@pobox.com>
4610 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
4611 the sender by setting to NULL
4613 2003-01-26 Havoc Pennington <hp@pobox.com>
4615 The unit tests pass, but otherwise untested. If it breaks, the
4616 tests should have been better. ;-)
4618 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
4621 * dbus/dbus-message.c: redo everything so we maintain
4622 message->header as the only copy of the various fields.
4623 This avoids the possibility of out-of-memory in some cases,
4624 for example dbus_message_lock() can't run out of memory anymore,
4625 and avoids extra copying. Figured I may as well go ahead and do
4626 this since it was busted for dbus_message_lock to not return
4627 failure on OOM, and dbus_message_write_header was totally
4628 unchecked for OOM. Also fixed some random other bugs.
4630 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
4631 that strings are nul-terminated. Also, end_pos can be equal
4632 to string length just not greater than, I think.
4633 (_dbus_marshal_set_int32): new function
4634 (_dbus_marshal_set_uint32): new function
4635 (_dbus_marshal_set_string): new function
4637 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
4638 a warning, init timeout_list to NULL
4639 (dbus_connection_send_message): don't use uninitialized variable
4642 * dbus/dbus-string.c (_dbus_string_replace_len): new function
4644 2003-01-26 Anders Carlsson <andersca@codefactory.se>
4646 * bus/driver.c: (bus_driver_handle_hello),
4647 (bus_driver_send_welcome_message):
4650 2003-01-26 Anders Carlsson <andersca@codefactory.se>
4652 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
4653 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
4654 (dbus_connection_unref):
4655 * dbus/dbus-marshal.c: (_dbus_marshal_test):
4656 * dbus/dbus-message.c: (dbus_message_unref),
4659 (dbus_message_get_fields):
4660 Remove debugging printout.
4662 (_dbus_message_loader_return_buffer):
4663 Don't store the header string.
4665 (_dbus_message_test):
4668 2003-01-26 Richard Hult <rhult@codefactory.se>
4670 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
4671 the file descriptor list, since it can change under us.
4673 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4675 * glib/dbus-gmain.c: (dbus_connection_prepare),
4676 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
4677 (remove_watch), (dbus_connection_hookup_with_g_main):
4678 Rewrite the glib handling to use its own GSource instead of a
4679 GIOChannel so we can catch messages put in the queue while waiting
4682 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4685 * bus/connection.c: (connection_disconnect_handler),
4686 (connection_watch_callback), (bus_connection_setup):
4687 * bus/dispatch.c: (send_one_message),
4688 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
4689 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
4691 * bus/driver.c: (bus_driver_send_service_deleted),
4692 (bus_driver_send_service_created), (bus_driver_handle_hello),
4693 (bus_driver_send_welcome_message),
4694 (bus_driver_handle_list_services), (bus_driver_remove_connection),
4695 (bus_driver_handle_message):
4697 Refactor code, put the message dispatching in its own file. Use
4698 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
4701 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4703 * dbus/dbus-internals.h:
4704 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
4706 * dbus/dbus-message.c: (dbus_message_get_sender):
4707 * dbus/dbus-message.h:
4708 Implement dbus_message_get_sender.
4710 * dbus/dbus-protocol.h:
4711 Add message and service defines.
4713 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4715 * dbus/dbus-connection.c: (dbus_connection_send_message):
4716 * dbus/dbus-message-internal.h:
4717 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
4718 (dbus_message_write_header):
4719 Remove _dbus_messag_unlock and don't set the client serial on a
4720 message if one already exists.
4722 2003-01-24 Havoc Pennington <hp@pobox.com>
4724 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
4727 * bus/driver.c (bus_driver_handle_list_services): fix a leak
4730 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4732 * dbus/dbus-list.c: (alloc_link), (free_link):
4733 Use a memory pool for the links.
4735 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4737 * bus/connection.c: (bus_connection_foreach):
4739 Add new bus_connection_foreach function.
4741 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
4742 Add function that broadcasts a message to all clients.
4744 (bus_driver_send_service_created), (bus_driver_handle_hello),
4745 (bus_driver_send_welcome_message),
4746 (bus_driver_handle_list_services), (bus_driver_message_handler):
4747 Implement functions that take care of listing services, and notifying
4748 clients when new services are created.
4750 * bus/services.c: (bus_services_list):
4752 Add new function that returns an array of strings with the currently
4753 registered services.
4756 * glib/dbus-gmain.c:
4757 Update copyright year.
4759 2003-01-25 Anders Carlsson <andersca@codefactory.se>
4761 * dbus/dbus-connection.c: (dbus_connection_send_message):
4762 Unlock the message in case it was sent earlier.
4764 (dbus_connection_send_message_with_reply_and_block):
4765 Remove the reply message from the list.
4767 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4768 Set array_len and new_pos correctly.
4770 (_dbus_marshal_test):
4771 Remove debug output.
4773 * dbus/dbus-message-internal.h:
4774 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
4775 New function that returns the reply serial.
4777 (_dbus_message_unlock):
4778 New function that unlocks a message and resets its header.
4780 (dbus_message_append_string_array),
4781 (dbus_message_get_fields_valist),
4782 (dbus_message_iter_get_field_type),
4783 (dbus_message_iter_get_string_array),
4784 (dbus_message_get_fields),
4785 (dbus_message_append_fields_valist):
4786 Handle string arrays.
4788 (dbus_message_set_sender):
4789 Make this function public since the bus daemon needs it.
4791 (decode_header_data):
4792 Set the reply serial to -1 initially.
4794 * dbus/dbus-message.h:
4795 Add dbus_message_set_sender.
4797 2003-01-24 Havoc Pennington <hp@pobox.com>
4799 * doc/dbus-specification.sgml: add some stuff
4801 2003-01-22 Havoc Pennington <hp@pobox.com>
4803 * doc/dbus-specification.sgml: Start to document the protocol.
4805 2003-01-22 Havoc Pennington <hp@pobox.com>
4807 * dbus/dbus-connection.c
4808 (dbus_connection_send_message_with_reply_and_block): add some @todo
4810 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
4812 2003-01-21 Havoc Pennington <hp@pobox.com>
4814 (patch untested because can't compile)
4816 * bus/driver.c (create_unique_client_name): make this function
4817 never recycle client names. Also, caller should initialize
4820 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
4822 2003-01-21 Anders Carlsson <andersca@codefactory.se>
4824 * dbus/dbus-marshal.c: (_dbus_marshal_double),
4825 (_dbus_marshal_int32), (_dbus_marshal_uint32),
4826 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
4827 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
4828 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4829 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4830 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
4831 * dbus/dbus-marshal.h:
4832 * dbus/dbus-protocol.h:
4833 Add support for marshalling and demarshalling integer, double
4836 2003-01-21 Anders Carlsson <andersca@codefactory.se>
4841 * bus/connection.c: (connection_disconnect_handler):
4842 Remove the connection from the bus driver's list.
4844 (connection_watch_callback): Dispatch messages.
4846 (free_connection_data): Free connection name.
4848 (bus_connection_setup): Add connection to the bus driver's list.
4849 (bus_connection_remove_owned_service):
4850 (bus_connection_set_name), (bus_connection_get_name):
4851 Add functions for setting and getting the connection's name.
4854 Add function headers.
4856 * bus/driver.c: (create_unique_client_name),
4857 (bus_driver_handle_hello_message),
4858 (bus_driver_send_welcome_message), (bus_driver_message_handler),
4859 (bus_driver_add_connection), (bus_driver_remove_connection):
4862 * bus/services.c: (bus_service_free):
4864 New file that handles communication and registreation with the bus
4867 2003-01-21 Anders Carlsson <andersca@codefactory.se>
4869 * dbus/dbus-connection.c: (dbus_connection_send_message):
4870 Add a new client_serial parameter.
4872 (dbus_connection_send_message_with_reply):
4873 Remove a @todo since we've implemented the blocking function.
4875 (dbus_connection_send_message_with_reply_and_block):
4876 New function that sends a message and waits for a reply and
4877 then returns the reply.
4879 * dbus/dbus-connection.h:
4882 * dbus/dbus-errors.c: (dbus_result_to_string):
4883 * dbus/dbus-errors.h:
4884 Add new DBUS_RESULT.
4886 * dbus/dbus-message-internal.h:
4887 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
4888 (_dbus_message_set_sender), (dbus_message_write_header),
4889 (dbus_message_new_reply), (decode_header_data),
4890 (_dbus_message_loader_return_buffer), (_dbus_message_test):
4891 * dbus/dbus-message.h:
4892 Add new functions that set the reply serial and sender.
4893 Also marshal and demarshal them correctly and add test.
4895 * dbus/dbus-protocol.h:
4896 Add new DBUS_MESSAGE_TYPE_SENDER.
4899 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
4900 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
4901 (dbus_connection_hookup_with_g_main):
4902 * glib/test-dbus-glib.c: (main):
4903 Rewrite to use GIOChannel and remove the GSource crack.
4905 * test/echo-client.c: (main):
4906 * test/watch.c: (check_messages):
4907 Update for changed APIs
4909 2003-01-19 Anders Carlsson <andersca@codefactory.se>
4911 * dbus/Makefile.am: Add dbus-timeout.[cħ]
4913 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
4914 Create a DBusTimeoutList.
4915 (dbus_connection_set_timeout_functions): Add new function to
4916 set timeout callbacks
4918 * dbus/dbus-connection.h: Add public DBusTimeout API.
4920 * dbus/dbus-message.c: (dbus_message_get_service):
4921 * dbus/dbus-message.h: New function.
4923 * dbus/dbus-server.c: Fix small doc typo.
4925 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
4927 2003-01-19 Anders Carlsson <andersca@codefactory.se>
4929 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
4930 of the string, just as long as specified.
4932 2003-01-19 Havoc Pennington <hp@pobox.com>
4934 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
4937 * dbus/dbus-server.c (dbus_server_set_max_connections)
4938 (dbus_server_get_max_connections, dbus_server_get_n_connections):
4939 keep track of current number of connections, and add API for
4940 setting a max (but haven't implemented enforcing the max yet)
4942 2003-01-18 Havoc Pennington <hp@pobox.com>
4944 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
4945 reading/writing if read_watch != NULL or write_watch != NULL.
4947 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
4948 the message loader code to actually load message->header and
4949 message->body into the newly-created message.
4951 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
4954 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
4955 (dbus_connection_get_max_message_size)
4956 (dbus_connection_set_max_live_messages_size)
4957 (dbus_connection_get_max_live_messages_size): implement some
4958 resource limitation functions
4960 * dbus/dbus-resources.c: new file implementing some of the
4961 resource limits stuff
4963 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
4964 missing docs, add @todo to handle OOM etc.
4966 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
4969 2003-01-18 Havoc Pennington <hp@pobox.com>
4971 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
4972 connection if it hasn't been already.
4974 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
4975 replace with DisconnectFunction.
4977 2003-01-18 Havoc Pennington <hp@pobox.com>
4979 Building --disable-verbose-mode --disable-asserts --disable-tests
4980 cuts the library from 112K to 45K or so
4982 * configure.in: check for varargs macro support,
4983 add --enable-verbose-mode, --enable-asserts.
4985 * dbus/dbus-internals.h (_dbus_assert): support
4987 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
4989 2003-01-18 Havoc Pennington <hp@pobox.com>
4991 * dbus/dbus-test.c: include config.h so that tests actually run
4993 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
4994 so the failure mode when that assumption fails will be plenty
4997 2003-01-18 Havoc Pennington <hp@pobox.com>
4999 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
5001 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
5004 * test/Makefile.am: don't use special variable "TESTS" for echo-*
5005 since we don't want to use those in make check
5007 2003-01-15 Havoc Pennington <hp@redhat.com>
5013 2003-01-15 Havoc Pennington <hp@redhat.com>
5015 * test/Makefile.am: fix so that test source code ends up in the
5016 distribution on make distcheck
5018 2003-01-15 Havoc Pennington <hp@redhat.com>
5024 2003-01-15 Havoc Pennington <hp@redhat.com>
5026 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
5027 fix build when --disable-tests
5029 * Makefile.am (EXTRA_DIST): put HACKING in here
5031 * HACKING: document procedure for making a tarball release.
5033 2003-01-14 Anders Carlsson <andersca@codefactory.se>
5035 * bus/connection.c: (connection_error_handler),
5036 (bus_connection_setup):
5037 * bus/main.c: (main):
5038 Make sure that the DBusConnectionData struct is NULLed
5039 out to prevent a segfault.
5041 * dbus/dbus-errors.c: (dbus_result_to_string):
5042 * dbus/dbus-errors.h:
5043 * dbus/dbus-message.c: (dbus_message_get_fields),
5044 (dbus_message_get_fields_valist), (_dbus_message_test):
5045 * dbus/dbus-message.h:
5046 Make dbus_message_get_fields return a result code so we can
5047 track invalid fields as well as oom.
5049 2003-01-11 Havoc Pennington <hp@pobox.com>
5051 * configure.in: change --enable-test/--enable-ansi action-if-given
5052 to enable_foo=$enableval instead of enable_foo=yes
5054 2003-01-08 Havoc Pennington <hp@pobox.com>
5056 * dbus/dbus-string.c (_dbus_string_align_length): new function
5058 * dbus/dbus-test-main.c: move main() for test app here
5060 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
5061 symbol to run tests, because dbus-test isn't in the main
5064 Code review nitpicks.
5066 * dbus/dbus-message.c (dbus_message_write_header): add newlines
5067 for people with narrow emacs ;-). Assert client_serial was filled
5068 in. Assert message->name != NULL.
5069 (dbus_message_append_fields): have "first_field_type" arg separate
5070 from va list, needed for C++ binding that also uses varargs IIRC
5071 and helps with type safety
5072 (dbus_message_new): add @todo about using DBusString to store
5073 service/name internally
5074 (dbus_message_new): don't leak ->service and ->name on OOM later
5076 (dbus_message_unref): free the service name
5077 (dbus_message_get_fields): same change to varargs
5078 i.e. first_field_type
5079 (_dbus_message_loader_return_buffer): assert that the message data
5080 is aligned (if not it's a bug in our code). Put in verbose griping
5081 about why we set corrupted = TRUE.
5082 (decode_header_data): add FIXME that char* is evil. Was going to
5083 add FIXME about evil locale-specific string.h strncmp, but just
5084 switched to wacky string-as-uint32 optimization. Move check for
5085 "no room for field name" above get_const_data_len() to avoid
5086 assertion failure in get_const_data_len if we have trailing 2
5087 bytes or the like. Check for service and name fields being
5088 provided twice. Don't leak service/name on error. Require field
5089 names to be aligned to 4 bytes.
5091 * dbus/dbus-marshal.c: move byte swap stuff to header
5092 (_dbus_pack_int32): uscore-prefix
5093 (_dbus_unpack_int32): uscore-prefix
5094 (_dbus_unpack_uint32): export
5095 (_dbus_demarshal_string): add @todo complaining about use of
5097 (_dbus_marshal_get_field_end_pos): add @todo about bad error
5098 handling allowing corrupt data to go unchecked
5100 2003-01-08 Havoc Pennington <hp@redhat.com>
5102 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
5103 to the select() as needed for authentication. (should be using
5104 _dbus_poll() not select, but for another day)
5106 * dbus/dbus.h: include dbus/dbus-protocol.h
5108 2003-01-08 Anders Carlsson <andersca@codefactory.se>
5110 * dbus/Makefile.am (dbusinclude_HEADERS): Install
5113 2003-01-08 Anders Carlsson <andersca@codefactory.se>
5115 * dbus/dbus-internals.c: (_dbus_type_to_string):
5116 New function that returns a string describing a type.
5118 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
5119 * dbus/dbus-marshal.h:
5120 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
5121 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
5122 (dbus_message_iter_get_byte_array):
5123 * dbus/dbus-message.h:
5124 Add new convenience functions for appending and getting message fields.
5125 Also add demarshalling routines for byte arrays.
5127 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5129 * dbus/dbus-connection-internal.h:
5130 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5131 (_dbus_connection_get_next_client_serial),
5132 (dbus_connection_send_message):
5133 * dbus/dbus-internals.h:
5134 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
5135 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
5136 (_dbus_marshal_uint32), (_dbus_demarshal_double),
5137 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
5138 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
5139 (_dbus_verbose_bytes), (_dbus_marshal_test):
5140 * dbus/dbus-marshal.h:
5141 * dbus/dbus-message-internal.h:
5142 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
5143 (dbus_message_write_header), (_dbus_message_lock),
5144 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
5145 (dbus_message_get_name), (dbus_message_append_int32),
5146 (dbus_message_append_uint32), (dbus_message_append_double),
5147 (dbus_message_append_string), (dbus_message_append_byte_array),
5148 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
5149 (dbus_message_iter_unref), (dbus_message_iter_has_next),
5150 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
5151 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
5152 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
5153 (decode_header_data), (_dbus_message_loader_return_buffer),
5154 (message_iter_test), (_dbus_message_test):
5155 * dbus/dbus-message.h:
5156 * dbus/dbus-protocol.h:
5157 * dbus/dbus-test.c: (main):
5159 * glib/test-dbus-glib.c: (message_handler), (main):
5160 * test/echo-client.c: (main):
5161 * test/watch.c: (check_messages):
5162 Make messages sendable and receivable for real.
5164 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5166 * dbus/dbus-marshal.c: (_dbus_marshal_double),
5167 (_dbus_marshal_string), (_dbus_marshal_byte_array):
5168 * dbus/dbus-message.c: (dbus_message_append_int32),
5169 (dbus_message_append_uint32), (dbus_message_append_double),
5170 (dbus_message_append_string), (dbus_message_append_byte_array):
5171 Handle OOM restoration.
5173 2003-01-07 Anders Carlsson <andersca@codefactory.se>
5175 * dbus/dbus-marshal.c: (_dbus_marshal_string),
5176 (_dbus_demarshal_string), (_dbus_marshal_test):
5177 * dbus/dbus-marshal.h:
5178 * dbus/dbus-message.c: (dbus_message_get_name),
5179 Document these functions.
5181 (dbus_message_append_int32), (dbus_message_append_uint32),
5182 (dbus_message_append_double), (dbus_message_append_string),
5183 (dbus_message_append_byte_array):
5184 * dbus/dbus-message.h:
5185 Add functions for adding message fields of different types.
5187 * dbus/dbus-protocol.h:
5188 Add the different types.
5190 2003-01-05 Havoc Pennington <hp@pobox.com>
5192 * bus/connection.c: implement routines for handling connections,
5193 first thing is keeping a list of owned services on each connection
5194 and setting up watches etc.
5196 * bus/services.c: implement a mapping from service names to lists
5199 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
5201 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
5202 to use static mutexes for global data
5204 * dbus/dbus-connection.c (dbus_connection_set_data): add new
5205 collection of functions to set/get application-specific data
5206 on the DBusConnection.
5208 2003-01-04 Havoc Pennington <hp@pobox.com>
5210 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
5211 (_dbus_poll): new function
5213 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
5216 * bus/loop.c: initial code for the daemon main loop
5218 2003-01-04 Havoc Pennington <hp@pobox.com>
5220 * test/watch.c (error_handler): make it safe if the error handler
5221 is called multiple times (if we s/error handler/disconnect
5222 handler/ we should just guarantee it's called only once)
5224 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
5225 error handler on disconnect (it's quite possible we should
5226 just change the error handler to a "disconnect handler," I'm
5227 not sure we have any other meaningful errors)
5229 * configure.in: check for getpwnam_r
5231 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5232 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
5233 mechanism as in SASL spec, using socket credentials
5235 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
5236 (_dbus_send_credentials_unix_socket): new function
5238 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
5240 (_dbus_write): only check errno if <0 returned
5241 (_dbus_write_two): ditto
5243 2003-01-02 Anders Carlsson <andersca@codefactory.se>
5245 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
5246 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
5247 (_dbus_marshal_test):
5248 * dbus/dbus-marshal.h:
5249 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
5250 to _dbus_marshal_utf8_string. Also fix some tests.
5252 2002-12-28 Harri Porten <porten@kde.org>
5254 * configure.in: added check for C++ compiler and a very cheesy
5255 check for the Qt integration
5257 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
5259 * qt/Makefile.am: added
5261 * qt/.cvsignore: added
5263 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
5264 latter, added #ifdef QT_THREAD_SUPPORT guard.
5266 * dbus/Makefile.am: added missing headers for make dist
5268 2002-12-28 Kristian Rietveld <kris@gtk.org>
5270 * dbus/Makefile.am: fixup export-symbols-regex.
5272 2002-12-27 Anders Carlsson <andersca@codefactory.se>
5274 * acinclude.m4: Add this file and put the
5275 PKG_CHECK_MODULE macro in it.
5277 2002-12-27 Anders Carlsson <andersca@codefactory.se>
5279 * dbus/dbus-marshal.c: (_dbus_marshal_string),
5280 (_dbus_demarshal_double), (_dbus_demarshal_int32),
5281 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
5282 (_dbus_marshal_test):
5283 Make the demarshalling routines align the pos argument.
5284 Add string marshalling tests and fix the obvious bugs
5287 2002-12-26 Havoc Pennington <hp@pobox.com>
5289 * dbus/dbus-auth.c: fixes fixes fixes
5291 * dbus/dbus-transport-unix.c: wire up support for
5292 encoding/decoding data on the wire
5294 * dbus/dbus-auth.c (_dbus_auth_encode_data)
5295 (_dbus_auth_decode_data): append to target string
5296 instead of nuking it.
5298 2002-12-26 Havoc Pennington <hp@pobox.com>
5300 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
5301 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
5304 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
5305 avoid swap_bytes() overhead (ignoring possible assembly stuff for
5306 now). Main point is because I wanted unpack_uint32 to implement
5308 (_dbus_verbose_bytes): new function
5310 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
5312 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
5313 mechanism to handle a corrupt message stream
5314 (_dbus_message_loader_new): fix preallocation to only prealloc,
5317 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
5318 (_dbus_string_test): enhance tests for copy/move and fix the
5321 * dbus/dbus-transport-unix.c: Hold references in more places to
5322 avoid reentrancy problems
5324 * dbus/dbus-transport.c: ditto
5326 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
5327 leak reference count in no-message case
5329 * test/watch.c (do_mainloop): handle adding/removing watches
5330 during iteration over the watches. Also, ref the connection/server
5331 stored on a watch, so we don't try to mangle a destroyed one.
5333 * dbus/dbus-transport-unix.c (do_authentication): perform
5336 * dbus/dbus-auth.c (get_state): add a state
5337 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
5338 (_dbus_auth_get_unused_bytes): append the unused bytes
5339 to the passed in string, rather than prepend
5341 * dbus/dbus-transport.c (_dbus_transport_init_base): create
5342 the auth conversation DBusAuth
5344 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
5345 (_dbus_transport_new_for_domain_socket): when creating a
5346 transport, pass in whether it's a client-side or server-side
5347 transport so we know which DBusAuth to create
5349 2002-12-03 Havoc Pennington <hp@pobox.com>
5351 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
5352 _after_ finalizing the derived members
5353 (unix_connection_set): unref watch if we fail to add it
5355 * dbus/dbus-connection.c (dbus_connection_unref): delete the
5356 transport first, so that the connection owned by the
5357 transport will be valid as the transport finalizes.
5359 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
5360 if necessary, and remove watches from the connection.
5362 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
5364 2002-12-26 Anders Carlsson <andersca@codefactory.se>
5366 * dbus/dbus-marshal.c: (_dbus_marshal_string),
5367 (_dbus_demarshal_double), (_dbus_demarshal_int32),
5368 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
5369 (_dbus_marshal_test):
5370 * dbus/dbus-marshal.h:
5371 Add string marshal functions and have the demarshal functions
5372 return the new position.
5374 2002-12-25 Havoc Pennington <hp@pobox.com>
5376 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
5377 it is a simple protocol that just maps directly to SASL.
5379 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
5380 initial implementation, not actually used yet.
5382 * dbus/dbus-string.c (_dbus_string_find): new function
5383 (_dbus_string_equal): new function
5384 (_dbus_string_base64_encode): new function
5385 (_dbus_string_base64_decode): new function
5387 2002-12-25 Anders Carlsson <andersca@codefactory.se>
5390 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
5391 (_dbus_marshal_int32), (_dbus_marshal_uint32),
5392 (_dbus_demarshal_double), (_dbus_demarshal_int32),
5393 (_dbus_demarshal_uint32), (_dbus_marshal_test):
5394 * dbus/dbus-marshal.h:
5395 * dbus/dbus-protocol.h:
5396 * dbus/dbus-test.c: (main):
5398 Add un-optimized marshalling/demarshalling routines.
5400 2002-12-25 Harri Porten <porten@kde.org>
5402 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
5404 2002-12-24 Zack Rusin <zack@kde.org>
5406 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
5407 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
5410 2002-12-24 Havoc Pennington <hp@pobox.com>
5412 * glib/dbus-gthread.c: fix include
5414 * glib/dbus-glib.h: rename DBusMessageHandler for now.
5415 I think glib API needs to change, though, as you don't
5416 want to use DBusMessageFunction, you want to use the
5417 DBusMessageHandler object. Probably
5418 dbus_connection_open_with_g_main_loop()
5419 and dbus_connection_setup_g_main_loop() or something like that
5420 (but think of better names...) that just create a connection
5421 that has watch/timeout functions etc. already set up.
5423 * dbus/dbus-connection.c
5424 (dbus_connection_send_message_with_reply): new function just to
5425 show how the message handler helps us deal with replies.
5427 * dbus/dbus-list.c (_dbus_list_remove_last): new function
5429 * dbus/dbus-string.c (_dbus_string_test): free a string that
5432 * dbus/dbus-hash.c: use memory pools for the hash entries
5433 (rebuild_table): be more paranoid about overflow, and
5434 shrink table when we can
5435 (_dbus_hash_test): reduce number of sprintfs and write
5436 valid C89. Add tests for case where we grow and then
5437 shrink the hash table.
5439 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
5441 * dbus/dbus-connection.c (dbus_connection_register_handler)
5442 (dbus_connection_unregister_handler): new functions
5444 * dbus/dbus-message.c (dbus_message_get_name): new
5446 * dbus/dbus-list.c: fix docs typo
5448 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
5449 an object representing a handler for messages.
5451 2002-12-16 Anders Carlsson <andersca@codefactory.se>
5454 * glib/dbus-gthread.c: (dbus_gthread_init):
5455 Don't use the gdbus prefix for public functions.
5457 2002-12-16 Anders Carlsson <andersca@codefactory.se>
5461 Add GLib checks and fixup .pc files
5465 * glib/dbus-gmain.c: (gdbus_connection_prepare),
5466 (gdbus_connection_check), (gdbus_connection_dispatch),
5467 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
5468 (dbus_connection_gsource_new):
5469 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
5470 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
5471 * glib/test-dbus-glib.c: (message_handler), (main):
5474 2002-12-15 Harri Porten <porten@kde.org>
5476 * autogen.sh: check for libtoolize before attempting to use it
5478 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
5481 * .cvsignore: ignore more stamp files
5483 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
5485 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
5486 without make install.
5488 2002-12-15 Havoc Pennington <hp@pobox.com>
5490 * dbus/dbus-threads.c: add thread stubs that a higher library
5491 layer can fill in. e.g. the GLib wrapper might fill them in with
5492 GThread stuff. We still need to use this thread API to
5493 thread-safe-ize the library.
5495 2002-12-12 Havoc Pennington <hp@pobox.com>
5497 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
5498 below new interfaces and include fewer system headers.
5500 * dbus/dbus-sysdeps.c (_dbus_read): new function
5501 (_dbus_write): new function
5502 (_dbus_write_two): new function
5503 (_dbus_connect_unix_socket): new function
5504 (_dbus_listen_unix_socket): new function
5506 * dbus/dbus-message-internal.h: change interfaces to use
5509 2002-12-11 Havoc Pennington <hp@pobox.com>
5511 * dbus/dbus-types.h: add dbus_unichar
5513 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
5515 * dbus/dbus-connection.c (dbus_connection_send_message): return
5518 * dbus/dbus-transport.c: include dbus-watch.h
5520 * dbus/dbus-connection.c: include dbus-message-internal.h
5522 * HACKING: add file with coding guidelines stuff.
5524 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
5525 handling here, for security purposes (as in vsftpd). Not actually
5526 using this class yet.
5528 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
5529 system/libc usage here, as in vsftpd, for ease of auditing (and
5530 should also simplify portability). Haven't actually moved all the
5531 system/libc usage into here yet.
5533 2002-11-25 Havoc Pennington <hp@pobox.com>
5535 * dbus/dbus-internals.c (_dbus_verbose): fix to not
5536 always print the first verbose message.
5538 2002-11-24 Havoc Pennington <hp@pobox.com>
5540 * test/echo-client.c, test/echo-server.c: cheesy test
5543 * configure.in (AC_CHECK_FUNCS): check for writev
5545 * dbus/dbus-message.c (_dbus_message_get_network_data): new
5548 * dbus/dbus-list.c (_dbus_list_foreach): new function
5550 * dbus/dbus-internals.c (_dbus_verbose): new function
5552 * dbus/dbus-server.c, dbus/dbus-server.h: public object
5553 representing a server that listens for connections.
5555 * dbus/.cvsignore: create
5557 * dbus/dbus-errors.h, dbus/dbus-errors.c:
5558 public API for reporting errors
5560 * dbus/dbus-connection.h, dbus/dbus-connection.c:
5561 public object representing a connection that
5562 sends/receives messages. (Same object used for
5563 both client and server.)
5565 * dbus/dbus-transport.h, dbus/dbus-transport.c:
5566 Basic abstraction for different kinds of stream
5567 that we might read/write messages from.
5569 2002-11-23 Havoc Pennington <hp@pobox.com>
5571 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
5574 * dbus/dbus-test.c (main): add list test, and include
5575 dbus-test.h as intended
5577 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
5578 (_dbus_hash_table_remove_int): return value indicates
5579 whether the entry existed to remove
5581 * dbus/dbus-list.c: add linked list utility class,
5584 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
5587 2002-11-23 Havoc Pennington <hp@pobox.com>
5589 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
5590 DBUS_END_DECLS to nothing, that should fix this once and for all
5592 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
5594 * dbus/dbus-message.c, dbus/dbus-hash.c:
5595 add some missing @brief
5597 2002-11-23 Havoc Pennington <hp@pobox.com>
5599 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
5600 to avoid confusing Doxygen
5602 * dbus/dbus-hash.c: @} not }@
5604 * dbus/dbus-message.c (struct DBusMessage): split out
5607 2002-11-23 Havoc Pennington <hp@pobox.com>
5609 * configure.in: pile on more warning flags if using gcc
5611 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
5612 to document static functions
5614 * configure.in: add summary to end of configure so it
5615 looks nice and attractive
5617 * dbus/dbus-hash.c: finish implementation and write unit
5620 * configure.in: add --enable-tests to enable unit tests
5622 * dbus/dbus-test.c: test program to run unit tests
5623 for all files in dbus/*, initially runs a test for
5626 * dbus/dbus-internals.h: file to hold some internal utility stuff
5628 2002-11-22 Havoc Pennington <hp@redhat.com>
5630 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
5631 "ported" away from Tcl
5633 * dbus/dbus-types.h: header for types such as dbus_bool_t
5635 2002-11-22 Havoc Pennington <hp@redhat.com>
5637 * dbus/dbus.h: fixups for doc warnings
5639 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
5641 (QUIET): make it quiet so we can see warnings
5643 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
5645 2002-11-22 Havoc Pennington <hp@redhat.com>
5647 * Makefile.am: include "Doxyfile" target in all-local
5649 * configure.in: generate the Doxyfile
5651 * Doxyfile.in: move Doxyfile here, so we can use
5652 configure to generate a Doxyfile with the right
5655 2002-11-22 Havoc Pennington <hp@redhat.com>
5657 * dbus/dbus-message.c: move inline docs into .c file
5659 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
5660 so all docs are under doc/
5661 (MAN_EXTENSION): generate man pages. Use extension
5662 ".3dbus" which matches ".3qt" on my system,
5663 I guess this is OK, I don't know really.
5664 (FILE_PATTERNS): look for .c files not .h, makes sense
5667 2002-11-22 Havoc Pennington <hp@pobox.com>
5669 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
5670 because any app can be a server, and any app can be a client,
5671 the bus is a special kind of server.
5673 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
5675 * Doxyfile : adding. Still needs Makefile rules to be generated
5676 automatically (just run "doxygen" in the toplevel dir for now to
5679 * dbus/dbus-message.h : Adding sample docs (javadoc since
5680 resembles gtk-doc a little more)
5682 * dbus/dbus.h : Adding sample docs
5684 2002-11-21 Havoc Pennington <hp@redhat.com>
5686 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
5687 so we can allow ourselves to include files directly,
5688 instead of having to use dbus.h
5690 * dbus/dbus.h: fill in
5692 * dbus/dbus-message.h: sketch out a sample header file.
5693 Include griping if you include it directly instead of
5696 * dbus/dbus-macros.h: new file with macros for extern "C",
5697 TRUE/FALSE, NULL, etc.
5699 * doc/file-boilerplate.c: put include guards in here
5701 2002-11-21 Havoc Pennington <hp@redhat.com>
5703 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
5705 * COPYING: include the GPL as well, and license code
5706 under both AFL and GPL.
5708 2002-11-21 Havoc Pennington <hp@redhat.com>
5710 * acconfig.h: get rid of this
5712 * autogen.sh (run_configure): add --no-configure option
5714 * configure.in: remove AC_ARG_PROGRAM to make
5715 autoconf complain less. add AC_PREREQ.
5716 add AC_DEFINE third arg.
5718 2002-11-21 Anders Carlsson <andersca@codefactory.se>
5721 Fix references so we can distcheck.
5723 2002-11-21 Havoc Pennington <hp@redhat.com>
5725 * Initial module creation