1 2005-02-17 Colin Walters <walters@verbum.org>
3 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
4 (parse_node, parse_interface, parse_method, parse_signal)
5 (parse_property, parse_annotation): Lose if we're currently in an
7 (parse_annotation): New function.
8 (parser_start_element, parser_end_element): Handle annotation.
9 (parse_method, parse_interface): Remove support for c_name attribute,
10 switch to annotations.
12 * glib/dbus-gidl.h (interface_info_get_binding_names)
13 (method_info_get_binding_names)
14 (interface_info_get_binding_name, method_info_get_binding_name)
15 (interface_info_set_binding_name, method_info_set_binding_name):
17 (interface_info_get_annotations, method_info_get_annotations)
18 (interface_info_get_annotation, method_info_get_annotation)
19 (interface_info_add_annotation, method_info_add_annotation):
22 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
24 (struct MethodInfo): Ditto.
25 Straightfoward conversion of binding methods into annotation methods
28 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
30 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
32 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
33 Use new annotation API.
35 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
38 * doc/dbus-specification.xml: Discuss introspection annotations,
39 include list of well-known annotations.
41 * test/glib/test-service-glib.xml: Make validate against new DTD.
43 2005-02-17 Colin Walters <walters@verbum.org>
45 This patch is based on initial work from
46 Paul Kuliniewicz <kuliniew@purdue.edu>.
48 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
49 initialization of GValue from dbus type to here.
50 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
51 for the "glib-genmarshal" program from a DBus type.
52 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
53 into the C name for it we use in the glib bindings.
54 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
55 glib C type (not GValue).
56 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
58 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
61 * glib/dbus-gutils.h: Prototype it.
63 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
64 (marshal_dbus_message_to_g_marshaller): Use new shared function
65 dbus_glib_marshal_dbus_message_to_gvalue_array.
67 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
68 Will be changed once we have annotations.
70 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
71 GStaticRWLock. Callers updated.
72 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
73 (string_table_next): New function for iterating over zero-terminated
75 (string_table_lookup): New function; retrieves specific entry in
77 (get_method_data): New function; look up method data in object data chunk.
78 (object_error_domain_prefix_from_object_info)
79 (object_error_code_from_object_info): New functions, but not implemented yet.
80 (method_interface_from_object_info): New function; retrieve interface name.
81 (method_name_from_object_info): New function; retrieve method name.
82 (method_arg_info_from_object_info): New function; retrieve argument data.
83 (arg_iterate): New function; iterates over serialized argument data.
84 (method_dir_signature_from_object_info): New function; returns a
85 GString holding type signature for arguments for just one
86 direction (input or output).
87 (method_input_signature_from_object_info)
88 (method_output_signature_from_object_info): New functions.
89 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
90 converts dbus message arguments into a GValue array. Used for both
91 signal handling and method invocation.
92 (struct DBusGlibWriteIterfaceData): New utility structure.
93 (write_interface): New function; generate introspection XML for
95 (introspect_interfaces): New function; gathers all interface->methods,
96 generates introspection XML for them.
97 (handle_introspect): Invoke introspect_interfaces.
98 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
99 (lookup_object_and_method): New function; examines an incoming message
100 and attempts to match it up (via interface, method name, and argument
101 signature) with a known object and method.
102 (gerror_domaincode_to_dbus_error_name): New function; converts a
103 GError domain and code into a DBus error name. Needs GError data
104 added to object introspection to work well.
105 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
107 (invoke_object_method): New function to invoke an object method
108 looked up via lookup_object_and_method. Parses the incoming
109 message, turns it into a GValue array, then invokes the marshaller
110 specified in the DBusGMethodInfo. Creates a new message with
111 either return values or error message as appropriate.
112 (gobject_message_function): Invoke lookup_object_and_method and
113 invoke_object_method.
115 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
116 (enum DBusBindingOutputMode): New enum for binding output modes.
117 (pretty_print): Print binding names.
118 (dbus_binding_tool_error_quark): GError bits.
120 (main): Create GIOChannel for output. Parse new --mode argument,
121 possible values are "pretty-print", "glib-server", "glib-client".
122 Use mode to invoke appropriate function.
124 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
126 * glib/dbus-glib-tool.h: New header, just includes GError bits
129 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
130 maps binding style to name.
131 (struct MethodInfo): Ditto.
132 (get_hash_keys, get_hash_key): Utility function, returns keys for
134 (interface_info_new, method_info_new): Initialize bindings.
135 (interface_info_unref, method_info_unref): Destroy bindings.
136 (method_info_get_binding_names, method_info_get_binding_name)
137 (interface_info_get_binding_names, interface_info_get_binding_name):
138 Functions for retrieving binding names.
139 (method_info_set_binding_name, interface_info_set_binding_name):
140 Functions for setting binding names.
142 * glib/dbus-binding-tool-glib.h: New file, has prototypes
143 for glib binding generation.
145 * glib/dbus-binding-tool-glib.c: New file, implements server-side
146 and client-side glib glue generation.
148 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
149 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
152 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
153 of using GClosureMarshal directly.
154 (struct DBusGObjectInfo): Add n_infos member.
156 * test/glib/test-service-glib.xml: New file; contains introspection data
157 for MyTestObject used in test-service-glib.c.
159 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
160 (my_object_do_nothing, my_object_increment, my_object_throw_error)
161 (my_object_uppercase, my_object_many_args): New test methods.
162 (main): Use dbus_g_object_class_install_info to include generated object
165 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
166 as well as client-side bindings.
168 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
169 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
170 using both the dbus_gproxy stuff directly as well as the generated bindings.
172 2005-02-15 Havoc Pennington <hp@redhat.com>
174 * dbus/dbus-connection.c (dbus_connection_dispatch): always
175 complete a pending call, don't run filters first.
177 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
178 dbus_pending_call_steal_reply
180 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
181 _dbus_connection_block_pending_call
182 (dbus_pending_call_get_reply): change to steal_reply and return a
185 * dbus/dbus-connection.c
186 (dbus_connection_send_with_reply_and_block): port to work in terms
188 (_dbus_connection_block_pending_call): replace block_for_reply
191 2005-02-14 Havoc Pennington <hp@redhat.com>
193 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
194 properly handle looking up group information by name; fix
197 2005-02-13 Havoc Pennington <hp@redhat.com>
199 * dbus/dbus-connection.c (dbus_connection_return_message)
200 (dbus_connection_borrow_message): hold dispatch lock while message
202 (_dbus_connection_block_for_reply): hold dispatch lock while we
203 block for the reply, so nobody steals our reply
204 (dbus_connection_pop_message): hold the dispatch lock while we
207 2005-02-13 Havoc Pennington <hp@redhat.com>
209 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
210 (_dbus_connection_release_dispatch)
211 (_dbus_connection_acquire_io_path)
212 (_dbus_connection_release_io_path): make the mutex and condvar
213 control access to the "acquired" flag. Drop the connection lock
214 while waiting on the condvar. Hopefully these are baby steps in
215 roughly the right direction.
217 2005-02-13 Havoc Pennington <hp@redhat.com>
219 * dbus/dbus-connection.c: use separate mutexes for the condition
220 variables; this is some kind of baseline for sanity, but the
221 condition variables still aren't used correctly afaict
223 2005-02-13 Havoc Pennington <hp@redhat.com>
225 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
228 * dbus/dbus-connection.c
229 (_dbus_connection_detach_pending_call_unlocked): add this
231 Initial semi-correct pass through to fix thread locking; there are
232 still some issues with the condition variable paths I'm pretty
235 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
238 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
239 rename to add _unlocked
240 (struct DBusConnection): move "dispatch_acquired" and
241 "io_path_acquired" to use only one bit each.
242 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
243 (dbus_connection_set_watch_functions): hacky fix to reentrancy
244 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
245 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
246 (_dbus_connection_remove_timeout)
247 (_dbus_connection_toggle_timeout): drop lock when calling out to
248 user functions; done in a hacky/bad way.
249 (_dbus_connection_send_and_unlock): add a missing unlock
250 (_dbus_connection_block_for_reply): add a missing unlock
252 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
253 drop lock in a hacky probably unsafe way to call out to user
256 2005-02-12 Havoc Pennington <hp@redhat.com>
258 * tools/dbus-tree-view.c (info_set_func_text): display more
261 * bus/driver.c (bus_driver_handle_list_services): list the bus
264 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
266 * glib/dbus-gidl.c (signal_info_get_n_args): new function
267 (method_info_get_n_args): new function
269 2005-02-12 Havoc Pennington <hp@redhat.com>
271 * bus/driver.c (bus_driver_handle_introspect): add introspection
274 2005-02-12 Havoc Pennington <hp@redhat.com>
276 * bus/driver.c: put the signature of each bus driver method in the
277 table of handlers and check it on incoming calls; this isn't
278 really useful, but going to add introspect support in a minute.
280 2005-02-11 Joe Shaw <joeshaw@novell.com>
282 * mono/Connection.cs: The unpredictability of finalizers in mono
283 prevents us from deterministically disconnecting the filters from
284 the Service class's finalizer, so move tracking of filters and
285 matches here. Add API for that.
287 * mono/Service.cs: Remove the code, add code which calls the
288 methods now on the Connection class.
290 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
292 * python/dbus.py (class Sender): added to support dbus signals better
293 (Bus::add_signal_receiver): added expand_args parameter which defaults
294 to True. When expand args is True the signal handler will pass the
295 message arguments as parameters to the signal handler. If False
296 revert to previous behavior where the signal handler must get the
297 argument list from the message. This is to help port applications
298 like HAL that have a tendancy to send variable length argument lists.
299 self._match_rule_to_receivers is now a dict of dicts.
300 (Bus::remove_signal_receiver): pop handler off the dict intead of
301 removing it from a list
302 (Bus::_signal_func): change signal handlers so that interface,
303 signal_name, service, path and message are packed into a Sender
304 object and that is passed to the handler. If expand_args is True
305 extract the args list from the message and append it to the parameter
308 * python/dbus_bindings.pyx.in (class Signature): added to support
310 (MessageIter::__init__): changed iteration limit to match D-BUS
311 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
312 STRUCT and VARIENT type support
313 (MessageIter::python_value_to_dbus_sig): made recursive to support
315 (MessageIter::append*): added Signature, dict, tuple
318 * python/examples/example-client.py: added examples of getting tuples
321 * python/examples/example-service.py: added examples of sending tuples
324 * python/examples/example-signal-recipient.py: Fixed to handle new
325 signal callback format
327 2005-02-10 Havoc Pennington <hp@redhat.com>
329 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
330 (call dbus_g_proxy_add_signal)
332 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
334 (_dbus_server_new_for_domain_socket): escape the path
336 * dbus/dbus-address.c (dbus_address_escape_value): new
337 (dbus_address_unescape_value): new
338 (dbus_parse_address): unescape values
340 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
342 * doc/dbus-specification.xml: explain how to escape values in
345 2005-02-10 Havoc Pennington <hp@redhat.com>
347 * dbus/dbus-message-factory.c (generate_special): modify test to
348 avoid using a non-basic dict key
350 * dbus/dbus-marshal-validate-util.c: add test for the below
352 * doc/dbus-specification.xml: require that dict keys are a basic
355 * dbus/dbus-marshal-validate.c
356 (_dbus_validate_signature_with_reason): require that dict key is a
359 2005-02-10 Havoc Pennington <hp@redhat.com>
361 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
362 change to be _and_unlock instead of _unlocked
364 * dbus/dbus-connection.c
365 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
366 have no_update so we can find this bug quickly in future
368 2005-02-10 Havoc Pennington <hp@redhat.com>
370 * dbus/dbus-message-util.c (verify_test_message): tests for string
373 * dbus/dbus-message.c (dbus_message_append_args_valist): add
374 support for arrays of string/signature/path
376 2005-02-10 Joe Shaw <joeshaw@novell.com>
378 * dbus/dbus-connection.c
379 (_dbus_connection_queue_received_message_link,
380 _dbus_connection_message_sent): Add the path to
382 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
383 _dbus_connection_send_preallocated_unlocked(), updated the
384 dispatch status, and unlocks. Fixes a bug where certain
385 situations (like a broken pipe) could cause a Disconnect message
386 to not be sent, tricking the bus into thinking a service was still
387 there when the process had quit.
388 (_dbus_connection_send_preallocated): Call
389 _dbus_connection_send_preallocated_and_unlock().
390 (_dbus_connection_send_and_unlock): Added. Calls
391 _dbus_connection_send_preallocated_and_unlock().
392 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
393 (dbus_connection_send_with_reply): Update the dispatch status and
396 * mono/Service.cs (~Service): Added. Removes the filter so that
397 we don't get unmanaged code calling back into a GCed delegate.
398 (RemoveFilter); Added.
400 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
402 * dbus/dbus-message.c (dbus_message_iter_open_container):
403 - Removed check for iterator type being an array because
404 get_arg_type does not work with writer iterators
405 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
407 2005-02-07 Havoc Pennington <hp@redhat.com>
409 * doc/dbus-specification.xml: some more language cleanups; add
410 stuff about how to deal with invalid protocol and extension
411 points; add _ to allowed chars in auth commands; add EXTENSION_
414 2005-02-06 Havoc Pennington <hp@redhat.com>
416 * s/expected/required/ in a couple places for clarity
418 2005-02-07 Colin Walters <walters@verbum.org>
420 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
421 sender or proposed_recipient.
423 2005-02-06 Havoc Pennington <hp@redhat.com>
425 * dbus/dbus-message-factory.c (generate_special): more tests
427 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
428 array length that exceeds the maximum
430 2005-02-05 Havoc Pennington <hp@redhat.com>
432 * dbus/dbus-message-factory.c (generate_special): more test cases,
435 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
436 reason why a signature was invalid
438 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
439 skip the length of the string before we look at it in validation
441 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
444 * dbus/dbus-message.c (_dbus_message_loader_new): default
445 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
447 2005-02-05 Havoc Pennington <hp@redhat.com>
449 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
450 if the signature of a variant was empty
451 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
452 struct with no element type)
454 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
455 mangled messages to break things
457 2005-02-04 Havoc Pennington <hp@redhat.com>
459 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
460 g_quark_try_string() so it actually can return 0
461 (dbus_g_proxy_connect_signal): ditto
463 2005-02-04 Havoc Pennington <hp@redhat.com>
465 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
467 (tristring_from_message): assert cleanly on null path/interface
468 (should not be possible though I decided later)
469 (dbus_g_proxy_dispose): move proxy manager unregistration here
470 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
471 g_return_if_fail() checks
473 2005-02-04 Havoc Pennington <hp@redhat.com>
475 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
477 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
478 (with some minor changes)
480 * doc/dbus-specification.xml: add deprecated attribute to
483 2005-01-31 Havoc Pennington <hp@redhat.com>
485 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
486 think it's sort of right
488 2005-01-30 Havoc Pennington <hp@redhat.com>
490 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
492 2005-01-30 Havoc Pennington <hp@redhat.com>
494 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
496 * autogen.sh: change to autotools 1.9
498 * glib/dbus-gproxy.c: completely change how signals work
499 (dbus_g_proxy_add_signal): new function to specify signature of a
501 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
502 and g_warning if the incoming message has the wrong signature.
504 2005-01-30 Havoc Pennington <hp@redhat.com>
506 * tools/dbus-names-model.c (have_names_notify): fix this
508 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
509 up the string array handling a bit
511 2005-01-30 Havoc Pennington <hp@redhat.com>
513 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
514 (dbus_g_pending_call_cancel): new function
516 * dbus/dbus-glib.h: move GType decls for connection/message here;
517 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
518 here, just kind of rationalizing how we handle all that
520 * tools/dbus-names-model.c: new file for a tree model listing the
523 * tools/dbus-tree-view.c (model_new): use proper typing on the
526 2005-01-30 Havoc Pennington <hp@redhat.com>
528 * glib/dbus-gmain.c: add a custom GSource back that just checks
529 whether the message queue has anything in it; otherwise, there are
530 cases where we won't see messages in the queue since there was no
531 IO visible to the glib main loop
533 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
534 increase default message timeout to 25 seconds
536 2005-01-30 Havoc Pennington <hp@redhat.com>
538 * test/glib/test-profile.c (no_bus_stop_server): remove the
539 warning about the g_warning that I just fixed
541 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
542 custom source, seems to be a lot easier to understand and work
545 2005-01-30 Havoc Pennington <hp@redhat.com>
547 I think this main loop thing is conceptually broken, but here are
548 some band aids. I'll maybe rewrite it in a minute.
550 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
551 custom GSource, so don't pass it in; confusing
552 (gsource_server_finalize, gsource_connection_finalize): add
553 finalize handlers that remove all the watches.
555 2005-01-30 Havoc Pennington <hp@redhat.com>
557 * glib/dbus-gobject.c (introspect_properties): fix the XML
560 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
561 which effectively detects the use of freed messages
563 * glib/dbus-gobject.c (handle_introspect): modify and return the
564 reply message instead of the incoming message
566 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
567 gee, maybe it should SEND THE XML instead of just making a string
568 and freeing it again ;-)
570 * tools/dbus-print-message.c (print_message): improve printing of
573 * configure.in: add debug-glib.service to the output
575 2005-01-30 Havoc Pennington <hp@redhat.com>
577 dbus-viewer introspected and displayed the bus driver
579 * dbus/dbus-object-tree.c
580 (object_tree_test_iteration): add tests for a handler registered on "/"
582 * dbus/dbus-object-tree.c
583 (_dbus_decompose_path): fix to handle path "/" properly
584 (run_decompose_tests): add tests for path decomposition
586 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
589 * glib/dbus-gobject.c (handle_introspect): fix quotes
591 * test/glib/run-test.sh: support launching the bus, then running
594 * test/glib/test-service-glib.c (main): put in a trivial gobject
595 subclass and register it on the connection
597 * bus/driver.c (bus_driver_handle_introspect): implement
598 introspection of the bus driver service
600 * dbus/dbus-protocol.h: add #defines for the XML namespace,
601 identifiers, doctype decl
603 * bus/driver.c (bus_driver_handle_get_service_owner): handle
604 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
605 returning the service unchanged.
606 (bus_driver_handle_message): remove old check for reply_serial in
607 method calls, now the message type deals with that
608 (bus_driver_handle_message): handle NULL interface
610 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
612 * glib/dbus-gloader-expat.c (description_load_from_string): allow
615 * tools/dbus-viewer.c: add support for introspecting a service on
618 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
619 (dbus_g_pending_call_unref): add
621 2005-01-29 Havoc Pennington <hp@redhat.com>
623 * tools/dbus-tree-view.c: add support for displaying properties.
624 (run dbus-viewer with an introspect xml file as arg, then resize
625 the window so the tree elements show up, not sure what that is)
627 * glib/dbus-gobject.c (handle_introspect): return
628 org.freedesktop.Properties and org.freedesktop.Introspectable
629 interfaces when we are introspected.
631 * doc/dbus-specification.xml: allow empty interface name when
634 2005-01-29 Havoc Pennington <hp@redhat.com>
636 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
637 though it uses glib, it could be extended for any binding in
640 * glib/dbus-gobject.c (gobject_message_function): change to the
641 new way properties work
643 * dbus/dbus-protocol.h: add the new interfaces
645 * doc/dbus-specification.xml: document the introspection format,
646 Introspectable interface, and add an org.freedesktop.Properties
649 * glib/dbus-gparser.c: add support for a <property> element
651 * glib/dbus-gidl.c: add PropertyInfo
653 * glib/dbus-gobject.c (handle_introspect): put the outermost
654 <node> outside the signal and property descriptions.
655 (introspect_properties): export properties as <property> rather
658 2005-01-28 Havoc Pennington <hp@redhat.com>
660 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
661 related to authentication protocol
663 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
665 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
666 - BUS_ACTIVATION -> BUS_STARTER
667 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
668 - class MessageIter (__init__): Added recursion checking
669 so we throw a nice error instead of just disconnecting from the
671 (get): Added arg_type parameter for recursion.
673 Added signiture type placeholder (not implemented)
674 Added struct type placeholder (not implemented)
675 Added varient type placeholder (not implemented)
676 Commented out dict type for now
677 (get_element_type): renamed from get_array_type
678 (get_*): changed to use the dbus_message_iter_get_basic API
679 (get_*_array): removed in favor of recursive get_array method
680 (get_array): new recursive method which calls get to marshal
681 the elements of the array
682 (value_to_dbus_sig): New method returns the corrasponding
683 dbus signiture to a python value
684 (append): Comment out dict handling for now
685 Handle lists with the new recursive API
686 Comment out None handling for now
687 (append_nil): removed
688 (append_*): changed to use dbus_message_iter_append_basic API
689 (append_*_array): removed in favor of recursive append_array
691 (__str__): Make it easier to print out recursive iterators
693 - class Message (__str__): moved type inspection to the
694 MessageIter class' __str__ method
695 (get_iter): Added an append parameter wich defaults to False
696 If True use the new API's to create an append iterator
698 * python/dbus.py: Update to use new bindings API
699 - TYPE_ACTIVATION -> TYPE_STARTER
700 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
701 - class ActivationBus -> class StarterBus
702 - class RemoteObject (__call__): get an append iterator
703 - (_dispatch_dbus_method_call): get an append iterator
704 - class Object (emit_signal): get an append iterator
706 * python/examples/: Fixed up the examples to work with the new API
708 2005-01-28 Joe Shaw <joeshaw@novell.com>
710 * configure.in: Bump version up to 0.30.
712 * HACKING: Add a release item to bump the version number up after
715 2005-01-28 Havoc Pennington <hp@redhat.com>
717 * doc/dbus-specification.xml: update to describe 16-bit types and
720 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
723 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
726 * dbus/dbus-marshal-recursive.c: implement
728 2005-01-27 Havoc Pennington <hp@redhat.com>
730 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
732 * configure.in: find the right type for 16 and 32 bit ints as well
735 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
736 the 16-bit types so people don't have to stuff them in 32-bit or
739 2005-01-27 Havoc Pennington <hp@redhat.com>
741 * dbus/dbus-message.c: byteswap the message if you init an
742 iterator to read/write from it
744 * dbus/dbus-marshal-byteswap.c: new file implementing
745 _dbus_marshal_byteswap()
747 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
749 2005-01-26 Havoc Pennington <hp@redhat.com>
751 * dbus/dbus-marshal-validate-util.c: break this out (and fix
752 build, apparently - nobody noticed?)
754 2005-01-26 Havoc Pennington <hp@redhat.com>
756 * dbus/dbus-marshal-recursive.h: remove todo comment
758 2005-01-25 Joe Shaw <joeshaw@novell.com>
760 * Land the mono binding changes to conform to the new APIs.
762 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
763 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
765 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
766 type code as a string.
767 (InitAppending): Rename dbus_message_append_iter_init() to
768 dbus_message_iter_init_append().
770 * mono/BusDriver.cs: Rename ServiceEventHandler to
771 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
772 Rename ServiceOwnerChanged to NameOwnerChanged.
774 * mono/Connection.cs: Rename BaseService to UniqueName, and the
777 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
779 * mono/Service.cs: Rename Exists to HasOwner, internally rename
780 dbus_bus_acquire_service() to dbus_bus_request_name().
782 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
783 of Type.UnderlyingSystemType to get the correct element type for
785 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
786 dbus_message_get_{element|arg}_type() instead of
787 dbus_message_iter_init_array_iterator().
788 (Append): Replace dbus_message_iter_append_array() with
789 dbus_message_iter_open_container() and
790 dbus_message_iter_close_container().
792 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
793 types have been removed.
795 * mono/DBusType/*.cs: Replace calls of
796 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
797 but specify the type in the DllImport extern declaration. Ditto
798 for dbus_message_iter_append_[type]() ->
799 dbus_message_iter_append_basic().
801 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
802 NameOwnerChangedHandler.
804 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
806 * python/dbus_bindings.pyx.in: Rename of methods and bindings
807 - get_base_service -> get_unique_name
808 - bus_get_base_service -> bus_get_unique_name
809 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
810 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
811 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
812 - bus_activate_service -> bus_start_service_by_name
813 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
814 - bus_acquire_service -> bus_request_name
815 - dbus_bus_acquire_service -> dbus_bus_request_name
816 - bus_service_exists -> bus_name_has_owner
817 - dbus_bus_service_exists -> dbus_bus_name_has_owner
819 * python/dbus.py: Rename of methods
820 - activate_service -> start_service_by_name
821 - bus_acquire_service -> bus_request_name
822 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
823 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
826 2005-01-24 Joe Shaw <joeshaw@novell.com>
828 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
829 signature for the method that can't be found.
831 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
832 the message has any arguments, we need to call
833 _dbus_type_reader_get_current_type(), not
834 _dbus_type_reader_has_next().
836 2005-01-24 Havoc Pennington <hp@redhat.com>
838 * dbus/dbus-message-factory.c: more testing of message validation
840 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
843 2005-01-23 Havoc Pennington <hp@redhat.com>
845 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
846 get this all working, not many tests in the framework yet though
848 2005-01-22 Havoc Pennington <hp@redhat.com>
850 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
851 tutorial, based on work from David Wheeler.
853 2005-01-21 Havoc Pennington <hp@redhat.com>
855 * dbus/dbus-bus.c: add more return_if_fail checks
857 * dbus/dbus-message.c (load_message): have the "no validation"
858 mode (have to edit the code to toggle the mode for now though)
860 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
861 skips all validation; I want to use this at least for benchmark
862 baseline, I'm not sure if it should be a publicly-available switch.
864 2005-01-21 Havoc Pennington <hp@redhat.com>
866 * glib/dbus-gmain.c: don't put the GLib bindings in the same
867 toplevel doxygen group as the low-level API stuff
869 * dbus/dbus.h: note that libdbus is the low-level API
871 2005-01-20 Havoc Pennington <hp@redhat.com>
873 * update-dbus-docs.sh: script to update docs on the web site, only
874 works for me though. neener.
876 2005-01-20 Havoc Pennington <hp@redhat.com>
878 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
879 code can reveal bugs in it
881 2005-01-20 Havoc Pennington <hp@redhat.com>
883 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
884 select() version, patches from Tor Lillqvist
886 2005-01-20 Havoc Pennington <hp@redhat.com>
888 * doc/dbus-tutorial.xml: replace > with >
890 * bus/services.c (bus_registry_acquire_service): validate the name
891 and return a better error if it's no good.
893 * doc/dbus-specification.xml: note NO_AUTO_START change
895 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
896 from AUTO_START, we're toggling the default
898 * bus/dispatch.c: adapt the tests to change of auto-start default
900 2005-01-18 Havoc Pennington <hp@redhat.com>
902 * rename dbus-daemon-1 to dbus-daemon throughout
904 2005-01-18 Havoc Pennington <hp@redhat.com>
906 * Throughout, grand renaming to strip out the use of "service",
907 just say "name" instead (or "bus name" when ambiguous). Did not
908 change the internal code of the message bus itself, only the
909 programmer-facing API and messages.
911 * doc/dbus-specification.xml: further update the message bus section
913 * bus/config-parser.c (all_are_equiv): fix bug using freed string
916 2005-01-17 Havoc Pennington <hp@redhat.com>
918 * dbus/dbus-types.h: remove 16-bit types since we don't use them
921 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
922 "invalid name character" not only non-ASCII
924 * doc/dbus-specification.xml: further update spec, message bus
925 parts are still out-of-date but the marshaling etc. stuff is now
928 2005-01-17 Havoc Pennington <hp@redhat.com>
930 * doc/dbus-specification.xml: partially update spec
932 2005-01-17 Havoc Pennington <hp@redhat.com>
934 * Throughout, align variant bodies according to the contained
935 type, rather than always to 8. Should save a fair bit of space in
938 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
939 fix handling of case where p == end
941 * doc/TODO: remove the dbus_bool_t item and variant alignment items
943 2005-01-17 Havoc Pennington <hp@redhat.com>
945 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
947 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
948 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
949 are marshaling/unmarshaling a boolean.
951 2005-01-16 Havoc Pennington <hp@redhat.com>
953 This is about it on what can be disabled/deleted from libdbus
954 easily, back below 150K anyhow. Deeper cuts are more work than
955 just turning the code off as I've done here.
957 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
958 signed int convenience funcs
960 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
963 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
964 things out of libdbus
966 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
968 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
969 tests-enabled-only, though it should probably be deleted)
971 * dbus/dbus-message-util.c: same stuff
973 * dbus/dbus-auth-util.c: same stuff
975 2005-01-16 Havoc Pennington <hp@redhat.com>
977 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
979 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
980 way for stripping down dbus-userdb.c stuff included in libdbus.
981 Rename _dbus_parse_uid for consistency.
983 2005-01-16 Havoc Pennington <hp@redhat.com>
985 * dbus/dbus-internals.c (_dbus_real_assert): print the function
986 name the assertion failed in
988 * dbus/dbus-internals.h (_dbus_return_if_fail)
989 (_dbus_return_val_if_fail): assert that the name of the function
990 containing the check doesn't start with '_', since we only want to
991 use checks on public functions
993 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
996 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
997 change checks to asserts for private function
999 * dbus/dbus-message.c (_dbus_message_set_serial): checks
1000 to asserts for private function
1002 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
1003 broken assertion that was breaking make check
1004 (_dbus_type_reader_array_is_empty): remove this rather than fix
1005 it, was only used in assertions
1007 2005-01-16 Havoc Pennington <hp@redhat.com>
1009 * test/unused-code-gc.py: hacky script to find code that's used
1010 only by the bus (not libdbus) or used only by tests or not used at
1011 all. It has some false alarms, but looks like we can clean up a
1012 lot of size from libdbus.
1014 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
1015 dbus/Makefile.am: initially move 10K of binary size out of libdbus
1017 2005-01-16 Havoc Pennington <hp@redhat.com>
1019 * Add and fix docs according to Doxygen warnings throughout
1022 * dbus/dbus-marshal-recursive.c
1023 (_dbus_type_reader_array_is_empty): change this to just call
1024 array_reader_get_array_len() and make it static
1026 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
1028 (dbus_message_iter_init_append): rename from append_iter_init
1030 * dbus/dbus-marshal-recursive.c
1031 (_dbus_type_reader_get_element_type): rename from
1032 _dbus_type_reader_get_array_type
1034 2005-01-15 Havoc Pennington <hp@redhat.com>
1036 * test/glib/test-profile.c (with_bus_server_filter): fix crash
1038 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
1039 when DBUS_DISABLE_ASSERT
1040 (_dbus_marshal_set_basic): be sure we align for the string length
1042 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
1045 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
1046 inline macro version
1047 (_dbus_string_set_byte): provide inline macro version
1049 2005-01-15 Havoc Pennington <hp@redhat.com>
1051 * Land the new message args API and type system.
1053 This patch is huge, but the public API change is not
1054 really large. The set of D-BUS types has changed somewhat,
1055 and the arg "getters" are more geared toward language bindings;
1056 they don't make a copy, etc.
1058 There are also some known issues. See these emails for details
1060 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
1061 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
1063 * dbus/dbus-marshal-*: all the new stuff
1065 * dbus/dbus-message.c: basically rewritten
1067 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
1068 freed blocks to be all non-nul bytes so using freed memory is less
1069 likely to work right
1071 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
1072 DBUS_FAIL_MALLOC=N environment variable, so you can do
1073 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
1074 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
1077 * qt/message.cpp: port to the new message args API
1078 (operator<<): use str.utf8() rather than str.unicode()
1079 (pretty sure this is right from the Qt docs?)
1081 * glib/dbus-gvalue.c: port to the new message args API
1083 * bus/dispatch.c, bus/driver.c: port to the new message args API
1085 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
1086 "locked" flag to TRUE and align_offset to 0; I guess we never
1087 looked at these anyhow, but seems cleaner.
1089 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
1090 move allocation padding macro to this header; use it to implement
1091 (_DBUS_STRING_STATIC): ability to declare a static string.
1093 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
1094 change to return TRUE if the interface is not set.
1096 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
1097 to dbus-marshal-validate.[hc]
1099 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
1102 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
1103 to dbus-marshal-*.[hc]
1105 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
1106 function here from dbus-marshal.c
1108 2005-01-12 Joe Shaw <joeshaw@novell.com>
1110 * NEWS: Update for 0.23.
1112 * configure.in: Release 0.23.
1114 2005-01-12 Joe Shaw <joeshaw@novell.com>
1116 * mono/Makefile.am, mono/example/Makefile.am: Always build the
1117 dbus DLL with --debug. Clean up after the .mdb files this leaves
1120 * mono/doc/Makefile.am: Need to uninstall the docs on "make
1123 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
1124 is an enum, get the enum's underlying type. Another mono
1127 2005-01-11 Joe Shaw <joeshaw@novell.com>
1129 Patch from Sjoerd Simons <sjoerd@luon.net>
1131 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
1132 DESTDIR. It breaks stuff.
1134 2005-01-11 Joe Shaw <joeshaw@novell.com>
1136 Patch from Tambet Ingo <tambet@ximian.com>
1138 * mono/DBusType/Array.cs (Get): Get the underlying element type by
1139 calling type.GetElementType(). The code previously depended on
1140 broken Mono behavior, which was fixed in Mono 1.1.3.
1142 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
1143 Activator.CreateInstance() so that the class's constructor is
1144 called with the right parameters.
1146 2005-01-11 Joe Shaw <joeshaw@novell.com>
1148 Patch from Timo Teräs <ext-timo.teras@nokia.com>
1150 * dbus/dbus-connection.c
1151 (_dbus_connection_queue_received_message_link): Call
1152 _dbus_connection_remove_timeout() instead of the _locked()
1153 variant, since it's always called from
1154 _dbus_connection_handle_watch(), which handles the locking.
1155 Removed the _locked() variant since it's no longer used.
1157 2005-01-03 Havoc Pennington <hp@redhat.com>
1159 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
1162 2004-12-26 Havoc Pennington <hp@redhat.com>
1164 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
1166 2005-01-03 Havoc Pennington <hp@redhat.com>
1168 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
1171 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
1173 2005-01-02 Havoc Pennington <hp@redhat.com>
1175 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
1177 2005-01-01 Havoc Pennington <hp@redhat.com>
1179 * configure.in: add -Wfloat-equal
1181 2005-01-01 Havoc Pennington <hp@redhat.com>
1183 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
1184 for a variety of reasons '==' doesn't do this.
1186 2004-12-31 Havoc Pennington <hp@redhat.com>
1188 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
1189 I keep wishing I had
1191 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1193 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
1195 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1197 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
1198 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
1199 dbus-protocol.h. Because they are defines and not enums they are not
1202 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
1204 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
1205 dbus_bus_activate_service
1207 * python/dbus.py (Bus.activate_service): activate a service on the
1210 2004-12-24 Havoc Pennington <hp@redhat.com>
1212 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
1213 file format has also changed and I haven't adapted to that yet
1215 * Makefile.am: load .gcno files from latest gcc
1217 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
1218 * Patch from Rob Taylor <robtaylor@fastmail.fm>
1220 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
1223 * python/dbus.py (get_unix_user): Added binding to
1224 call dbus_bindings.bus_get_unix_user
1226 * python/extract.py: Modified the proto_pat regex to
1227 handle unsigned long
1229 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1231 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
1232 better POSIX compliance.
1234 2004-12-19 Havoc Pennington <hp@redhat.com>
1236 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
1237 (_dbus_string_insert_8_aligned): new functions
1239 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
1241 2004-12-18 Havoc Pennington <hp@redhat.com>
1243 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
1246 * dbus/dbus-message.c: fix a comment, and add a still-unused
1247 not-implemented function
1249 * dbus/dbus-marshal.h: fix comment
1251 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
1253 2004-12-17 Joe Shaw <joeshaw@novell.com>
1255 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
1256 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
1257 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
1258 Type.UnderlyingSystemType to get the actual system type
1259 underneath. This code previously depended on the broken Mono
1260 behavior, which was fixed in 1.1.3.
1262 2004-11-27 Havoc Pennington <hp@redhat.com>
1264 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
1266 (_dbus_string_get_const_data): inline when asserts are disabled
1268 * dbus/dbus-message.c: record the _dbus_current_generation of
1269 creation so we can complain if dbus_shutdown() is used improperly.
1270 Do this only if checks are enabled.
1272 * dbus/dbus-connection.c: ditto
1274 2004-11-26 Havoc Pennington <hp@redhat.com>
1276 * test/glib/test-profile.c: add with_bus mode to profile echoes
1277 that go through the bus.
1279 * test/glib/run-test.sh: add ability to run test-profile
1281 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
1284 2004-11-26 Havoc Pennington <hp@redhat.com>
1286 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
1287 thing was implemented
1289 2004-11-26 Havoc Pennington <hp@redhat.com>
1291 * test/glib/test-profile.c: tweak a bit, add support for some
1292 made-up minimal malloc overhead with plain sockets, since in
1293 real life some sort of buffers are unavoidable thus we could
1294 count them in the theoretical best case
1296 2004-11-26 Havoc Pennington <hp@redhat.com>
1298 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
1299 where I was trying to cache one too many messages
1301 2004-11-26 Havoc Pennington <hp@redhat.com>
1303 * dbus/dbus-message.c: reimplement message cache as an array which
1304 makes the cache about twice as fast and saves maybe 1.5% overall
1306 2004-11-26 Havoc Pennington <hp@redhat.com>
1308 * dbus/dbus-threads.c (init_global_locks): forgot to put the
1309 message cache lock here
1311 2004-11-26 Havoc Pennington <hp@redhat.com>
1313 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
1314 the "char byte_order" next to each other to save 4 bytes
1315 (dbus_message_new_empty_header): reduce preallocation, since the
1316 message cache should achieve a similar effect
1317 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
1318 message cache that keeps a few DBusMessage around in a pool,
1319 another 8% speedup or so.
1321 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
1323 2004-11-25 Havoc Pennington <hp@redhat.com>
1325 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
1326 to write, without reading or blocking, try it before the poll()
1327 and skip the poll() if nothing remains to write. This is about a
1328 3% speedup in the echo client/server
1330 2004-11-25 Havoc Pennington <hp@redhat.com>
1332 The primary change here is to always write() once before adding
1333 the write watch, which gives us about a 10% performance increase.
1335 * dbus/dbus-transport-unix.c: a number of modifications to cope
1336 with removing messages_pending
1337 (check_write_watch): properly handle
1338 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
1339 messages_pending stuff
1340 (check_read_watch): properly handle WAITING_FOR_MEMORY and
1342 (unix_handle_watch): after writing, see if the write watch can be
1344 (unix_do_iteration): assert that write_watch/read_watch are
1345 non-NULL rather than testing that they aren't, since they
1346 aren't allowed to be NULL. check_write_watch() at the end so
1347 we add the watch if we did not finish writing (e.g. got EAGAIN)
1349 * dbus/dbus-transport-protected.h: remove messages_pending call,
1350 since it resulted in too much inefficient watch adding/removing;
1351 instead we now require that the transport user does an iteration
1352 after queueing outgoing messages, and after trying the first
1353 write() we add a write watch if we got EAGAIN or exceeded our
1354 max bytes to write per iteration setting
1356 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
1359 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
1360 freed and then accessed, valgrind flagged this bug, fix it
1362 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
1363 as the last valid field plus 1, where really it is equal to the
1364 last valid field. Corrects some message corruption issues.
1366 * dbus/dbus-mainloop.c: verbosity changes
1368 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
1369 instead of aborting in one of the test codepaths
1371 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
1372 caused not printing the pid ever again if a verbose was missing
1373 the newline at the end
1374 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
1376 * dbus/dbus-connection.c: verbosity changes;
1377 (dbus_connection_has_messages_to_send): new function
1378 (_dbus_connection_message_sent): no longer call transport->messages_pending
1379 (_dbus_connection_send_preallocated_unlocked): do one iteration to
1380 try to write() immediately, so we can avoid the write watch. This
1381 is the core purpose of this patchset
1382 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
1383 dump the outgoing message queue, so nobody will get confused
1384 trying to send them or thinking stuff is pending to be sent
1386 * bus/test.c: verbosity changes
1388 * bus/driver.c: verbosity/assertion changes
1390 * bus/dispatch.c: a bunch of little tweaks to get it working again
1391 because this patchset changes when/where you need to block.
1393 2004-11-23 Havoc Pennington <hp@redhat.com>
1395 * test/glib/test-profile.c: modify to accept a plain_sockets
1396 argument in which case it will bench plain sockets instead of
1397 libdbus, for comparison purposes.
1399 2004-11-22 Havoc Pennington <hp@redhat.com>
1401 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
1402 threads for more time, so sysprof can get a grip on it.
1404 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
1407 2004-11-13 Havoc Pennington <hp@redhat.com>
1409 * test/glib/test-profile.c: fix this thing up a bit
1411 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
1412 preallocation sizes by a fair bit; not sure if this will be an
1413 overall performance win or not, but it does reduce reallocs.
1415 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
1416 the test hack that forced constant realloc if asserts are
1417 disabled, so we can profile sanely. Sprinkle in some
1418 _DBUS_UNLIKELY() which are probably pointless, but before I
1419 noticed the real performance problem I put them in.
1420 (_dbus_string_validate_utf8): micro-optimize this thing a little
1421 bit, though callgrind says it didn't help; then special-case
1422 ascii, which did help a lot; then be sure we detect nul bytes as
1423 invalid, which is a bugfix.
1424 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
1425 superstition; use memset to nul the padding instead of a manual
1427 (_dbus_string_get_length): inline this as a
1428 macro; it showed up in the profile because it's used for loop
1431 2004-11-10 Colin Walters <walters@verbum.org>
1433 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
1436 2004-11-09 Colin Walters <walters@verbum.org>
1438 * dbus/dbus-string.c (_dbus_string_get_length): New
1439 function, writes DBusString to C buffer.
1441 * dbus/dbus-string.h: Prototype it.
1443 * dbus/dbus-message.c (dbus_message_type_to_string): New
1444 function, converts message type into C string.
1446 * dbus/dbus-message.h: Prototype it.
1448 * bus/selinux.c (bus_selinux_check): Take source pid,
1449 target pid, and audit data. Pass audit data to
1451 (log_audit_callback): New function, appends extra
1453 (bus_selinux_allows_acquire_service): Also take
1454 service name, add it to audit data.
1455 (bus_selinux_allows_send): Also take message
1456 type, interface, method member, error name,
1457 and destination, and add them to audit data.
1458 (log_cb): Initialize func_audit.
1460 * bus/selinux.h (bus_selinux_allows_acquire_service)
1461 (bus_selinux_allows_send): Update prototypes
1463 * bus/services.c (bus_registry_acquire_service): Pass
1464 service name to bus_selinux_allows_acquire_service.
1466 * bus/bus.c (bus_context_check_security_policy): Pass
1467 additional audit data. Move assignment of dest
1470 2004-11-07 Colin Walters <walters@verbum.org>
1472 * dbus/dbus-transport-unix.c (do_authentication): Always
1473 initialize auth_completed.
1475 2004-11-07 Colin Walters <walters@verbum.org>
1477 * bus/bus.c (load_config): Break into three
1478 separate functions: process_config_first_time_only,
1479 process_config_every_time, and process_config_postinit.
1480 (process_config_every_time): Move call of
1481 bus_registry_set_service_context_table into
1482 process_config_postinit.
1483 (process_config_postinit): New function, does
1484 any processing that needs to happen late
1485 in initialization (and also on reload).
1486 (bus_context_new): Instead of calling load_config,
1487 open config parser here and call process_config_first_time_only
1488 and process_config_every_time directly. Later, after
1489 we have forked but before changing UID,
1490 invoke bus_selinux_full_init, and then call
1491 process_config_postinit.
1492 (bus_context_reload_config): As in bus_context_new,
1493 load parse file inside here, and call process_config_every_time
1494 and process_config_postinit.
1496 * bus/services.h, bus/services.c
1497 (bus_registry_set_service_context_table): Rename
1498 from bus_registry_set_sid_table. Take string hash from config
1499 parser, and convert them here into SIDs.
1501 * bus/config-parser.c (struct BusConfigParser): Have
1502 config parser only store a mapping of service->context
1504 (merge_service_context_hash): New function.
1505 (merge_included): Merge context string hashes instead
1506 of using bus_selinux_id_table_union.
1507 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
1508 simply create a new string hash.
1509 (bus_config_parser_unref): Unref it.
1510 (start_selinux_child): Simply insert strings into hash,
1511 don't call bus_selinux_id_table_copy_over.
1513 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
1514 (bus_selinux_id_table_copy_over): Delete.
1516 2004-11-03 Colin Walters <walters@verbum.org>
1518 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
1521 2004-11-03 Colin Walters <walters@verbum.org>
1523 * bus/test-main.c (test_pre_hook): Fix test logic,
1524 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
1526 2004-11-02 Colin Walters <walters@redhat.com>
1528 * bus/selinux.c (bus_selinux_init): Split into two functions,
1529 bus_selinux_pre_init and bus_selinux_post_init.
1530 (bus_selinux_pre_init): Just determine whether SELinux is
1532 (bus_selinux_post_init): Do everything else.
1534 * bus/main.c (main): Call bus_selinux_pre_init before parsing
1535 config file, and bus_selinux_post_init after. This ensures that
1536 we don't lose the policyreload notification thread that
1537 bus_selinux_init created before forking previously.
1539 * bus/test-main.c (test_pre_hook): Update for split.
1541 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
1543 Patch from Johan Fischer <linux@fischaz.com>
1545 * mono/doc/Makefile.am (install-data-local): Added directory
1548 2004-10-29 Colin Walters <walters@redhat.com>
1550 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
1551 parameter for fd to write pid to.
1553 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
1555 * bus/bus.c (bus_context_new): Pass print_pid_fd
1556 to _dbus_become_daemon (bug #1720)
1558 2004-10-29 Colin Walters <walters@redhat.com>
1560 Patch from Ed Catmur <ed@catmur.co.uk>
1562 * mono/doc/Makefile.am (install-data-local): Handle
1565 2004-10-29 Colin Walters <walters@redhat.com>
1567 * bus/.cvsignore, qt/.cvsignore: Update.
1569 2004-10-29 Colin Walters <walters@redhat.com>
1571 Patch from Kristof Vansant <de_lupus@pandora.be>
1573 * configure.in: Detect Slackware.
1574 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
1575 * bus/rc.messagebus.in: New file.
1577 2004-10-29 Colin Walters <walters@redhat.com>
1579 * tools/dbus-monitor.c (filter_func): Return
1580 DBUS_HANDLER_RESULT_HANDLED in filter function
1582 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
1584 2004-10-29 Colin Walters <walters@redhat.com>
1586 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
1588 * bus/services.c (bus_registry_acquire_service):
1589 Correctly retrieve service name from DBusString
1592 2004-10-29 Colin Walters <walters@redhat.com>
1594 * dbus/dbus-glib.h: Update documentation to not
1595 refer to internal APIs.
1597 2004-10-27 Joe Shaw <joeshaw@novell.com>
1599 * mono/Arguments.cs (GetDBusTypeConstructor):
1600 type.UnderlyingSystemType will return "System.Byte" if you do it
1601 on "byte[]", which is not what we want. So check the type.IsArray
1602 property and use System.Array instead.
1604 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
1606 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
1607 the DBusUserInfo structure since this is passed into the function.
1608 This would cause a double free when the function that allocated
1609 the structure would try to free it when an error occured.
1611 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
1612 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
1613 for service activation to avoid 32bit/64bit parallel install issues
1615 2004-10-21 Colin Walters <walters@verbum.org>
1617 * AUTHORS: Fix my email address, the @gnu.org one
1618 has been bouncing for some time. Also add J5.
1620 2004-10-21 Colin Walters <walters@verbum.org>
1622 * dbus/dbus-transport-unix.c (do_authentication): Return
1623 authentication status to callers.
1624 (unix_handle_watch): If we completed authentication this round,
1625 don't do another read. Instead wait until the next iteration,
1626 after we've read any pending data in the auth buffer.
1627 (unix_do_iteration): Ditto.
1628 (unix_handle_watch): Updated for new do_authentication prototype.
1630 2004-10-18 Colin Walters <walters@verbum.org>
1632 * bus/selinux.c (bus_selinux_enabled): Handle
1633 --disable-selinux case.
1635 2004-10-18 Colin Walters <walters@verbum.org>
1637 * bus/selinux.h: Add bus_selinux_enabled.
1639 * bus/selinux.c (bus_selinux_enabled): Implement it.
1641 * bus/config-parser.c (struct include): Add
1642 if_selinux_enabled member.
1643 (start_busconfig_child): Parse if_selinux_enabled
1644 attribute for include.
1645 (bus_config_parser_content): Handle it.
1647 * bus/session.conf.in, bus/system.conf.in: Add
1648 inclusion of context mapping to default config files;
1649 conditional on SELinux being enabled.
1651 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
1653 * test/data/invalid-config-files/badselinux-1.conf,
1654 test/data/invalid-config-files/badselinux-2.conf:
1655 Test files for bad syntax.
1657 2004-10-17 Colin Walters <walters@verbum.org>
1659 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
1660 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
1661 format specifier mismatches.
1663 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
1665 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
1668 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
1669 pointer (bug #1540, Leonardo Boiko).
1671 2004-09-28 Jon Trowbridge <trow@ximian.com>
1673 * mono/BusDriver.cs: Changed BusDriver struct to remove
1674 the ServiceCreated and ServiceDeleted events and replace them
1675 with the new ServiceOwnerChanged event.
1677 * mono/example/BusListener.cs: Added a new example program,
1678 which listens for and reports any ServiceOwnerChanged events
1681 * mono/example/Makefile.am (DESTDIR): Build changes for the
1682 new BusListener.cs example.
1684 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
1686 * bus/signals.c (bus_match_rule_parse): validate the components of
1687 match rules (bug #1439).
1689 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
1691 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
1693 * doc/dbus-specification.xml: document ServiceOwnerChanged
1696 * bus/driver.c, bus/driver.h, bus/services.c: Use
1697 ServiceOwnerChanged signal instead of ServiceCreated and
1700 * bus/dispatch.c: update testcase for the new signal.
1702 2004-09-20 Jon Trowbridge <trow@ximian.com>
1704 Patch from Nat Friedman <nat@novell.com>
1706 * mono/Makefile.am: A number of small build fixes to allow "make
1707 distcheck" to succeed.
1709 * mono/example/Makefile.am: "make distcheck" fixes.
1711 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
1714 * test/Makefile.am: "make distcheck" fixes.
1716 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1718 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
1720 * doc/busconfig.dtd: update the DTD for the at_console attribute.
1722 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
1723 messages after the first one (bug #1389).
1725 * bus/dispatch.c (check_double_hello_message): add a test case for
1726 the double hello message bug.
1727 (check_existent_service_activation): fix check of spawning error.
1729 2004-09-16 David Zeuthen <david@fubar.dk>
1731 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
1733 2004-09-12 David Zeuthen <david@fubar.dk>
1735 Patch from Kay Sievers <kay.sievers@vrfy.org>
1737 * bus/bus.c (bus_context_new):
1739 * bus/main.c (usage)
1741 Add commandline option --nofork to override configuration file
1744 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
1746 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
1747 compilers don't like it (bug #974).
1749 2004-09-04 Harald Fernengel <harry@kdevelop.org>
1751 * qt/connection.*: Applied patch by Jérôme Lodewyck
1752 <lodewyck@clipper.ens.fr> to integrate an existing
1753 connection into the Qt eventloop
1755 2004-08-30 Jon Trowbridge <trow@ximian.com>
1757 * mono/BusDriver.cs: Added. This is a class for interacting with
1758 the org.freedesktop.DBus service.
1760 * mono/Message.cs: Added a mechanism to expose the message that is
1761 currently being dispatched via the static Message.Current
1762 property. Added Message.Sender and Message.Destination
1765 * mono/Handler.cs: Expose the dispatched message via
1766 Message.Current when handling method calls.
1768 * mono/Service.cs: Expose the dispatched message via
1769 Message.Current when handling signal emissions.
1771 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
1772 Connection.BaseService property.
1774 2004-08-28 Havoc Pennington <hp@redhat.com>
1776 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
1778 More fixes from Steve Grubb
1780 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
1781 (_dbus_listen_tcp_socket): fix fd leak
1783 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
1784 EINTR to a bit lower in the code
1786 2004-08-26 Jon Trowbridge <trow@ximian.com>
1788 * bus/driver.c (bus_driver_handle_service_exists): Respond with
1789 TRUE if we are inquiring about the existence of the built-in
1790 org.freedesktop.DBus service.
1792 2004-08-25 John Palmieri <johnp@redhat.com>
1793 * bus/config-parser.c:
1794 (struct PolicyType): Add POLICY_CONSOLE
1795 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
1796 (start_busconfig_child): Sets up console element when
1797 <policy at_console=""> is encountered in a policy file
1798 (append_rule_from_element): Convert console elements to console
1802 (bus_policy_create_client_policy): Add console rules to the client
1803 policy based on if the client is at the console
1804 (bus_policy_append_console_rule): New function for adding a
1805 console rule to a policy
1806 (bus_policy_merge): Handle console rule merging
1808 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
1809 where we check for console user files
1811 * dbus/dbus-sysdeps.c:
1812 (_dbus_file_exists): New function which checks if the given
1814 (_dbus_user_at_console): New function which does the system
1815 specific process of checking if the user is at the console
1817 * dbus/dbus-userdb.c:
1818 (_dbus_is_console_user): New function converts a UID to user name
1819 and then calls the system specific _dbus_user_at_console to
1820 see if the user is at the console and therefor a console user
1822 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
1824 * bus/config-parser.c (set_limit):
1825 * bus/dbus-daemon-1.1.in:
1826 * test/data/valid-config-files/many-rules.conf: set the
1827 max_match_rules_per_connection limt from the config file.
1829 * doc/busconfig.dtd: update the DTD.
1831 * bus/driver.c: remove some unused variables.
1833 2004-08-24 Mikael Hallendal <micke@imendio.com>
1835 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
1836 it's been replaced by dbus_g_bus_get
1838 2004-08-23 Colin Walters <walters@redhat.com>
1840 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1842 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
1844 * bus/selinux.c: Create a thread for policy reload notification.
1845 (bus_selinux_get_policy_root): Implement.
1847 * bus/config-parser.c (start_busconfig_child)
1848 (bus_config_parser_content): Support SELinux-root relative
1851 * configure.in <HAVE_SELINUX>: Add -lpthread.
1853 * bus/test-main.c (test_pre_hook, test_post_hook): New.
1854 (test_post_hook): Move memory checking into here.
1855 (test_pre_hook, test_post_hook): Move SELinux checks in
1856 here, but conditional on a DBUS_TEST_SELINUX environment
1857 variable. Unfortunately we can't run the SELinux checks
1858 as a normal user, since they won't have any permissions
1859 for /selinux. So this will have to be tested manually
1860 for now, until we have virtualization for most of
1863 2004-08-23 Havoc Pennington <hp@redhat.com>
1865 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
1866 drop supplementary groups, suggested by Steve Grubb
1868 2004-08-20 Colin Walters <walters@redhat.com>
1870 * bus/config-parser.c (start_busconfig_child): Remove some unused
1873 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
1876 2004-08-17 Joe Shaw <joeshaw@novell.com>
1878 * configure.in: If --enable-mono is passed in, if we can't find
1881 * mono/Makefile.am: Use /gacutil to install assemblies into the
1884 2004-08-12 Havoc Pennington <hp@redhat.com>
1886 * NEWS: update for 0.22
1888 * configure.in: release 0.22
1890 2004-08-11 Colin Walters <walters@redhat.com>
1892 * tools/dbus-send.c (main, usage): Add --reply-timeout
1895 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
1897 * bus/bus.c (process_config_first_time_only): get rid of an unused
1898 DBusError that was causing a memoy leak (bug #989).
1900 * dbus/dbus-keyring.c, dbus/dbus-message.c:
1901 fix compilation on Solaris/Forte C (bug #974)
1903 * bus/main.c (main): plug two minuscule memleaks.
1905 2004-08-10 Havoc Pennington <hp@redhat.com>
1907 * doc/dbus-tutorial.xml: add some more info on GLib bindings
1909 2004-08-09 Havoc Pennington <hp@redhat.com>
1911 * COPYING: switch to Academic Free License version 2.1 instead of
1912 2.0, to resolve complaints about patent termination clause.
1914 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
1916 * README: added documentation for the --enable-python
1919 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
1921 * bus/config-parser.c (bus_config_parser_new): fix an invalid
1922 _unref in the SELinux support.
1924 * doc/busconfig.dtd: update DTD for SELinux support.
1926 * bus/config-loader-libxml.c: fix error handler and parser
1927 initialisation/cleanup. OOM test now works with libxml2 HEAD.
1929 * configure.in: remove the warning about libxml2.
1931 * dbus/dbus-bus.c: silence doxygen warning.
1933 2004-07-31 Colin Walters <walters@redhat.com>
1935 * configure.in: Move #error in SELinux check to its own line.
1937 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
1939 * dbus/dbus-internals.h (_DBUS_SET_OOM):
1940 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
1943 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
1944 broken by the change in the _SET_OOM macros.
1946 2004-07-31 Colin Walters <walters@redhat.com>
1948 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
1951 2004-07-31 Colin Walters <walters@redhat.com>
1953 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
1954 to correctly detect DBUS__ACQUIRE_SVC. Also add an
1957 2004-07-24 Havoc Pennington <hp@redhat.com>
1959 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1961 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
1964 * configure.in: add --enable-selinux
1966 * bus/policy.c (bus_policy_merge): add FIXME to a comment
1968 * bus/main.c (main): initialize and shut down selinux
1970 * bus/connection.c: store SELinux ID on each connection, to avoid
1971 repeated getting of the string context and converting it into
1974 * bus/bus.c (bus_context_get_policy): new accessor, though it
1976 (bus_context_check_security_policy): check whether the security
1977 context of sender connection can send to the security context of
1978 recipient connection
1980 * bus/config-parser.c: add parsing for <selinux> and <associate>
1982 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
1983 implement dbus_connection_get_unix_fd()
1985 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
1986 function, used by the selinux stuff
1988 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
1990 * bus/config-loader-libxml.c: complete the implementation of
1991 libxml backend for config file loader. Doesn't work with full OOM
1994 * configure.in: change error when selecting libxml into a warning.
1996 * test/data/invalid-config-files: add two non-well-formed XML
1999 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
2001 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
2002 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
2003 be necessary to read all the buffer. (bug #894)
2005 * bus/activation.c (bus_activation_activate_service): fix a
2006 potential assertion failure (bug #896). Small optimization in the
2007 case of auto-activation messages.
2009 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
2010 add test case for byte-through-vararg bug (#901). patch by Kimmo
2013 2004-07-28 Anders Carlsson <andersca@gnome.org>
2016 * python/dbus_bindings.pyx.in:
2017 Add dbus.init_gthreads (), allow emit_signal to pass
2018 arguments to the signal.
2020 2004-07-24 Havoc Pennington <hp@redhat.com>
2022 * AUTHORS: add some people, not really comprehensively, let me
2023 know if I missed you
2025 2004-07-24 Havoc Pennington <hp@redhat.com>
2027 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
2030 * test/Makefile.am (DIST_SUBDIRS): here also
2032 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2034 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
2035 breaking build on Solaris, reported by Farhad Saberi on the ML.
2037 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
2038 va_arg invocation to account for integer promotion in the case of
2039 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
2041 * bus/services.c (bus_service_remove_owner): fix bug #902, use
2042 _dbus_list_get_first_link, not _dbus_list_get_first.
2044 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
2046 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
2047 handler functions so that the asserts in _dbus_object_subtree_unref
2050 * dbus/dbus-transport-unix.c (do_reading):
2051 _dbus_transport_queue_messages return value is of type
2052 dbus_bool_t, not DBusDispatchStatus.
2054 2004-07-19 David Zeuthen <david@fubar.dk>
2056 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
2059 (check_get_connection_unix_user): Debug says GetProperty; but the
2060 method is called GetConnectionUnixUser
2061 (check_get_connection_unix_process_id): New function
2062 (bus_dispatch_test): Actually call check_get_connection_unix_user();
2063 also call check_get_connection_unix_process_id()
2066 (bus_driver_handle_get_connection_unix_process_id): New function,
2067 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
2071 (handle_server_data_external_mech): Set pid from the credentials
2072 obtained from the socket
2074 * dbus/dbus-connection.c:
2075 (dbus_connection_get_unix_process_id): New function
2077 * dbus/dbus-connection.h:
2078 Add prototype for dbus_connection_get_unix_process_id
2080 * dbus/dbus-transport.c:
2081 (_dbus_transport_get_unix_process_id): New function
2083 * dbus/dbus-transport.h:
2084 Add prototype for _dbus_transport_get_unix_process_id
2086 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
2088 * dbus/dbus-message.c: Message counter fix, patch by Christian
2089 Hammond <chipx86@gnupdate.org>
2091 2004-07-18 Seth Nickell <seth@gnome.org>
2094 * python/dbus_bindings.pyx.in:
2095 * python/tests/test-client.py:
2097 Add dbus.ByteArray and dbus_bindings.ByteArray
2098 types so that byte streams can be passed back.
2100 Give jdahlin the heaps of credit that are so
2103 2004-07-12 Seth Nickell <seth@gnome.org>
2107 Add message argument to the default object_method_handler
2110 * python/dbus_bindings.pyx.in:
2112 Automatically return NIL when passed an empty list
2113 (we can't pass back a list since lists are typed
2114 and we don't have any idea what type the the client
2115 intended the list to be... :-( )
2117 2004-07-10 Seth Nickell <seth@gnome.org>
2119 * python/examples/Makefile.am:
2121 Fix distcheck breakage caused by new examples.
2123 2004-07-10 Seth Nickell <seth@gnome.org>
2127 Add "message" argument to service-side dbus.Object
2128 methods. This will break existing services written
2129 using the python bindings, but will allow extraction
2130 of all the message information (e.g. who its from).
2132 Add improved "object oriented" signal handling/emission.
2134 * python/examples/example-service.py:
2138 * python/examples/example-signal-emitter.py:
2139 * python/examples/example-signal-recipient.py:
2141 Two new examples that show how to emit and receive
2142 signals using the new APIs.
2144 * python/examples/example-signals.py:
2145 * python/examples/gconf-proxy-service.py:
2146 * python/examples/gconf-proxy-service2.py:
2148 Add "message" argument to service methods.
2150 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
2152 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
2153 * dbus/bus.c (dbus_bus_get_unix_user)
2154 * doc/dbus-specification.xml: implement GetConnectionUnixUser
2155 method of org.freedesktop.DBus interface.
2157 * bus/dispatch.c: test case
2159 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
2161 * python/Makefile.am: switched include directory from glib/ to dbus/
2162 since dbus-glib.h moved
2164 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2166 * configure.in: prevent building the gcj stuff and libxml loader
2167 since they are broken.
2169 2004-06-20 Havoc Pennington <hp@redhat.com>
2171 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
2172 codes from the dbus error names
2174 * glib/dbus-glib.h: move to subdir dbus/ since it's included
2175 as dbus/dbus-glib.h and that breakage is now visible due to
2176 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
2178 * glib/dbus-glib.h: s/gproxy/g_proxy/
2180 * dbus/dbus-shared.h: new header to hold stuff shared with
2183 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
2186 * glib/dbus-glib.h (dbus_set_g_error): move to
2187 dbus-glib-lowlevel.h
2189 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
2190 of stuff to enable this
2192 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
2194 * a bunch of other changes with the same basic "separate glib
2195 bindings from dbus.h" theme
2197 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
2199 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
2201 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
2203 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
2205 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
2206 the reply value of the ServiceExists message.
2208 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
2210 * python/dbus_bindings.pyx.in: No longer need to parse path
2211 elements and pass them as arrays of strings. The C API now
2212 accepts plain path strings.
2213 (_build_parsed_path): removed
2215 2004-06-07 Havoc Pennington <hp@redhat.com>
2217 * doc/TODO: remove auto-activation item since it's done; sort
2218 items by importance/milestone
2220 2004-06-07 Havoc Pennington <hp@redhat.com>
2222 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
2223 random signature when using REQUIRED_FIELDS (this hack won't work
2226 * dbus/dbus-message.c: change the signature to be a header field,
2227 instead of message->signature special-case string. Incremental
2228 step forward. Then we can fix up code to send the signature in the
2229 message, then fix up code to validate said signature, then fix up
2230 code to not put the typecodes inline, etc.
2231 (load_one_message): don't make up the signature after the fact
2232 (decode_header_data): require signature field for the known
2235 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
2237 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
2239 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
2241 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
2243 * mono/Handler.cs: Updated to follow new path argument for
2244 (un-)registering objects.
2246 * mono/example/Makefile.am:
2248 * configure.in: Bumped required version for mono and use new -pkg
2251 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
2253 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
2254 registration functions take the path argument as char* instead of
2257 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
2258 split off the path decompostion part of
2259 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
2262 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
2264 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2266 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
2267 machine approach. A state is implemented as a function that
2268 handles incoming events as specified for that state.
2270 * doc/dbus-specification.xml: Update auth protocol state machine
2271 specification to match implementation. Remove some leftover
2274 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2276 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
2277 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
2280 * Doxyfile.in: remove deprecated options.
2282 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
2283 glib/test-thread.h, glib/test-thread-client.c,
2284 glib/test-thread-server.c, glib/test-profile.c,
2285 glib/test-dbus-glib.c: remove these unused files.
2287 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
2289 * dbus/dbus-object-tree.c
2290 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
2291 non-fallback handlers (bug #684).
2292 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
2293 (find_subtree_recurse): report wether the returned subtree is an
2294 exact match or a "fallback" match higher up in the tree.
2295 (object_tree_test_iteration): update test case.
2297 2004-06-01 Seth Nickell <seth@gnome.org>
2299 * python/dbus_bindings.pyx.in:
2300 * python/tests/test-client.py:
2302 Round off basic type support. Add dicts (yay!), and
2303 remaining array types.
2305 Make MessageIter more general so it works for dicts too.
2307 Mark all loop variables as C integers.
2309 2004-05-31 Havoc Pennington <hp@redhat.com>
2311 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
2314 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
2316 * glib/dbus-glib-tool.c (main): set up to have a --self-test
2317 option that runs the tests, and start filling in some code
2318 including for starters just dumping the interfaces to stdout
2320 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
2322 * test/data/valid-introspection-files/lots-of-types.xml: test of
2323 an example introspection file
2325 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
2328 2004-05-31 Seth Nickell <seth@gnome.org>
2330 * python/dbus_bindings.pyx.in:
2331 * python/tests/test-client.py:
2336 Fix string array memory trashing bug... oops...
2338 2004-05-30 Seth Nickell <seth@gnome.org>
2342 Add a nicer-but-less-flexible alternate API for handling
2343 calls to virtual objects in dbus.ObjectTree.
2345 Screw up the argument order to the dbus.Object constructor
2346 for consistency with dbus.ObjectTree (and to make dbus_methods
2347 optional for future extension)
2349 * python/examples/Makefile.am:
2350 * python/examples/gconf-proxy-service.py:
2351 * python/examples/gconf-proxy-service2.py:
2353 Alternate implementation of gconf-proxy-service using the
2354 nicer dbus.ObjectTree API.
2356 * python/examples/example-service.py:
2357 * python/tests/test-server.py
2359 Reverse the argument order to deal with dbus.Object constructor
2362 2004-05-30 Seth Nickell <seth@gnome.org>
2364 * python/examples/example-client.py:
2365 * python/examples/example-service.py:
2367 Take it back. Lists seem to work but they're broken
2368 in the test suite. Make the base examples use
2371 2004-05-30 Seth Nickell <seth@gnome.org>
2373 * python/dbus_bindings.pyx.in:
2374 * python/tests/test-client.py:
2376 Add some more tests and fix errors that crop up.
2377 Unfortunately, currently it seems like marshalling
2378 and unmarshalling of lists is completely broken :-(
2380 2004-05-30 Seth Nickell <seth@gnome.org>
2382 * python/dbus_bindings.pyx.in:
2384 Add support for ObjectPath type.
2388 Refactor message handling code to a common function.
2390 * python/tests/test-client.py:
2391 * python/tests/test-server.py:
2393 Add tests that check to make sure values of all types
2394 can be echoed from a service w/o mangling.
2396 2004-05-29 Seth Nickell <seth@gnome.org>
2400 Add ObjectTree class which allows implementation
2401 of trees of "virtual" objects. Basically the python
2402 wrapper for "register_fallback".
2404 * python/examples/Makefile.am
2405 * python/examples/gconf-proxy-client.py:
2406 * python/examples/gconf-proxy-service.py:
2408 Implement a simple GConf proxy service that supports
2409 get/set on string and int GConf keys using the ObjectTree.
2411 2004-05-29 Seth Nickell <seth@gnome.org>
2414 * python/examples/example-client.py:
2415 * python/examples/example-service.py:
2416 * python/examples/list-system-services.py:
2418 Add SessionBus, SystemBus and ActivationBus classes
2419 so you don't need to know the special little BUS_TYPE
2422 2004-05-29 Havoc Pennington <hp@redhat.com>
2424 * bus/config-parser.c (process_test_valid_subdir): temporarily
2425 stop testing config parser OOM handling, since expat has issues
2426 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
2428 * bus/dbus-daemon-1.1.in: change requested_reply to
2429 send_requested_reply/receive_requested_reply so we can send the
2430 replies, not just receive them.
2432 * bus/config-parser.c: parse the new
2433 send_requested_reply/receive_requested_reply
2435 * bus/policy.c (bus_client_policy_check_can_send): add
2436 requested_reply argument and use it
2438 * bus/bus.c (bus_context_check_security_policy): pass through
2439 requested_reply status to message send check
2441 * bus/system.conf.in: adapt to requested_reply change
2443 2004-05-28 Havoc Pennington <hp@redhat.com>
2445 * test/glib/test-service-glib.c (main): remove unused variable
2447 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
2449 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
2450 from the enum, no longer in use.
2452 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
2455 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
2456 whether error_name passed in is a valid error name.
2458 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
2460 * dbus/dbus-message.c (dbus_message_get_args): Added support for
2461 OBJECT_PATH and OBJECT_PATH_ARRAY
2463 2004-05-28 Seth Nickell <seth@gnome.org>
2465 * python/examples/Makefile.am:
2467 Forget to add Makefile.am. Do not pass go.
2469 2004-05-28 Michael Meeks <michael@ximian.com>
2471 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
2474 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
2476 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
2477 (_dbus_message_iter_get_basic_type_array): impl.
2478 drastically simplify ~all relevant _get methods to use these.
2479 (_dbus_message_iter_append_basic_array),
2480 (dbus_message_iter_append_basic): impl
2481 drastically simplify ~all relevant _append methods to use these.
2483 * dbus/dbus-message-builder.c (parse_basic_type)
2484 (parse_basic_array, lookup_basic_type): impl.
2485 (_dbus_message_data_load): prune scads of duplicate /
2488 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
2489 (_dbus_demarshal_basic_type): implement,
2490 (demarshal_and_validate_len/arg): beef up debug.
2491 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
2493 2004-05-27 Seth Nickell <seth@gnome.org>
2496 * python/Makefile.am:
2498 Include the example python apps in the tarball.
2500 * python/examples/list-system-services.py
2502 Add a python new example that fetches the list of services
2503 from the system bus.
2505 2004-05-27 Seth Nickell <seth@gnome.org>
2508 * python/dbus_bindings.pyx.in:
2510 Fix failure to notify that a signal was not handled,
2511 resulted in hung functions.
2513 2004-05-25 Colin Walters <walters@redhat.com>
2515 * tools/dbus-monitor.c (main): Monitor all types of messages.
2517 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
2519 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
2520 which unregisters the object path and disposes the handler.
2522 2004-05-23 Kristian Høgsberg <krh@redhat.com>
2524 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
2526 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
2527 operands to && so we call dbus_message_iter_next () for the last
2530 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2532 * dbus/dbus-object-tree.c
2533 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
2534 children even if the requested path isn't registered.
2535 (object_tree_test_iteration): test object_tree_list_registered.
2537 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
2540 2004-05-20 Kristian Høgsberg <krh@redhat.com>
2542 * doc/TODO: Remove resolved items.
2544 * bus/expirelist.h (struct BusExpireList): remove unused n_items
2547 * bus/connection.c (bus_connections_expect_reply): Enforce the
2548 per-connection limit on pending replies.
2550 Patch from Jon Trowbridge <trow@ximian.com>:
2552 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
2553 up a watch that triggers a config reload when one end of the pipe
2555 (signal_handler): Instead of doing the config reload in our SIGHUP
2556 handler, just write to the reload pipe and let the associated
2557 watch handle the reload when control returns to the main loop.
2559 * bus/driver.c (bus_driver_handle_reload_config): Added.
2560 Implements a ReloadConfig method for requesting a configuration
2561 file reload via the bus driver.
2563 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
2565 * HACKING: Updated release instructions concerning the wiki page.
2567 2004-05-18 Kristian Høgsberg <krh@redhat.com>
2569 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
2570 filter against auth->allowed_mechs; we only add allowed mechs in
2571 record_mechanisms().
2573 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
2574 ALLOWED_MECHS to auth-script format so we can set the list of
2577 * data/auth/client-out-of-mechanisms.auth-script: New test to
2578 check client disconnects when it is out of mechanisms to try.
2580 * dbus/dbus-auth.c (process_command): Remove check for lines
2581 longer that 1 MB; we only buffer up maximum 16 kB.
2583 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2584 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
2585 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
2586 assume there might be unused bytes.
2588 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
2589 client-out-of-mechs, it is handled in process_reject(). Move check
2590 for max failures to send_rejected(), as it's a server-only thing.
2592 * dbus/dbus-auth.c: Factor out protocol reply code into functions
2593 send_auth(), send_data(), send_rejected(), send_error(),
2594 send_ok(), send_begin() and send_cancel().
2596 2004-05-17 Kristian Høgsberg <krh@redhat.com>
2598 Remove base64 encoding, replace with hex encoding. Original patch
2599 from trow@ximian.com, added error handling.
2601 * dbus/dbus-string.c (_dbus_string_base64_encode)
2602 (_dbus_string_base64_decode): Remove.
2603 (_dbus_string_hex_decode): Add end_return argument so we can
2604 distinguish between OOM and invalid hex encoding.
2605 (_dbus_string_test): Remove base64 tests and add test case for
2608 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
2609 Replace base64 with hex.
2611 * test/data/auth/invalid-hex-encoding.auth-script: New test case
2612 for invalid hex encoded data in auth protocol.
2614 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
2616 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
2619 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
2621 * mono/dbus-sharp.dll.config.in: Added for GAC
2622 * mono/dbus-sharp.snk: Added for GAC
2623 * mono/Assembly.cs.in: Added for GAC
2624 * mono/Makefile.am: Changes for GAC installation
2625 * configure.in: Added refs for dbus-sharp.dll.config.in and
2626 Assembly.cs.in. More fixes for mono testing
2627 * mono/example/Makefile.am: Changed var to CSC
2628 * Makefile.am: Changed flag name to DBUS_USE_CSC
2630 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
2632 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
2633 * mono/doc/*: Added documentation framework
2634 * configure.in: Added monodoc check
2635 * README: Added description of mono configure flags
2637 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
2639 * doc/dbus-specification.xml: Added a "Required" column to the
2640 header fields table and changed the "zero or more" verbage in
2641 the above paragraph to read "The header must contain the required
2642 named header fields and zero or more of the optional named header
2644 * test/data/invalid-messages/*.message: Added the required PATH
2645 named header field to the tests so that they don't fail on
2646 'Missing path field'
2648 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
2650 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
2651 the stack by implicitly defining variable and parameter types and
2652 removing the hack of defining C pointers as python objects and later
2655 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
2657 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
2659 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
2661 * mono/DBusType/Dict.cs: Handle empty dicts
2662 * mono/DBusType/Array.cs: Handle empty arrays
2663 * mono/Arguments.cs: Handle empty arguments
2665 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
2667 * dbus-sharp.pc.in: Modified to include include Libs and Requires
2670 2004-04-25 Kristian Høgsberg <krh@redhat.com>
2672 * test/data/valid-messages/standard-*.message: Update message
2673 test scripts to new header field names.
2675 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
2677 * test/break-loader.c (randomly_do_n_things): tracked down buffer
2678 overflow to times_we_did_each_thing array which would chop off the
2679 first character of the failure_dir string. Increased the size of
2680 the array to 7 to reflect the number of random mutation functions
2683 2004-04-21 Kristian Høgsberg <krh@redhat.com>
2685 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
2686 unix_server->watch here, it is unreffed in disconnect.
2687 (_dbus_server_new_for_tcp_socket): convert NULL host to
2688 "localhost" here so we don't append NULL to address.
2690 * dbus/dbus-server.c (_dbus_server_test): Add test case for
2691 various addresses, including tcp with no explicit host.
2693 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2695 * dbus/dbus-message.c (decode_header_data, decode_string_field):
2696 fix incorrect setting of .name_offset in the HeaderField (it was
2697 off by two bytes, positioned right after the name and typecode)
2699 * bus/bus.c (bus_context_new, bus_context_unref): test before
2700 calling dbus_server_free_data_slot and _dbus_user_database_unref
2701 in case of an error.
2703 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
2706 2004-04-19 Kristian Høgsberg <krh@redhat.com>
2708 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
2709 _dbus_poll() instead of select().
2711 2004-04-15 Jon Trowbridge <trow@ximian.com>
2713 * bus/main.c (signal_handler): Reload the configuration files
2715 (main): Set up our SIGHUP handler.
2717 * bus/bus.c (struct BusContext): Store the config file, user and
2718 fork flag in the BusContext.
2719 (process_config_first_time_only): Added. Contains the code
2720 (previously in bus_context_new) for setting up the BusContext from
2721 the BusConfigParser that should only be run the first time the
2722 config files are read.
2723 (process_config_every_time): Added. Contains the code (previously
2724 in bus_context_new) for setting up the BusContext from the
2725 BusConfigParser that should be run every time the config files are
2727 (load_config): Added. Builds a BusConfigParser from the config
2728 files and passes the resulting structure off to
2729 process_config_first_time_only (assuming this is the first time)
2730 and process_config_every_time.
2731 (bus_context_new): All of the config-related code has been moved
2732 to process_config_first_time_only and process_config_every_time.
2733 Now this function just does the non-config-related initializations
2734 and calls load_config.
2735 (bus_context_reload_config): Added.
2737 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
2739 * bus/driver.c (bus_driver_handle_get_service_owner):
2740 implement a GetServiceOwner method.
2741 * doc/dbus-specification.xml: document it.
2742 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
2744 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
2745 implement, using the bus GetServiceOwner method.
2747 * test/glib/test-dbus-glib.c:
2748 use dbus_gproxy_new_for_service_owner so that we can receive the
2751 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
2753 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2754 dbus/dbus-message.c, dbus/dbus-protocol.h
2755 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
2757 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2758 dbus/dbus-message.c, dbus/dbus-protocol.h
2759 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
2761 * dbus/dbus-internals.c (_dbus_header_field_to_string):
2762 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
2763 DBUS_HEADER_FIELD_SENDER resolves to "sender"
2765 * doc/dbus-specification.xml (Header Fields Table):
2766 s/SERVICE/DESTINATION
2767 s/SENDER_SERVICE/SENDER
2770 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
2772 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
2775 2004-04-13 Michael Meeks <michael@ximian.com>
2777 * glib/dbus-gobject.c (handle_introspect): split out
2778 (introspect_properties): this.
2779 (handle_introspect): implement this.
2781 * test/glib/Makefile.am: use the absolute path so the bus
2782 daemon's chdir ("/") doesn't kill us dead.
2784 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
2786 2004-04-12 Jon Trowbridge <trow@ximian.com>
2788 * bus/config-parser.c (struct BusConfigParser): Added
2789 included_files field.
2790 (seen_include): Added. Checks whether or not a file has already
2791 been included by any parent BusConfigParser.
2792 (bus_config_parser_new): Copy the parent's included_files.
2793 (include_file): Track which files have been included, and fail on
2794 circular inclusions.
2795 (process_test_valid_subdir): Changed printf to report if we are
2796 testing valid or invalid conf files.
2797 (all_are_equiv): Changed printf to be a bit clearer about
2798 what we are actually doing.
2799 (bus_config_parser_test): Test invalid configuration files.
2801 2004-04-09 Jon Trowbridge <trow@ximian.com>
2803 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
2804 argument. If non-null, the newly-constructed BusConfigParser will
2805 be initialized with the parent's BusLimits instead of the default
2807 (include_file): When including a config file, pass in
2808 the current parser as the parent and then copy the BusLimits
2809 from the included BusConfigParser pack to the current parser.
2810 (process_test_valid_subdir): Renamed from process_test_subdir.
2811 (process_test_equiv_subdir): Added. Walks through a directory,
2812 descending into each subdirectory and loading the config files
2813 it finds there. If any subdirectory contains two config files
2814 that don't produce identical BusConfigParser structs, fail.
2815 For now, the BusConfigParser's BusPolicies are not compared.
2816 (bus_config_parser_test): Call both process_test_valid_subdir and
2817 process_test_equiv_subdir.
2819 * bus/config-loader-libxml.c (bus_config_load): Take a parent
2820 argument and pass it along to the call to bus_config_parser_new.
2821 Also made a few small changes to allow this code to compile.
2823 * bus/config-loader-expat.c (bus_config_load): Take a parent
2824 argument and pass it along to the call to bus_config_parser_new.
2826 * bus/bus.c (bus_context_new): Load the config file
2827 with a NULL parent argument.
2829 2004-03-29 Michael Meeks <michael@ximian.com>
2831 * glib/dbus-gobject.c (introspect_properties): split
2832 out, fix mangled 'while' flow control.
2833 (introspect_signals): implement.
2834 (handle_introspect): update.
2836 2004-03-29 Michael Meeks <michael@ximian.com>
2838 * glib/dbus-gobject.c (set_object_property): split out /
2839 re-work, use the property type, and not the message type(!)
2840 (get_object_property): ditto.
2842 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
2843 (dbus_gvalue_marshal): make this code re-usable, needed
2844 for signals too, also on both proxy and server side.
2845 Re-write for more efficiency / readability.
2847 2004-03-29 Michael Meeks <michael@ximian.com>
2849 * dbus/dbus-message.c
2850 (dbus_message_new_error_printf): impl.
2852 * dbus/dbus-connection.c
2853 (dbus_connection_unregister_object_path): fix warning.
2855 * configure.in: fix no-mono-installed situation.
2857 2004-03-27 Havoc Pennington <hp@redhat.com>
2859 Patch from Timo Teräs:
2861 * tools/dbus-send.c (main): if --print-reply, assume type is
2862 method call; support boolean type args
2864 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
2865 bunch of memleak and logic bugs
2867 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
2869 * mono/Arguments.cs:
2870 * mono/Introspector.cs:
2872 * mono/InterfaceProxy.cs:
2874 * mono/ProxyBuilder.cs:
2876 Added InterfaceProxy class to avoid building proxies for every
2880 * dbus-message.c (dbus_message_append_args_valist)
2881 (dbus_message_iter_get_object_path)
2882 (dbus_message_iter_get_object_path_array)
2883 (dbus_message_iter_append_object_path)
2884 (dbus_message_iter_append_object_path_array):
2885 Added object_path iter functions to handle OBJECT_PATH arguments
2887 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
2889 First checkin of mono bindings.
2892 Build stuff for the bindings
2893 * dbus-sharp.pc.in: Added for pkgconfig
2895 2004-03-21 Havoc Pennington <hp@redhat.com>
2897 * test/test-service.c (main): remove debug spew
2899 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2901 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
2904 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
2905 (dbus_message_iter_init_array_iterator)
2906 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
2907 indicate whether the iterator is empty
2909 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
2912 2004-03-19 Havoc Pennington <hp@redhat.com>
2914 * NEWS: 0.21 updates
2916 * configure.in: 0.21
2918 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
2920 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
2921 you don't need pyrex to make dist
2923 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
2926 2004-03-18 Richard Hult <richard@imendio.com>
2928 * dbus/dbus-message.c (dbus_message_get_auto_activation)
2929 (dbus_message_set_auto_activation): Add doxygen docs.
2931 2004-03-16 Richard Hult <richard@imendio.com>
2933 * bus/activation.c: (bus_activation_service_created),
2934 (bus_activation_send_pending_auto_activation_messages),
2935 (bus_activation_activate_service):
2937 * bus/dispatch.c: (bus_dispatch),
2938 (check_nonexistent_service_auto_activation),
2939 (check_service_auto_activated),
2940 (check_segfault_service_auto_activation),
2941 (check_existent_service_auto_activation), (bus_dispatch_test):
2942 * bus/driver.c: (bus_driver_handle_activate_service):
2943 * bus/services.c: (bus_registry_acquire_service):
2944 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
2945 (dbus_message_get_auto_activation):
2946 * dbus/dbus-message.h:
2947 * dbus/dbus-protocol.h: Implement auto-activation.
2949 * doc/dbus-specification.xml: Add auto-activation to the spec.
2951 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
2953 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
2954 fix a bug with CUSTOM types.
2956 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
2957 a unit test for this bug (used to fail).
2959 2004-03-12 Mikael Hallendal <micke@imendio.com>
2962 (babysitter_watch_callback): notify all pending activations waiting for
2963 the same exec that the activation failed.
2964 (bus_activation_activate_service): shortcut the activation if we
2965 already waiting for the same executable to start up.
2967 2004-03-12 Mikael Hallendal <micke@imendio.com>
2970 - Added service file reloading.
2971 Each service files directory is kept in an hash table in
2972 BusActivation and each BusActivationEntry knows what .service-file it
2973 was read from. So when you try to activate a service the bus will
2974 check if it's been updated, removed or if new .service-files has
2976 - Test code at the bottom for the service file reloading.
2977 * bus/test-main.c: (main):
2979 - added service reloading test.
2980 * dbus/dbus-sysdeps.c:
2981 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
2983 2004-03-08 Michael Meeks <michael@ximian.com>
2985 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
2986 bail immediately if disconnected, to avoid busy loop.
2988 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
2989 cleanup cut/paste/inefficiency.
2991 2004-03-01 David Zeuthen <david@fubar.dk>
2993 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
2994 bug where args were used twice. This bug resulted in a segfault
2995 on a Debian/PPC system when starting the messagebus daemon. Include
2996 dbus-sysdeps.h for DBUS_VA_COPY
2998 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
3000 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
3001 appropriate va_copy implementation. From GLib
3003 2004-02-24 Joe Shaw <joe@ximian.com>
3005 * bus/services.c (bus_registry_acquire_service): We need to pass
3006 in the service name to dbus_set_error() to prevent a crash.
3008 2003-12-26 Anders Carlsson <andersca@gnome.org>
3010 * AUTHORS: Reveal my True identity.
3012 2003-12-17 Mikael Hallendal <micke@imendio.com>
3014 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3015 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
3017 2003-12-13 Mikael Hallendal <micke@imendio.com>
3019 * doc/TODO: Added not about better error check of configuration files.
3021 2003-12-02 Richard Hult <richard@imendio.com>
3023 * Update AFL version to 2.0 throughout the source files to reflect
3024 the update that was done a while ago.
3026 2003-12-02 Richard Hult <richard@imendio.com>
3028 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
3029 wrote_dict_key to FALSE on the iter that the dict is appended to,
3030 just like when appending other types. Fixes a bug where a dict
3031 couldn't be put inside a dict.
3032 (dbus_message_iter_append_dict_key): Fix typo in warning message.
3033 (message_iter_test, _dbus_message_test): Add test case for dict
3036 2003-12-01 David Zeuthen <david@fubar.dk>
3038 * python/dbus.py: Add the actual message when calling the reciever
3039 of a signal such that parameters can be inspected. Add the method
3040 remove_signal_receiver
3042 2003-11-26 Mikael Hallendal <micke@imendio.com>
3046 * glib/*.[ch]: Made ref functions return the pointer
3048 2003-11-25 Zack Rusin <zack@kde.org>
3050 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
3052 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
3055 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
3056 the Integrator and to better fit with the server,
3058 2003-11-24 Zack Rusin <zack@kde.org>
3060 * qt/connection.h, qt/connection.cpp: removing initDbus method since
3061 the integrator handles it now
3063 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
3064 since QTimer wasn't really meant to be used the way DBusTimeout is
3066 2003-11-24 Zack Rusin <zack@kde.org>
3068 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
3069 Integrator class which integrates D-BUS with the Qt event loop,
3071 * qt/connection.h, qt/connection.cpp: Move all the code which
3072 was dealing with D-BUS integration to the Integrator class,
3073 and start using Integrator,
3075 2003-11-23 Zack Rusin <zack@kde.org>
3077 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
3080 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
3081 switching namespaces to DBusQt, reworking the class,
3083 * Makefile.cvs: switching dependencies so that it matches KDE
3086 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
3089 2003-11-19 Havoc Pennington <hp@redhat.com>
3093 * configure.in: bump version to 0.20
3095 * configure.in (have_qt): add yet another place to look for qt
3096 (someone hand trolltech a .pc file...)
3098 2003-11-01 Havoc Pennington <hp@redhat.com>
3100 * doc/dbus-specification.xml: add state machine docs on the auth
3101 protocol; just a first draft, I'm sure it's wrong.
3103 2003-10-28 David Zeuthen <david@fubar.dk>
3105 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
3106 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
3108 2003-10-28 Havoc Pennington <hp@redhat.com>
3110 * dbus/dbus-message.c (get_next_field): delete unused function
3112 2003-10-28 Havoc Pennington <hp@redhat.com>
3114 * bus/expirelist.c (do_expiration_with_current_time): detect
3115 failure of the expire_func due to OOM
3117 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
3119 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
3120 NoReply error that's now created by the bus when the service exits
3122 2003-10-28 Havoc Pennington <hp@redhat.com>
3124 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
3125 tests for set_path, set_interface, set_member, etc.
3127 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
3129 * dbus/dbus-message.c (set_string_field): always just delete and
3130 re-append the field; accept NULL for deletion
3131 (re_align_fields_recurse): reimplement
3133 2003-10-26 Havoc Pennington <hp@redhat.com>
3135 * dbus/dbus-connection.c: fix docs to properly describe the
3136 disconnected message
3137 (_dbus_connection_notify_disconnected): remove this function;
3138 we can't synchronously add the disconnected message, we have to
3139 do it after we've queued any remaining real messages
3140 (_dbus_connection_get_dispatch_status_unlocked): queue the
3141 disconnect message only if the transport has finished queueing all
3142 its real messages and is disconnected.
3143 (dbus_connection_disconnect): update the dispatch status here
3145 2003-10-22 Havoc Pennington <hp@redhat.com>
3147 * bus/bus.c (bus_context_check_security_policy): fix up assertion
3149 * bus/connection.c (bus_transaction_send_from_driver): set the
3150 destination to the connection's base service
3152 2003-10-20 Havoc Pennington <hp@redhat.com>
3154 hmm, make check is currently not passing.
3156 * doc/dbus-specification.xml: add requirement that custom type
3157 names follow the same rules as interface names.
3159 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
3160 duplication and allow 'c' to be 'custom'; dict is now 'm' for
3163 * doc/dbus-specification.xml: update type codes to match
3164 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
3165 CUSTOM. Add type OBJECT_PATH to the spec.
3167 2003-10-17 Havoc Pennington <hp@redhat.com>
3169 * bus/driver.c (create_unique_client_name): use "." as separator
3170 in base service names instead of '-'
3172 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
3173 byte at the end of the string
3175 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
3176 optimization macros since string validation seems to be a slow
3179 * doc/dbus-specification.xml: restrict valid
3180 service/interface/member/error names. Add test suite code for the
3183 * dbus/dbus-string.c: limit service/interface/member/error names
3186 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
3187 format arg to verbose spew
3189 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
3190 memory, return instead of g_error
3192 * test/test-service.c (path_message_func): support emitting a
3195 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
3196 activation bus type if DBUS_BUS_ACTIVATION was set; default to
3197 assuming the activation bus was the session bus so that services
3198 started manually will still register.
3199 (init_connections_unlocked): fix so that in OOM situation we get
3200 the same semantics when retrying the function
3202 * test/test-service.c (main): change to use path registration, to
3203 test those codepaths; register with DBUS_BUS_ACTIVATION rather
3204 than DBUS_BUS_SESSION
3206 2003-10-16 Havoc Pennington <hp@redhat.com>
3208 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
3210 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
3211 coverage of the tests
3212 (coverage-report.txt): don't move the .da and .bbg files around
3214 2003-10-16 Havoc Pennington <hp@redhat.com>
3216 * bus/bus.c (struct BusContext): remove struct field I didn't mean
3219 2003-10-16 Havoc Pennington <hp@redhat.com>
3221 * bus/connection.c (bus_pending_reply_expired): either cancel or
3223 (bus_connections_check_reply): use unlink, not remove_link, as we
3224 don't want to free the link; fixes double free mess
3226 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
3227 where no reply was received
3229 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
3232 * bus/signals.c (match_rule_matches): add special cases for the
3233 bus driver, so you can match on sender/destination for it.
3235 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
3236 DBUS_PRINT_BACKTRACE is set
3238 * dbus/dbus-internals.c: add pid to assertion failure messages
3240 * dbus/dbus-connection.c: add message type code to the debug spew
3242 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
3243 sender=foo not service=foo
3245 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
3246 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
3247 DBUS_ACTIVATION_ADDRESS instead
3249 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
3250 DBUS_SYSTEM_BUS_ADDRESS if appropriate
3252 * bus/bus.c (bus_context_new): handle OOM copying bus type into
3255 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
3256 (dbus_message_iter_get_object_path_array): new function (half
3257 finished, disabled for the moment)
3259 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
3260 DBUS_MESSAGE_TYPE_ERROR
3262 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
3263 avoid redirecting stderr to /dev/null
3264 (babysit): close stdin if not doing the "exit_with_session" thing
3266 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
3267 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
3268 stdout/stdin, so things don't get confused
3270 * bus/system.conf.in: fix to allow replies, I modified .conf
3271 instead of .conf.in again.
3273 2003-10-14 David Zeuthen <david@fubar.dk>
3275 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
3276 argtype to arg_type when raising unknown arg type exception.
3277 Changed type list to reflect the changes in dbus-protocol.h so
3278 the bindings actually work.
3280 2003-10-14 Havoc Pennington <hp@redhat.com>
3282 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
3283 to have a bug keeping it from outputting the .da files sometimes
3284 (string_get_string): don't append garbage nul bytes to the string.
3286 2003-10-15 Seth Nickell <seth@gnome.org>
3288 * python/Makefile.am:
3290 Include dbus_h_wrapper.h in the dist tarball.
3292 2003-10-14 Havoc Pennington <hp@redhat.com>
3294 * bus/bus.c (bus_context_check_security_policy): revamp this to
3295 work more sanely with new policy-based requested reply setup
3297 * bus/connection.c (bus_transaction_send_from_driver): set bus
3298 driver messages as no reply
3300 * bus/policy.c (bus_client_policy_check_can_receive): handle a
3301 requested_reply attribute on allow/deny rules
3303 * bus/system.conf: add <allow requested_reply="true"/>
3305 * bus/driver.c (bus_driver_handle_message): fix check for replies
3306 sent to the bus driver, which was backward. How did this ever work
3307 at all though? I think I'm missing something.
3309 * dbus/dbus-message.c (decode_header_data): require error and
3310 method return messages to have a reply serial field to be valid
3311 (_dbus_message_loader_queue_messages): break up this function;
3312 validate that reply serial and plain serial are nonzero;
3313 clean up the OOM/error handling.
3314 (get_uint_field): don't return -1 from this
3315 (dbus_message_create_header): fix signed/unsigned bug
3317 * bus/connection.c (bus_connections_expect_reply): save serial of
3318 the incoming message, not reply serial
3320 2003-10-14 Havoc Pennington <hp@redhat.com>
3322 * bus/connection.c: implement pending reply tracking using
3325 * bus/bus.c (bus_context_check_security_policy): verify that a
3326 reply is pending in order to allow a reply to be sent. Deny
3327 messages of unknown type.
3329 * bus/dbus-daemon-1.1.in: update to mention new resource limits
3331 * bus/bus.c (bus_context_get_max_replies_per_connection): new
3332 (bus_context_get_reply_timeout): new
3334 2003-10-13 Seth Nickell <seth@gnome.org>
3336 * python/Makefile.am:
3338 Pass "make distcheck": remove a couple files from DIST_FILES
3339 that weren't included in the final version.
3341 2003-10-12 Havoc Pennington <hp@pobox.com>
3343 Added test code that 1) starts an actual bus daemon and 2) uses
3344 DBusGProxy; fixed bugs that were revealed by the test. Lots
3345 more testing possible, but this is the basic framework.
3347 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
3348 empty proxy lists from the proxy list hash
3350 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
3351 couple of return_if_fail checks
3353 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
3354 to allocate, so everything is cleared to NULL as it should be.
3356 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
3357 source as data to dbus_connection_set_timeout_functions() as the
3358 timeout functions expected
3360 * test/glib/run-test.sh: add a little script to start up a message
3361 bus and run tests using it
3363 * tools/dbus-launch.1: updates
3365 * tools/dbus-launch.c (main): add --config-file option
3367 * tools/dbus-launch.c (main): remove confusing else if (runprog)
3368 that could never be reached.
3370 * dbus/dbus-message.c (dbus_message_new_method_return)
3371 (dbus_message_new_error, dbus_message_new_signal): set the
3372 no-reply-expected flag on all these. Redundant, but may
3373 as well be consistent.
3375 2003-10-11 Havoc Pennington <hp@pobox.com>
3377 * test/decode-gcov.c (function_solve_graph): make broken block
3378 graph a nonfatal error since it seems to be broken. Need to debug
3381 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
3382 can't just check type > INVALID < LAST anymore
3384 * dbus/dbus-message.c (dbus_message_get_signature): new function
3385 (dbus_message_has_signature): new function
3386 (struct DBusMessage): add signature field (right now it isn't sent
3387 over the wire, just generated on the fly)
3388 (dbus_message_copy): copy the signature, and init strings to
3389 proper length to avoid some reallocs
3390 (dbus_message_iter_init_array_iterator): return void, since it
3392 (dbus_message_iter_init_dict_iterator): return void since it can't fail
3393 (_dbus_message_loader_queue_messages): add silly temporary hack to
3394 fill in message->signature on load
3396 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
3397 characters, so they are relatively human-readable.
3399 2003-10-11 Havoc Pennington <hp@pobox.com>
3401 * dbus/dbus-message.c (_dbus_message_test): add more test
3402 coverage, but #if 0 for now since they uncover a bug
3403 not fixed yet; I think in re_align_field_recurse()
3404 (re_align_field_recurse): add FIXME about broken assertion
3406 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
3408 * bus/connection.c: share a couple code bits with expirelist.c
3410 * bus/expirelist.h, bus/expirelist.c: implement a generic
3411 expire-items-after-N-seconds facility, was going to share between
3412 expiring connections and replies, decided not to use for expiring
3413 connections for now.
3415 * COPYING: include AFL 2.0 (still need to change all the file headers)
3417 2003-10-09 Havoc Pennington <hp@redhat.com>
3419 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
3420 gcc 3.3. Not that we do anything about it yet.
3422 * bus/signals.c (bus_match_rule_parse): impose max length on the
3425 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
3427 2003-10-09 Havoc Pennington <hp@redhat.com>
3429 Make matching rules theoretically work (add parser).
3431 * bus/bus.c (bus_context_check_security_policy): fix up to handle
3432 the case where destination is explicitly specified as bus driver
3433 and someone else is eavesdropping.
3435 * bus/policy.c (bus_client_policy_check_can_receive): fix up
3436 definition of eavesdropping and assertion
3438 * tools/dbus-send.c (main): use dbus_message_type_from_string
3440 * bus/signals.c (bus_match_rule_parse): implement
3442 * dbus/dbus-message.c (dbus_message_type_from_string): new
3444 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
3446 2003-10-02 Havoc Pennington <hp@pobox.com>
3448 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
3449 dbus_gproxy_oneway_call
3451 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
3452 (dbus_server_setup_with_g_main): fix to allow calling them more
3453 than once on the same args
3454 (dbus_bus_get_with_g_main): new function
3456 2003-10-02 Havoc Pennington <hp@redhat.com>
3458 * doc/dbus-tutorial.xml: write some stuff
3460 2003-09-29 Havoc Pennington <hp@pobox.com>
3462 * configure.in: split checks for Doxygen from XML docs, check for
3465 * doc/Makefile.am: XML-ify all the docs, and add a blank
3468 2003-09-29 Havoc Pennington <hp@pobox.com>
3470 * Merge dbus-object-names branch. To see the entire patch
3471 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
3472 it's huuuuge though.
3473 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
3475 2003-09-28 Havoc Pennington <hp@pobox.com>
3477 * HACKING: update to reflect new server
3479 2003-09-26 Seth Nickell <seth@gnome.org>
3482 * python/examples/example-signals.py:
3484 Start implementing some notions of signals. The API
3485 is really terrible, but they sort of work (with the
3486 exception of being able to filter by service, and to
3487 transmit signals *as* a particular service). Need to
3488 figure out how to make messages come from the service
3491 * python/dbus_bindings.pyx.in:
3493 Removed duplicate message_handler callbacks.
3495 2003-09-25 Havoc Pennington <hp@redhat.com>
3497 * bus/session.conf.in: fix my mess
3499 2003-09-25 Havoc Pennington <hp@pobox.com>
3501 * bus/session.conf.in: fix security policy, reported by Seth Nickell
3503 2003-09-25 Seth Nickell <seth@gnome.org>
3505 * python/examples/example-service.py:
3507 Johan notices complete wrong code in example-service, but
3508 completely wrong in a way that works exactly the same (!).
3509 Johan is confused, how could this possibly work? Example
3510 code fails to serve purpose of making things clear.
3513 2003-09-25 Mark McLoughlin <mark@skynet.ie>
3515 * doc/dbus-specification.sgml: don't require header fields
3516 to be 4-byte aligned and specify that fields should be
3517 distinguished from padding by the fact that zero is not
3520 * doc/TODO: remove re-alignment item and add item to doc
3521 the OBJECT_PATH type.
3523 * dbus/dbus-message.c:
3524 (HeaderField): rename the original member to value_offset
3525 and introduce a name_offset member to keep track of where
3526 the field actually begins.
3527 (adjust_field_offsets): remove.
3528 (append_int_field), (append_uint_field),
3529 (append_string_field): don't align the start of the header
3530 field to a 4-byte boundary.
3531 (get_next_field): impl finding the next marhsalled field
3532 after a given field.
3533 (re_align_field_recurse): impl re-aligning a number of
3534 already marshalled fields.
3535 (delete_field): impl deleting a field of any type and
3536 re-aligning any following fields.
3537 (delete_int_or_uint_field), (delete_string_field): remove.
3538 (set_int_field), (set_uint_field): no need to re-check
3539 that we have the correct type for the field.
3540 (set_string_field): ditto and impl re-aligning any
3542 (decode_header_data): update to take into account that
3543 the fields aren't 4-byte aligned any more and the new
3544 way to distinguish padding from header fields. Also,
3545 don't exit when there is too much header padding.
3546 (process_test_subdir): print the directory.
3547 (_dbus_message_test): add test to make sure a following
3548 field is re-aligned correctly after field deletion.
3550 * dbus/dbus-string.[ch]:
3551 (_dbus_string_insert_bytes): rename from insert_byte and
3552 allow the insert of multiple bytes.
3553 (_dbus_string_test): test inserting multiple bytes.
3555 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
3556 warning note to docs about having to re-align any
3557 marshalled values following the string.
3559 * dbus/dbus-message-builder.c:
3560 (append_string_field), (_dbus_message_data_load):
3561 don't align the header field.
3563 * dbus/dbus-auth.c: (process_test_subdir): print the
3566 * test/break-loader.c: (randomly_add_one_byte): upd. for
3569 * test/data/invalid-messages/bad-header-field-alignment.message:
3572 * test/data/valid-messages/unknown-header-field.message: shove
3573 a dict in the unknown field.
3575 2003-09-25 Seth Nickell <seth@gnome.org>
3578 * python/dbus_bindings.pyx.in:
3580 Handle return values.
3582 * python/examples/example-client.py:
3583 * python/examples/example-service.py:
3585 Pass back return values from the service to the client.
3587 2003-09-24 Seth Nickell <seth@gnome.org>
3591 Connect Object methods (when you are sharing an object) up... pass
3592 in a list of methods to be shared. Sharing all the methods just
3593 worked out too weird. You can now create nice Services over the
3596 * python/dbus_bindings.pyx.in:
3598 Keep references to user_data tuples passed into C functions so
3599 Python doesn't garbage collect on us.
3601 Implement MethodReturn and Error subclasses of Message for creating
3602 DBusMessage's of those types.
3604 * python/examples/example-client.py:
3605 * python/examples/example-service.py:
3607 Simple example code showing both how create DBus services and objects,
3608 and how to use them.
3610 2003-09-23 Havoc Pennington <hp@pobox.com>
3612 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
3614 2003-09-23 Havoc Pennington <hp@redhat.com>
3616 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
3617 (dbus_gproxy_disconnect_signal): implement
3618 (dbus_gproxy_manager_remove_signal_match): implement
3619 (dbus_gproxy_manager_add_signal_match): implement
3620 (dbus_gproxy_oneway_call): implement
3622 2003-09-23 Havoc Pennington <hp@pobox.com>
3624 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
3625 subclass. This means dropping the transparent thread safety of the
3626 proxy; you now need a separate proxy per-thread, or your own
3627 locking on the proxy. Probably right anyway.
3628 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
3630 2003-09-22 Havoc Pennington <hp@redhat.com>
3632 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
3634 2003-09-21 Seth Nickell <seth@gnome.org>
3636 First checkin of the Python bindings.
3638 * python/.cvsignore:
3639 * python/Makefile.am:
3640 * python/dbus_bindings.pyx.in:
3641 * python/dbus_h_wrapper.h:
3643 Pieces for Pyrex to operate on, building a dbus_bindings.so
3644 python module for low-level access to the DBus APIs.
3648 High-level Python module for accessing DBus objects.
3653 Build stuff for the python bindings.
3657 Extra macro needed for finding the Python C header files.
3659 2003-09-21 Havoc Pennington <hp@pobox.com>
3661 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
3662 implementing the proxy manager, didn't get very far.
3664 * dbus/dbus-bus.c (dbus_bus_add_match): new
3665 (dbus_bus_remove_match): new
3667 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
3668 path_name argument; adjust the other not-yet-implemented
3669 gproxy constructors to be what I think they should be.
3671 2003-09-21 Havoc Pennington <hp@pobox.com>
3673 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
3674 by default for message bus connections.
3676 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
3677 exit_on_disconnect flag is set and we process the disconnected
3679 (dbus_connection_set_exit_on_disconnect): new function
3681 2003-09-21 Havoc Pennington <hp@pobox.com>
3683 Get matching rules mostly working in the bus; only actually
3684 parsing the rule text remains. However, the client side of
3685 "signal connections" hasn't been started, this patch is only the
3688 * dbus/dispatch.c: fix for the matching rules changes
3690 * bus/driver.c (bus_driver_handle_remove_match)
3691 (bus_driver_handle_add_match): send an ack reply from these
3694 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
3695 arguments, reported by Seth Nickell
3697 * bus/config-parser.c (append_rule_from_element): support
3698 eavesdrop=true|false attribute on policies so match rules
3699 can be prevented from snooping on the system bus.
3701 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
3702 and "destination" in attribute names; fix some docs bugs;
3703 add eavesdrop=true|false attribute
3705 * bus/driver.c (bus_driver_handle_add_match)
3706 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
3709 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
3710 rid of broadcast service concept, signals are just always broadcast
3712 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
3713 mostly implement matching rules stuff (currently only exposed as signal
3716 2003-09-21 Mark McLoughlin <mark@skynet.ie>
3718 * doc/dbus-specification.sgml: Change the header field name
3719 to be an enum and update the rest of the spec to reference
3720 the fields using the conventinal name.
3722 * dbus/dbus-protocol.h: update to reflect the spec.
3724 * doc/TODO: add item to remove the 4 byte alignment requirement.
3726 * dbus/dbus-message.c: Remove the code to generalise the
3727 header/body length and serial number header fields as named
3728 header fields so we can reference field names using the
3730 (append_int_field), (append_uint_field), (append_string_field):
3731 Append the field name as a byte rather than four chars.
3732 (delete_int_or_uint_field), (delete_string_field): reflect the
3733 fact that the field name and typecode now occupy 4 bytes instead
3735 (decode_string_field), (decode_header_data): update to reflect
3736 protocol changes and move the field specific encoding from
3737 decode_string_field() back into decode_header_data().
3739 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
3740 Add utility to aid debugging.
3742 * dbus/dbus-message-builder.c:
3743 (append_string_field), (_dbus_message_data_load): Update to
3744 reflect protocol changes; Change the FIELD_NAME directive
3745 to HEADER_FIELD and allow it to take the field's conventional
3746 name rather than the actual value.
3748 * test/data/*/*.message: Update to use HEADER_FIELD instead
3749 of FIELD_NAME; Always align the header on an 8 byte boundary
3750 *before* updating the header length.
3752 2003-09-15 Havoc Pennington <hp@pobox.com>
3754 * dbus/dbus-pending-call.c: add the get/set object data
3755 boilerplate as for DBusConnection, etc. Use generic object data
3756 for the notify callback.
3758 * glib/dbus-gparser.c (parse_node): parse child nodes
3760 * tools/dbus-viewer.c: more hacking on the dbus-viewer
3762 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
3763 contain functions shared between the convenience lib and the
3766 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
3767 -export-symbols-regex to the GLib library
3769 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
3770 fix the locking in here, and add a default handler for
3771 Introspect() that just returns sub-nodes.
3773 2003-09-14 Havoc Pennington <hp@pobox.com>
3775 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
3776 rather than gfoo consistent
3778 * glib/dbus-gproxy.h: delete for now, move contents to
3779 dbus-glib.h, because the include files don't work right since we
3780 aren't in the dbus/ subdir.
3782 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
3783 (dbus_gproxy_end_call): finish
3784 (dbus_gproxy_begin_call): finish
3786 * glib/dbus-gmain.c (dbus_set_g_error): new
3788 * glib/dbus-gobject.c (handle_introspect): include information
3789 about child nodes in the introspection
3791 * dbus/dbus-connection.c (dbus_connection_list_registered): new
3792 function to help in implementation of introspection
3794 * dbus/dbus-object-tree.c
3795 (_dbus_object_tree_list_registered_and_unlock): new function
3797 2003-09-12 Havoc Pennington <hp@pobox.com>
3799 * glib/dbus-gidl.h: add common base class for all the foo_info
3802 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
3805 * test/Makefile.am: try test srcdir -ef . in addition to test
3806 srcdir = ., one of them should work (yeah lame)
3808 * glib/Makefile.am: build the "idl" parser stuff as a convenience
3811 * glib/dbus-gparser.h: make description_load routines return
3812 NodeInfo* not Parser*
3814 * Makefile.am (SUBDIRS): build test dir after all library dirs
3816 * configure.in: add GTK+ detection
3818 2003-09-07 Havoc Pennington <hp@pobox.com>
3820 * Make Doxygen contented.
3822 2003-09-07 Havoc Pennington <hp@pobox.com>
3824 * doc/dbus-specification.sgml: more updates
3826 2003-09-06 Havoc Pennington <hp@pobox.com>
3828 * doc/dbus-specification.sgml: partial updates
3830 * bus/dbus-daemon-1.1.in: fix the config file docs for the
3831 zillionth time; hopefully I edited the right file this time.
3833 * bus/config-parser.c (append_rule_from_element): support
3834 send_type, send_path, receive_type, receive_path
3836 * bus/policy.c: add message type and path to the list of things
3837 that can be "firewalled"
3839 2003-09-06 Havoc Pennington <hp@pobox.com>
3841 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
3842 (dbus_connection_register_object_path): make this not handle
3843 messages to paths below the given path
3845 2003-09-03 Havoc Pennington <hp@pobox.com>
3847 * test/glib/Makefile.am: add this with random glib-linked test
3850 * glib/Makefile.am: remove the random test programs from here,
3851 leave only the unit tests
3853 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
3854 uscore/javacaps conversion, and fix
3855 (get_object_property, set_object_property): change to .NET
3856 convention for mapping props to methods, set_FooBar/get_FooBar,
3857 since one language has such a convention we may as well copy it.
3858 Plus real methods in either getFooBar or get_foo_bar style won't
3859 collide with this convention.
3861 2003-09-01 Havoc Pennington <hp@pobox.com>
3863 * glib/dbus-gparser.c: implement
3865 * glib/dbus-gobject.c: start implementing skeletons support
3867 * configure.in: when disabling checks/assert, also define
3868 G_DISABLE_ASSERT and G_DISABLE_CHECKS
3870 2003-09-01 Havoc Pennington <hp@pobox.com>
3872 * glib/Makefile.am: rearrange a bunch of files and get "make
3873 check" framework set up
3875 2003-08-31 Havoc Pennington <hp@pobox.com>
3877 * fix build with --disable-tests
3879 2003-08-30 Havoc Pennington <hp@pobox.com>
3881 * dbus/dbus-connection.c: purge DBusMessageHandler
3883 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
3884 use callbacks everywhere
3886 2003-08-30 Havoc Pennington <hp@pobox.com>
3888 * test/data/valid-config-files/system.d/test.conf: change to
3889 root for the user so warnings don't get printed
3891 * dbus/dbus-message.c: add dbus_message_get_path,
3892 dbus_message_set_path
3894 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
3895 dispatching to a path
3897 * dbus/dbus-string.c (_dbus_string_validate_path): add
3899 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
3900 (_dbus_marshal_object_path): implement
3902 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
3903 to contain the path to the target object
3904 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
3905 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
3907 2003-08-30 Havoc Pennington <hp@pobox.com>
3909 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
3911 2003-08-29 Havoc Pennington <hp@pobox.com>
3913 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
3915 (struct DBusObjectSubtree): shrink this
3916 a lot, since we may have a lot of them
3917 (_dbus_object_tree_free_all_unlocked): implement
3918 (_dbus_object_tree_dispatch_and_unlock): implement
3920 2003-08-29 Havoc Pennington <hp@pobox.com>
3922 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
3924 2003-08-28 Havoc Pennington <hp@pobox.com>
3928 * dbus/dbus-connection.c: port to no ObjectID, create a
3929 DBusObjectTree, rename ObjectTree to ObjectPath in public API
3931 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
3932 everything except UnregisterFunction and MessageFunction
3934 * dbus/dbus-marshal.c: port away from DBusObjectID,
3935 add DBUS_TYPE_OBJECT_PATH
3937 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
3938 dbus/dbus-objectid.[hc]: remove these, we are moving to
3939 path-based object IDs
3941 2003-08-25 Havoc Pennington <hp@pobox.com>
3943 Just noticed that dbus_message_test is hosed, I wonder when I
3944 broke that. I thought make check was passing earlier...
3946 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
3947 container tree, will replace most of dbus-object-registry
3949 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
3952 2003-08-19 Havoc Pennington <hp@pobox.com>
3954 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
3955 (dbus_message_is_error): fix this function
3957 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
3960 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
3961 reflect clarified man page
3962 (bus_client_policy_check_can_send): ditto
3964 * bus/session.conf.in: fixup
3966 * bus/system.conf.in: fixup
3968 2003-08-18 Havoc Pennington <hp@redhat.com>
3970 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
3972 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3973 dumb bug created earlier (wrong order of args to
3974 decode_header_data())
3976 * tools/dbus-send.c: port
3978 * tools/dbus-print-message.c (print_message): port
3980 * test/data/*messages: port all messages over
3982 * dbus/dbus-message-builder.c: support including
3985 * bus/driver.c: port over
3987 * bus/dispatch.c: port over to new stuff
3989 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3990 rename disconnect signal to "Disconnected"
3992 2003-08-17 Havoc Pennington <hp@pobox.com>
3994 This doesn't compile yet, but syncing up so I can hack on it from
3995 work. What are branches for if not broken code? ;-)
3997 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
3998 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
3999 DBUS_HEADER_FIELD_ERROR_NAME
4001 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
4002 for the interface+member pairs
4003 (string_hash): change to use g_str_hash algorithm
4004 (find_direct_function, find_string_function): refactor these to
4007 * dbus/dbus-message.c: port all of this over to support
4008 interface/member fields instead of name field
4010 * dbus/dbus-object-registry.c: port over
4012 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
4013 from _dbus_string_validate_name
4015 * bus/dbus-daemon-1.1: change file format for the
4016 <deny>/<allow> stuff to match new message naming scheme
4018 * bus/policy.c: port over
4020 * bus/config-parser.c: parse new format
4022 2003-08-16 Havoc Pennington <hp@pobox.com>
4024 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
4027 * glib/dbus-gproxy.c: some hacking
4029 2003-08-15 Havoc Pennington <hp@redhat.com>
4031 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
4033 * dbus/dbus-connection.c
4034 (dbus_connection_send_with_reply_and_block): factor out internals;
4035 change to convert any error replies to DBusError instead of
4036 returning them as a message
4038 2003-08-15 Havoc Pennington <hp@pobox.com>
4040 * dbus/dbus-connection.c,
4041 dbus/dbus-pending-call.c: Finish the pending call stuff
4043 2003-08-14 Havoc Pennington <hp@redhat.com>
4045 * dbus/dbus-pending-call.c: start on new object that will replace
4046 DBusMessageHandler and ReplyHandlerData for tracking outstanding
4049 * dbus/dbus-gproxy.c: start on proxy object used to communicate
4050 with remote interfaces
4052 * dbus/dbus-gidl.c: do the boring boilerplate in here
4054 2003-08-12 Havoc Pennington <hp@pobox.com>
4056 * bus/dispatch.c (bus_dispatch): make this return proper
4057 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
4059 * dbus/dbus-errors.c (dbus_set_error): use
4060 _dbus_string_append_printf_valist
4062 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
4063 (_dbus_string_append_printf): new
4065 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
4068 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
4069 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
4070 message is unhandled.
4072 2003-08-11 Havoc Pennington <hp@pobox.com>
4074 * bus/test.c (client_disconnect_handler): change to return
4075 HANDLED (would have been REMOVE_MESSAGE)
4077 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
4078 HANDLED/NOT_YET_HANDLED instead of
4079 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
4082 2003-08-10 Havoc Pennington <hp@pobox.com>
4084 * tools/dbus-send.c (main): add --type argument, for now
4085 supporting only method_call and signal types.
4087 * tools/dbus-print-message.c: print message type
4089 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4090 init connection->objects
4092 * doc/dbus-specification.sgml: fix sgml
4094 * bus/*.c: port over to object-instance API changes
4096 * test/test-service.c: ditto
4098 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
4099 name, we will have to fix up the rest of the code to also handle
4101 (dbus_message_new): generic message-creation call
4102 (set_string_field): allow appending name field
4104 2003-08-06 Havoc Pennington <hp@pobox.com>
4106 * dbus/dbus-object-registry.c: implement signal connection
4109 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
4111 * dbus/dbus-internals.c (_dbus_memdup): new function
4113 2003-08-02 Havoc Pennington <hp@pobox.com>
4115 * dbus/dbus-message.c (dbus_message_get_no_reply)
4116 (dbus_message_set_no_reply): add these and remove
4117 set_is_error/get_is_error
4119 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
4120 remove the ERROR flag, since there's now an ERROR type
4122 2003-08-01 Havoc Pennington <hp@pobox.com>
4124 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
4127 * dbus/dbus-message.c (dbus_message_get_type): new function
4129 * doc/dbus-specification.sgml: add "type" byte to messages
4131 2003-08-01 Havoc Pennington <hp@pobox.com>
4133 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
4134 a message type enum to distinguish kinds of message
4135 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
4136 that need not be replied to
4138 2003-08-01 Havoc Pennington <hp@pobox.com>
4140 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
4141 (unpack_8_octets): fix no-64-bit-int bug
4143 * dbus/dbus-object-registry.c (validate_id): validate the
4144 connection ID bits, not just the instance ID.
4146 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
4147 the connection-global 33 bits of the object ID
4149 * dbus/dbus-object-registry.c (info_from_entry): fill in
4150 object ID in the new way
4152 * dbus/dbus-objectid.h: rather than high/low bits, specifically
4153 define server/client/instance bits.
4155 2003-07-30 Havoc Pennington <hp@pobox.com>
4157 * dbus/dbus-connection.c (dbus_connection_register_object): fix
4160 2003-07-13 Havoc Pennington <hp@pobox.com>
4162 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
4163 fields to DBusObjectVTable and DBusObjectInfo
4165 2003-07-12 Havoc Pennington <hp@pobox.com>
4167 * dbus/dbus-object-registry.c: implement unit test,
4168 fix bugs discovered in process
4170 * dbus/dbus-connection.c: remove handler_table and
4171 register_handler(), add DBusObjectRegistry usage
4173 * dbus/dbus-objectid.c (dbus_object_id_is_null)
4174 (dbus_object_id_set_null): new functions
4176 2003-07-08 Havoc Pennington <hp@pobox.com>
4178 * dbus/dbus-object.c: implement some of this
4180 * dbus/dbus-object-registry.c
4181 (_dbus_object_registry_add_and_unlock): fill in the object_id out
4183 (_dbus_object_registry_new): handle OOM
4185 2003-07-08 Havoc Pennington <hp@pobox.com>
4187 * dbus/dbus-object.h: sketch out an API for registering objects
4188 with a connection, that allows us to use as little as 24 bytes
4189 per object and lets application code represent an object in
4190 any conceivable way.
4192 * dbus/dbus-object-registry.c: implement the hard bits of the
4193 DBusConnection aspect of object API. Not yet wired up.
4195 2003-07-06 Havoc Pennington <hp@pobox.com>
4197 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
4198 (_dbus_marshal_object_id): new
4199 (_dbus_demarshal_object_id): new
4200 (_dbus_marshal_get_arg_end_pos): support object ID type, and
4201 consolidate identical switch cases. Don't conditionalize handling
4202 of DBUS_TYPE_UINT64, need to handle the type always.
4203 (_dbus_marshal_validate_arg): consolidate identical cases, and
4204 handle DBUS_TYPE_OBJECT_ID
4206 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
4208 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
4210 2003-09-28 Havoc Pennington <hp@pobox.com>
4214 2003-09-28 Havoc Pennington <hp@pobox.com>
4216 * doc/Makefile.am (dbus-specification.html): testing a funky hack
4217 to work with Debian db2html
4219 2003-09-28 Havoc Pennington <hp@pobox.com>
4221 * configure.in: 0.13
4223 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
4224 stylesheet-images for benefit of Debian
4226 Change back to using filesystem-linked sockets for the system
4227 bus, so only root can create the default system bus address.
4229 * bus/system.conf.in: change to use
4230 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4232 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
4235 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4236 here, and AC_DEFINE DBUS_SYSTEM_PATH
4238 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4241 * doc/busconfig.dtd:
4244 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4246 * doc/dbus-specification.sgml:
4247 Add activation reply values.
4249 2003-08-05 Havoc Pennington <hp@redhat.com>
4251 * configure.in: 0.12
4253 2003-08-05 Anders Carlsson <andersca@codefactory.se>
4255 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
4256 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
4257 (add_watch), (remove_watch), (create_source):
4258 Refcount fds, fixes some reentrancy issues.
4260 2003-07-30 Havoc Pennington <hp@redhat.com>
4262 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
4263 bus address to be abstract if we have abstract sockets
4267 2003-07-28 Havoc Pennington <hp@redhat.com>
4269 * bus/messagebus.in: fix to avoid processname/servicename
4270 confusion, from Michael Kearey
4271 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
4273 2003-07-23 Havoc Pennington <hp@pobox.com>
4275 * dbus/dbus-message.c (dbus_message_iter_get_named):
4276 fix from Andy Hanton to remove broken "+1"
4278 2003-07-16 Havoc Pennington <hp@pobox.com>
4280 * tools/dbus-launch.c (babysit): close stdout/stderr in the
4281 babysitter process, as suggested by Thomas Leonard, so
4282 an "eval `dbus-launch --exit-with-session`" will actually
4285 2003-07-16 Havoc Pennington <hp@pobox.com>
4287 * configure.in: print out EXPANDED_* variables in the summary at
4288 the end; clean up the code that computes EXPANDED_ variables and
4289 get the ones using exec_prefix right. Should make things work
4290 when you build without --prefix
4292 2003-06-29 Havoc Pennington <hp@pobox.com>
4294 * mono/Test.cs (class Test): fire up a main loop and run it
4296 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
4297 done once, the app has to do it
4299 2003-06-26 Havoc Pennington <hp@pobox.com>
4301 * mono/Connection.cs: set up connection with the glib main loop
4303 2003-07-01 Havoc Pennington <hp@redhat.com>
4305 * doc/dbus-specification.sgml: clarify the format of a type code,
4306 change suggested by Jim Blandy
4308 2003-06-29 Miloslav Trmac <mitr@volny.cz>
4311 * tools/Makefile.am: Don't assume srcdir == builddir.
4313 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
4314 the allocated block.
4315 (_dbus_memory_test): New function.
4316 * dbus/dbus-test.h: Add _dbus_memory_test ().
4317 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
4319 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
4321 (dbus_message_new): Remove obsolete @todo.
4323 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
4324 (_dbus_marshal_set_uint64): Fix comment.
4326 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
4327 hardcode FIELD_REPLY_SERIAL.
4329 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
4330 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
4332 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
4333 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
4335 2003-06-24 Havoc Pennington <hp@pobox.com>
4337 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
4339 2003-06-23 Anders Carlsson <andersca@codefactory.se>
4345 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
4346 * gcj/org/.cvsignore:
4347 * gcj/org/Makefile.am:
4348 * gcj/org/freedesktop/.cvsignore:
4349 * gcj/org/freedesktop/Makefile.am:
4350 * gcj/org/freedesktop/dbus/.cvsignore:
4351 * gcj/org/freedesktop/dbus/Makefile.am:
4352 * gcj/org/freedesktop/dbus/Message.java: (Message),
4354 * gcj/org/freedesktop/dbus/natMessage.cc:
4355 Fix the build system.
4357 2003-06-22 Havoc Pennington <hp@pobox.com>
4359 * mono/Connection.cs: add more bindings
4361 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
4364 2003-06-22 Havoc Pennington <hp@pobox.com>
4366 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
4367 Start wrapping more stuff.
4369 2003-06-22 Havoc Pennington <hp@pobox.com>
4371 * mono/Message.cs: implement Message.Wrap() that ensures we only
4372 have a single C# wrapper per DBusMessage, assuming it works which
4373 it probably doesn't.
4375 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
4376 (dbus_message_free_data_slot): new
4377 (dbus_message_set_data): new
4378 (dbus_message_get_data): new
4380 2003-06-22 Havoc Pennington <hp@pobox.com>
4382 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
4383 (_dbus_data_slot_allocator_alloc): rework these to keep a
4384 reference count on each slot and automatically manage a global
4385 slot ID variable passed in by address
4387 * bus/bus.c: convert to new dataslot API
4389 * dbus/dbus-bus.c: convert to new dataslot API
4391 * dbus/dbus-connection.c: convert to new dataslot API
4393 * dbus/dbus-server.c: convert to new dataslot API
4395 * glib/dbus-gmain.c: ditto
4399 * bus/connection.c: ditto
4401 2003-06-22 Anders Carlsson <andersca@codefactory.se>
4403 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
4404 after the gcj checks so that the correct configuration tags
4405 will be added to libtool.
4407 * dbus-glib-1.pc.in: No need to specify any includes since
4408 dbus-1.pc.in has those.
4410 2003-06-22 Havoc Pennington <hp@pobox.com>
4412 * mono/*, gcj/*, configure.in, Makefile.am:
4413 Check in makefiles and subdirs for mono and gcj bindings.
4414 Neither binding actually exists, just trying to get through
4415 all the build and other boring bits.
4417 2003-06-21 Philip Blundell <philb@gnu.org>
4419 * tools/dbus-monitor.1: Updated.
4421 * tools/dbus-send.1: Likewise.
4423 2003-06-20 Anders Carlsson <andersca@codefactory.se>
4425 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
4426 for hangup and error after checking read so we won't discard
4427 pending data if both hangup and read are set.
4429 2003-06-19 Philip Blundell <philb@gnu.org>
4431 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
4433 * tools/dbus-send.c: Accept both --system and --session.
4435 * tools/dbus-monitor.c: Same here.
4437 2003-06-19 Anders Carlsson <andersca@codefactory.se>
4439 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
4440 from C++ (Patch by Miloslav Trmac).
4442 2003-06-15 Joe Shaw <joe@assbarn.com>
4444 * configure.in: Check for socklen_t.
4446 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
4448 * test/test-segfault.c: Add #include <sys/time.h>
4450 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
4451 dbus-launch needs it.
4453 2003-06-09 Havoc Pennington <hp@redhat.com>
4455 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
4456 SUN_LEN, it breaks abstract socket usage
4458 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
4461 2003-06-04 Havoc Pennington <hp@pobox.com>
4463 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
4464 using unix:abstract=/foo, and when listening in a tmpdir
4465 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
4467 * dbus/dbus-transport.c (_dbus_transport_open): support
4470 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4471 support abstract sockets
4473 * dbus/dbus-transport-unix.c
4474 (_dbus_transport_new_for_domain_socket): support abstract sockets
4476 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
4477 toggle as an argument, implement abstract namespace support
4478 (_dbus_listen_unix_socket): ditto
4480 * configure.in: add --enable-abstract-sockets and implement
4481 a configure check for autodetection of the right value.
4483 2003-06-01 Havoc Pennington <hp@pobox.com>
4485 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
4486 in /tmp (though on Linux this will end up being useless,
4487 when we add abstract namespace support)
4489 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
4492 2003-05-28 Colin Walters <walters@verbum.org>
4494 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
4496 2003-05-18 Anders Carlsson <andersca@codefactory.se>
4498 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
4500 2003-05-17 Colin Walters <walters@gnu.org>
4502 * tools/dbus-send.c: Don't exit with an error code if --help was
4503 passed. Default to using the session bus instead of the system
4506 * tools/dbus-launch.c: Ditto.
4508 * tools/dbus-monitor.c: Ditto.
4510 * tools/dbus-send.1: Update with new arguments.
4512 * tools/dbus-launch.c: Emit code to export variables. New
4513 arguments -s and -c to specify shell syntax, and a bit of code to
4514 autodetect syntax. Also, allow specifying a program to run.
4516 * tools/dbus-launch.1: Update with new arguments.
4518 * tools/dbus-send.1: Ditto.
4520 * tools/dbus-monitor.1: Ditto.
4522 2003-05-17 Havoc Pennington <hp@pobox.com>
4524 * bus/config-parser.c (merge_included): merge in policies from
4525 child configuration file.
4527 * bus/policy.c (bus_policy_merge): function to merge two policies
4530 2003-05-16 Havoc Pennington <hp@redhat.com>
4532 * dbus/dbus-connection.c: disable verbose lock spew
4534 * tools/dbus-send.c: add --print-reply command line option
4536 * tools/dbus-print-message.h (print_message): new util function
4537 shared by dbus-send and dbus-monitor
4539 * tools/dbus-monitor.c (handler_func): exit on disconnect
4541 * dbus/dbus-transport-unix.c (do_reading): if the transport is
4542 disconnected, don't try to use the read_watch
4544 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
4545 so we can find this bug more easily
4547 2003-05-16 Havoc Pennington <hp@redhat.com>
4549 * bus/policy.c (free_rule_list_func): avoid a crash when passed
4550 NULL as DBusHashTable is annoyingly likely to do.
4552 2003-05-16 Colin Walters <walters@verbum.org>
4554 * tools/dbus-monitor.c: Add --session argument and usage()
4557 * tools/dbus-monitor.1: Update with new --session arg.
4559 * bus/Makefile.am (install-data-hook): Create
4560 $(libdir)/dbus-1.0/services so that the session bus is happy.
4562 2003-05-15 Havoc Pennington <hp@redhat.com>
4564 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
4565 on non-x86. ifdef's are evil.
4567 2003-05-15 Havoc Pennington <hp@redhat.com>
4569 * configure.in: 0.11
4573 * bus/Makefile.am (initddir): apparently we are supposed to put
4574 init scripts in /etc/rc.d/init.d not /etc/init.d
4576 * bus/Makefile.am: remove the "you must --enable-tests to make
4577 check" as it broke distcheck
4579 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
4581 2003-05-13 James Willcox <jwillcox@gnome.org>
4584 * bus/activation.c: (bus_activation_service_created),
4585 (bus_activation_activate_service):
4586 * bus/driver.c: (bus_driver_send_service_deleted),
4587 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4588 (bus_driver_send_service_acquired),
4589 (bus_driver_send_welcome_message),
4590 (bus_driver_handle_list_services):
4591 * bus/session.conf.in:
4592 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
4593 (dbus_bus_service_exists), (dbus_bus_activate_service):
4596 Add some convenience API which lets you activate a service, and did a
4597 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
4598 and dbus_message_get_args()
4600 2003-05-11 Havoc Pennington <hp@pobox.com>
4602 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
4603 calling _dbus_marshal_validate_arg() for every byte in a byte
4606 * dbus/dbus-message-handler.c: use atomic reference counting to
4607 reduce number of locks slightly; the global lock in here sucks
4609 * dbus/dbus-connection.c
4610 (_dbus_connection_update_dispatch_status_and_unlock): variant of
4611 update_dispatch_status that can be called with lock held; then use
4612 in a couple places to reduce locking/unlocking
4613 (dbus_connection_send): hold the lock over the whole function
4614 instead of acquiring it twice.
4616 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
4618 * bus/connection.c (bus_connections_setup_connection): fix access
4619 to already-freed memory.
4621 * dbus/dbus-connection.c: keep a little cache of linked list
4622 nodes, to avoid using the global linked list alloc lock in the
4623 normal send-message case. Instead we just use the connection lock
4624 that we already have to take.
4626 * dbus/dbus-list.c (_dbus_list_find_last): new function
4628 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
4629 change to use a struct for the atomic type; fix docs,
4630 they return value before increment, not after increment.
4632 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
4633 (_dbus_string_append_8_aligned): new functions to try to
4634 microoptimize this operation.
4635 (reallocate_for_length): break this out of set_length(), to
4636 improve profile info, and also so we can consider inlining the
4639 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
4640 strings with some preallocation, cuts down on our calls to realloc
4641 a fair bit. Though if we can get the "move entire string to empty
4642 string" optimization below to kick in here, it would be better.
4644 * dbus/dbus-string.c (_dbus_string_move): just call
4645 _dbus_string_move_len
4646 (_dbus_string_move_len): add a special case for moving
4647 an entire string into an empty string; we can just
4648 swap the string data instead of doing any reallocs.
4649 (_dbus_string_init_preallocated): new function
4651 2003-05-11 Havoc Pennington <hp@pobox.com>
4653 Write a "test-profile" that does echo client-server with threads;
4654 profile reveals lock contention, memcpy/realloc of buffers, and
4655 UTF-8 validation as hot spots. 20% of lock contention eliminated
4656 with dbus_atomic_inc/dec implementation on x86. Much remaining
4657 contention is global mempool locks for GList and DBusList.
4659 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
4662 * dbus/dbus-connection.c (struct DBusConnection): use
4663 dbus_atomic_t for the reference count
4665 * dbus/dbus-message.c (struct DBusMessage): declare
4666 dbus_atomic_t values as volatile
4668 * configure.in: code to detect ability to use atomic integer
4669 operations in assembly, from GLib patch
4671 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
4672 time, tired of it being wrong in threads and forked processes
4674 * glib/test-profile.c: a little program to bounce messages back
4675 and forth between threads and eat CPU
4677 * dbus/dbus-connection.c: add debug spew macros for debugging
4678 thread locks; include config.h at top; fix deadlock in
4679 dbus_connection_flush()
4681 2003-05-08 Havoc Pennington <hp@pobox.com>
4683 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
4684 data from getting written, and there wasn't a good reason to
4687 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
4688 dbus_verbose lines in test coverage
4689 (main): add list of functions sorted by # of untested blocks
4690 to the coverage report
4692 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
4694 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
4696 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
4697 extend test coverage
4699 * test/data/auth/cancel.auth-script: test canceling an
4702 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
4703 aren't used. in CVS history if we end up needing them.
4705 2003-05-04 Havoc Pennington <hp@pobox.com>
4707 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
4710 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
4711 function, which assumed length was in # of strings, not bytes
4713 * dbus/dbus-message.c (_dbus_message_test): add tests for some
4716 * dbus/dbus-connection.c
4717 (_dbus_connection_queue_received_message): disable function for
4718 now, we are only using it in test mode
4720 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4721 remove a mistaken FIXME
4723 2003-05-04 Havoc Pennington <hp@pobox.com>
4725 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
4726 unlock mutex on successful return, patch from Anders Gustafsson
4728 2003-05-04 Havoc Pennington <hp@pobox.com>
4730 * dbus-glib-1.pc.in (Requires): fix dependencies, from
4733 2003-05-04 Havoc Pennington <hp@pobox.com>
4735 * tools/dbus-launch.c: implement
4737 * bus/main.c (main), bus/bus.c (bus_context_new):
4738 implement --print-pid and --fork
4740 2003-05-03 Havoc Pennington <hp@redhat.com>
4742 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
4743 the address had no value, and add to test suite. Fix and
4744 regression test from Miloslav Trmac
4746 2003-05-03 Havoc Pennington <hp@pobox.com>
4748 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
4749 watch is invalid when handled
4751 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
4752 dbus-launch utility to launch the bus from a shell script. Didn't
4753 actually implement dbus-launch yet, it's just a placeholder still.
4755 2003-05-03 Havoc Pennington <hp@pobox.com>
4757 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
4758 daemon; also documents daemon config file, so replaces
4759 doc/config-file.txt. Corrected some stuff from config-file.txt in
4760 the process of moving it.
4762 2003-05-03 Havoc Pennington <hp@pobox.com>
4764 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
4767 2003-05-03 Colin Walters <walters@verbum.org>
4769 * dbus/dbus-sysdeps.c (fill_user_info): Test against
4770 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
4772 * Makefile.am: Update to use new .pc versioning scheme.
4774 2003-05-02 Havoc Pennington <hp@redhat.com>
4776 * bus/system.conf.in: allow send/receive to/from message bus
4779 2003-04-30 Havoc Pennington <hp@redhat.com>
4781 * configure.in: print a note when building with unit tests and
4784 2003-04-30 Havoc Pennington <hp@redhat.com>
4786 * Makefile.am: add a check-local that complains if you didn't
4787 configure with --enable-tests
4789 2003-04-29 Havoc Pennington <hp@redhat.com>
4791 * glib/dbus-gmain.c: docs cleanups
4793 * dbus/dbus-types.h: add docs on int64 types
4795 * dbus/dbus-memory.c: fix docs to avoid putting private API in
4796 public API docs section
4798 2003-04-29 Havoc Pennington <hp@redhat.com>
4800 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
4801 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
4802 parallel install API version, not with the D-BUS package version.
4804 * HACKING: move some of README over here
4806 * README: updates, and document API/ABI policy
4808 * configure.in: reindentation
4810 2003-04-29 Havoc Pennington <hp@redhat.com>
4812 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
4813 to use this library" to be sure people have the right
4816 2003-04-28 Havoc Pennington <hp@redhat.com>
4818 * configure.in: add --enable-docs which by default is auto yes if
4819 doxygen and db2html found, no otherwise; but can be forced on/off
4821 * doc/Makefile.am: conditionalize whether to build docs on
4824 2003-04-28 Havoc Pennington <hp@redhat.com>
4826 * configure.in: 0.10
4830 * bus/system.conf.in: add <includedir>system.d</includedir>
4832 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
4833 username was provided but not uid
4835 * bus/config-parser.c (struct BusConfigParser): keep track of
4836 whether the parser is toplevel or was included; change some
4837 of the error handling if it's included.
4839 2003-04-27 Havoc Pennington <hp@pobox.com>
4843 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
4844 report correct status if we finish processing authentication
4845 inside this function.
4847 * bus/activation.c (try_send_activation_failure): use
4848 bus_transaction_send_error_reply
4850 * bus/connection.c (bus_connection_get_groups): return an error
4851 explaining the problem
4853 * bus/bus.c (bus_context_check_security_policy): implement
4854 restriction here that inactive connections can only send the
4855 hello message. Also, allow bus driver to send anything to
4858 * bus/connection.c (bus_connection_complete): create the
4859 BusClientPolicy here instead of on-demand.
4860 (bus_connection_get_policy): don't return an error
4862 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
4863 sender field in message being replied to
4865 * bus/bus.c (bus_context_check_security_policy): fix silly typo
4866 causing it to return FALSE always
4868 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
4869 we checked sender rather than destination
4871 2003-04-25 Havoc Pennington <hp@redhat.com>
4873 test suite is slightly hosed at the moment, will fix soon
4875 * bus/connection.c (bus_connections_expire_incomplete): fix to
4876 properly disable the timeout when required
4877 (bus_connection_set_name): check whether we can remove incomplete
4878 connections timeout after we complete each connection.
4880 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
4881 probably still broken.
4883 * bus/services.c (bus_registry_acquire_service): implement max
4884 number of services owned, and honor allow/deny rules on which
4885 services a connection can own.
4887 * bus/connection.c (bus_connection_get_policy): report errors here
4889 * bus/activation.c: implement limit on number of pending
4892 2003-04-25 Havoc Pennington <hp@redhat.com>
4894 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
4895 where we used >= 0 instead of != DBUS_UID_UNSET.
4897 2003-04-25 Havoc Pennington <hp@redhat.com>
4899 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
4900 were toggled without add/remove, fix from Anders Gustafsson
4902 2003-04-24 Havoc Pennington <hp@redhat.com>
4904 * test/data/valid-config-files/basic.conf: add <limit> tags to
4907 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
4908 <limit> tag in configuration file.
4910 2003-04-24 Havoc Pennington <hp@redhat.com>
4912 * bus/dispatch.c: somehow missed some name_is
4914 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
4915 (_dbus_timeout_set_interval): new
4917 * bus/connection.c (bus_connections_setup_connection): record time
4918 when each connection is first set up, and expire them after the
4919 auth timeout passes.
4921 2003-04-24 Havoc Pennington <hp@redhat.com>
4923 * dbus/dbus-message.c (dbus_message_name_is): rename
4924 (dbus_message_service_is): rename
4925 (dbus_message_sender_is): rename
4926 (dbus_message_get_service): rename
4928 2003-04-24 Havoc Pennington <hp@redhat.com>
4930 * configure.in: add --enable-checks
4932 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
4934 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
4935 to use thread locks.
4936 (_dbus_connection_handler_destroyed_locked): move some private
4937 functions into proper docs group
4939 * dbus/dbus-internals.h: add _dbus_return_if_fail,
4940 _dbus_return_val_if_fail
4942 Throughout: use dbus_return_if_fail
4944 2003-04-23 James Willcox <jwillcox@gnome.org>
4947 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
4948 (dbus_connection_setup_with_g_main),
4949 (dbus_server_setup_with_g_main):
4950 * glib/test-dbus-glib.c: (main):
4951 * glib/test-thread-client.c: (main):
4952 * glib/test-thread-server.c: (new_connection_callback), (main):
4953 * tools/dbus-monitor.c: (main):
4955 Added a GMainContext argument to dbus_connection_setup_with_g_main()
4956 and dbus_server_setup_with_g_main().
4958 2003-04-20 Havoc Pennington <hp@pobox.com>
4960 * doc/dbus-specification.sgml: document the restrictions on
4961 message and service names
4963 2003-04-22 Havoc Pennington <hp@redhat.com>
4965 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
4966 support, and do some code cleanups to share more code and
4967 speed up array marshal/demarshal.
4969 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
4971 * configure.in: generate dbus-arch-deps.h
4973 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
4976 2003-04-22 Havoc Pennington <hp@redhat.com>
4978 * test/data/valid-messages/opposite-endian.message: fix test
4979 to use proper type for rply field
4981 * test/data/invalid-messages: add tests for below validation
4983 * dbus/dbus-message.c (decode_header_data): validate field types,
4984 and validate that named fields are valid names
4985 (decode_name_field): consider messages in the
4986 org.freedesktop.Local. namespace to be invalid.
4988 * dbus/dbus-string.c (_dbus_string_validate_name): new
4990 2003-04-19 Havoc Pennington <hp@pobox.com>
4992 * bus/driver.c (bus_driver_handle_hello): check limits and
4993 return an error if they are exceeded.
4995 * bus/connection.c: maintain separate lists of active and inactive
4996 connections, and a count of each. Maintain count of completed
4997 connections per user. Implement code to check connection limits.
4999 * dbus/dbus-list.c (_dbus_list_unlink): export
5001 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
5002 number of bytes in the message queue for a connection
5004 2003-04-18 Havoc Pennington <hp@pobox.com>
5006 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
5008 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
5011 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
5012 on realloc be sure to update the pointer in the keyring
5014 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
5015 offset to avoid writing to unallocated memory
5017 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
5018 try the next mechanism, so we properly handle OOM
5020 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
5022 (_dbus_keyring_new): fix OOM bug
5023 (_dbus_keyring_new_homedir): always set error; impose a maximum
5024 number of keys we'll load from the file, mostly to speed up the
5025 test suite and make its OOM checks more useful, but also for
5028 * dbus/dbus-auth.c (process_error_server): reject authentication
5029 if we get an error from the client
5030 (process_cancel): on cancel, send REJECTED, per the spec
5031 (process_error_client): send CANCEL if we get an error from the
5034 2003-04-18 Havoc Pennington <hp@pobox.com>
5036 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
5039 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
5042 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
5043 about DBUS_TEST_HOMEDIR once
5045 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
5048 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
5049 config file so we test the right thing
5051 Throughout: assorted docs improvements
5053 2003-04-18 Havoc Pennington <hp@pobox.com>
5055 * glib/dbus-gmain.c: adapt to watch changes
5057 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
5059 * dbus/dbus-server.h: remove dbus_server_handle_watch
5061 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
5063 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
5064 like DBusTimeout, so we don't need dbus_connection_handle_watch
5067 2003-04-17 Havoc Pennington <hp@redhat.com>
5069 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
5070 database usage so it all goes via the DBusUserDatabase cache.
5072 2003-04-17 Havoc Pennington <hp@redhat.com>
5074 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
5075 there was an OOM watch we skipped, we always return TRUE so we
5076 iterate again to have a look at it again. Fixes test suite hang.
5077 Code rearrangement also lets us lose some memset and only iterate
5078 over callbacks once.
5080 * bus/driver.c (bus_driver_handle_message): sense of test for
5083 2003-04-16 Havoc Pennington <hp@pobox.com>
5085 * doc/dbus-specification.sgml: make spec say serials are unsigned
5087 * dbus/dbus-message.h: change message serials to unsigned
5089 * dbus/dbus-connection.c: adapt to message serials being unsigned
5091 2003-04-15 Havoc Pennington <hp@pobox.com>
5093 * bus/bus.c: create and keep around a shared DBusUserDatabase
5096 * bus/connection.c (bus_connection_get_groups): don't cache
5097 groups for user in the connection object, since user database
5098 object now does that.
5100 2003-04-16 Havoc Pennington <hp@redhat.com>
5102 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
5103 list of size counters
5104 (_dbus_message_loader_putback_message_link): put back a popped link
5106 * dbus/dbus-connection.c
5107 (dbus_connection_set_max_live_messages_size): rename
5109 (dbus_connection_get_outgoing_size): get size of outgoing
5111 (_dbus_connection_set_connection_counter): remove this cruft
5113 2003-04-14 Havoc Pennington <hp@redhat.com>
5115 * dbus/dbus-userdb.c: user database abstraction, mostly to get
5116 caching, but at some point we might want to be able to use a
5119 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
5120 SHA1 conf file to test the sha1 auth mechanism, since the regular
5121 test always uses EXTERNAL when available.
5124 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
5125 add conf file that requires use of sha1 auth
5127 2003-04-13 Havoc Pennington <hp@pobox.com>
5129 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
5130 from Philip Blundell to send messages and monitor them.
5132 2003-04-13 Havoc Pennington <hp@pobox.com>
5134 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
5137 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
5140 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5141 fix to only recover unused bytes if we're already authenticated
5142 (_dbus_transport_get_is_authenticated): fix to still mark us
5143 authenticated if there are unused bytes.
5145 * bus/dispatch.c: implement security policy checking
5147 * bus/connection.c (bus_transaction_send_from_driver): new
5149 * bus/bus.c (bus_context_check_security_policy): new
5151 * bus/dispatch.c (send_service_nonexistent_error): delete this,
5152 now we just set the DBusError and it gets converted to an error
5155 * bus/connection.c (allow_user_function): enable code using actual
5156 data from the config file
5158 * bus/policy.c (list_allows_user): handle wildcard rules for
5159 user/group connection perms
5161 2003-04-13 Havoc Pennington <hp@pobox.com>
5163 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
5165 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
5167 * bus/policy.c (bus_policy_append_mandatory_rule)
5168 (bus_policy_append_default_rule, bus_policy_append_user_rule)
5169 (bus_policy_append_group_rule): new functions
5171 2003-04-12 Havoc Pennington <hp@pobox.com>
5173 * bus/config-parser.c (bus_config_parser_new): fix a memleak
5175 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
5176 the pid/gid/uid, just for paranoia.
5178 * test/break-loader.c (randomly_do_n_things): find a byte
5179 containing a type code, and randomly change it to a different
5182 2003-04-12 Havoc Pennington <hp@pobox.com>
5184 * bus/policy.h: change BusPolicy to be the thing from the config
5185 file, and rename old BusPolicy to BusClientPolicy
5187 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
5188 match change in how policy works
5190 * dbus/dbus-internals.h: mark assert_not_reached as
5191 __attribute((noreturn))__
5193 2003-04-11 Havoc Pennington <hp@redhat.com>
5195 * doc/dbus-specification.sgml: fix a spot with the wrong name for
5196 the broadcast service. Use boolean return for ServiceExists.
5198 2003-04-11 Havoc Pennington <hp@redhat.com>
5200 * configure.in: add another directory to look for qt in.
5202 2003-04-11 Havoc Pennington <hp@redhat.com>
5204 * AUTHORS: add Colin Walters
5206 2003-04-11 Havoc Pennington <hp@redhat.com>
5212 2003-04-11 Havoc Pennington <hp@redhat.com>
5214 * bus/messagebus.in: remove pid file when stopping the
5215 message bus, since the bus won't have privileges to remove it
5218 2003-04-11 Havoc Pennington <hp@redhat.com>
5220 * bus/bus.c (bus_context_new): move credentials change after
5223 2003-04-11 Havoc Pennington <hp@pobox.com>
5225 * test/decode-gcov.c: add "below average functions" to the
5226 coverage report, and change how some of the code works.
5228 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
5229 not in the coverage stats.
5231 * test/test-service.c (main): use _dbus_verbose not fprintf in a
5232 couple places so running the test suite doesn't result in megaspam.
5234 2003-04-11 Havoc Pennington <hp@pobox.com>
5236 * bus/dispatch.c (check_existent_service_activation): accept a no
5237 memory error in a place we didn't before
5239 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
5240 in case the first one failed," since the test suite is less
5243 2003-04-10 Havoc Pennington <hp@pobox.com>
5245 * bus/dispatch.c (check_segfault_service_activation): add test
5246 for launching an executable that just crashes.
5248 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
5249 don't leave a million cores. We'll see how portable this is.
5251 2003-04-10 Havoc Pennington <hp@pobox.com>
5253 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
5254 the possible parent failures before we fork, so that we don't
5255 fail to create a babysitter after creating the child.
5257 * bus/activation.c (bus_activation_activate_service): kill child
5258 if we don't successfully complete the activation.
5260 2003-04-10 Havoc Pennington <hp@redhat.com>
5262 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
5263 the connection if it's disconnected
5265 * bus/activation.c (bus_activation_service_created): use new
5266 transaction features to roll back removal of pending activation if
5267 we don't successfully create the service after all. Don't remove
5268 pending activation if the function fails.
5270 * dbus/dbus-list.c (_dbus_list_insert_before_link)
5271 (_dbus_list_insert_after_link): new code to facilitate
5274 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
5275 new functionality, so we can preallocate the ability to insert
5278 * bus/connection.c (bus_transaction_add_cancel_hook): new function
5279 allowing us to put custom hooks in a transaction to be used for
5280 cancelling said transaction
5282 * doc/dbus-specification.sgml: add some discussion of secondary
5283 service owners, and disallow zero-length service names
5285 * bus/services.c (bus_registry_acquire_service): new function,
5286 splits out part of bus_driver_handle_acquire_service() and fixes
5287 a bug where we didn't remove the service doing the acquiring
5288 from the secondary queue if we failed to remove the current owner
5289 from the front of the queue.
5291 2003-04-10 Alexander Larsson <alexl@redhat.com>
5293 * doc/dbus-specification.sgml:
5294 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
5296 2003-04-10 Alexander Larsson <alexl@redhat.com>
5301 Added files to cvsignore
5303 * dbus/dbus-message.h:
5304 * dbus/dbus-message.c: (dbus_message_iter_get_named):
5305 Make get_named() take two out argument and return a boolean.
5306 (dbus_message_iter_get_args_valist):
5307 Update usage of get_named().
5308 (dbus_message_iter_append_byte):
5310 (dbus_message_iter_append_named)
5312 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
5315 2003-04-10 Alexander Larsson <alexl@redhat.com>
5317 * dbus/dbus-marshal.[ch]:
5318 Add array_type_pos argument to _dbus_marshal_validate_arg.
5319 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
5321 * dbus/dbus-message.[ch]:
5322 Multi-dimensional arrays have full type specification in the
5323 outermost array. Iter code re-arranged to handle this.
5324 Added some more iter tests.
5326 * doc/dbus-specification.sgml:
5329 Update new array encoding description.
5330 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
5332 * test/data/invalid-messages/array-with-mixed-types.message:
5333 * test/data/valid-messages/array-of-array-of-uint32.message:
5334 Change to the new array format.
5336 * test/data/invalid-messages/too-short-dict.message:
5339 * test/data/valid-messages/recursive-types.message:
5340 Fix up and extend test.
5342 2003-04-10 Havoc Pennington <hp@pobox.com>
5344 * bus/dispatch.c: lots of fixes
5346 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
5347 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
5348 that was crack, broke the test service.
5350 * dbus/dbus-transport.c (_dbus_transport_open): fix error
5351 handling to avoid piling up errors if we get a failure on the
5354 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
5355 pid in assertion failures.
5357 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
5358 to some fixed size of file descriptor array. Don't return TRUE
5359 anytime a timeout exists, that led to lots of busy loop silliness
5362 2003-04-09 Havoc Pennington <hp@redhat.com>
5364 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
5365 I'd checked this in earlier but hadn't.
5367 2003-04-09 Havoc Pennington <hp@redhat.com>
5369 * bus/dispatch.c (bus_dispatch_test): get a bit further through
5370 the activation test (man this is getting old!)
5372 2003-04-09 Havoc Pennington <hp@redhat.com>
5374 * test/test-utils.c: use dispatch status function to fix this up
5376 * bus/connection.c (connection_watch_callback): don't dispatch
5378 (connection_timeout_callback): don't dispatch from here
5379 (bus_connections_setup_connection): set the dispatch status function
5380 (bus_connection_disconnected): unset it
5382 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
5383 used to add a connection to be dispatched
5384 (_dbus_loop_iterate): do the dispatching at the end of each
5387 * dbus/dbus-connection.c
5388 (dbus_connection_set_dispatch_status_function): new function
5389 allowing us to fix up main loop usage
5390 (_dbus_connection_last_unref): free all the various function
5392 (dbus_connection_dispatch): call the DispatchStatusFunction
5393 whenever this function returns
5394 (dbus_connection_handle_watch): call DispatchStatusFunction
5395 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
5396 (reply_handler_timeout): call DispatchStatusFunction
5397 (dbus_connection_flush): call DispatchStatusFunction
5399 2003-04-09 Havoc Pennington <hp@redhat.com>
5401 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
5404 * bus/dispatch.c (check_service_activated): fix bug in test
5406 * dbus/dbus-mainloop.c (check_timeout): fix this up
5408 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
5409 verbose output so we can sort out output from different processes,
5410 e.g. in the activation case.
5412 2003-04-08 Colin Walters <walters@gnu.org>
5414 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
5416 (bus_context_new): Set it.
5417 (bus_context_unref): Use it to delete the pid file.
5419 2003-04-08 Havoc Pennington <hp@redhat.com>
5421 * test/data/invalid-messages/array-with-mixed-types.message:
5422 regression test that fails for the moment
5424 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
5425 tests for convenience
5427 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
5428 array of nil, it broke things.
5430 * test/data/invalid-messages/array-of-nil.message: regression test
5432 * test/data/valid-messages/array-of-array-of-uint32.message:
5433 happened to write this so added it to suite
5435 2003-04-08 Havoc Pennington <hp@redhat.com>
5437 * bus/driver.c (bus_driver_handle_acquire_service): init
5438 retval/reply before checking name
5440 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
5441 recursion depth argument
5443 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
5444 in the public struct for future extension
5446 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
5449 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
5452 * doc/dbus-specification.sgml: fix typo
5454 2003-04-08 Alexander Larsson <alexl@redhat.com>
5456 Implemented recursive types, named types and new-style iters
5459 * glib/test-thread-client.c: (thread_func):
5460 * glib/test-thread-server.c: (handle_test_message):
5461 * test/test-service.c: (handle_echo):
5470 * dbus/dbus-internals.c: (_dbus_type_to_string):
5471 Update for new types.
5473 * dbus/dbus-marshal.[ch]:
5474 Implement recursive types and the new marshalling format.
5475 Remove hardcoded dict marshalling.
5476 Marshal named types.
5478 * dbus/dbus-message-builder.c:
5480 Remove references to old types
5482 * dbus/dbus-message.[ch]:
5483 New non-refcounted iter API that supports recursive iters.
5484 Use iters for appending, including support for recursive
5486 Add byte and named type support.
5487 Update everything to new marshalling formats.
5488 Add tests for new API.
5490 * dbus/dbus-protocol.h:
5491 Remove old array types.
5492 Add types: BYTE, ARRAY, DICT, NAMED
5494 * dbus/dbus-string.c:
5495 * dbus/dbus-sysdeps.c:
5496 Make parse_double locale safe.
5498 * dbus/dbus-test-main.c:
5504 * doc/dbus-specification.sgml:
5507 * test/data/incomplete-messages/missing-body.message:
5508 * test/data/invalid-messages/bad-boolean.message:
5509 * test/data/invalid-messages/bad-boolean-array.message:
5510 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
5511 * test/data/invalid-messages/boolean-has-no-value.message-raw:
5512 * test/data/invalid-messages/too-short-dict.message:
5513 * test/data/valid-messages/dict-simple.message:
5514 * test/data/valid-messages/dict.message:
5515 * test/data/valid-messages/emptiness.message:
5516 * test/data/valid-messages/lots-of-arguments.message:
5517 * test/data/valid-messages/no-padding.message:
5518 * test/data/valid-messages/recursive-types.message:
5519 Add missing NAME fields
5520 Fix up dicts & arrays
5522 * test/data/invalid-messages/dict-with-nil-value.message:
5523 Removed, this is not invalid anymore.
5525 * test/data/valid-messages/recursive-types.message:
5526 Add new test for deeply recursive types.
5528 2003-04-07 Havoc Pennington <hp@pobox.com>
5530 * bus/driver.c (bus_driver_handle_acquire_service): return an
5531 error if you try to acquire a service that starts with ':'
5533 2003-04-07 Havoc Pennington <hp@redhat.com>
5535 * doc/dbus-specification.sgml: require that base service names
5536 start with ':' and that the base service is created/deleted
5537 as first and last things a connection does on the bus
5539 * bus/dispatch.c (check_existent_service_activation): lots more
5540 work on the activation test; it doesn't fully pass yet...
5542 * test/test-service.c (main): fix so we don't memleak the
5543 connection to the message bus
5544 (filter_func): accept a message asking us to exit
5546 2003-04-06 Havoc Pennington <hp@pobox.com>
5548 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
5551 * configure.in: fixes to Qt detection from Colin Walters
5553 * doc/Makefile.am: Only remove generated docbook dirs if they
5554 exist, from Colin Walters
5556 * dbus/dbus-bus.c: change how we set well-known connections to
5557 NULL, so that it works if a single connection is stored in
5558 two well-known array slots.
5560 * test/Makefile.am: remove a lot of stuff that isn't immediately
5561 useful, it's in CVS history if we want it.
5563 * test/test-service.c: use dbus-mainloop instead of that
5566 2003-04-06 Havoc Pennington <hp@pobox.com>
5568 * dbus/Makefile.am: split lists of sources into stuff that goes in
5569 the library, util functions that go in the lib and are also used
5570 elsewhere, and util functions that are used in tests/daemon but
5571 don't go in the lib.
5573 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
5574 here so it can be used in test binaries also
5576 2003-04-06 Havoc Pennington <hp@pobox.com>
5578 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
5579 here in the parent process, so we can return an error if it
5580 fails. Also, move some of the code into the child so the parent
5581 is less hosed if we fail midway through.
5583 * bus/bus.c (bus_context_new): move pidfile detection further up
5584 in the function, before we start overwriting sockets and such.
5586 * bus/messagebus.in: adjust this a bit, not sure if it will work.
5588 * configure.in: add --with-system-pid-file and --with-system-socket
5590 2003-04-06 Colin Walters <walters@verbum.org>
5592 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
5594 * bus/system.conf.in: Declare a pidfile.
5596 * bus/bus.c (bus_context_new): Test for an existing pid file, and
5597 create one (if appropriate).
5599 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
5600 (struct BusConfigParser) [pidfile]: New.
5601 (element_type_to_name, merge_included, start_busconfig_child)
5602 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
5603 (bus_config_parser_unref): Free it.
5604 (bus_config_parser_get_pidfile): New function.
5606 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
5608 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
5610 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
5612 * dbus/dbus-sysdeps.h: Prototype it.
5614 2003-04-06 Havoc Pennington <hp@pobox.com>
5616 * bus/bus.c (bus_context_new): print the address in here, rather
5617 than in main(), because we need to do it before forking the daemon
5619 * bus/dispatch.c (send_service_nonexistent_error): set the sender
5620 on the service nonexistent error
5622 * bus/driver.c (bus_driver_handle_acquire_service): set the
5623 sender on the AcquireService reply
5625 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
5626 server also listen on a UNIX socket so services can connect to it.
5628 2003-04-06 Havoc Pennington <hp@pobox.com>
5630 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
5631 so it detects deadlocks and also we actually init threads when
5634 2003-04-06 Havoc Pennington <hp@pobox.com>
5636 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
5637 save the domain socket name, and unlink it when we disconnect the
5638 server. Means that at least when we exit normally, we won't leave
5639 a bunch of junk in /tmp
5641 * dbus/dbus-transport-unix.c
5642 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
5643 memory management). (I was making a real change here but then
5646 2003-04-06 Havoc Pennington <hp@pobox.com>
5648 * bus/bus.c (bus_context_new): fix wrong handling of
5649 server_data_slot_unref() in the error case.
5651 * dbus/dbus-internals.h (_dbus_assert): change so it passes
5652 "(condition) != 0" to _dbus_real_assert so that
5653 "_dbus_assert (pointer)" doesn't cause a warning
5655 * bus/main.c (main): accept --print-address option to print out
5656 the message bus address
5658 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
5660 * dbus/dbus-transport.c (_dbus_transport_open): special error for
5661 "tmpdir" option to unix: address on client side
5663 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
5666 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
5667 we can use to create sockets in the test suite.
5669 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
5670 cleanly. To be used for testing.
5672 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
5674 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
5676 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
5677 handle trying to call this when there's no servers active
5679 2003-04-05 Havoc Pennington <hp@pobox.com>
5685 2003-04-05 Havoc Pennington <hp@pobox.com>
5687 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
5688 crash on startup. Need to get "try starting the daemon"
5689 in the test suite I guess. ;-)
5691 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
5692 tracked the number of open connections; it's better done in
5693 application-specific code as you want it to span all servers etc.
5695 2003-04-05 Havoc Pennington <hp@pobox.com>
5697 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
5698 patch from Colin Walters
5700 2003-04-05 Havoc Pennington <hp@pobox.com>
5702 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
5703 reality; in fact multiple mechanisms are allowed.
5705 * dbus/dbus-internals.c (_dbus_real_assert)
5706 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
5707 _dbus_assert_not_reached() into functions, so that they don't show
5708 up in basic block counts for test coverage, and don't use up as
5709 much disk space. Does mean slower execution speed though, so
5710 assumes --disable-asserts is the normal production case.
5712 2003-04-05 Havoc Pennington <hp@pobox.com>
5714 * test/Makefile.am (dist-hook): also dist *.in files
5720 2003-04-05 Havoc Pennington <hp@pobox.com>
5722 * dbus/dbus-string.c: docs warning
5724 * dbus/dbus-spawn.c: missing docs
5726 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
5728 2003-04-05 Havoc Pennington <hp@pobox.com>
5730 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
5733 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
5734 to -1 once we've reaped the babysitter
5735 (_dbus_babysitter_handle_watch): do as much work as we can, not
5738 * bus/activation.c: add code using DBusBabysitter so that we
5739 handle it when a service fails to start up properly.
5740 (bus_activation_service_created): don't remove the activation
5741 entries as we go, just let them get removed when we free the pending
5742 activation. Unref reply messages after sending them.
5744 2003-04-05 Havoc Pennington <hp@pobox.com>
5746 * test/decode-gcov.c (main): print per-directory stats in the report
5748 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
5750 2003-04-05 Havoc Pennington <hp@pobox.com>
5752 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
5754 * test/decode-gcov.c: hack up a little program to suck data
5755 out of gcov files. Yes this is sort of silly.
5757 * configure.in: define something in config.h and do an
5758 AM_CONDITIONAL when gcov is enabled
5760 2003-04-04 Havoc Pennington <hp@redhat.com>
5762 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
5763 return a "babysitter" object that is used to monitor the status of
5764 the spawned process and reap it when required.
5766 * test/test-segfault.c, test/test-exit.c,
5767 test/test-sleep-forever.c: binaries that do various lame things,
5768 used in the test suite.
5770 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
5772 2003-04-03 Havoc Pennington <hp@pobox.com>
5774 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
5775 in preparation for modifying it, dbus-sysdeps is getting
5778 2003-04-03 Havoc Pennington <hp@redhat.com>
5780 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
5783 * bus/*.[hc]: adapt to mainloop change
5785 2003-04-03 Havoc Pennington <hp@redhat.com>
5787 * bus/activation.c (load_directory): fix up memleaks
5788 (bus_activation_entry_free): free the entry
5790 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
5791 we get one from the message bus; fix memleaks.
5793 * dbus/dbus-message.c (dbus_set_error_from_message): new function
5795 2003-04-03 Havoc Pennington <hp@pobox.com>
5797 * bus/config-parser.c (bus_config_parser_unref): free
5798 list of mechanisms, bug discovered by test suite enhancements
5799 (putting system.conf and session.conf into suite)
5801 * test/Makefile.am, test/test-service.c: add placeholder for a
5802 test service that we'll activate as part of test suite. Doesn't
5805 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
5806 setting NULL value, and use system malloc not dbus_malloc()
5807 when we have unavoidable memleakage.
5809 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
5810 didn't work, and support DBUS_BUS_ACTIVATION.
5812 * bus/activation.c (child_setup): pass our well-known bus type to
5815 * bus/config-parser.c: support <type> to specify well-known type
5817 * doc/dbus-specification.sgml: document the env variables to
5818 locate well-known buses and find service activator
5820 2003-04-02 Havoc Pennington <hp@redhat.com>
5822 * test/Makefile.am (all-local): add a rule to copy tests to
5823 builddir, so we can have generated tests. Use this to remove the
5824 silly hack for testing system.conf and session.conf. Will use this
5825 shortly to generate .service files pointing to test binaries.
5827 2003-04-02 Havoc Pennington <hp@redhat.com>
5829 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
5830 current alloc and needed new length, not max of the doubled
5831 allocation and needed new length. Also, when building tests,
5832 don't do the double-allocation stuff, just realloc every time.
5834 2003-04-02 Havoc Pennington <hp@redhat.com>
5836 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
5838 (_dbus_string_get_dirname): new
5839 (_dbus_sysdeps_test): new
5840 (_dbus_directory_open): include dirnames in error messages
5842 * bus/config-parser.c: interpret <include> and <includedir> and
5843 <servicedir> relative to config file location if the given
5844 filename is not absolute.
5846 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
5848 2003-04-02 Havoc Pennington <hp@redhat.com>
5850 * bus/connection.c (bus_transaction_send_error_reply): set sender
5851 service for the error, and unref the reply on success
5853 * bus/activation.c: convert to use BusTransaction so OOM can be
5855 (bus_activation_service_created): set sender of the message
5857 2003-04-01 Havoc Pennington <hp@redhat.com>
5859 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
5860 <includedir> (at least mostly)
5862 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
5863 first, then the user ID
5865 2003-04-01 Havoc Pennington <hp@pobox.com>
5867 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
5870 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
5872 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
5874 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
5875 socket 0777, and unlink any existing socket.
5877 * bus/bus.c (bus_context_new): change our UID/GID and fork if
5878 the configuration file so specifies; set up auth mechanism
5881 * bus/config-parser.c (bus_config_parser_content): add support
5882 for <fork> option and fill in code for <auth>
5884 * bus/system.conf.in: add <fork/> to default configuration,
5885 and limit auth mechanisms to EXTERNAL
5887 * doc/config-file.txt (Elements): add <fork>
5889 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
5890 (_dbus_change_identity): new function
5892 2003-03-31 Havoc Pennington <hp@redhat.com>
5894 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
5895 (_dbus_listen_unix_socket): fix off-by-one error in null
5896 termination spotted by Nalin
5898 2003-03-31 Havoc Pennington <hp@redhat.com>
5900 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
5901 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
5902 having a real home directory available.
5904 2003-03-31 Havoc Pennington <hp@redhat.com>
5906 * bus/Makefile.am (install-data-hook): create /var/run/dbus
5908 * bus/messagebus.in: add init script for Red Hat /etc/init.d
5910 * configure.in: add support for specifying a style of init script
5913 2003-03-31 Havoc Pennington <hp@redhat.com>
5915 Fix some annoying DBusString API and fix all affected code.
5917 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
5919 (_dbus_string_get_data): change to return string instead of using
5921 (_dbus_string_get_const_data): ditto
5922 (_dbus_string_get_data_len): ditto
5923 (_dbus_string_get_const_data_len): ditto
5925 2003-03-31 Havoc Pennington <hp@redhat.com>
5927 * bus/main.c (main): fix up the command line arguments to be nicer
5929 2003-03-31 Havoc Pennington <hp@redhat.com>
5931 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
5932 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
5933 final location that lands in the config file
5935 * bus/config-loader-expat.c (bus_config_load): fix type of
5938 * doc/TODO: remove TODO item for dbus_bus_get()
5940 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
5942 2003-03-31 Havoc Pennington <hp@pobox.com>
5944 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
5945 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
5946 argument since they are always client side
5948 * dbus/dbus-server.c (dbus_server_get_address): new function
5950 * bus/main.c (main): take the configuration file as an argument.
5952 * test/data/valid-config-files/debug-allow-all.conf: new file to
5953 use with dispatch.c tests for example
5955 * bus/test-main.c (main): require test data dir
5957 * bus/bus.c (bus_context_new): change this to take a
5958 configuration file name as argument
5960 * doc/config-file.txt (Elements): add <servicedir>
5962 * bus/system.conf, bus/session.conf: new files
5964 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
5965 well-known socket if none set
5967 * configure.in: create system.conf and session.conf
5969 2003-03-30 Havoc Pennington <hp@pobox.com>
5971 * bus/config-parser.c: hacking
5973 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
5974 to shut down, since it could cause weirdness with the DBusList
5977 * dbus/dbus-list.c (_dbus_list_test): add tests for the
5978 link-oriented stack routines
5979 (alloc_link): free the mempool if the first alloc from it fails
5981 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
5983 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
5985 (_dbus_string_skip_white): new
5987 * doc/config-file.txt (Elements): add <includedir>
5989 2003-03-28 Havoc Pennington <hp@pobox.com>
5991 * dbus/dbus-string.c (_dbus_string_copy_data_len)
5992 (_dbus_string_copy_data): new functions
5994 2003-03-28 Anders Carlsson <andersca@codefactory.se>
5996 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
6000 * dbus/dbus-memory.c:
6003 2003-03-28 Havoc Pennington <hp@pobox.com>
6005 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
6006 I think it may have just been superstition. Not sure.
6008 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
6009 failures that were not being handled.
6011 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
6013 * dbus/dbus-memory.c: add ability to set number of mallocs in a
6014 row that will fail on out-of-memory.
6016 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
6017 function for testing out-of-memory handling.
6019 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
6020 allocation functions, they do map exactly to the expat ones.
6022 2003-03-27 Havoc Pennington <hp@redhat.com>
6024 * bus/config-loader-libxml.c (bus_config_load): add another error
6027 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6030 Add note about automatic service activation.
6032 * doc/dbus-specification.sgml:
6033 Rename the specification and clarify a few things.
6035 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6038 * dbus/dbus-address.c:
6040 * dbus/dbus-marshal.c:
6041 * dbus/dbus-server-debug-pipe.c:
6042 * dbus/dbus-transport-unix.c:
6043 Fix documentation warnings.
6045 2003-03-26 Havoc Pennington <hp@pobox.com>
6047 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
6048 after every test so it's quick and easy to see which leaked, and
6049 so we test multiple dbus_shutdown() calls
6051 * configure.in: change configure.in XML stuff to also support
6054 * config-loader-libxml.c: some hacking
6056 * config-loader-expat.c: some hacking
6058 * config-parser.c: some hacking, plus tests
6060 2003-03-25 Havoc Pennington <hp@redhat.com>
6062 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
6064 * configure.in: add --with-xml option to specify XML library,
6065 right now only libxml is supported.
6067 * bus/config-loader-libxml.c, config-parser.c: sync some minor
6068 nonworking code between home and work, still just stubs
6070 2003-03-24 Havoc Pennington <hp@redhat.com>
6072 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
6075 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
6076 NULL argument for "message" if the error is a well-known one,
6077 fill in a generic message in this case.
6079 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
6082 * bus/test.c (bus_test_flush_bus): add
6084 * bus/policy.c (bus_policy_test): test code stub
6086 2003-03-24 Havoc Pennington <hp@pobox.com>
6088 * bus/connection.c (bus_connections_setup_connection): set up
6089 the "can this user connect" function, but it always returns
6090 TRUE until we have a config file parser so we can have a config
6091 file that allows connections.
6093 2003-03-23 Havoc Pennington <hp@pobox.com>
6095 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
6096 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
6097 the mutex, so we can check for proper memory management
6100 * dbus/dbus-dataslot.c: remove the mutex from
6101 DBusDataSlotAllocator and lock it manually when using it,
6102 to simplify fitting it into the global slots framework.
6104 * dbus/dbus-threads.c (init_static_locks): rework how we're
6105 handling global locks so they are easily shut down.
6107 * bus/policy.c (bus_policy_append_rule): fix
6109 * bus/test-main.c (main): check for memleaks
6111 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
6112 test suite check for memleaks
6114 * dbus/dbus-memory.c: add support in test mode for tracking
6115 number of outstanding blocks
6117 2003-03-23 Havoc Pennington <hp@pobox.com>
6119 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
6122 * dbus/dbus-hash.h: add ULONG hash keys
6124 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
6125 (_dbus_get_group_id): new function
6127 2003-03-20 Havoc Pennington <hp@redhat.com>
6129 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
6131 (dbus_connection_get_unix_user): new function
6133 2003-03-20 Havoc Pennington <hp@pobox.com>
6135 * bus/connection.c (bus_connection_send_oom_error): assert that
6136 message has a sender
6137 (connection_execute_transaction): ditto
6138 (bus_connection_preallocate_oom_error): fix to set the sender, and
6139 set recipient to the destination service, not the bus driver
6141 * bus/policy.c: hacking
6143 * dbus/dbus-message.c (dbus_message_service_is): new function
6144 (dbus_message_sender_is): new
6146 2003-03-19 Havoc Pennington <hp@redhat.com>
6148 * bus/policy.c: start sketching code for policy restrictions on
6149 what connections can do.
6151 2003-03-18 Havoc Pennington <hp@redhat.com>
6153 * doc/TODO: some notes on high-level todo items. Little nitpick
6154 stuff is all in @todo, so no need to add it here.
6156 * doc/config-file.txt: some notes on how config file might look
6158 2003-03-18 Anders Carlsson <andersca@codefactory.se>
6164 2003-03-17 Havoc Pennington <hp@redhat.com>
6166 * dbus/dbus-internals.h: add gcc attributes so that
6167 our printf-style functions warn on bad arguments to
6170 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
6173 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
6176 2003-03-17 Havoc Pennington <hp@redhat.com>
6178 * bus/test-main.c (main): make it print something as it runs
6179 so make check doesn't look stuck
6181 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
6182 from CVS, now obsolete
6184 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6186 * bus/dispatch.c: (bus_dispatch):
6187 Refetch the service name since it may have been reallocated
6188 when dbus_message_set_sender was called.
6190 * dbus/dbus-sysdeps.c: (_dbus_accept):
6191 Add address and address length variables and use them to stop
6192 valgrind from complaining.
6194 2003-03-17 Havoc Pennington <hp@pobox.com>
6196 All tests pass, no memleaks, no valgrind complaints.
6198 * bus/test.c: refcount handler_slot
6200 * bus/connection.c (bus_connections_new): refcount
6201 connection_data_slot
6203 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
6204 bytes so that auth scripts pass.
6206 * bus/dispatch.c: init message_handler_slot so it gets allocated
6209 * bus/dispatch.c (message_handler_slot_ref): fix memleak
6211 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
6212 dealloc server_pipe_hash when no longer used for benefit of
6215 * dbus/dbus-auth.c (process_command): memleak fix
6217 * bus/dispatch.c (check_hello_message): memleak fix
6219 2003-03-16 Havoc Pennington <hp@pobox.com>
6221 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
6223 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6225 * bus/activation.c (bus_activation_activate_service): Append
6226 the pending activation entry to the list of pending activations.
6228 2003-03-16 Havoc Pennington <hp@pobox.com>
6230 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
6233 * dbus/dbus-address.c (create_entry): fix OOM handling when
6234 failing to alloc entry->method
6236 2003-03-16 Havoc Pennington <hp@pobox.com>
6238 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
6241 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6242 add some missing dbus_set_result
6244 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
6245 alloc the DBusMessageHandler
6247 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
6248 the transport here, since we call this from the finalizer; it
6249 resulted in a double-finalize.
6251 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
6252 where we tried to use transport->connection that was NULL,
6253 happened when transport was disconnected early on due to OOM
6255 * bus/*.c: adapt to handle OOM for watches/timeouts
6257 * dbus/dbus-transport-unix.c: port to handle OOM during
6260 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
6261 reference to unused bytes instead of a copy
6263 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
6266 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
6269 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
6272 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6274 * doc/dbus-specification.sgml:
6275 Document reply message for ActivateService.
6277 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6279 * bus/activation.c: (bus_pending_activation_entry_free),
6280 (bus_pending_activation_free), (bus_activation_new),
6281 (bus_activation_unref), (bus_activation_service_created),
6282 (bus_activation_activate_service):
6284 * bus/bus.c: (bus_context_new):
6285 * bus/desktop-file.c: (new_section):
6286 * bus/driver.c: (bus_driver_send_service_deleted),
6287 (bus_driver_handle_activate_service):
6288 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
6290 * dbus/dbus-connection.c:
6291 (dbus_connection_send_with_reply_and_block):
6292 * dbus/dbus-message.c: (dbus_message_append_args_valist):
6293 * dbus/dbus-protocol.h:
6294 Make activation work better. Now pending activations will be queued
6295 and the daemon won't try to activate services that are already registered.
6297 2003-03-16 Havoc Pennington <hp@pobox.com>
6299 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
6302 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
6303 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
6305 2003-03-16 Havoc Pennington <hp@pobox.com>
6307 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
6308 this. always run the test suite before commit...
6310 * bus/*: adapt to DBusConnection API changes
6312 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
6313 requires renaming stuff to avoid dbus_connection_dispatch name
6316 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
6319 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6320 separate from _dbus_message_loader_return_buffer()
6322 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
6323 this, because it's now always broken to use; the number of
6324 messages in queue vs. the number still buffered by the message
6325 loader is undefined/meaningless. Should use
6326 dbus_connection_get_dispatch_state().
6327 (dbus_connection_dispatch): rename from
6328 dbus_connection_dispatch_message
6330 2003-03-16 Havoc Pennington <hp@pobox.com>
6332 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
6335 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6337 * dbus/dbus-connection.c:
6338 (dbus_connection_send_with_reply_and_block):
6339 Decrease connection->n_incoming when removing an entry
6341 * dbus/dbus-dict.c: (dbus_dict_entry_free),
6342 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6343 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6344 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
6345 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
6346 (dbus_dict_get_byte_array):
6347 Handle NULL arrays and strings. Also add support for byte arrays.
6349 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
6350 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
6351 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6352 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6353 (_dbus_demarshal_dict), (demarshal_and_validate_len),
6354 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
6355 * dbus/dbus-marshal.h:
6356 Add support for marshalling and demarshalling empty arrays and strings.
6358 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6359 (dbus_message_append_string_array),
6360 (dbus_message_iter_get_boolean),
6361 (dbus_message_iter_get_boolean_array),
6362 (dbus_message_iter_get_int32_array),
6363 (dbus_message_iter_get_uint32_array),
6364 (dbus_message_iter_get_double_array),
6365 (dbus_message_iter_get_byte_array),
6366 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
6367 (check_message_handling):
6368 Add support for getting empty arrays and dicts.
6370 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
6371 Don't do any validation at all for now, that's better than just checking
6374 * test/data/valid-messages/emptiness.message:
6375 New test message with lots of empty arrays.
6377 2003-03-16 Havoc Pennington <hp@pobox.com>
6379 * dbus/dbus-connection.c
6380 (_dbus_connection_queue_received_message_link): new function that
6381 can't fail due to OOM
6383 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
6384 new function pops a message together with a list link
6387 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
6388 message queuing functions to avoid needing to alloc memory
6390 2003-03-16 Havoc Pennington <hp@pobox.com>
6392 Oops - test code was only testing failure of around 30 of the
6393 mallocs in the test path, but it turns out there are 500+
6394 mallocs. I believe this was due to misguided linking setup such
6395 that there was one copy of dbus_malloc etc. in the daemon and one
6396 in the shared lib, and only daemon mallocs were tested. In any
6397 case, the test case now tests all 500+ mallocs, and doesn't pass
6398 yet, though there are lots of fixes in this patch.
6400 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6401 this so that it doesn't need to allocate memory, since it
6402 has no way of indicating failure due to OOM (and would be
6403 annoying if it did).
6405 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
6407 * bus/Makefile.am: rearrange to create two self-contained
6408 libraries, to avoid having libraries with overlapping symbols.
6409 that was resulting in weirdness, e.g. I'm pretty sure there
6410 were two copies of global static variables.
6412 * dbus/dbus-internals.c: move the malloc debug stuff to
6415 * dbus/dbus-list.c (free_link): free list mempool if it becomes
6418 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
6420 * dbus/dbus-address.c (dbus_parse_address): free list nodes
6423 * bus/dispatch.c (bus_dispatch_add_connection): free
6424 message_handler_slot when no longer using it, so
6425 memory leak checkers are happy for the test suite.
6427 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
6429 * bus/bus.c (new_connection_callback): disconnect in here if
6430 bus_connections_setup_connection fails.
6432 * bus/connection.c (bus_connections_unref): fix to free the
6434 (bus_connections_setup_connection): if this fails, don't
6435 disconnect the connection, just be sure there are no side
6438 * dbus/dbus-string.c (undo_alignment): unbreak this
6440 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
6442 (_dbus_auth_new): fix the order in which we free strings
6445 * bus/connection.c (bus_connection_disconnected): fix to
6446 not send ServiceDeleted multiple times in case of memory
6449 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
6450 get the base service name
6451 (dbus_bus_register_client): don't return base service name,
6452 instead store it on the DBusConnection and have an accessor
6454 (dbus_bus_register_client): rename dbus_bus_register()
6456 * bus/dispatch.c (check_hello_message): verify that other
6457 connections on the bus also got the correct results, not
6458 just the one sending hello
6460 2003-03-15 Havoc Pennington <hp@pobox.com>
6462 Make it pass the Hello handling test including all OOM codepaths.
6463 Now to do other messages...
6465 * bus/services.c (bus_service_remove_owner): fix crash when
6466 removing owner from an empty list of owners
6467 (bus_registry_ensure): don't leave service in the list of
6468 a connection's owned services if we fail to put the service
6471 * bus/connection.c (bus_connection_preallocate_oom_error): set
6472 error flag on the OOM error.
6474 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6475 handle _dbus_transport_set_connection failure
6477 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
6478 to create watches up front and simply enable/disable them as
6480 (unix_connection_set): this can now fail on OOM
6482 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
6483 of enabling/disabling a watch or timeout.
6485 * bus/loop.c (bus_loop_iterate): don't touch disabled
6488 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
6490 2003-03-15 Havoc Pennington <hp@pobox.com>
6492 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
6493 write useful test code, after all that futzing around ;-)
6495 Test does not yet pass because we can't handle OOM in
6496 _dbus_transport_messages_pending (basically,
6497 dbus_connection_preallocate_send() does not prealloc the write
6498 watch). To fix this, I think we need to add new stuff to
6499 set_watch_functions, namely a SetEnabled function so we can alloc
6500 the watch earlier, then enable it later.
6502 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
6503 dbus-memory.c to the convenience lib
6505 * bus/test.c: rename some static functions to keep them clearly
6506 distinct from stuff in connection.c. Handle client disconnection.
6508 2003-03-14 Havoc Pennington <hp@pobox.com>
6510 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
6511 transport, tests more of the real codepath. Set up clients
6512 with bus_setup_debug_client.
6514 * bus/test.c (bus_setup_debug_client): function to set up debug
6515 "clients" on the main loop
6517 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
6520 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
6523 * dbus/dbus-server-debug.c: support a debug server based on pipes
6525 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
6526 (_dbus_close): new function
6528 * configure.in: check for socketpair
6530 2003-03-14 Havoc Pennington <hp@redhat.com>
6532 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
6535 * dbus/dbus-transport-debug.c: rework this a good bit to be
6536 less complicated. hopefully still works.
6538 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
6541 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
6544 * dbus/dbus-message.c (dbus_message_copy): rename from
6545 dbus_message_new_from_message, fix it up to copy
6546 all the message fields, add test case
6548 * bus/dispatch.c (bus_dispatch_test): add some more test code,
6549 not quite passing yet
6551 2003-03-14 Havoc Pennington <hp@pobox.com>
6553 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
6554 until no work remains" in test code. (the large diff here
6555 is just code movement, no actual changes)
6557 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
6558 1, no point waiting around for test code.
6559 (_dbus_server_debug_accept_transport): unref the timeout
6560 after adding it (right?)
6562 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
6564 2003-03-13 Havoc Pennington <hp@redhat.com>
6566 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
6569 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
6572 * dbus/dbus-connection.h: Make AddWatchFunction and
6573 AddTimeoutFunction return a bool so they can fail on out-of-memory
6575 * bus/bus.c (bus_context_new): set up timeout handlers
6577 * bus/connection.c (bus_connections_setup_connection): set up
6580 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
6583 * bus/bus.c (bus_context_new): adapt to changes
6585 * bus/connection.c: adapt to changes
6587 * test/watch.c: adapt to DBusWatch changes
6589 * bus/dispatch.c (bus_dispatch_test): started adding this but
6592 2003-03-14 Anders Carlsson <andersca@codefactory.se>
6594 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
6596 2003-03-13 Havoc Pennington <hp@pobox.com>
6598 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
6599 set up a test framework as for the library
6601 2003-03-12 Havoc Pennington <hp@pobox.com>
6603 Throughout: purge global variables, introduce BusActivation,
6604 BusConnections, BusRegistry, etc. objects instead.
6606 * bus/bus.h, bus/bus.c: introduce BusContext as a global
6609 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
6610 going to redo this a bit differently I think
6612 2003-03-12 Havoc Pennington <hp@redhat.com>
6614 Mega-patch that gets the message bus daemon initially handling
6615 out-of-memory. Work still needed. Also lots of random
6616 moving stuff to DBusError instead of ResultCode.
6618 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
6620 * dbus/dbus-connection.c
6621 (dbus_connection_send_with_reply_and_block): use DBusError
6623 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
6626 * dbus/dbus-connection.c (dbus_connection_send): drop the result
6627 code here, as the only failure possible is OOM.
6629 * bus/connection.c (bus_connection_disconnect):
6630 rename bus_connection_disconnected as it's a notification only
6632 * bus/driver.c (bus_driver_handle_acquire_service): don't free
6633 "name" on get_args failure, should be done by get_args;
6634 don't disconnect client for bad args, just return an error.
6635 (bus_driver_handle_service_exists): ditto
6637 * bus/services.c (bus_services_list): NULL-terminate returned array
6639 * bus/driver.c (bus_driver_send_service_lost)
6640 (bus_driver_send_service_acquired): send messages from driver to a
6641 specific client to the client's unique name, not to the broadcast
6644 * dbus/dbus-message.c (decode_header_data): reject messages that
6645 contain no name field
6646 (_dbus_message_get_client_serial): rename to
6647 dbus_message_get_serial and make public
6648 (_dbus_message_set_serial): rename from set_client_serial
6649 (_dbus_message_set_reply_serial): make public
6650 (_dbus_message_get_reply_serial): make public
6652 * bus/connection.c (bus_connection_foreach): allow stopping
6653 iteration by returning FALSE from foreach function.
6655 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
6656 (dbus_connection_free_preallocated_send)
6657 (dbus_connection_preallocate_send): new API for sending a message
6658 without possibility of malloc failure.
6659 (dbus_connection_send_message): rename to just
6660 dbus_connection_send (and same for whole function family)
6662 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
6664 * dbus/dbus-sysdeps.c (_dbus_exit): new function
6666 * bus/activation.c: handle/return errors
6668 * dbus/dbus-errors.h: add more DBUS_ERROR #define
6670 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
6671 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
6672 (_dbus_result_from_errno): move to this file
6674 2003-03-10 Anders Carlsson <andersca@codefactory.se>
6676 * dbus/dbus-marshal.c:
6677 (_dbus_marshal_set_string):
6678 Take a length argument so we can marshal the correct string
6681 (_dbus_marshal_dict), (_dbus_demarshal_dict),
6682 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
6683 (_dbus_marshal_test):
6684 * dbus/dbus-marshal.h:
6685 Add support for marshalling and demarshalling dicts.
6687 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6688 Add support for TYPE DICT.
6690 * dbus/dbus-message.c: (set_string_field):
6691 Adjust header padding.
6693 (dbus_message_append_args_valist), (dbus_message_append_dict),
6694 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
6695 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
6696 (check_message_handling), (check_have_valid_message):
6697 * dbus/dbus-message.h:
6698 Add functions for setting and getting dicts.
6700 * dbus/dbus-protocol.h:
6706 * doc/dbus-specification.sgml:
6707 Add information about how dicts are marshalled.
6709 * test/data/invalid-messages/dict-with-nil-value.message:
6710 * test/data/invalid-messages/too-short-dict.message:
6711 * test/data/valid-messages/dict-simple.message:
6712 * test/data/valid-messages/dict.message:
6713 Add sample messages containing dicts.
6715 2003-03-08 Anders Carlsson <andersca@codefactory.se>
6717 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
6719 2003-03-07 Anders Carlsson <andersca@codefactory.se>
6722 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6723 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
6724 (dbus_dict_set_int32), (dbus_dict_set_uint32),
6725 (dbus_dict_set_double), (dbus_dict_set_string),
6726 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6727 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6728 (dbus_dict_set_string_array), (_dbus_dict_test):
6730 Fix according to comments from Havoc.
6732 2003-03-06 Michael Meeks <michael@server.home>
6734 * configure.in: if we don't have kde-config, disable have_qt.
6736 2003-03-07 Anders Carlsson <andersca@codefactory.se>
6741 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6742 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
6743 (dbus_dict_remove), (dbus_dict_get_value_type),
6744 (dbus_dict_get_keys), (dbus_dict_put_boolean),
6745 (dbus_dict_put_int32), (dbus_dict_put_uint32),
6746 (dbus_dict_put_double), (dbus_dict_put_string),
6747 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
6748 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
6749 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
6750 (dbus_dict_get_int32), (dbus_dict_get_uint32),
6751 (dbus_dict_get_double), (dbus_dict_get_string),
6752 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
6753 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
6754 (dbus_dict_get_string_array), (_dbus_dict_test):
6756 Add DBusDict implementation
6758 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
6762 2003-03-04 Havoc Pennington <hp@pobox.com>
6764 * test/data/auth/*: adapt to changes
6766 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
6767 USERID_BASE64 and change USERNAME_BASE64 to put in username not
6770 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
6771 more stuff from being in a context name, to make the protocol
6772 simpler to deal with
6774 * dbus/dbus-errors.c (dbus_error_has_name): new function
6775 (dbus_error_is_set): new function
6777 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
6778 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
6780 * dbus/dbus-connection.c (dbus_connection_flush): also read
6781 messages during a flush operation
6783 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
6785 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6787 * configure.in: Check for gethostbyname on Solaris.
6789 * dbus/dbus-transport.c: (_dbus_transport_open):
6790 Remove duplicate "tcp" entry.
6792 * doc/dbus-specification.sgml:
6793 Clarify some things.
6795 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6797 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
6798 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
6799 (_dbus_keyring_test):
6800 * dbus/dbus-md5.c: (_dbus_md5_compute):
6801 * dbus/dbus-sha.c: (_dbus_sha_compute):
6804 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6806 * README: Add some things.
6808 2003-03-04 Anders Carlsson <andersca@codefactory.se>
6810 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
6811 after case DBUS_TYPE_BOOELAN.
6813 2003-03-02 Havoc Pennington <hp@pobox.com>
6815 * test/break-loader.c (randomly_set_extreme_ints): add test that
6816 sets really huge and small integers
6818 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
6819 that length of boolean array fits in the string, and that
6820 string has room for boolean value in single-bool case.
6822 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
6823 optional value to "ALIGN" command which is what to fill the
6826 * test/data/valid-messages/no-padding.message: add regression
6827 test for the message padding problem
6829 2003-03-02 Havoc Pennington <hp@pobox.com>
6831 * dbus/dbus-message.c (decode_header_data): fix to always init
6832 message_padding, from Benjamin Dauvergne
6834 2003-03-02 Havoc Pennington <hp@pobox.com>
6840 2003-03-01 Joe Shaw <joe@assbarn.com>
6842 * configure.in: Check for "struct cmsgcred" and try to access its
6843 members for BSD-like unices.
6845 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
6846 _dbus_read_credentials_unix_socket().
6847 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
6848 read() for reading the credential byte off the unix socket. Use
6849 struct cmsgcred on systems that support it.
6851 2003-02-27 Alexander Larsson <alexl@redhat.com>
6855 Make gthreads-2.0 dependency optional. Don't build thread test if
6858 2003-02-27 Havoc Pennington <hp@pobox.com>
6860 * dbus/dbus-connection.c
6861 (dbus_connection_send_message_with_reply_and_block): fix doh!
6862 doh! doh! bug that resulted in never removing a reply from the
6863 queue, no wonder we called get_reply_serial so much ;-)
6865 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
6866 and client serial instead of demarshaling them every time
6868 2003-02-27 Havoc Pennington <hp@pobox.com>
6870 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
6871 more inlined, using dbus-string-private.h, speeds things up
6874 * dbus/dbus-string.c (_dbus_string_free): apply align offset
6875 when freeing the string
6876 (_dbus_string_steal_data): fix for align offset
6877 (undo_alignment): new function
6879 2003-02-26 Havoc Pennington <hp@redhat.com>
6881 All kinds of audit fixes from Owen, plus initial attempt to
6882 handle unaligned memory returned from malloc.
6884 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
6885 leave room for align_offset and nul byte
6886 (fixup_alignment): function to track an align_offset and
6887 ensure real->str is aligned
6888 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
6889 to allow a nul byte plus align offset
6890 (_dbus_string_lock): fix overflow issue
6891 (_dbus_string_init_const_len): add assertions on sanity of len,
6892 assign allocated to be ALLOCATION_PADDING larger than len
6893 (set_length): fixup the overflow handling
6894 (_dbus_string_get_data_len): fix overflow in assertion
6895 (open_gap): detect overflow in size of gap to be opened
6896 (_dbus_string_lengthen): add overflow check
6897 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
6898 (_dbus_string_append): add overflow check
6899 (_dbus_string_append_unichar): overflow
6900 (_dbus_string_delete): fix overflow in assertion
6901 (_dbus_string_copy_len): overflow in assertion
6902 (_dbus_string_replace_len): overflows in assertions
6903 (_dbus_string_find): change to implement in terms of
6904 _dbus_string_find_to
6905 (_dbus_string_find_to): assorted fixage
6906 (_dbus_string_equal_c_str): assert c_str != NULL,
6907 fix logic so the function works
6908 (_dbus_string_ends_with_c_str): fix overflow thingy
6909 (_dbus_string_base64_encode): overflow fix
6910 (_dbus_string_validate_ascii): overflow
6911 (_dbus_string_validate_nul): overflow
6913 2003-02-26 Havoc Pennington <hp@redhat.com>
6915 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
6917 2003-02-26 Alexander Larsson <alexl@redhat.com>
6920 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
6922 * dbus/dbus-connection.c:
6923 * dbus/dbus-connection.h:
6924 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
6925 Add dbus_connection_set_wakeup_main_function and use it when queueing
6926 incoming and outgoing messages.
6929 * dbus/dbus-dataslot.c:
6930 Threadsafe usage of DBusDataSlotAllocator
6932 * dbus/dbus-message.c: (dbus_message_get_args_iter):
6935 * dbus/dbus-server-unix.c:
6938 * glib/dbus-gmain.c:
6939 Implement the new wakeup functions for glib.
6942 * glib/test-thread-client.c:
6943 * glib/test-thread-server.c:
6944 * glib/test-thread.h:
6945 Initial cut at some thread test code. Not really done yet.
6947 2003-02-26 Havoc Pennington <hp@pobox.com>
6949 * dbus/dbus-connection.c
6950 (dbus_connection_send_message_with_reply_and_block): fix crash
6951 where we ref'd the outgoing message instead of the returned reply
6953 * dbus/dbus-transport-unix.c (do_authentication): check read watch
6954 at the end of this function, so if we didn't need to read for
6955 authentication, we reinstall it for receiving messages
6957 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
6958 a NULL sender for peer-to-peer case
6960 * dbus/dbus-transport-unix.c (check_read_watch): handle
6961 !authenticated case correctly
6963 * glib/dbus-gmain.c: add support for DBusServer
6965 * dbus/dbus-server.c: add data slot support
6967 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
6968 return values and handle errors
6970 * dbus/dbus-dataslot.c: factor out the data slot stuff from
6973 * Doxyfile.in (INPUT): add glib subdir
6975 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
6976 setup_with_g_main instead of hookup_with_g_main; write docs
6978 2003-02-24 Anders Carlsson <andersca@codefactory.se>
6980 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
6981 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6982 * dbus/dbus-message.c: (dbus_message_append_boolean),
6983 (dbus_message_append_boolean_array),
6984 (dbus_message_get_args_valist), (_dbus_message_test):
6985 * dbus/dbus-message.h:
6986 * doc/dbus-specification.sgml:
6987 Various fixes as pointed out by Havoc.
6989 * test/data/invalid-messages/bad-boolean-array.message:
6990 * test/data/invalid-messages/bad-boolean.message:
6991 Add invalid boolean value test cases.
6993 2003-02-24 Anders Carlsson <andersca@codefactory.se>
6995 * dbus/dbus-internals.c: (_dbus_type_to_string):
6996 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6997 (_dbus_marshal_validate_arg):
6998 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6999 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7000 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
7001 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
7002 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
7003 (dbus_message_iter_get_double),
7004 (dbus_message_iter_get_boolean_array), (message_iter_test):
7005 * dbus/dbus-message.h:
7006 * dbus/dbus-protocol.h:
7007 * doc/dbus-specification.sgml:
7008 * test/data/valid-messages/lots-of-arguments.message:
7009 Add support for boolean and boolean array types.
7011 2003-02-23 Havoc Pennington <hp@pobox.com>
7013 * dbus/dbus-keyring.c: finish most of this implementation and
7016 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7017 these barf if the error isn't cleared to NULL
7019 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
7020 (_dbus_create_directory): new function
7022 * dbus/dbus-errors.c (dbus_set_error): fix warning
7024 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
7025 (_dbus_string_hex_decode): new function
7026 (test_hex_roundtrip): test code
7028 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
7030 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
7032 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
7033 the save-to-temp/rename trick to atomically write the new file
7034 (_dbus_string_parse_uint): new function
7036 2003-02-22 Havoc Pennington <hp@pobox.com>
7038 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
7040 2003-02-22 Havoc Pennington <hp@pobox.com>
7042 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
7043 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
7045 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7047 * dbus/test/data/sha-1: add US government test suite for SHA-1
7049 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7051 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7052 Make string arrays NULL-terminated.
7054 * dbus/dbus-memory.c: (dbus_free_string_array):
7055 * dbus/dbus-memory.h:
7056 New function for freeing NULL-terminated string arrays.
7058 * dbus/dbus-message-builder.c: (append_quoted_string),
7059 (_dbus_message_data_load):
7060 Add support for array types.
7062 * dbus/dbus-message.c: (check_message_handling):
7063 Add more types as test cases.
7065 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
7066 (_dbus_string_parse_double):
7067 Add the start offset to the end offset.
7069 * test/data/valid-messages/lots-of-arguments.message:
7070 New test message with lots of arguments.
7072 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7074 * dbus/dbus-message.c: (dbus_message_append_nil),
7075 (dbus_message_append_int32), (dbus_message_append_uint32),
7076 (dbus_message_append_double), (dbus_message_append_string),
7077 (dbus_message_append_int32_array),
7078 (dbus_message_append_uint32_array),
7079 (dbus_message_append_double_array),
7080 (dbus_message_append_byte_array),
7081 (dbus_message_append_string_array):
7082 Fix all out-of-memory handling in these functions.
7084 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7086 * dbus/dbus-message.c: (dbus_message_append_nil):
7089 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7091 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7092 (dbus_message_append_nil), (dbus_message_append_int32_array),
7093 (dbus_message_append_uint32_array),
7094 (dbus_message_append_double_array),
7095 (dbus_message_append_byte_array),
7096 (dbus_message_append_string_array), (dbus_message_get_args_valist),
7097 (dbus_message_iter_get_int32_array),
7098 (dbus_message_iter_get_uint32_array),
7099 (dbus_message_iter_get_double_array),
7100 (dbus_message_iter_get_byte_array),
7101 (dbus_message_iter_get_string_array):
7103 * dbus/dbus-message.h:
7104 Add functions for appending and getting arrays.
7106 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7108 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
7109 element size at least 8 bytes, fixes mempool tests on
7112 2003-02-20 Alexander Larsson <alexl@redhat.com>
7114 * dbus/dbus-transport-unix.c (unix_do_iteration):
7115 Unlock the connection mutex during a blocking select call.
7116 Add todo about how we need a way to wake up the select.
7118 * dbus/dbus-connection-internal.h:
7119 * dbus/dbus-connection.c:
7120 Add _dbus_connection_lock and _dbus_connection_unlock.
7122 2003-02-19 Havoc Pennington <hp@pobox.com>
7124 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
7125 Doxyfile.in, not Doxyfile
7127 * dbus/dbus-keyring.c: do some hacking on this
7129 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
7131 * dbus/dbus-errors.c (dbus_set_error_const): do not call
7133 (dbus_set_error): remove dbus_error_init, check for message ==
7134 NULL *before* we sprintf into it, and add @todo about including
7135 system headers in this file
7137 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
7139 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
7141 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
7142 get various bits of user information based on either username
7144 (_dbus_homedir_from_username): new function
7146 2003-02-19 Anders Carlsson <andersca@codefactory.se>
7149 Add check for nonposix getpwnam_r
7151 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
7152 Align the pool element size to a sizeof (void *) boundary.
7154 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
7155 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
7156 General Solaris fixes.
7158 * test/data/valid-messages/simplest-manual.message:
7159 Explicitly state that we want little-endian packing.
7161 2003-02-19 Mikael Hallendal <micke@codefactory.se>
7163 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7165 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
7166 Added to create a transport connecting using a tcp/ip socket.
7168 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
7169 to a tcp socket at given host and port.
7170 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
7173 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7175 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
7176 Added to create a server listening on a TCP/IP socket.
7178 2003-02-19 Havoc Pennington <hp@pobox.com>
7180 Throughout: mop up all the Doxygen warnings and undocumented
7183 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
7184 to search any paths.
7186 * dbus/dbus-threads.c: move global mutex initializers to
7187 dbus-internals.h, multiple prototypes was confusing doxygen
7188 besides being kind of ugly
7190 * Doxyfile (PREDEFINED): have Doxygen define
7191 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
7192 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
7193 (do not abuse the feature! it's for stuff like the autogenerated
7194 macros in dbus-md5.c, not just for things you don't feel like
7197 2003-02-18 Havoc Pennington <hp@pobox.com>
7199 * dbus/dbus-string.c (_dbus_string_zero): new function
7201 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
7202 wrap it in some dbus-friendly API
7204 * dbus/dbus-types.h: add 16-bit types
7206 2003-02-18 Joe Shaw <joe@assbarn.com>
7208 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
7209 credentials from our currently running process.
7210 (get_word): Fix a buglet where we were copying the entire length
7211 instead of relative to our position.
7213 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
7214 keys on the stack... it's 640k of data.
7216 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
7217 read the credentials byte off the socket, even if we don't have
7219 (_dbus_poll): Implement poll() using select() for systems which
7222 * glib/test-dbus-glib.c (main): Print out an error if no
7223 parameters are given.
7225 * test/data/auth/fallback.auth-script: Added. Tests that a client
7226 can fallback to a secondary auth mechanism if the first fails.
7228 2003-02-18 Havoc Pennington <hp@pobox.com>
7232 2003-02-17 Havoc Pennington <hp@pobox.com>
7234 * doc/dbus-specification.sgml: lots of cosmetic
7235 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
7236 env variable to DBUS_BUS_ADDRESS, s/client/application/,
7237 s/server/bus/ (except in authentication section). Add a section
7238 "Message Bus Message Routing"
7240 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
7246 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7248 * doc/dbus-specification.sgml:
7249 Specification updates.
7251 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7253 * bus/activation.c: (bus_activation_init), (child_setup),
7254 (bus_activation_activate_service):
7256 * bus/main.c: (main):
7257 Set DBUS_ADDRESS environment variable.
7259 * dbus/dbus-errors.c: (dbus_set_error):
7260 Don't use va_copy since that's a C99 feature.
7262 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
7263 (_dbus_spawn_async):
7264 * dbus/dbus-sysdeps.h:
7265 Add child_setup_func to _dbus_spawn_async.
7267 * doc/dbus-specification.sgml:
7268 Update specification.
7270 * test/spawn-test.c: (setup_func), (main):
7273 2003-02-17 Alexander Larsson <alexl@redhat.com>
7275 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
7278 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7282 * doc/dbus-test-plan.sgml:
7283 Add test plan document.
7288 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7290 * dbus/dbus-message.c: (decode_header_data),
7291 (_dbus_message_loader_return_buffer):
7292 Set the header padding amount when loading a message.
7294 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7296 * bus/dispatch.c: (send_one_message):
7297 Only send broadcast messages to registered connections.
7299 * dbus/dbus-message.c: (dbus_message_name_is):
7300 * dbus/dbus-message.h:
7301 New convenience function.
7303 * dbus/dbus-transport-debug.c: (do_reading):
7304 Only dispatch one message per run.
7307 * test/bus-test.c: (new_connection_callback), (die),
7308 (test_hello_client1_handler), (test_hello_client2_handler),
7309 (test_hello_replies), (main):
7311 * test/bus-test-loop.[ch]:
7314 2003-02-16 Havoc Pennington <hp@pobox.com>
7316 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7317 backward conditional
7319 2003-02-16 Alexander Larsson <alexl@redhat.com>
7321 * dbus/dbus-connection.c:
7322 Implement sent_message_with_reply. (with_reply_and block is still
7324 Made dispatch_message not lose message if OOM.
7326 * dbus/dbus-errors.h:
7327 Add NoReply error (for reply timeouts).
7329 2003-02-16 Alexander Larsson <alexl@redhat.com>
7331 * dbus/dbus-hash.c (_dbus_hash_table_unref):
7332 Actually free keys and values when destroying hashtable.
7334 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7336 * dbus/dbus-auth.c: (client_try_next_mechanism):
7339 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
7340 Return TRUE if there's no thread implementation around.
7342 * glib/dbus-gmain.c: (free_source),
7343 (dbus_connection_hookup_with_g_main):
7344 Make sure to remove the GSource when the connection is finalized.
7346 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7348 * bus/dispatch.c: (bus_dispatch_message_handler):
7349 * dbus/dbus-errors.h:
7350 Return an error if someone tries to send a message to a service
7353 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7355 * bus/activation.c: (load_directory), (bus_activation_init),
7356 (bus_activation_activate_service):
7359 (bus_driver_handle_activate_service), (bus_driver_handle_message):
7360 More work on the activation handling.
7362 * dbus/dbus-errors.h:
7363 Add some error messages
7365 * dbus/dbus-message.c: (dbus_message_new_error_reply):
7366 * dbus/dbus-message.h:
7367 New function that creates an error message.
7369 * dbus/dbus-protocol.h:
7370 Add ACTIVATE_SERVER message.
7372 * dbus/dbus-server-unix.c: (unix_handle_watch),
7373 (_dbus_server_new_for_domain_socket):
7374 Call _dbus_fd_set_close_on_exec.
7376 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
7377 (_dbus_spawn_async), (_dbus_disable_sigpipe),
7378 (_dbus_fd_set_close_on_exec):
7379 * dbus/dbus-sysdeps.h:
7380 Add _dbus_fd_set_close_on exec function. Also add function that checks
7381 that all open fds are set to close-on-exec and warns otherwise.
7383 * dbus/dbus-transport-unix.c:
7384 (_dbus_transport_new_for_domain_socket):
7385 Call _dbus_fd_set_close_on_exec.
7387 2003-02-16 Havoc Pennington <hp@pobox.com>
7389 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
7390 allow people to avoid setting SIGPIPE to SIG_IGN
7391 (_dbus_connection_new_for_transport): disable SIGPIPE unless
7392 we've been asked not to
7394 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7396 * dbus/dbus-list.c: (_dbus_list_append_link),
7397 (_dbus_list_prepend_link):
7398 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
7402 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7405 * bus/activation.c: (bus_activation_entry_free),
7406 (add_desktop_file_entry), (load_directory), (bus_activation_init):
7408 * bus/main.c: (main):
7409 Add simple activation support, doesn't work yet though.
7411 2003-02-15 Zack Rusin <zack@kde.org>
7413 * qt/dbus-qthread.cpp: small casting fix
7415 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7417 * dbus/dbus-errors.c: (dbus_set_error):
7418 * dbus/dbus-errors.h:
7419 Add a few errors and make dbus_set_error void.
7421 * dbus/dbus-sysdeps.c:
7422 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
7423 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
7424 * dbus/dbus-sysdeps.h:
7425 Add _dbus_spawn_async.
7427 * test/spawn-test.c: (main):
7428 Test for _dbus_spawn_async.
7430 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7432 * dbus/dbus-internals.h:
7433 Fix build without tests.
7435 * dbus/dbus-list.c: (alloc_link):
7436 Fix a segfault when a malloc fails.
7438 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
7439 (dbus_malloc0), (dbus_realloc):
7440 Add support for malloc debugging.
7442 2003-02-15 Alexander Larsson <alexl@redhat.com>
7444 * dbus/dbus-threads.c:
7445 * dbus/dbus-threads.h:
7446 Add condvars. Remove static mutext from API.
7447 Implement static mutexes by initializing them from threads_init.
7449 * glib/dbus-gthread.c:
7450 * qt/dbus-qthread.cpp:
7451 Update with the thread api changes.
7456 Turn StaticMutex into normal mutex + init function.
7457 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
7458 _dbus_list_append_link, _dbus_list_prepend_link
7461 * dbus/dbus-sysdeps.c:
7462 * dbus/dbus-sysdeps.h:
7463 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
7464 _dbus_atomic_dec. Only slow fallback implementation at the moment.
7466 * dbus/dbus-protocol.h:
7467 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
7469 * dbus/dbus-message.c:
7470 Make ref/unref atomic.
7473 * dbus/dbus-connection-internal.h:
7474 * dbus/dbus-connection.c:
7475 * dbus/dbus-connection.h:
7477 Change _peek to _borrow,_return & _steal_borrowed.
7478 Change disconnect callback to event.
7479 Make dbus_connection_dispatch_messages reentrant.
7481 * dbus/dbus-transport.c:
7482 Don't ref the connection on calls to the transport
7485 * dbus/dbus-message-handler.c:
7488 * glib/dbus-gmain.c:
7489 Don't use peek_message anymore
7492 * test/debug-thread.c:
7493 * test/debug-thread.h:
7494 Simple thread implementation that asserts() on deadlocks in
7495 single-threaded code.
7498 (main) Call debug_threads_init.
7501 Use disconnect message instead of disconnect callback.
7505 Don't call dbus_connection_set_disconnect_function. Instead export
7506 bus_connection_disconnect.
7509 Call bus_connection_disconnect when we get a disconnected message.
7511 2003-02-15 Havoc Pennington <hp@pobox.com>
7513 * dbus/dbus-message.c (dbus_message_new): fool around with the
7516 2003-02-14 Havoc Pennington <hp@pobox.com>
7518 * dbus/dbus-mempool.c: fail if the debug functions so indicate
7520 * dbus/dbus-memory.c: fail if the debug functions indicate we
7523 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
7524 (_dbus_decrement_fail_alloc_counter): debug functions to
7525 simulate memory allocation failures
7527 2003-02-14 Havoc Pennington <hp@pobox.com>
7529 * dbus/dbus-errors.h (struct DBusError): add a word of padding
7532 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7534 * bus/driver.c: (bus_driver_handle_hello):
7536 * bus/services.c: (bus_service_lookup):
7537 Reorder message sending so we get a more sane order.
7539 * test/bus-test.c: (message_handler):
7542 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7544 * bus/driver.c: (bus_driver_send_service_deleted),
7545 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7546 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7547 (bus_driver_send_welcome_message),
7548 (bus_driver_handle_list_services),
7549 (bus_driver_handle_acquire_service),
7550 (bus_driver_handle_service_exists):
7551 * dbus/dbus-bus.c: (dbus_bus_register_client),
7552 (dbus_bus_acquire_service), (dbus_bus_service_exists):
7553 * dbus/dbus-errors.c: (dbus_result_to_string):
7554 * dbus/dbus-errors.h:
7555 * dbus/dbus-message.c: (dbus_message_append_args),
7556 (dbus_message_append_args_valist), (dbus_message_get_args),
7557 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
7558 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
7559 (dbus_message_iter_get_byte_array),
7560 (dbus_message_iter_get_string_array), (message_iter_test),
7561 (check_message_handling), (_dbus_message_test):
7562 * dbus/dbus-message.h:
7563 * test/bus-test.c: (main):
7564 Change fields to arguments in messages, so that they won't be
7565 confused with header fields.
7567 * glib/test-dbus-glib.c: (main):
7568 Remove append_fields from hello message.
7570 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7572 * dbus/dbus-errors.c:
7573 * dbus/dbus-message.c:
7574 * dbus/dbus-string.c:
7575 Documentation fixes.
7577 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7579 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
7581 Implement support for timeouts in dbus-glib.
7583 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7585 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7586 * dbus/dbus-message.c: (process_test_subdir):
7587 * test/break-loader.c: (find_breaks_based_on):
7588 Plug some memory leaks.
7590 2003-02-13 Richard Hult <rhult@codefactory.se>
7592 * bus/main.c: Fix build.
7594 * dbus/dbus-errors.h:
7595 * dbus/dbus-errors.c: Fix copyright for Anders.
7597 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7602 * bus/connection.c: (bus_connection_foreach):
7605 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
7606 (unescape_string), (new_section), (parse_section_start),
7607 (parse_key_value), (report_error), (bus_desktop_file_load),
7608 (bus_desktop_file_get_string):
7609 * bus/desktop-file.h:
7610 Use DBusError for error reporting.
7612 * bus/dispatch.c: (send_one_message),
7613 (bus_dispatch_message_handler):
7614 * bus/driver.c: (bus_driver_send_service_deleted),
7615 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7616 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7617 (bus_driver_send_welcome_message),
7618 (bus_driver_handle_list_services),
7619 (bus_driver_handle_acquire_service),
7620 (bus_driver_handle_service_exists):
7621 * bus/loop.c: (bus_loop_run):
7623 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
7625 * bus/utils.c: (bus_wait_for_memory):
7627 New files with general utility functions.
7629 * dbus/dbus-internals.h:
7630 Remove _DBUS_HANDLE_OOM.
7632 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7634 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
7635 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
7636 * dbus/dbus-errors.h:
7637 Add DBusError structure.
7639 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7641 * test/data/valid-messages/standard-acquire-service.message:
7642 * test/data/valid-messages/standard-hello.message:
7643 * test/data/valid-messages/standard-list-services.message:
7644 * test/data/valid-messages/standard-service-exists.message:
7645 Add some standard messages.
7647 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7649 * bus/driver.c: (bus_driver_send_welcome_message),
7650 (bus_driver_handle_list_services),
7651 (bus_driver_handle_acquire_service),
7652 (bus_driver_handle_service_exists), (bus_driver_handle_message):
7653 Update for API changes in libdbus.
7655 * dbus/dbus-message.c: (dbus_message_new_reply):
7656 * dbus/dbus-message.h:
7657 Remove the name argument. The spec states that replies shouldn't
7660 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7662 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
7663 (report_error), (bus_desktop_file_load), (lookup_section),
7664 (lookup_line), (bus_desktop_file_get_raw),
7665 (bus_desktop_file_get_string):
7666 * bus/desktop-file.h:
7667 Some fixes, and new functions for getting a key value from a section.
7669 2003-02-13 Havoc Pennington <hp@pobox.com>
7671 * test/data/auth/fail-after-n-attempts.auth-script: new test
7673 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
7676 2003-02-13 Havoc Pennington <hp@pobox.com>
7678 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
7679 dbus_credentials_match were backward
7681 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
7682 NO_CREDENTIALS and ROOT_CREDENTIALS
7684 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
7685 into here. Never process more commands after we've reached an
7686 end state; store further data as unused bytes.
7688 * test/data/auth/*: add more auth tests
7690 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
7691 command to match exact string and EXPECT_UNUSED to match unused
7694 * test/Makefile.am (dist-hook): fix to dist all the test stuff
7696 2003-02-12 Havoc Pennington <hp@pobox.com>
7698 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
7699 \r off of popped lines
7701 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
7704 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
7707 2003-02-12 Havoc Pennington <hp@pobox.com>
7709 * dbus/Makefile.am: remove break-loader from the build, since it
7712 * configure.in: add --enable-gcov to turn on coverage profiling
7713 flags and disable optimization
7715 2003-02-10 Havoc Pennington <hp@pobox.com>
7717 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
7718 initial cut at test framework for DBusAuth from laptop.
7719 Doesn't quite work yet but it compiles and I need to get
7720 it off the 266mhz laptop. ;-)
7722 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
7723 fix a memleak in error case
7725 2003-02-12 Anders Carlsson <andersca@codefactory.se>
7728 * bus/desktop-file.c:
7729 * bus/desktop-file.h:
7730 Add a desktop file parser.
7732 2003-02-11 Zack Rusin <zack@kde.org>
7734 * qt/message.[h|cpp]: sample implementation
7735 of the KDE wrapper for DBusMessage
7737 2003-02-09 Zack Rusin <zack@kde.org>
7739 * test/bus-test.c: make_it_compile
7740 * doc/dbus-specification.sgml: minimal semantic fix
7742 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7748 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7751 * dbus/dbus-break-loader.c:
7753 * test/break-loader.c:
7754 Move dbus-break-loader to test/ and rename it to break-loader.
7756 2003-02-02 Havoc Pennington <hp@pobox.com>
7758 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
7759 for code to manage cookies in your home directory
7761 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
7763 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
7764 to authenticate, then disconnect the client.
7766 2003-02-03 Alexander Larsson <alexl@redhat.com>
7768 * dbus/dbus-message.c (dbus_message_append_fields):
7771 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7773 * doc/dbus-specification.sgml:
7774 Update address format section.
7776 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7779 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
7780 (message_handler), (new_connection_callback), (loop_quit),
7784 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7786 * bus/driver.c: (bus_driver_handle_service_exists):
7787 Simplify the code a bit.
7789 * dbus/dbus-bus.c: (dbus_bus_service_exists):
7792 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7795 Add libdbus-daemon.la and link to it.
7797 2003-02-01 James Willcox <jwillcox@gnome.org>
7799 * bus/driver.c: (bus_driver_handle_own_service):
7800 Actually include the service reply code in the message.
7802 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7804 * bus/driver.c: (bus_driver_handle_service_exists):
7805 Don't unref the incoming message.
7807 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7809 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
7811 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7813 * dbus/dbus-server.c: (dbus_server_listen):
7814 * dbus/dbus-transport.c: (_dbus_transport_open):
7815 ifdef out the calls to the debug transport and server.
7817 2003-02-02 Alexander Larsson <alexl@redhat.com>
7819 * dbus/dbus-watch.c (dbus_watch_get_flags):
7820 Add note in the docs that ERROR or HANGUP won't be returned
7821 and are assumed always on.
7823 * glib/dbus-gmain.c (add_watch):
7824 Always add IO_ERR | IO_HUP
7826 * dbus/dbus-message.h:
7827 Add semicolon after dbus_message_iter_get_string_array().
7828 Makes qt code build again
7830 2003-02-01 Anders Carlsson <andersca@codefactory.se>
7832 * bus/driver.c: (create_unique_client_name),
7833 (bus_driver_handle_hello):
7834 Don't take a name, just use a numeric id to identify
7838 * dbus/dbus-bus.c: (dbus_bus_register_client),
7839 (dbus_bus_acquire_service), (dbus_bus_service_exists):
7841 Add new convenience functions for communicating with the bus.
7843 * dbus/dbus-message.h:
7845 * dbus/dbus-protocol.h:
7848 2003-02-01 Alexander Larsson <alexl@redhat.com>
7850 * dbus/dbus-message.c (dbus_message_append_fields):
7851 Add some more doc comments.
7853 2003-02-01 Havoc Pennington <hp@pobox.com>
7855 * dbus/dbus-break-loader.c (randomly_modify_length): change
7856 a 4-byte value in the message as if it were a length
7858 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
7859 execute bit on saved files
7861 2003-02-01 Havoc Pennington <hp@pobox.com>
7863 * dbus/dbus-break-loader.c (main): new program to find messages
7864 that break the loader.
7866 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
7867 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
7869 * dbus/dbus-string.c (_dbus_string_set_byte): new
7871 2003-01-31 Havoc Pennington <hp@pobox.com>
7873 * dbus/dbus-message.c: refactor the test code to be more general,
7874 in preparation for writing a "randomly permute test cases to
7875 try to break the loader" program.
7877 2003-01-31 Havoc Pennington <hp@pobox.com>
7879 * doc/dbus-specification.sgml: work on the specification
7881 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
7882 the protocol version of the message.
7884 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
7885 no longer specifies that.
7886 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
7889 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
7890 "break" for DBUS_TYPE_NIL, remove @todo
7892 2003-01-31 Havoc Pennington <hp@pobox.com>
7894 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
7895 just set_is_error/get_is_error as this is a commonly-used
7896 function, and write docs.
7898 2003-01-31 Anders Carlsson <andersca@codefactory.se>
7900 * dbus/dbus-address.c: (dbus_address_entry_free):
7901 Free key and value lists.
7903 * dbus/dbus-internals.c: (_dbus_type_to_string):
7904 Add the types we didn't have.
7906 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7907 (_dbus_marshal_validate_arg):
7910 * dbus/dbus-message.c: (dbus_message_set_sender):
7911 Remove todo about being able to set sender to NULL.
7913 (dbus_message_set_is_error_reply),
7914 (dbus_message_get_is_error_reply):
7915 * dbus/dbus-message.h:
7918 * dbus/dbus-protocol.h:
7919 Add error reply flag.
7921 * test/data/valid-messages/opposite-endian.message:
7922 Add NIL type to test.
7924 2003-01-31 Havoc Pennington <hp@pobox.com>
7926 * doc/dbus-specification.sgml: fully specify the header. Add
7927 flags and major protocol version, and change header/body len to
7930 * dbus/dbus-message-builder.c (append_saved_length): append length
7933 * dbus/dbus-message.c (dbus_message_create_header): change header
7934 length and body length to unsigned. Add the new fields from the
7936 (_dbus_message_loader_return_buffer): unsigned header/body len
7938 2003-01-30 Havoc Pennington <hp@pobox.com>
7940 * dbus/dbus-auth.c: rework to use only REJECTED, no
7943 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
7944 use REJECTED, suggested by Mark McLoughlin
7946 2003-01-30 Havoc Pennington <hp@pobox.com>
7948 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
7949 a better way to report errors here. e.g. "unix address lacks
7950 path" or something. also "no such file" when the path doesn't
7953 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
7955 (dbus_parse_address): add @todo about documenting address format,
7956 and allowing , and ; to be escaped
7958 2003-01-30 Anders Carlsson <andersca@codefactory.se>
7961 Add dbus-address.[ch]
7963 * dbus/dbus-address.c: (dbus_address_entry_free),
7964 (dbus_address_entries_free), (create_entry),
7965 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
7966 (dbus_parse_address), (_dbus_address_test):
7967 * dbus/dbus-address.h:
7968 New files for dealing with address parsing.
7970 * dbus/dbus-connection.c:
7971 Document timeout functions.
7973 * dbus/dbus-message.c:
7974 Document dbus_message_new_from_message.
7976 * dbus/dbus-server-debug.c:
7979 * dbus/dbus-server.c: (dbus_server_listen):
7980 Parse address and use correct server implementation.
7982 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
7983 * dbus/dbus-string.h:
7984 New function with test.
7986 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
7990 * dbus/dbus-transport-debug.c:
7993 * dbus/dbus-transport.c: (_dbus_transport_open):
7994 Parse address and use correct transport implementation.
7996 2003-01-30 Havoc Pennington <hp@pobox.com>
7998 * dbus/dbus-message.c: use message->byte_order instead of
7999 DBUS_COMPILER_BYTE_ORDER throughout.
8000 (dbus_message_create_header): pad header to align the
8001 start of the body of the message to 8-byte boundary
8003 * dbus/dbus-marshal.h: make all the demarshalers take const
8004 DBusString arguments.
8006 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
8007 validate message args here, so we don't have to do slow validation
8008 later, and so we catch bad messages as they are incoming. Also add
8009 better checks on header_len and body_len. Also fill in
8012 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
8013 implemented properly)
8014 (_dbus_string_validate_nul): new function to check all-nul
8016 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
8017 get_arg_end_pos and remove all validation
8018 (_dbus_marshal_validate_arg): actually do validation here.
8020 2003-01-29 Havoc Pennington <hp@pobox.com>
8022 * dbus/dbus-message.c (check_message_handling): fix assertion
8023 failure on set_client_serial
8025 2003-01-28 Havoc Pennington <hp@pobox.com>
8027 * dbus/dbus-server-debug.c: Add doc section comments
8029 * dbus/dbus-transport-debug.c: add doc section comments
8031 2003-01-28 Havoc Pennington <hp@redhat.com>
8033 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
8034 the reverse order from how I had it
8035 (_dbus_string_base64_encode): reverse encoding order. I was
8036 basically byteswapping everything during encoding.
8038 2003-01-28 Anders Carlsson <andersca@codefactory.se>
8040 * dbus/dbus-connection-internal.h:
8041 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
8042 (_dbus_connection_remove_timeout):
8043 Add functions for adding and removing timeouts.
8045 * dbus/dbus-message.c: (dbus_message_new_from_message):
8046 Add new function that takes a message and creates an exact
8047 copy of it, but with the refcount set to 1.
8048 (check_message_handling):
8051 * dbus/dbus-server-protected.h:
8052 * dbus/dbus-server.c: (_dbus_server_init_base),
8053 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
8054 (dbus_server_set_timeout_functions):
8055 (_dbus_server_remove_timeout):
8056 New functions so that a server can add and remove timeouts.
8058 (dbus_server_listen):
8059 Add commented out call to dbus_server_debug_new.
8061 * dbus/dbus-timeout.c: (_dbus_timeout_new):
8062 Actually set the handler, doh.
8064 * dbus/dbus-transport.c: (_dbus_transport_open):
8065 Add commented out call to dbus_transport_debug_client_new.
8068 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
8070 2003-01-28 Havoc Pennington <hp@pobox.com>
8072 * dbus/dbus-message.c (check_message_handling): function to check
8073 on the loaded message, iterates over it etc.
8075 2003-01-28 Havoc Pennington <hp@pobox.com>
8077 * test/Makefile.am (dist-hook): fix make distdir
8079 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
8081 2003-01-27 Havoc Pennington <hp@pobox.com>
8083 * dbus/dbus-mempool.c (time_for_size): replace printf with
8086 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
8087 empty lines; fix the SAVE_LENGTH stuff to be
8088 START_LENGTH/END_LENGTH so it actually works; couple other
8091 * test/Makefile.am (dist-hook): add dist-hook for .message files
8093 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
8094 can be constant or locked.
8095 (_dbus_string_free): allow freeing a const string as
8098 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
8100 * dbus/dbus-test-main.c (main): take an argument which is the
8101 directory containing test data
8103 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
8104 argument to this and load all the messages in test/data/
8105 checking that they can be loaded or not loaded as appropriate.
8107 2003-01-27 Anders Carlsson <andersca@codefactory.se>
8109 * bus/dispatch.c: (bus_dispatch_message_handler):
8110 Dispatch messages sent to services.
8112 * bus/driver.c: (bus_driver_send_service_deleted),
8113 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8114 (bus_driver_send_service_acquired):
8115 Add helper functions for sending service related messages.
8117 (bus_driver_send_welcome_message):
8118 Send HELLO_REPLY instead of WELCOME.
8120 (bus_driver_handle_list_services):
8121 Send LIST_SERVICES_REPLY instead of SERVICES.
8123 (bus_driver_handle_own_service),
8124 (bus_driver_handle_service_exists):
8125 New message handlers.
8127 (bus_driver_handle_message):
8128 Invoke new message handlers.
8130 (bus_driver_remove_connection):
8131 Don't remove any services here since that's done automatically
8132 by bus_service_remove_owner now.
8135 New function signatures.
8137 * bus/services.c: (bus_service_add_owner):
8138 Send ServiceAcquired message if we're the only primary owner.
8140 (bus_service_remove_owner):
8141 Send ServiceAcquired/ServiceLost messages.
8143 (bus_service_set_prohibit_replacement),
8144 (bus_service_get_prohibit_replacement):
8145 Functions for setting prohibit replacement.
8147 (bus_service_has_owner):
8148 New function that checks if a connection is in the owner queue of
8152 Add new function signatures.
8154 * dbus/dbus-list.c: (_dbus_list_test):
8155 Add tests for _dbus_list_remove_last and traversing the list backwards.
8158 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
8159 go any further, so return NULL then.
8161 * dbus/dbus-protocol.h:
8162 Add new messages, service flags and service replies.
8164 2003-01-26 Havoc Pennington <hp@pobox.com>
8166 * dbus/dbus-message-builder.c: implement, completely untested.
8168 * test/data/*: add data to be used in testing.
8169 ".message" files are our simple loadable text format.
8170 ".message-raw" will be binary dumps of messages.
8172 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
8174 2003-01-26 Havoc Pennington <hp@pobox.com>
8176 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
8178 * dbus/dbus-errors.c (dbus_result_to_string): add
8181 * dbus/dbus-message-builder.c: new file, will contain code to load
8182 up messages from files. Not implemented yet.
8184 2003-01-26 Havoc Pennington <hp@pobox.com>
8186 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
8187 the sender by setting to NULL
8189 2003-01-26 Havoc Pennington <hp@pobox.com>
8191 The unit tests pass, but otherwise untested. If it breaks, the
8192 tests should have been better. ;-)
8194 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
8197 * dbus/dbus-message.c: redo everything so we maintain
8198 message->header as the only copy of the various fields.
8199 This avoids the possibility of out-of-memory in some cases,
8200 for example dbus_message_lock() can't run out of memory anymore,
8201 and avoids extra copying. Figured I may as well go ahead and do
8202 this since it was busted for dbus_message_lock to not return
8203 failure on OOM, and dbus_message_write_header was totally
8204 unchecked for OOM. Also fixed some random other bugs.
8206 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
8207 that strings are nul-terminated. Also, end_pos can be equal
8208 to string length just not greater than, I think.
8209 (_dbus_marshal_set_int32): new function
8210 (_dbus_marshal_set_uint32): new function
8211 (_dbus_marshal_set_string): new function
8213 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
8214 a warning, init timeout_list to NULL
8215 (dbus_connection_send_message): don't use uninitialized variable
8218 * dbus/dbus-string.c (_dbus_string_replace_len): new function
8220 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8222 * bus/driver.c: (bus_driver_handle_hello),
8223 (bus_driver_send_welcome_message):
8226 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8228 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
8229 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8230 (dbus_connection_unref):
8231 * dbus/dbus-marshal.c: (_dbus_marshal_test):
8232 * dbus/dbus-message.c: (dbus_message_unref),
8235 (dbus_message_get_fields):
8236 Remove debugging printout.
8238 (_dbus_message_loader_return_buffer):
8239 Don't store the header string.
8241 (_dbus_message_test):
8244 2003-01-26 Richard Hult <rhult@codefactory.se>
8246 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
8247 the file descriptor list, since it can change under us.
8249 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8251 * glib/dbus-gmain.c: (dbus_connection_prepare),
8252 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
8253 (remove_watch), (dbus_connection_hookup_with_g_main):
8254 Rewrite the glib handling to use its own GSource instead of a
8255 GIOChannel so we can catch messages put in the queue while waiting
8258 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8261 * bus/connection.c: (connection_disconnect_handler),
8262 (connection_watch_callback), (bus_connection_setup):
8263 * bus/dispatch.c: (send_one_message),
8264 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
8265 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
8267 * bus/driver.c: (bus_driver_send_service_deleted),
8268 (bus_driver_send_service_created), (bus_driver_handle_hello),
8269 (bus_driver_send_welcome_message),
8270 (bus_driver_handle_list_services), (bus_driver_remove_connection),
8271 (bus_driver_handle_message):
8273 Refactor code, put the message dispatching in its own file. Use
8274 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
8277 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8279 * dbus/dbus-internals.h:
8280 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
8282 * dbus/dbus-message.c: (dbus_message_get_sender):
8283 * dbus/dbus-message.h:
8284 Implement dbus_message_get_sender.
8286 * dbus/dbus-protocol.h:
8287 Add message and service defines.
8289 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8291 * dbus/dbus-connection.c: (dbus_connection_send_message):
8292 * dbus/dbus-message-internal.h:
8293 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
8294 (dbus_message_write_header):
8295 Remove _dbus_messag_unlock and don't set the client serial on a
8296 message if one already exists.
8298 2003-01-24 Havoc Pennington <hp@pobox.com>
8300 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
8303 * bus/driver.c (bus_driver_handle_list_services): fix a leak
8306 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8308 * dbus/dbus-list.c: (alloc_link), (free_link):
8309 Use a memory pool for the links.
8311 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8313 * bus/connection.c: (bus_connection_foreach):
8315 Add new bus_connection_foreach function.
8317 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
8318 Add function that broadcasts a message to all clients.
8320 (bus_driver_send_service_created), (bus_driver_handle_hello),
8321 (bus_driver_send_welcome_message),
8322 (bus_driver_handle_list_services), (bus_driver_message_handler):
8323 Implement functions that take care of listing services, and notifying
8324 clients when new services are created.
8326 * bus/services.c: (bus_services_list):
8328 Add new function that returns an array of strings with the currently
8329 registered services.
8332 * glib/dbus-gmain.c:
8333 Update copyright year.
8335 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8337 * dbus/dbus-connection.c: (dbus_connection_send_message):
8338 Unlock the message in case it was sent earlier.
8340 (dbus_connection_send_message_with_reply_and_block):
8341 Remove the reply message from the list.
8343 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8344 Set array_len and new_pos correctly.
8346 (_dbus_marshal_test):
8347 Remove debug output.
8349 * dbus/dbus-message-internal.h:
8350 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
8351 New function that returns the reply serial.
8353 (_dbus_message_unlock):
8354 New function that unlocks a message and resets its header.
8356 (dbus_message_append_string_array),
8357 (dbus_message_get_fields_valist),
8358 (dbus_message_iter_get_field_type),
8359 (dbus_message_iter_get_string_array),
8360 (dbus_message_get_fields),
8361 (dbus_message_append_fields_valist):
8362 Handle string arrays.
8364 (dbus_message_set_sender):
8365 Make this function public since the bus daemon needs it.
8367 (decode_header_data):
8368 Set the reply serial to -1 initially.
8370 * dbus/dbus-message.h:
8371 Add dbus_message_set_sender.
8373 2003-01-24 Havoc Pennington <hp@pobox.com>
8375 * doc/dbus-specification.sgml: add some stuff
8377 2003-01-22 Havoc Pennington <hp@pobox.com>
8379 * doc/dbus-specification.sgml: Start to document the protocol.
8381 2003-01-22 Havoc Pennington <hp@pobox.com>
8383 * dbus/dbus-connection.c
8384 (dbus_connection_send_message_with_reply_and_block): add some @todo
8386 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
8388 2003-01-21 Havoc Pennington <hp@pobox.com>
8390 (patch untested because can't compile)
8392 * bus/driver.c (create_unique_client_name): make this function
8393 never recycle client names. Also, caller should initialize
8396 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
8398 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8400 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8401 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8402 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
8403 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
8404 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
8405 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
8406 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
8407 * dbus/dbus-marshal.h:
8408 * dbus/dbus-protocol.h:
8409 Add support for marshalling and demarshalling integer, double
8412 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8417 * bus/connection.c: (connection_disconnect_handler):
8418 Remove the connection from the bus driver's list.
8420 (connection_watch_callback): Dispatch messages.
8422 (free_connection_data): Free connection name.
8424 (bus_connection_setup): Add connection to the bus driver's list.
8425 (bus_connection_remove_owned_service):
8426 (bus_connection_set_name), (bus_connection_get_name):
8427 Add functions for setting and getting the connection's name.
8430 Add function headers.
8432 * bus/driver.c: (create_unique_client_name),
8433 (bus_driver_handle_hello_message),
8434 (bus_driver_send_welcome_message), (bus_driver_message_handler),
8435 (bus_driver_add_connection), (bus_driver_remove_connection):
8438 * bus/services.c: (bus_service_free):
8440 New file that handles communication and registreation with the bus
8443 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8445 * dbus/dbus-connection.c: (dbus_connection_send_message):
8446 Add a new client_serial parameter.
8448 (dbus_connection_send_message_with_reply):
8449 Remove a @todo since we've implemented the blocking function.
8451 (dbus_connection_send_message_with_reply_and_block):
8452 New function that sends a message and waits for a reply and
8453 then returns the reply.
8455 * dbus/dbus-connection.h:
8458 * dbus/dbus-errors.c: (dbus_result_to_string):
8459 * dbus/dbus-errors.h:
8460 Add new DBUS_RESULT.
8462 * dbus/dbus-message-internal.h:
8463 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
8464 (_dbus_message_set_sender), (dbus_message_write_header),
8465 (dbus_message_new_reply), (decode_header_data),
8466 (_dbus_message_loader_return_buffer), (_dbus_message_test):
8467 * dbus/dbus-message.h:
8468 Add new functions that set the reply serial and sender.
8469 Also marshal and demarshal them correctly and add test.
8471 * dbus/dbus-protocol.h:
8472 Add new DBUS_MESSAGE_TYPE_SENDER.
8475 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
8476 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
8477 (dbus_connection_hookup_with_g_main):
8478 * glib/test-dbus-glib.c: (main):
8479 Rewrite to use GIOChannel and remove the GSource crack.
8481 * test/echo-client.c: (main):
8482 * test/watch.c: (check_messages):
8483 Update for changed APIs
8485 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8487 * dbus/Makefile.am: Add dbus-timeout.[cħ]
8489 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
8490 Create a DBusTimeoutList.
8491 (dbus_connection_set_timeout_functions): Add new function to
8492 set timeout callbacks
8494 * dbus/dbus-connection.h: Add public DBusTimeout API.
8496 * dbus/dbus-message.c: (dbus_message_get_service):
8497 * dbus/dbus-message.h: New function.
8499 * dbus/dbus-server.c: Fix small doc typo.
8501 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
8503 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8505 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
8506 of the string, just as long as specified.
8508 2003-01-19 Havoc Pennington <hp@pobox.com>
8510 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
8513 * dbus/dbus-server.c (dbus_server_set_max_connections)
8514 (dbus_server_get_max_connections, dbus_server_get_n_connections):
8515 keep track of current number of connections, and add API for
8516 setting a max (but haven't implemented enforcing the max yet)
8518 2003-01-18 Havoc Pennington <hp@pobox.com>
8520 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
8521 reading/writing if read_watch != NULL or write_watch != NULL.
8523 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
8524 the message loader code to actually load message->header and
8525 message->body into the newly-created message.
8527 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
8530 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
8531 (dbus_connection_get_max_message_size)
8532 (dbus_connection_set_max_live_messages_size)
8533 (dbus_connection_get_max_live_messages_size): implement some
8534 resource limitation functions
8536 * dbus/dbus-resources.c: new file implementing some of the
8537 resource limits stuff
8539 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
8540 missing docs, add @todo to handle OOM etc.
8542 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
8545 2003-01-18 Havoc Pennington <hp@pobox.com>
8547 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
8548 connection if it hasn't been already.
8550 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
8551 replace with DisconnectFunction.
8553 2003-01-18 Havoc Pennington <hp@pobox.com>
8555 Building --disable-verbose-mode --disable-asserts --disable-tests
8556 cuts the library from 112K to 45K or so
8558 * configure.in: check for varargs macro support,
8559 add --enable-verbose-mode, --enable-asserts.
8561 * dbus/dbus-internals.h (_dbus_assert): support
8563 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
8565 2003-01-18 Havoc Pennington <hp@pobox.com>
8567 * dbus/dbus-test.c: include config.h so that tests actually run
8569 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
8570 so the failure mode when that assumption fails will be plenty
8573 2003-01-18 Havoc Pennington <hp@pobox.com>
8575 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
8577 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
8580 * test/Makefile.am: don't use special variable "TESTS" for echo-*
8581 since we don't want to use those in make check
8583 2003-01-15 Havoc Pennington <hp@redhat.com>
8589 2003-01-15 Havoc Pennington <hp@redhat.com>
8591 * test/Makefile.am: fix so that test source code ends up in the
8592 distribution on make distcheck
8594 2003-01-15 Havoc Pennington <hp@redhat.com>
8600 2003-01-15 Havoc Pennington <hp@redhat.com>
8602 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
8603 fix build when --disable-tests
8605 * Makefile.am (EXTRA_DIST): put HACKING in here
8607 * HACKING: document procedure for making a tarball release.
8609 2003-01-14 Anders Carlsson <andersca@codefactory.se>
8611 * bus/connection.c: (connection_error_handler),
8612 (bus_connection_setup):
8613 * bus/main.c: (main):
8614 Make sure that the DBusConnectionData struct is NULLed
8615 out to prevent a segfault.
8617 * dbus/dbus-errors.c: (dbus_result_to_string):
8618 * dbus/dbus-errors.h:
8619 * dbus/dbus-message.c: (dbus_message_get_fields),
8620 (dbus_message_get_fields_valist), (_dbus_message_test):
8621 * dbus/dbus-message.h:
8622 Make dbus_message_get_fields return a result code so we can
8623 track invalid fields as well as oom.
8625 2003-01-11 Havoc Pennington <hp@pobox.com>
8627 * configure.in: change --enable-test/--enable-ansi action-if-given
8628 to enable_foo=$enableval instead of enable_foo=yes
8630 2003-01-08 Havoc Pennington <hp@pobox.com>
8632 * dbus/dbus-string.c (_dbus_string_align_length): new function
8634 * dbus/dbus-test-main.c: move main() for test app here
8636 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
8637 symbol to run tests, because dbus-test isn't in the main
8640 Code review nitpicks.
8642 * dbus/dbus-message.c (dbus_message_write_header): add newlines
8643 for people with narrow emacs ;-). Assert client_serial was filled
8644 in. Assert message->name != NULL.
8645 (dbus_message_append_fields): have "first_field_type" arg separate
8646 from va list, needed for C++ binding that also uses varargs IIRC
8647 and helps with type safety
8648 (dbus_message_new): add @todo about using DBusString to store
8649 service/name internally
8650 (dbus_message_new): don't leak ->service and ->name on OOM later
8652 (dbus_message_unref): free the service name
8653 (dbus_message_get_fields): same change to varargs
8654 i.e. first_field_type
8655 (_dbus_message_loader_return_buffer): assert that the message data
8656 is aligned (if not it's a bug in our code). Put in verbose griping
8657 about why we set corrupted = TRUE.
8658 (decode_header_data): add FIXME that char* is evil. Was going to
8659 add FIXME about evil locale-specific string.h strncmp, but just
8660 switched to wacky string-as-uint32 optimization. Move check for
8661 "no room for field name" above get_const_data_len() to avoid
8662 assertion failure in get_const_data_len if we have trailing 2
8663 bytes or the like. Check for service and name fields being
8664 provided twice. Don't leak service/name on error. Require field
8665 names to be aligned to 4 bytes.
8667 * dbus/dbus-marshal.c: move byte swap stuff to header
8668 (_dbus_pack_int32): uscore-prefix
8669 (_dbus_unpack_int32): uscore-prefix
8670 (_dbus_unpack_uint32): export
8671 (_dbus_demarshal_string): add @todo complaining about use of
8673 (_dbus_marshal_get_field_end_pos): add @todo about bad error
8674 handling allowing corrupt data to go unchecked
8676 2003-01-08 Havoc Pennington <hp@redhat.com>
8678 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
8679 to the select() as needed for authentication. (should be using
8680 _dbus_poll() not select, but for another day)
8682 * dbus/dbus.h: include dbus/dbus-protocol.h
8684 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8686 * dbus/Makefile.am (dbusinclude_HEADERS): Install
8689 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8691 * dbus/dbus-internals.c: (_dbus_type_to_string):
8692 New function that returns a string describing a type.
8694 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
8695 * dbus/dbus-marshal.h:
8696 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
8697 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
8698 (dbus_message_iter_get_byte_array):
8699 * dbus/dbus-message.h:
8700 Add new convenience functions for appending and getting message fields.
8701 Also add demarshalling routines for byte arrays.
8703 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8705 * dbus/dbus-connection-internal.h:
8706 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8707 (_dbus_connection_get_next_client_serial),
8708 (dbus_connection_send_message):
8709 * dbus/dbus-internals.h:
8710 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
8711 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
8712 (_dbus_marshal_uint32), (_dbus_demarshal_double),
8713 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
8714 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
8715 (_dbus_verbose_bytes), (_dbus_marshal_test):
8716 * dbus/dbus-marshal.h:
8717 * dbus/dbus-message-internal.h:
8718 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
8719 (dbus_message_write_header), (_dbus_message_lock),
8720 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
8721 (dbus_message_get_name), (dbus_message_append_int32),
8722 (dbus_message_append_uint32), (dbus_message_append_double),
8723 (dbus_message_append_string), (dbus_message_append_byte_array),
8724 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
8725 (dbus_message_iter_unref), (dbus_message_iter_has_next),
8726 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
8727 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
8728 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
8729 (decode_header_data), (_dbus_message_loader_return_buffer),
8730 (message_iter_test), (_dbus_message_test):
8731 * dbus/dbus-message.h:
8732 * dbus/dbus-protocol.h:
8733 * dbus/dbus-test.c: (main):
8735 * glib/test-dbus-glib.c: (message_handler), (main):
8736 * test/echo-client.c: (main):
8737 * test/watch.c: (check_messages):
8738 Make messages sendable and receivable for real.
8740 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8742 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8743 (_dbus_marshal_string), (_dbus_marshal_byte_array):
8744 * dbus/dbus-message.c: (dbus_message_append_int32),
8745 (dbus_message_append_uint32), (dbus_message_append_double),
8746 (dbus_message_append_string), (dbus_message_append_byte_array):
8747 Handle OOM restoration.
8749 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8751 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8752 (_dbus_demarshal_string), (_dbus_marshal_test):
8753 * dbus/dbus-marshal.h:
8754 * dbus/dbus-message.c: (dbus_message_get_name),
8755 Document these functions.
8757 (dbus_message_append_int32), (dbus_message_append_uint32),
8758 (dbus_message_append_double), (dbus_message_append_string),
8759 (dbus_message_append_byte_array):
8760 * dbus/dbus-message.h:
8761 Add functions for adding message fields of different types.
8763 * dbus/dbus-protocol.h:
8764 Add the different types.
8766 2003-01-05 Havoc Pennington <hp@pobox.com>
8768 * bus/connection.c: implement routines for handling connections,
8769 first thing is keeping a list of owned services on each connection
8770 and setting up watches etc.
8772 * bus/services.c: implement a mapping from service names to lists
8775 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
8777 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
8778 to use static mutexes for global data
8780 * dbus/dbus-connection.c (dbus_connection_set_data): add new
8781 collection of functions to set/get application-specific data
8782 on the DBusConnection.
8784 2003-01-04 Havoc Pennington <hp@pobox.com>
8786 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
8787 (_dbus_poll): new function
8789 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
8792 * bus/loop.c: initial code for the daemon main loop
8794 2003-01-04 Havoc Pennington <hp@pobox.com>
8796 * test/watch.c (error_handler): make it safe if the error handler
8797 is called multiple times (if we s/error handler/disconnect
8798 handler/ we should just guarantee it's called only once)
8800 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
8801 error handler on disconnect (it's quite possible we should
8802 just change the error handler to a "disconnect handler," I'm
8803 not sure we have any other meaningful errors)
8805 * configure.in: check for getpwnam_r
8807 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
8808 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
8809 mechanism as in SASL spec, using socket credentials
8811 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
8812 (_dbus_send_credentials_unix_socket): new function
8814 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
8816 (_dbus_write): only check errno if <0 returned
8817 (_dbus_write_two): ditto
8819 2003-01-02 Anders Carlsson <andersca@codefactory.se>
8821 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
8822 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
8823 (_dbus_marshal_test):
8824 * dbus/dbus-marshal.h:
8825 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
8826 to _dbus_marshal_utf8_string. Also fix some tests.
8828 2002-12-28 Harri Porten <porten@kde.org>
8830 * configure.in: added check for C++ compiler and a very cheesy
8831 check for the Qt integration
8833 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
8835 * qt/Makefile.am: added
8837 * qt/.cvsignore: added
8839 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
8840 latter, added #ifdef QT_THREAD_SUPPORT guard.
8842 * dbus/Makefile.am: added missing headers for make dist
8844 2002-12-28 Kristian Rietveld <kris@gtk.org>
8846 * dbus/Makefile.am: fixup export-symbols-regex.
8848 2002-12-27 Anders Carlsson <andersca@codefactory.se>
8850 * acinclude.m4: Add this file and put the
8851 PKG_CHECK_MODULE macro in it.
8853 2002-12-27 Anders Carlsson <andersca@codefactory.se>
8855 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8856 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8857 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8858 (_dbus_marshal_test):
8859 Make the demarshalling routines align the pos argument.
8860 Add string marshalling tests and fix the obvious bugs
8863 2002-12-26 Havoc Pennington <hp@pobox.com>
8865 * dbus/dbus-auth.c: fixes fixes fixes
8867 * dbus/dbus-transport-unix.c: wire up support for
8868 encoding/decoding data on the wire
8870 * dbus/dbus-auth.c (_dbus_auth_encode_data)
8871 (_dbus_auth_decode_data): append to target string
8872 instead of nuking it.
8874 2002-12-26 Havoc Pennington <hp@pobox.com>
8876 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
8877 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
8880 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
8881 avoid swap_bytes() overhead (ignoring possible assembly stuff for
8882 now). Main point is because I wanted unpack_uint32 to implement
8884 (_dbus_verbose_bytes): new function
8886 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
8888 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
8889 mechanism to handle a corrupt message stream
8890 (_dbus_message_loader_new): fix preallocation to only prealloc,
8893 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
8894 (_dbus_string_test): enhance tests for copy/move and fix the
8897 * dbus/dbus-transport-unix.c: Hold references in more places to
8898 avoid reentrancy problems
8900 * dbus/dbus-transport.c: ditto
8902 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
8903 leak reference count in no-message case
8905 * test/watch.c (do_mainloop): handle adding/removing watches
8906 during iteration over the watches. Also, ref the connection/server
8907 stored on a watch, so we don't try to mangle a destroyed one.
8909 * dbus/dbus-transport-unix.c (do_authentication): perform
8912 * dbus/dbus-auth.c (get_state): add a state
8913 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
8914 (_dbus_auth_get_unused_bytes): append the unused bytes
8915 to the passed in string, rather than prepend
8917 * dbus/dbus-transport.c (_dbus_transport_init_base): create
8918 the auth conversation DBusAuth
8920 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
8921 (_dbus_transport_new_for_domain_socket): when creating a
8922 transport, pass in whether it's a client-side or server-side
8923 transport so we know which DBusAuth to create
8925 2002-12-03 Havoc Pennington <hp@pobox.com>
8927 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
8928 _after_ finalizing the derived members
8929 (unix_connection_set): unref watch if we fail to add it
8931 * dbus/dbus-connection.c (dbus_connection_unref): delete the
8932 transport first, so that the connection owned by the
8933 transport will be valid as the transport finalizes.
8935 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
8936 if necessary, and remove watches from the connection.
8938 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
8940 2002-12-26 Anders Carlsson <andersca@codefactory.se>
8942 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8943 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8944 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8945 (_dbus_marshal_test):
8946 * dbus/dbus-marshal.h:
8947 Add string marshal functions and have the demarshal functions
8948 return the new position.
8950 2002-12-25 Havoc Pennington <hp@pobox.com>
8952 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
8953 it is a simple protocol that just maps directly to SASL.
8955 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
8956 initial implementation, not actually used yet.
8958 * dbus/dbus-string.c (_dbus_string_find): new function
8959 (_dbus_string_equal): new function
8960 (_dbus_string_base64_encode): new function
8961 (_dbus_string_base64_decode): new function
8963 2002-12-25 Anders Carlsson <andersca@codefactory.se>
8966 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
8967 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8968 (_dbus_demarshal_double), (_dbus_demarshal_int32),
8969 (_dbus_demarshal_uint32), (_dbus_marshal_test):
8970 * dbus/dbus-marshal.h:
8971 * dbus/dbus-protocol.h:
8972 * dbus/dbus-test.c: (main):
8974 Add un-optimized marshalling/demarshalling routines.
8976 2002-12-25 Harri Porten <porten@kde.org>
8978 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
8980 2002-12-24 Zack Rusin <zack@kde.org>
8982 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
8983 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
8986 2002-12-24 Havoc Pennington <hp@pobox.com>
8988 * glib/dbus-gthread.c: fix include
8990 * glib/dbus-glib.h: rename DBusMessageHandler for now.
8991 I think glib API needs to change, though, as you don't
8992 want to use DBusMessageFunction, you want to use the
8993 DBusMessageHandler object. Probably
8994 dbus_connection_open_with_g_main_loop()
8995 and dbus_connection_setup_g_main_loop() or something like that
8996 (but think of better names...) that just create a connection
8997 that has watch/timeout functions etc. already set up.
8999 * dbus/dbus-connection.c
9000 (dbus_connection_send_message_with_reply): new function just to
9001 show how the message handler helps us deal with replies.
9003 * dbus/dbus-list.c (_dbus_list_remove_last): new function
9005 * dbus/dbus-string.c (_dbus_string_test): free a string that
9008 * dbus/dbus-hash.c: use memory pools for the hash entries
9009 (rebuild_table): be more paranoid about overflow, and
9010 shrink table when we can
9011 (_dbus_hash_test): reduce number of sprintfs and write
9012 valid C89. Add tests for case where we grow and then
9013 shrink the hash table.
9015 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
9017 * dbus/dbus-connection.c (dbus_connection_register_handler)
9018 (dbus_connection_unregister_handler): new functions
9020 * dbus/dbus-message.c (dbus_message_get_name): new
9022 * dbus/dbus-list.c: fix docs typo
9024 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
9025 an object representing a handler for messages.
9027 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9030 * glib/dbus-gthread.c: (dbus_gthread_init):
9031 Don't use the gdbus prefix for public functions.
9033 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9037 Add GLib checks and fixup .pc files
9041 * glib/dbus-gmain.c: (gdbus_connection_prepare),
9042 (gdbus_connection_check), (gdbus_connection_dispatch),
9043 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
9044 (dbus_connection_gsource_new):
9045 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
9046 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
9047 * glib/test-dbus-glib.c: (message_handler), (main):
9050 2002-12-15 Harri Porten <porten@kde.org>
9052 * autogen.sh: check for libtoolize before attempting to use it
9054 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
9057 * .cvsignore: ignore more stamp files
9059 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
9061 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
9062 without make install.
9064 2002-12-15 Havoc Pennington <hp@pobox.com>
9066 * dbus/dbus-threads.c: add thread stubs that a higher library
9067 layer can fill in. e.g. the GLib wrapper might fill them in with
9068 GThread stuff. We still need to use this thread API to
9069 thread-safe-ize the library.
9071 2002-12-12 Havoc Pennington <hp@pobox.com>
9073 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
9074 below new interfaces and include fewer system headers.
9076 * dbus/dbus-sysdeps.c (_dbus_read): new function
9077 (_dbus_write): new function
9078 (_dbus_write_two): new function
9079 (_dbus_connect_unix_socket): new function
9080 (_dbus_listen_unix_socket): new function
9082 * dbus/dbus-message-internal.h: change interfaces to use
9085 2002-12-11 Havoc Pennington <hp@pobox.com>
9087 * dbus/dbus-types.h: add dbus_unichar
9089 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
9091 * dbus/dbus-connection.c (dbus_connection_send_message): return
9094 * dbus/dbus-transport.c: include dbus-watch.h
9096 * dbus/dbus-connection.c: include dbus-message-internal.h
9098 * HACKING: add file with coding guidelines stuff.
9100 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
9101 handling here, for security purposes (as in vsftpd). Not actually
9102 using this class yet.
9104 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
9105 system/libc usage here, as in vsftpd, for ease of auditing (and
9106 should also simplify portability). Haven't actually moved all the
9107 system/libc usage into here yet.
9109 2002-11-25 Havoc Pennington <hp@pobox.com>
9111 * dbus/dbus-internals.c (_dbus_verbose): fix to not
9112 always print the first verbose message.
9114 2002-11-24 Havoc Pennington <hp@pobox.com>
9116 * test/echo-client.c, test/echo-server.c: cheesy test
9119 * configure.in (AC_CHECK_FUNCS): check for writev
9121 * dbus/dbus-message.c (_dbus_message_get_network_data): new
9124 * dbus/dbus-list.c (_dbus_list_foreach): new function
9126 * dbus/dbus-internals.c (_dbus_verbose): new function
9128 * dbus/dbus-server.c, dbus/dbus-server.h: public object
9129 representing a server that listens for connections.
9131 * dbus/.cvsignore: create
9133 * dbus/dbus-errors.h, dbus/dbus-errors.c:
9134 public API for reporting errors
9136 * dbus/dbus-connection.h, dbus/dbus-connection.c:
9137 public object representing a connection that
9138 sends/receives messages. (Same object used for
9139 both client and server.)
9141 * dbus/dbus-transport.h, dbus/dbus-transport.c:
9142 Basic abstraction for different kinds of stream
9143 that we might read/write messages from.
9145 2002-11-23 Havoc Pennington <hp@pobox.com>
9147 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
9150 * dbus/dbus-test.c (main): add list test, and include
9151 dbus-test.h as intended
9153 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
9154 (_dbus_hash_table_remove_int): return value indicates
9155 whether the entry existed to remove
9157 * dbus/dbus-list.c: add linked list utility class,
9160 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
9163 2002-11-23 Havoc Pennington <hp@pobox.com>
9165 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
9166 DBUS_END_DECLS to nothing, that should fix this once and for all
9168 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
9170 * dbus/dbus-message.c, dbus/dbus-hash.c:
9171 add some missing @brief
9173 2002-11-23 Havoc Pennington <hp@pobox.com>
9175 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
9176 to avoid confusing Doxygen
9178 * dbus/dbus-hash.c: @} not }@
9180 * dbus/dbus-message.c (struct DBusMessage): split out
9183 2002-11-23 Havoc Pennington <hp@pobox.com>
9185 * configure.in: pile on more warning flags if using gcc
9187 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
9188 to document static functions
9190 * configure.in: add summary to end of configure so it
9191 looks nice and attractive
9193 * dbus/dbus-hash.c: finish implementation and write unit
9196 * configure.in: add --enable-tests to enable unit tests
9198 * dbus/dbus-test.c: test program to run unit tests
9199 for all files in dbus/*, initially runs a test for
9202 * dbus/dbus-internals.h: file to hold some internal utility stuff
9204 2002-11-22 Havoc Pennington <hp@redhat.com>
9206 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
9207 "ported" away from Tcl
9209 * dbus/dbus-types.h: header for types such as dbus_bool_t
9211 2002-11-22 Havoc Pennington <hp@redhat.com>
9213 * dbus/dbus.h: fixups for doc warnings
9215 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
9217 (QUIET): make it quiet so we can see warnings
9219 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
9221 2002-11-22 Havoc Pennington <hp@redhat.com>
9223 * Makefile.am: include "Doxyfile" target in all-local
9225 * configure.in: generate the Doxyfile
9227 * Doxyfile.in: move Doxyfile here, so we can use
9228 configure to generate a Doxyfile with the right
9231 2002-11-22 Havoc Pennington <hp@redhat.com>
9233 * dbus/dbus-message.c: move inline docs into .c file
9235 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
9236 so all docs are under doc/
9237 (MAN_EXTENSION): generate man pages. Use extension
9238 ".3dbus" which matches ".3qt" on my system,
9239 I guess this is OK, I don't know really.
9240 (FILE_PATTERNS): look for .c files not .h, makes sense
9243 2002-11-22 Havoc Pennington <hp@pobox.com>
9245 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
9246 because any app can be a server, and any app can be a client,
9247 the bus is a special kind of server.
9249 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
9251 * Doxyfile : adding. Still needs Makefile rules to be generated
9252 automatically (just run "doxygen" in the toplevel dir for now to
9255 * dbus/dbus-message.h : Adding sample docs (javadoc since
9256 resembles gtk-doc a little more)
9258 * dbus/dbus.h : Adding sample docs
9260 2002-11-21 Havoc Pennington <hp@redhat.com>
9262 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
9263 so we can allow ourselves to include files directly,
9264 instead of having to use dbus.h
9266 * dbus/dbus.h: fill in
9268 * dbus/dbus-message.h: sketch out a sample header file.
9269 Include griping if you include it directly instead of
9272 * dbus/dbus-macros.h: new file with macros for extern "C",
9273 TRUE/FALSE, NULL, etc.
9275 * doc/file-boilerplate.c: put include guards in here
9277 2002-11-21 Havoc Pennington <hp@redhat.com>
9279 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
9281 * COPYING: include the GPL as well, and license code
9282 under both AFL and GPL.
9284 2002-11-21 Havoc Pennington <hp@redhat.com>
9286 * acconfig.h: get rid of this
9288 * autogen.sh (run_configure): add --no-configure option
9290 * configure.in: remove AC_ARG_PROGRAM to make
9291 autoconf complain less. add AC_PREREQ.
9292 add AC_DEFINE third arg.
9294 2002-11-21 Anders Carlsson <andersca@codefactory.se>
9297 Fix references so we can distcheck.
9299 2002-11-21 Havoc Pennington <hp@redhat.com>
9301 * Initial module creation