1 2005-06-22 Colin Walters <walters@verbum.org>
3 Patch from Ross Burton <ross@openedhand.com>
5 * glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
7 2005-06-20 Colin Walters <walters@verbum.org>
9 * configure.in: Add glib/examples.
11 * glib/Makefile.am: Add examples/
13 * glib/examples/.cvsignore
14 * glib/examples/Makefile.am
15 * glib/examples/example-client.c
16 * glib/examples/example-service.c
17 * glib/examples/example-service.xml
18 * glib/examples/example-signal-emitter.c
19 * glib/examples/example-signal-emitter.xml
20 * glib/examples/example-signal-recipient.c:
21 New files; GLib binding examples, ported from
24 2005-06-20 Colin Walters <walters@verbum.org>
27 * glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
30 * glib/dbus-binding-tool-glib.c:
31 * doc/dbus-tutorial.xml:
32 * test/glib/test-dbus-glib.c: Update for rename.
34 2005-06-20 Colin Walters <walters@verbum.org>
36 Patch suggested by Ross Burton <ross@openedhand.com>
38 * glib/dbus-gobject.c (export_signals): Free signal name.
39 (g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
40 memory leak. Add a bit of documentation.
41 (dbus_g_method_return_error): Free context, and note we do
44 2005-06-18 Murray Cumming <murrayc@murrayc.com>
47 * glib/dbus-gobject.c:
49 * glib/dbus-gvalue.c: Predeclare structs as
50 typedef struct _Something Something instead of
51 typedef struct Something Something, so we can
52 redeclare the prototypes. Other GNOME libraries
55 2005-06-17 Colin Walters <walters@verbum.org>
57 * tools/dbus-names-model.c (have_names_notify): Fix call
58 to dbus_g_proxy_end_call.
60 2005-06-17 Colin Walters <walters@verbum.org>
62 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
63 spew warnings if we get malformed remote signals.
65 * glib/dbus-gobject.c (propsig_iterate): New function.
66 (lookup_object_info): New function, extracted from
67 lookup_object_and_method.
68 (introspect_properties, introspect_signals): Delete; these
69 are merged into write_interface.
70 (write_interface): Write out signals and properties here;
71 dump the org.gtk.object stuff and use the interface given
72 in the introspection data blob. Also fix up property XML.
73 (lookup_values): New function.
74 (introspect_interfaces): Gather a mapping from interface to a
75 list of its methods, signals, and properties, then write out
77 (lookup_object_and_method): Use lookup_object_info.
78 (struct DBusGSignalClosure): Add interface.
79 (dbus_g_signal_closure_new): Add interface. Don't dup signame;
80 we can just use the constant data.
81 (dbus_g_signal_closure_finalize): Don't free signal name.
82 (signal_emitter_marshaller): Use interface from signal closure.
83 (export_signals): Only export signals mentioned in introspection
85 (dbus_g_connection_register_g_object): Warn if we have no
86 introspection data for an object.
87 (funcsig_equal): Remove unused variable.
88 (dbus_g_object_register_marshaller): Take varargs instead of
90 (dbus_g_object_register_marshaller_array): New function,
91 extracted from old dbus_g_object_register_marshaller.
93 * glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
94 signals and property data.
95 (write_quoted_string): New function, extracted from generate_glue.
96 (generate_glue): Write signals and properties to introspection
99 * dbus/dbus-glib.h (struct DBusGObjectInfo): Include
100 exported_signals and exported_properties.
101 (dbus_g_object_register_marshaller): Update prototype.
102 (dbus_g_object_register_marshaller_array): Prototype.
104 * test/glib/test-dbus-glib.c: Extend testing to cover new signals.
106 * test/glib/test-service-glib.c: Add new test signals and method
109 * test/glib/test-service-glib.xml: Add some test signals.
111 * test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
112 and my-object-marshal.h
113 (test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
115 (my-object-marshal.c, my-object-marshal.h): Implement.
117 * test/glib/.cvsignore: Update.
119 * doc/TODO: Remove two GLib TODO items fixed by this
122 2005-06-16 Colin Walters <walters@verbum.org>
124 * doc/TODO: Update for GLib bindings.
126 2005-06-16 Colin Walters <walters@verbum.org>
128 * glib/dbus-binding-tool-glib.c:
129 * glib/dbus-gobject.c:
130 * glib/dbus-gproxy.c: Add Nokia copyright; Patch
131 from Ross Burton, for his GLib bindings work.
133 2005-06-16 Colin Walters <walters@verbum.org>
135 * glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
136 to iterate instead of walking to G_TYPE_INVALID.
138 Patch based on a patch from Ryan Gammon.
140 2005-06-16 Colin Walters <walters@verbum.org>
142 * bus/bus.c (bus_context_new): Set parser to NULL
143 after we unref it (Patch from Chris Boscolo, #2174).
145 2005-06-16 Colin Walters <walters@verbum.org>
147 * python/dbus_bindings.pyx.in: Import size_t,
148 __int64_t, __uint64_t, and __signed.
150 * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
151 Define cmsg struct, output it.
152 (_dbus_read_credentials_unix_socket):
155 Patch from Joe Markus Clarke for FreeBSD support.
157 2005-06-16 Colin Walters <walters@verbum.org>
159 * tools/dbus-send.c (append_array): Use strtok.
160 (append_dict): New function.
161 (type_from_name): New function, extracted from main.
162 (main): Handle sending dicts.
164 * tools/dbus-print-message.c (print_iter): Print dict
167 2005-06-16 Colin Walters <walters@verbum.org>
169 * glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
170 values as the empty string (#2948).
172 2005-06-16 Colin Walters <walters@verbum.org>
175 * mono/doc/Makefile.am:
176 * test/glib/Makefile.am:
178 Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
180 2005-06-16 Colin Walters <walters@verbum.org>
182 * dbus/dbus-marshal-header.c (_dbus_header_load): Set
183 header byte order from expected byte order (Patch from Chris Wilson, #3475).
185 * dbus/dbus-marshal-byteswap.c (byteswap_body_helper):
186 Increment pointer after swapping fixed array. Add assertion
189 2005-06-15 Colin Walters <walters@verbum.org>
191 * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
192 Fix call to dbus_set_error. (Patch from Michael Banck, #3461)
194 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
196 * NEWS: Update to 0.34
198 2005-06-15 David Zeuthen <davidz@redhat.com>
200 * configure.in (LT_CURRENT): Revert back to 1 as the library
201 hasn't changed and we've certainly not committed to protocol
202 stability yet. All this does is to break ABI. See commit note
203 from hp@redhat.com 2005-05-05 for details.
205 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
207 * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method
208 (_dbus_connection_run_builtin_filters): New method
209 (dbus_connection_dispatch): Run the builtin filters which in turn
210 runs the peer filter which handles Ping messages.
213 - Ping isn't handled: This patch fixes it
215 - Add a test case for the Ping message: added TODO item
217 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
219 * dbus/dbus-message.c:
220 (dbus_message_has_path): New method
221 (dbus_message_has_interface): New method
222 (dbus_message_has_member): New method
224 * dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
227 * dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that
228 the keyring directory is private to the user
231 - The convenience functions in dbus-bus.h should perhaps have
232 the signatures that they would have if they were autogenerated
233 stubs. e.g. the acquire service function. We should also evaluate
234 which of these functions to include, in light of the fact that
235 GLib/Qt native stubs will probably also exist.: Punted
237 - add dbus_message_has_path(), maybe has_member/interface:
240 - in dbus-keyring.c, enforce that the keyring dir is not
241 world readable/writable: Fixed in this patch
243 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
245 * dbus/dbus-marshal-validate.h: Added a new validation
246 error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for
247 out of memory errors when validating signitures
249 * dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
250 in places where we previously used DBUS_VALID and a FALSE return
251 value to indicate OOM
253 * dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
254 Use a stack to track the number of elements inside containers. The
255 stack values are then used to validate that dict entries have only two
256 elements within them.
257 (validate_body_helper): check the reason for failure when validating
260 * dbus/dbus-message.c (load_message): use
261 DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used
262 DBUS_VALID and a FALSE return value to indicate OOM
264 * doc/TODO: remove "- validate dict entry number of fields" as this
267 2005-06-14 David Zeuthen <davidz@redhat.com>
269 * bus/bus.c (process_config_every_time): Drop existing conf-dir
270 watches (if applicable) and add new watches
272 * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
273 (main): Setup SIGIO signal handler if using D_NOTIFY
275 * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
277 * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
278 (merge_included): Also merge conf_dirs list
279 (bus_config_parser_unref): Clear conf_dirs list
280 (include_dir): Add directory to conf_dirs list
281 (bus_config_parser_get_conf_dirs): New function
283 * bus/dir-watch.[ch]: New files
285 * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
287 * configure.in: Add checks for D_NOTIFY on Linux
289 2005-06-14 Colin Walters <walters@verbum.org>
291 * glib/dbus-binding-tool-glib.c:
292 * glib/dbus-gobject.c:
293 * glib/dbus-gvalue.c: Fix indentation and brace style.
295 2005-06-14 Ross Burton <ross@openedhand.com>.
297 * glib/dbus-glib.h: Make DBusGMethodInvocation
298 a private structure. Rearrange prototypes a bit.
300 * glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
301 documentation for first_arg_type.
303 * glib/dbus-gobject.c: Move DBusGMethodInvocation
304 here, add documentation. Move dbus_g_method_return
305 and dbus_g_method_return_error into public API
308 2005-06-14 Colin Walters <walters@verbum.org>
310 * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
311 Add missing return statements, noticed by Ross Burton.
313 2005-06-13 Ross Burton <ross@openedhand.com>.
315 * glib/dbus-gobject.c: Handle errors on message
316 demarshalling by sending error message back.
317 * glib/dbus-gvalue.c: Initialize return variables.
319 2005-06-13 Colin Walters <walters@verbum.org>
321 * glib/Makefile.am: Fix thinko in last patch.
323 2005-06-13 Colin Walters <walters@verbum.org>
325 * glib/Makefile.am: Move dbus-gtype-specialized.c
326 and dbus-gtype-specialized.h into a _HEADERS variable,
329 2005-06-12 Colin Walters <walters@verbum.org>
331 Async signals and various bugfixes and testing by
332 Ross Burton <ross@openedhand.com>.
334 * glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
335 (dbus_gvalue_genmarshal_name_from_type)
336 (dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
337 (dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
338 (dbus_g_value_types_init, dbus_gtype_from_signature)
339 (dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
340 (dbus_gtypes_from_arg_signature): New function prototypes.
341 (dbus_gvalue_demarshal): Take context and error arguments.
342 (dbus_gvalue_demarshal_variant): New function.
343 (dbus_gvalue_demarshal_message): New function.
344 (dbus_gvalue_store): Delete.
346 * glib/dbus-gvalue.c:
348 File has been almost entirely rewritten; now we special-case
349 more types such as DBUS_TYPE_SIGNATURE, handle arrays and
350 hash tables correctly, etc. Full support for recursive values
353 * glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
354 argument of signal to G_TYPE_POINTER since we now pass a
356 (lookup_g_marshaller): Delete in favor of
357 _dbus_gobject_lookup_marshaller.
358 (marshal_dbus_message_to_g_marshaller): Use
359 _dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
360 to handle remote signal callbacks.
361 (dbus_g_proxy_new_from_proxy): New function; creates a new
362 DBusGProxy by copying an existing one.
363 (dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
364 (dbus_g_proxy_get_path): New functions.
365 (dbus_g_proxy_marshal_args_to_message): New function;
366 factored out of existing code.
367 (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
368 from a varargs array.
369 (dbus_g_proxy_begin_call_internal): New function.
370 (dbus_g_proxy_end_call_internal): New function.
371 (dbus_g_proxy_begin_call): Take GTypes instead of DBus types
372 as arguments; simply invoke dbus_g_proxy_begin_call_internal
373 after collecting args into value array.
374 (dbus_g_proxy_end_call): Take GTypes instead of DBus types;
375 invoke dbus_g_proxy_end_call_internal.
376 (dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
378 (dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
380 (array_free_all): New function.
381 (dbus_g_proxy_add_signal): Take GTypes.
383 * glib/dbus-gobject.h:
384 (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
385 (_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
388 * glib/dbus-gobject.c: Add a global marshal_table hash which
389 stores mappings from type signatures to marshallers. Change lots
390 of invocations of dbus_gtype_to_dbus_type to
391 dbus_gtype_to_signature.
392 (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
393 (introspect_signals): Fix test for query.return_type.
394 (set_object_property): Update invocation of dbus_gvalue_demarshal.
395 (invoke_object_method): Many changes. Handle asynchronous
396 invocations. Convert arguments with
397 dbus_gvalue_demarshal_message. Handle errors. Use
398 DBusSignatureIter instead of strlen on args. Handle all arguments
399 generically. Special-case variants.
400 (dbus_g_method_return, dbus_g_method_return_error): New function.
401 (DBusGSignalClosure): New structure, closes over signal
403 (dbus_g_signal_closure_new): New function.
404 (dbus_g_signal_closure_finalize): New function.
405 (signal_emitter_marshaller): New function; is special marshaller
406 which emits signals on bus.
407 (export_signals): New function; introspects object signals and
409 (dbus_g_object_type_install_info): Take GType instead of
411 (dbus_g_connection_register_g_object): Invoke export_signals.
412 (dbus_g_connection_lookup_g_object): New function.
413 (DBusGFuncSignature) New structure; used for mapping type
414 signatures to marshallers.
415 (funcsig_hash): New function; hashes DBusGFuncSignature.
416 (funcsig_equal): New function; compares DBusGFuncSignature.
417 (_dbus_gobject_lookup_marshaller): New function.
418 (dbus_g_object_register_marshaller): New function; used to
419 register a marshaller at runtime for a particular signature.
421 * glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
423 * glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
424 which notes a server method implementation should be
427 * glib/dbus-binding-tool-glib.c
428 (dbus_binding_tool_output_glib_server): Call
429 dbus_g_value_types_init.
430 (write_formal_parameters): Use dbus_gtype_from_signature. Handle
432 (dbus_g_type_get_lookup_function): Turn GType into an invocation
433 of a lookup function.
434 (write_args_for_direction): Use dbus_g_type_get_lookup_function.
435 (write_untyped_out_args): New method; write output arguments.
436 (write_formal_declarations_for_direction): Function for
438 (write_formal_parameters_for_direction): Function for
439 writing implementations.
440 (write_typed_args_for_direction): Function for writing
441 arguments prefixed with GTypes.
442 (write_async_method_client): Write out async version
445 * glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
446 (dbus_g_type_get_marshal_name): Move mapping from GType
447 to marshal name into here.
448 (dbus_g_type_get_c_name): Move into here.
449 (compute_marshaller): Convert signature to type with
450 dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
451 (compute_marshaller_name): Ditto.
452 (compute_marshaller): Handle async signal annotations.
453 (gather_marshallers): Return if we don't have a known
455 (generate_glue): Collect introspection blob here, and
456 write all of the blob at the end. This allows an object
457 with multiple interfaces to work.
458 Mark async methods in introspection blob.
460 * glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
461 dbus-gtype-specialized.c, dbus-gtype-specialized.h,
462 dbus-gvalue-utils.h, dbus-gvalue-utils.c.
464 * dbus/dbus-glib.h: Don't include dbus-protocol.h; this
465 avoids people accidentally using DBUS_TYPE_* which should
466 not be necessary anymore.
467 Do include dbus-gtype-specialized.h, which are utilities
468 for GLib container types.
469 Add various #defines for types such as
470 DBUS_TYPE_G_BOOLEAN_ARRAY.
471 (DBusGValueIterator, DBusGValue): Define, not fully used
473 (dbus_g_value_get_g_type): Type for recursive value.
474 (dbus_g_value_open, dbus_g_value_iterator_get_value)
475 (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
476 (dbus_g_value_free): Prototypes.
477 (dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
478 (dbus_g_proxy_set_interface): Prototype.
479 (dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
480 (dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
482 (dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
484 (DBusGAsyncData, DBusGMethodInvocation): Structures for
485 doing async invocations.
486 (dbus_g_method_return, dbus_g_method_return_error):
488 * doc/dbus-tutorial.xml: Update GLib section.
490 * tools/dbus-viewer.c (load_child_nodes): Update
491 for new invocation type of dbus_g_proxy_end_call.
492 (load_from_service_thread_func): Ditto.
494 * tools/print-introspect.c (main): Ditto.
496 * tools/dbus-names-model.c (have_names_notify)
497 (names_model_reload, names_model_set_connection)
500 * python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
501 needed since Python bindings use GLib bindings.
503 * test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
504 Add --prefix argument.
506 * tools/Makefile.am: Define DBUS_COMPILATION. Remove
507 unneeded --ignore-unsupported arg.
509 * test/glib/test-service-glib.c:
510 * test/glib/test-service-glib.xml:
511 * test/glib/test-dbus-glib.c: Add many more tests.
513 2005-06-06 David Zeuthen <davidz@redhat.com>
515 * doc/TODO: Add item about need to remove deprecated functions.
517 * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
519 * dbus/dbus-connection.c (dbus_connection_disconnect): New function
520 to repair the ABI which was broken with the last commit.
522 2005-06-02 John (J5) Palmieri <johnp@redhat.com>
524 * dbus/dbus-connection.c, dbus/dbus-connection.h
525 (dbus_connection_disconnect): renamed to dbus_connection_close
526 for API symmetry with dbus_connection_open
527 (_dbus_connection_open_internal):
528 s/dbus_connection_disconnect/dbus_connection_close
530 * dbus/dbus-bus.c (dbus_bus_get):
531 s/dbus_connection_disconnect/dbus_connection_close
533 * bus/connection.c (bus_connections_unref,
534 bus_connections_setup_connection, bus_connections_expire_incomplete):
535 s/dbus_connection_disconnect/dbus_connection_close
537 * bus/dispatch.c (bus_dispatch, kill_client_connection,
538 kill_client_connection_unchecked, check_hello_connection):
539 s/dbus_connection_disconnect/dbus_connection_close
541 * bus/bus.c (new_connection_callback):
542 s/dbus_connection_disconnect/dbus_connection_close
544 * tools/dbus-send.c (main):
545 s/dbus_connection_disconnect/dbus_connection_close
547 * test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
548 s/dbus_connection_disconnect/dbus_connection_close
550 * test/test-service.c (path_message_func, filter_func):
551 s/dbus_connection_disconnect/dbus_connection_close
553 * doc/TODO: remove connection_open/connection_disconnect lacks symmetry item that was just fixed
555 2005-05-25 Colin Walters <walters@verbum.org>
557 * dbus/dbus-protocol.h: Move various bus service #defines such
558 as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
560 * dbus/dbus-shared.h: Various defines moved here.
561 * dbus/dbus-marshal-header.c: Include dbus-shared.h.
563 2005-05-25 John (J5) Palmieri <johnp@redhat.com>
565 * python/__init__.py: Python bindings deserve a minor version
566 update. Upped to (0, 40, 2)
568 2005-05-24 John (J5) Palmieri <johnp@redhat.com>
570 * python/decorators.py: add explicitly_pass_message decorator
571 for passing in the dbus message as keyword for edge case signal
574 * python/matchrules.py (SignalMatchRule.__repr__): fix output
575 to conform with what dbus expects for match rules
576 (SignalMatchRule.execute): add the dbus message as a keyword
577 if the signal handler has requested it
579 * python/examples/example/signal-recipient.py: added some more
580 examples on how to hook up to signals
582 2005-05-23 John (J5) Palmieri <johnp@redhat.com>
584 * python/decorators.py: import dbus_bindings
586 * python/matchrules.py (SignalMatchRule, SignalMatchTree,
587 SignalMatchNode): new classes that implement wildcard signal
588 callback matching using a tree lookup. Heavily modified from a
589 patch sent by Celso Pinto (fd.o bug #3241)
591 * _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
592 use new match classes to handle signals.
594 2005-05-19 John (J5) Palmieri <johnp@redhat.com>
596 * python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
598 2005-05-18 Havoc Pennington <hp@redhat.com>
600 * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
601 gettext. Not really worth requiring yet perhaps, but any
602 production quality 1.0 would require it so we should go ahead and
603 get things set up. We do have a couple token calls to
604 bindtextdomain in the code already.
606 2005-05-16 John (J5) Palmieri <johnp@redhat.com>
608 * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
609 when using recursive g_main_loops
611 * python/_dbus.py (class Bus): add the ProxyObjectClass
612 alias for ProxyObject to make it easier for the Twisted
613 networking framework to integrate dbus.
615 * python/proxies.py (class ProxyObject): add the ProxyMethodClass
616 alias for ProxyMethod to make it easier for the Twisted
617 networking framework to integrate dbus.
619 2005-05-11 Ross Burton <ross@openedhand.com>
621 * glib/dbus-glib-tool.c: Add --prefix argument.
622 * glib/dbus-binding-tool-glib.h: Add prefix argument.
623 * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
625 (generate_glue): Pass prefix argument down.
626 (dbus_binding_tool_output_glib_server): Pass prefix to
629 2005-05-11 Colin Walters <walters@verbum.org>
631 * tools/dbus-send.c (append_array): New function.
632 (append_arg): Broken out from main.
633 (main): Add cheesy hack to send arrays and variants.
635 * tools/dbus-print-message.c (print_iter): Broken out
638 2005-05-11 Colin Walters <walters@verbum.org>
640 * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
641 New function, returns signature string for signature iter.
642 * dbus/dbus-signature.h: Prototype it.
643 * dbus/dbus-message.c (dbus_message_iter_get_signature):
644 New function, returns signature string for message iter.
645 (dbus_message_iter_get_array_len): New function, returns
647 (dbus_message_iter_get_fixed_array): Fix assertion; this
648 function should be used when the iter is pointing to the
650 * dbus/dbus-message.h: Prototypes.
651 * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
652 New function; returns length of an array.
653 * dbus/dbus-marshal-recursive.h: Prototype it.
655 2005-05-11 Colin Walters <walters@verbum.org>
657 * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
660 2005-05-08 Havoc Pennington <hp@redhat.com>
662 * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
663 daemon's pid, not the parent's pid, to the file descriptor.
664 Reported by Taj Morton.
666 2005-05-05 Havoc Pennington <hp@redhat.com>
668 * configure.in (LT_*): add notes on how the libtool versioning
669 works to save thinking. Increment soname to indicate protocol
670 breakage (though really the library interface hasn't changed I
673 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
674 verify the GUID received from server matches what we were
675 expecting, if we had an expectation
677 * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
678 (_dbus_auth_get_guid_from_server): new function
679 (send_begin): parse the OK args
681 * doc/dbus-specification.xml: add GUID to the auth protocol
683 2005-05-05 John (J5) Palmieri <johnp@redhat.com>
685 * Fix my name in previous changelog ;)
687 * python/proxies.py (ProxyObject.__getattr__): add further patch
688 from Anthony Baxter to throw an AttributeError when python
689 __special__ functions are called instead of marshling them over
690 the bus (Bug#1685 comment 3).
692 2005-05-04 John (J5) Palmieri <johnp@redhat.com>
694 * python/Makefile.am: changed to use pyexecdir for the binding
695 shared libraries (Bug#2494)
697 * python/exceptions.py: bring exceptions over from the bindings
698 so they can be used in applications (Bug#2036)
699 Make all exceptions derive from DBusException
701 * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
702 of classes so that print obj doesn't throw an exception (Bug #1685)
704 2005-05-03 Ross Burton <ross@openedhand.com>
706 * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
707 Return if we get an error during registration. Set up a
708 weak reference on object to unregister if object is destroyed.
709 (unregister_gobject): New function.
711 2005-05-01 John (J5) Palmieri <johnp@redhat.com>
713 * python/dbus_bindings.pyx.in:
714 - added new type classes for hinting to the marashaler what type
715 to send over the wire
716 - added int16 and uint16 marshalers
717 - Fixed a bug in the type constants that caused int32 to go out
718 as uint16 over the wire
719 * python/dbus.py: split up into different files and renamed _dbus.py
720 * python/__init__.py, python/_util.py, python/decorators.py,
721 python/exceptions.py, python/proxies.py, python/services.py,
722 python/types.py: new files split off from dbus.py
723 * python/Makefile.am: Add new files, remove dbus.py and
724 install all python files to <python module dir>/dbus
725 * python/examples/*: Added #!/usr/bin/env python to the top of
726 every example. Patch provided by Tatavarty Kalyan
728 2005-04-25 John (J5) Palmieri <johnp@redhat.com>
730 * NEWS: Update to 0.33
732 2005-04-25 John (J5) Palmieri <johnp@redhat.com>
734 * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
735 method for doing async calls
736 (_pending_call_notification): New C function for handling pendning call
738 (set_notify): New method for setting pending call notification
740 * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
741 Async capabilities added to remote method calls
742 (Sender): class removed
743 (RemoteService): class removed
744 (ObjectTree): class removed for now
745 (RemoteObject): Renamed to ProxyObject
746 (RemoteMethod): Renamed to ProxyMethod
747 (method): Decorator added for decorating python methods as dbus methods
748 (signal): Decorator added for decorating python methods as signal emitters
749 (ObjectType): Metaclass added for generating introspection data and the
750 method callback vtable
751 (Interface): Wrapper class added to wrap objects in a dbus interface
752 (Object): Uses ObjectType as its metaclass and exports Introspect
753 of the org.freedesktop.DBus.Introspectable interface
754 (ValidationException, UnknownMethodException): new exceptions
756 * python/examples/*: Modified to fit with the new bindings
758 2005-04-23 Havoc Pennington <hp@redhat.com>
760 * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
761 reported by Tony Houghton
763 * test/test-service.c (main): test
764 dbus_connection_get_object_path_data()
766 * dbus/dbus-object-tree.c (find_handler): be sure we always init
768 (_dbus_object_tree_get_user_data_unlocked): new function used by
769 dbus_connection_get_object_path_data()
770 (do_register): add assertion test for get_user_data_unlocked
771 (object_tree_test_iteration): more tests
773 * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
774 new function from Dan Reed to let you get the user data from
775 dbus_connection_register_object_path()
777 2005-04-23 John (J5) Palmieri <johnp@redhat.com>
779 * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
780 in numerous places that did not account for the NULL terminator
781 (signature_from_seed): changed the manual string copy loop to
782 just use strcpy instead
783 make check should now pass
785 2005-04-19 John (J5) Palmieri <johnp@redhat.com>
787 * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
788 so that it allows messages that are not signals to pass in
789 NULL as the interface.
791 2005-04-18 David Zeuthen <davidz@redhat.com>
793 * glib/dbus-gmain.c (io_handler_destroy_source):
794 (timeout_handler_destroy_source, connection_setup_free):
795 Also unref the source to avoid memory leaks.
797 2005-04-13 David Zeuthen <davidz@redhat.com>
799 * bus/config-parser.c (bus_config_parser_new): Bump this to a
800 more reasonable, yet still totally arbitrary, value :-).
802 2005-04-13 David Zeuthen <davidz@redhat.com>
804 * doc/TODO: Added an "important for 1.0" item about selinux
807 2005-04-13 David Zeuthen <davidz@redhat.com>
809 * bus/selinux.c: Add c-file-style to top of file
810 (log_audit_callback): Don't free the data here anymore
811 (bus_selinux_check): Don't take spid and tpid since appending
812 that to auxdata may OOM.
813 (bus_selinux_allows_acquire_service): Handle OOM and signal back
814 to the caller if we are OOM by taking an error object.
815 (bus_selinux_allows_send): -do-
817 * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
818 and bus_selinux_allows_send
820 * bus/bus.c (bus_context_check_security_policy): Pass error and
821 pass on OOM thrown by bus_selinux_allows_send()
823 * bus/services.c (bus_registry_acquire_service): Pass error and
824 pass on OOM thrown by bus_selinux_allows_acquire_service()
826 2005-04-13 Havoc Pennington <hp@redhat.com>
828 * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
829 message at a time to avoid monopolizing the main loop, bug
830 #2953 from Benjamin Otte
832 2005-04-09 Havoc Pennington <hp@redhat.com>
834 * dbus/dbus-string.c (copy): change a memcpy to memmove due to
835 possible overlap, fix from Daniel Reed
836 (fixup_alignment): fix signedness warnings
837 (_dbus_string_append_unichar): ditto
839 2005-04-09 Havoc Pennington <hp@redhat.com>
841 * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
843 * glib/dbus-glib-tool.c (main): fix warning
845 * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
847 * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
848 add a new function that can be used in simple applications that
849 don't have a main loop and are willing to block
851 2005-04-05 David Zeuthen <davidz@redhat.com>
853 Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
856 (io_handler_destroy_source): Remove from list of IO handlers
857 of the ConnectionSetup object
858 (timeout_handler_destroy_source): -do- for timeout handlers
859 (io_handler_source_finalized): Don't remove from list since
860 we now do that in io_handler_destroy_source(). Renamed from
861 io_handler_source_destroyed
862 (timeout_handler_source_destroyed): -do- for timeout handlers
863 (connection_setup_free): It is now safe to iterate over all
864 IO and timeout handlers as the _destroy_source removes them
865 from the list synchronously
867 2005-03-30 Havoc Pennington <hp@redhat.com>
869 * configure.in: change check to gtk 2.4
871 * tools/dbus-viewer.c (name_combo_changed_callback): remove
872 gtk_combo_box_get_active_text() usage to decrement GTK requirement
875 2005-03-29 John (J5) Palmieri <johnp@redhat.com>
879 * HACKING: Fixed realease instructions. configure.in should be updated to
880 the next release by the person who made the last release.
882 2005-03-29 John (J5) Palmieri <johnp@redhat.com>
884 * python/lvalue_cast_post_process.py - removed. Patch has been
885 submitted to Pyrex maintainers that fixes gcc4.0 errors
887 * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
889 2005-03-24 Daniel Reed <n@ml.org>
891 * tools/Makefile.am: Make print-introspect and
892 dbus-bus-introspect.xml building conditional on HAVE_GLIB.
894 2005-03-22 John (J5) Palmieri <johnp@redhat.com>
896 * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
898 * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have
899 had in Red Hat packages for a while but for some reason never
901 (_dbus_is_a_number): New checks if a string
902 can be converted to a number and does the conversion if it can
903 (_dbus_user_database_lookup): Add check to see if the given username
904 is a udi. This allows udi's to be used instead of usernames in the
906 (_dbus_user_database_lookup_group): Add check to see if the given groupname
907 is a gdi. This allows gdi's to be used instead of groupnames in the
910 2005-03-21 John (J5) Palmieri <johnp@redhat.com>
912 * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
913 code so that it compiles with gcc4.0
915 * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
916 run dbus_bindings.c through lvalue_cast_post_process.py and copy the
917 results back to dbus_binding.c
919 2005-03-20 Colin Walters <walters@verbum.org>
921 Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
923 * configure.in: Require GTK+ 2.6.
925 2005-03-20 Colin Walters <walters@verbum.org>
927 * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
929 2005-03-17 Tom Parker <palfrey@tevp.net>
931 * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
932 print DBUS_UID_UNSET; instead print passed username. Also
933 be sure to actually use gid looked up in cache.
935 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
936 for DBUS_GID_UNSET and groupname.
938 2005-03-17 Colin Walters <walters@verbum.org>
940 * bus/print-introspect.c: Move to tools/.
941 * bus/run-with-tmp-session-bus.sh: Ditto.
943 * glib/Makefile.am (dbus-glib-bindings.h): Move
944 generation to tools/Makefile.am.
946 * test/glib/run-test.sh: Update to handle move
947 of run-with-tmp-session-bus.sh.
949 * test/glib/test-service-glib.c: Update to handle
950 move of dbus-glib-bindings.h.
952 * tools/print-introspect.c: Moved here
953 from bus/, and ported to GLib bindings.
955 * tools/run-with-tmp-session-bus.sh: Moved here
958 * tools/Makefile.am: Generate dbus-glib-bindings.h
959 and dbus-bus-introspect.xml here.
961 * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
964 2005-03-17 Colin Walters <walters@verbum.org>
966 * bus/driver.c (write_args_for_direction): Use
967 _dbus_string_get_const_data to retrieve string;
968 _dbus_string_get_const_data_len doesn't actually return
969 a NULL-terminated substring.
971 * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
972 (main): Change to use org_freedesktop_DBus_request_name
973 instead of using g_proxy_begin_call/end_call.
975 2005-03-15 Joe Shaw <joeshaw@novell.com>
977 * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
978 generating the finalizer. Fixes from Ben Maurer.
980 2005-03-12 Joe Shaw <joeshaw@novell.com>
982 * mono/BusDriver.cs: Update method names: ListServices
983 becomes ListNames; GetOwner becomes GetNameOwner.
985 * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
986 onto the eval stack when removing the delegate.
988 2005-03-12 Joe Shaw <joeshaw@novell.com>
990 * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
991 LT_CURRENT. Set it to the autoconf variable.
993 * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
994 classes that disconnects the signal handler delegate from the
995 service object. Fixes a big leak of proxy objects on the
996 client side of things. Patch from Ben Maurer
999 2005-03-12 Colin Walters <walters@verbum.org>
1001 * bus/driver.c (write_args_for_direction): New function,
1002 parses a type signature into arguments and outputs to
1004 (bus_driver_handle_introspect): Use it instead of
1005 hardcoding XML for certain signatures.
1007 * bus/Makefile.am (dbus-bus-introspect.xml): Add
1008 dependency on dbus-daemon.
1010 * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
1011 argument, pass it to dbus_binding_tool_output_glib_client.
1013 * glib/dbus-binding-tool-glib.c
1014 (generate_client_glue): Protect against multiple inclusion.
1015 (dbus_binding_tool_output_glib_client): Add
1016 G_BEGIN_DECLS/G_END_DECLS.
1018 * glib/dbus-binding-tool-glib.c (compute_client_method_name):
1019 Change to just take iface prefix directly.
1020 (write_formal_parameters): Clarify error message.
1021 (check_supported_parameters): New function; checks to see type
1022 signatures of method parameters are supported.
1023 (generate_client_glue): Handle ignore_unsupported flag.
1024 (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
1027 * glib/Makefile.am (dbus-glib-bindings.h): Pass
1028 --ignore-unsupported by default until glib bindings
1031 2005-03-11 Colin Walters <walters@verbum.org>
1033 * glib/Makefile.am: Generate dbus-glib-bindings.h and
1036 * bus/print-introspect.c: New file; prints introspection
1037 data for a given name and object path.
1039 * bus/run-with-tmp-session-bus.sh: New file, refactored
1040 from test/glib/run-test.sh. Creates a temporary session
1041 bus and runs another program.
1043 * test/glib/run-test.sh: Refactor to invoke
1044 run-with-tmp-session-bus.sh.
1046 * bus/driver.c (bus_driver_handle_introspect): Fix to print new
1047 introspection format. Also change to use DBUS_TYPE_x_AS_STRING
1048 macros instead of hardcoding.
1050 * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
1052 2005-03-11 Joe Shaw <joeshaw@novell.com>
1054 * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
1055 this unref; it doesn't match up evenly in some codepaths.
1056 (_dbus_connection_block_pending_call): Unref at every exitpoint;
1057 this evenly matches with the ref near the top of this function.
1059 2005-03-09 Joe Shaw <joeshaw@novell.com>
1061 * dbus/dbus-object-tree.c
1062 (_dbus_object_tree_unregister_and_unlock): If checks are enabled
1063 and we try to unregister a path that's not registered, still go
1064 through the process of unlocking and don't just return.
1066 2005-03-09 Colin Walters <walters@verbum.org>
1068 * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
1069 to this are generated for client-side wrappers. Invokes a
1070 D-BUS method and returns reply values.
1072 * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
1073 function; writes signature string for argument direction.
1074 (write_args_for_direction): Change to pass input values directly
1075 instead of via address, and fix indentation.
1076 (generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
1077 make generated wrappers inlineable.
1079 * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
1080 note about using dbus_type_is_fixed.
1082 * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
1083 dbus/dbus-signature.c as dbus_type_is_fixed.
1085 All callers updated.
1087 * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
1088 from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
1090 * dbus/dbus-signature.h: Prototype.
1092 * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
1095 * test/glib/test-dbus-glib.c (main): Be sure to clear error as
1096 appropriate instead of just freeing it.
1097 (main): Free returned strings using g_free.
1099 * test/glib/Makefile.am (test-service-glib-glue.h)
1100 (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
1102 * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
1103 simply maps a simple D-BUS type to GType.
1104 (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
1106 (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
1107 initialize the value with it.
1108 (dbus_gvalue_binding_type_from_type): Unused, delete.
1109 (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
1110 various types instead of unmarshalling to value data directly.
1111 Remove can_convert boolean.
1112 (dbus_gvalue_marshal): Remove duplicate initialization; switch to
1113 returning directly instead of using can_convert boolean.
1114 (dbus_gvalue_store): New function; not related to D-BUS per-se.
1115 Stores a GValue in a pointer to a value of its corresponding C
1118 * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
1119 add dbus_gvalue_store.
1121 2005-03-08 Joe Shaw <joeshaw@novell.com>
1123 Fix a bunch of lifecycle and memory management problems
1124 in the mono bindings.
1126 * mono/Arguments.cs (Arguments): Implement IDisposable
1128 * mono/Bus.cs (Bus): Don't allow public instantiation. This is
1129 strictly a static class.
1131 * mono/Connection.cs: Move the DBusObjectPathVTable and associated
1132 delegates into this file.
1133 (Connection): Implement IDisposable.
1134 (Dispose): Disconnect the connection and set the raw connection
1135 pointer to IntPtr.Zero.
1136 (~Connection): Call Dispose().
1137 (RegisterObjectPath): Added. Manages the registration of object
1138 paths so we can cleanly disconnect them at dispose/finalize time.
1139 (UnregisterObjectPath): Ditto.
1140 (set_RawConnection): Unregister all of the object paths when
1141 changing the underlying DBusConnection. Add them back onto the
1142 new connection, if any.
1144 * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
1145 more unmanaged resources anymore, so it's not necessary. Move all
1146 the DBusObjectPathVTable stuff out of here.
1147 (Handler): Save references to our delegates so that they don't get
1148 finalized. Call Connection.RegisterObjectPath() instead of
1149 dbus_connection_register_object_path() directly.
1150 (Message_Called): Dispose the message after we're finished with
1153 * mono/Message.cs (Message): Implement IDisposable.
1154 (Dispose): Dispose the Arguments, and set the RawMessage to
1156 (SendWithReplyAndBlock): We own the ref to the reply that comes
1157 back from dbus_connection_send_with_reply_and_block() so add a
1158 comment about that and unref it after we've constructed a managed
1159 MethodReturn class around it. Fixes a big, big leak.
1161 * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
1163 (BuildSignalHandler): After we've sent the Signal message, dispose
1165 (BuildMethod): Dispose of the method call and reply messages after
1166 we've sent the message and extracted the data we want from the
1169 * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
1171 (Service_FilterCalled): Dispose of the message after we're
1174 2005-03-08 Joe Shaw <joeshaw@novell.com>
1176 * dbus/dbus-connection.c (dbus_connection_send_with_reply):
1177 After we attach our pending call to the connection, unref
1180 * mono/Connection.cs (set_RawConnection): Disconnect our
1181 filter and match callbacks from the old connection and
1182 reconnect them to the new connection, if any.
1184 * mono/DBusType/Array.cs: "Code" is a static member, so
1185 don't use "this" to refer to it. Fix for stricter checking
1188 * mono/DBusType/ObjectPath.cs (Append): Don't leak the
1189 object path that we pass into unmanaged code.
1191 * mono/DBusType/String.cs (Append): Don't leak the string
1192 that we pass into unmanged code.
1194 2005-03-07 John (J5) Palmieri <johnp@redhat.com>
1195 * NEWS: Update for 0.31
1197 * configure.in: Release 0.31
1198 add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
1200 * qt/Makefile.am: fixed build
1202 * dbus/Makefile.am: soname bump for libdbus
1204 * glib/Makefile.am: soname bump for libdbus-glib
1206 2005-03-05 Havoc Pennington <hp@redhat.com>
1208 * dbus/dbus-sysdeps.c:
1209 (pseudorandom_generate_random_bytes_buffer): fix to have no return
1211 (_dbus_generate_random_bytes_buffer): fix return value
1213 * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
1214 checks actually work, from Tom Parker <fdo@tevp.net>
1216 2005-03-01 Colin Walters <walters@verbum.org>
1218 * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
1219 functions copied from dbus-glib-tool.c.
1220 (main): Convert lots of error code to use them.
1221 Also add some testing for introspection bits.
1223 2005-03-01 Colin Walters <walters@verbum.org>
1225 * doc/TODO: Remove introspection signature TODO.
1227 2005-02-27 Colin Walters <walters@verbum.org>
1229 * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
1230 Change return value to const char * instead of int so we can do
1232 (struct PropertyInfo, struct ArgInfo): Store char *.
1233 (property_info_new, arg_info_new): Update parameters, strdup.
1234 (property_info_unref, arg_info_unref): Free.
1236 * glib/dbus-gidl.h: Update prototypes.
1238 * glib/dbus-gparser.c (basic_type_from_string): Delete.
1239 (validate_signature): New function, just validates signature and
1241 (parse_property, parse_arg): Invoke validate_signature. Store
1242 signature instead of just type code.
1244 * glib/dbus-gvalue.c (base_type_from_signature): New utility
1245 function to return a primary type for a signature, dropping
1246 information about types in container types.
1247 (dbus_gvalue_genmarshal_name_from_type)
1248 (dbus_gvalue_binding_type_from_type)
1249 (dbus_gvalue_ctype_from_type): Update to take full signature
1250 instead of type code.
1251 (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
1253 * glib/dbus-gvalue.h: Update prototypes for above.
1255 * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
1256 glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
1257 (introspect_properties, introspect_signals, write_interface):
1258 Update to handle signatures, and remove usage of
1259 _dbus_gutils_type_to_string.
1260 (handle_introspect): Print out type codes instead of e.g. "string"
1261 in hardcoded introspection XML; also use x_AS_STRING constants
1262 instead of hardcoding in string.
1264 * glib/dbus-glib-tool.c (pretty_print): Handle signature change
1265 to string. Remove usage of _dbus_gutils_type_to_string.
1267 * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
1269 * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
1272 * glib/dbus-binding-tool-glib.c (compute_marshaller)
1273 (compute_marshaller_name, generate_glue): Handle signature change
1275 (write_formal_parameters, write_args_for_direction): Ditto, and
1278 * tools/dbus-tree-view.c (type_to_string): Delete.
1279 (info_set_func_text): Update to print full signatures.
1281 * test/glib/test-service-glib.xml: Change types to new
1282 introspection format.
1284 2005-02-26 Havoc Pennington <hp@redhat.com>
1286 * doc/TODO: remove the "guid" item
1288 * test/glib/test-profile.c (no_bus_thread_func): use open_private
1289 (with_bus_thread_func): use open_private
1291 * dbus/dbus-connection.c (dbus_connection_open_private): new
1292 function that works like the old dbus_connection_open()
1293 (dbus_connection_open): now returns an existing connection if
1296 * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
1297 through the GUID to the transport
1299 * dbus/dbus-server.c (_dbus_server_init_base): keep around the
1300 GUID in hex-encoded form.
1302 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1303 pass GUID argument in to the transport
1305 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
1308 * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
1310 * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
1312 2005-02-25 Havoc Pennington <hp@redhat.com>
1314 * doc/dbus-specification.xml: document the GUID thing
1316 * dbus/dbus-server.c (_dbus_server_init_base): initialize a
1317 globally unique ID for the server, and put a "guid=hexencoded"
1318 field in the address
1320 * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
1322 * dbus/dbus-message.c: ditto
1324 * dbus/dbus-dataslot.c: ditto
1326 * dbus/dbus-list.c: ditto
1328 * dbus/dbus-internals.h: wait, just include
1329 dbus-threads-internal.h here
1331 * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
1334 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
1336 2005-02-24 Colin Walters <walters@verbum.org>
1338 * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
1340 2005-02-24 John (J5) Palmieir <johnp@redhat.com>
1342 * glib/Makefile.am: added dbus-gobject.h to sources list
1343 so distcheck doesn't fail
1345 2005-02-24 Havoc Pennington <hp@redhat.com>
1347 * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
1348 you must disconnect before unref, since locking and other things
1349 are screwed up otherwise. Fix assorted other locking stuff.
1351 * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
1354 * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
1355 into a private header and don't export from the library
1357 * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
1359 2005-02-24 Colin Walters <walters@verbum.org>
1361 * dbus/dbus-signature.c: New file; implements various functions
1362 related to type signatures. Includes an interator for parsing,
1363 validation functions.
1364 (dbus_type_is_basic): Moved here from
1365 dbus-marshal-basic.c:_dbus_type_is_basic.
1366 (dbus_type_is_container): Moved here from
1367 dbus-marshal-basic.c:_dbus_type_is_container.
1369 All callers of _dbus_type_is_container and _dbus_type_is_basic
1370 updated, and include dbus-signature.h.
1372 * dbus/dbus-signature.h: New file; prototypes for the above.
1374 * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
1377 * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
1378 function factored out of _dbus_first_type_in_signature.
1379 (_dbus_first_type_in_signature_c_str): New function; returns first
1380 type code for a type signature character.
1382 * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
1383 handle function moves.
1385 * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
1387 * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
1388 function; skips to next complete type in type signature.
1389 Implemented using previous skip_one_complete_type. Now
1390 skip_one_complete_type just delegates to
1391 _dbus_type_signature_next.
1393 * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
1395 (_dbus_type_is_container): Ditto.
1397 * doc/dbus-specification.xml: Update introspection sample to
1398 use real type signatures.
1400 * dbus/dbus-test.h: Prototype signature test.
1402 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
1405 * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
1407 2005-02-23 John (J5) Palmieri <johnp@redhat.com>
1409 * python/dbus_bindings.pyx.in (PendingCall::get_reply):
1410 s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
1412 2005-02-21 Colin Walters <walters@verbum.org>
1414 * dbus/dbus-test-main.c (main): Take optional specific test
1417 * dbus/dbus-test.c (run_test): New function, runs a test function
1418 with no data directory.
1419 (run_data_test): Like above, but takes data directory.
1420 (dbus_internal_do_not_use_run_tests): Take
1421 specific test argument. Replace lots of cut n' paste code
1422 with run_test and run_data_test.
1424 * dbus/dbus-test.h: Update prototype for
1425 dbus_internal_do_not_use_run_tests.
1427 2005-02-20 Havoc Pennington <hp@redhat.com>
1429 Fix bugs reported by Daniel P. Berrange
1431 * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
1432 (protected_change_watch): new function
1433 (_dbus_server_toggle_watch, _dbus_server_remove_watch)
1434 (_dbus_server_add_watch): change to work like the
1435 dbus-connection.c equivalents; like those, probably kind of
1436 busted, but should at least mostly work for now
1437 (dbus_server_disconnect): drop the lock if we were already
1438 disconnected, patch from Daniel P. Berrange
1440 * dbus/dbus-server.c (_dbus_server_toggle_timeout)
1441 (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
1444 * doc/TODO: todo about unscrewing this mess
1446 2005-02-19 Colin Walters <walters@verbum.org>
1448 * glib/dbus-binding-tool-glib.c
1449 (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
1451 * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
1452 as errno.h and sys/stat.h.
1453 (lose): New function, prints error with
1455 (lose_gerror): Similar, but takes GError for message.
1456 (main): Add --output argument to specify output file to write to,
1457 instead of always printing to stdout. In this mode, determine
1458 timestamps on source files to see whether any are newer than the
1459 target file. If not, exit. Also convert a number of error
1460 messages to use lose (since it's shorter), and switch to using
1461 g_io_channel_shutdown.
1463 2005-02-19 Havoc Pennington <hp@redhat.com>
1465 * glib/dbus-gobject.c
1466 (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
1468 * glib/dbus-glib.c: fix doxygen warnings
1470 * glib/dbus-gparser.c (parse_annotation): error if an annotation
1471 is found on an <arg>
1473 2005-02-17 Colin Walters <walters@verbum.org>
1475 * glib/dbus-gobject.h: Don't export
1476 _dbus_glib_marshal_dbus_message_to_gvalue_array.
1478 * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
1479 (invoke_object_method): Handle it.
1481 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
1484 2005-02-17 Colin Walters <walters@verbum.org>
1486 * bus/.cvsignore, doc/.cvsignore
1487 * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
1490 2005-02-17 Colin Walters <walters@verbum.org>
1492 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
1493 Rename to DBUS_SERVICE_DBUS.
1494 (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
1495 (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
1496 Change the value from "org.freedesktop.Local"
1497 to "org.freedesktop.DBus.Local".
1498 (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
1499 (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
1500 DBUS_INTERFACE_INTROSPECTABLE.
1501 Change the value from "org.freedesktop.Introspectable"
1502 to "org.freedesktop.DBus.Introspectable".
1503 (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
1504 DBUS_INTERFACE_PROPERTIES.
1505 Change the value from "org.freedesktop.Properties"
1506 to "org.freedesktop.DBus.Properties".
1507 (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
1508 DBUS_INTERFACE_PEER.
1509 Change the value from "org.freedesktop.Peer"
1510 to "org.freedesktop.DBus.Peer".
1511 (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
1512 DBUS_INTERFACE_LOCAL.
1513 Change the value from "org.freedesktop.Local"
1514 to "org.freedesktop.DBus.Local".
1516 All other users of those constants have been changed.
1518 * bus/driver.c (bus_driver_handle_introspect): Use constants.
1520 * glib/dbus-gobject.c (handle_introspect): Use constants.
1522 * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
1524 2005-02-17 Colin Walters <walters@verbum.org>
1526 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
1527 (parse_node, parse_interface, parse_method, parse_signal)
1528 (parse_property, parse_annotation): Lose if we're currently in an
1530 (parse_annotation): New function.
1531 (parser_start_element, parser_end_element): Handle annotation.
1532 (parse_method, parse_interface): Remove support for c_name attribute,
1533 switch to annotations.
1535 * glib/dbus-gidl.h (interface_info_get_binding_names)
1536 (method_info_get_binding_names)
1537 (interface_info_get_binding_name, method_info_get_binding_name)
1538 (interface_info_set_binding_name, method_info_set_binding_name):
1540 (interface_info_get_annotations, method_info_get_annotations)
1541 (interface_info_get_annotation, method_info_get_annotation)
1542 (interface_info_add_annotation, method_info_add_annotation):
1545 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
1547 (struct MethodInfo): Ditto.
1548 Straightfoward conversion of binding methods into annotation methods
1551 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
1553 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
1555 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
1556 Use new annotation API.
1558 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
1561 * doc/dbus-specification.xml: Discuss introspection annotations,
1562 include list of well-known annotations.
1564 * test/glib/test-service-glib.xml: Make validate against new DTD.
1566 2005-02-17 Colin Walters <walters@verbum.org>
1568 This patch is based on initial work from
1569 Paul Kuliniewicz <kuliniew@purdue.edu>.
1571 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
1572 initialization of GValue from dbus type to here.
1573 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
1574 for the "glib-genmarshal" program from a DBus type.
1575 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
1576 into the C name for it we use in the glib bindings.
1577 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
1578 glib C type (not GValue).
1579 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
1581 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
1582 from dbus-gobject.c.
1584 * glib/dbus-gutils.h: Prototype it.
1586 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
1587 (marshal_dbus_message_to_g_marshaller): Use new shared function
1588 dbus_glib_marshal_dbus_message_to_gvalue_array.
1590 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
1591 Will be changed once we have annotations.
1593 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
1594 GStaticRWLock. Callers updated.
1595 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
1596 (string_table_next): New function for iterating over zero-terminated
1598 (string_table_lookup): New function; retrieves specific entry in
1600 (get_method_data): New function; look up method data in object data chunk.
1601 (object_error_domain_prefix_from_object_info)
1602 (object_error_code_from_object_info): New functions, but not implemented yet.
1603 (method_interface_from_object_info): New function; retrieve interface name.
1604 (method_name_from_object_info): New function; retrieve method name.
1605 (method_arg_info_from_object_info): New function; retrieve argument data.
1606 (arg_iterate): New function; iterates over serialized argument data.
1607 (method_dir_signature_from_object_info): New function; returns a
1608 GString holding type signature for arguments for just one
1609 direction (input or output).
1610 (method_input_signature_from_object_info)
1611 (method_output_signature_from_object_info): New functions.
1612 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
1613 converts dbus message arguments into a GValue array. Used for both
1614 signal handling and method invocation.
1615 (struct DBusGlibWriteIterfaceData): New utility structure.
1616 (write_interface): New function; generate introspection XML for
1618 (introspect_interfaces): New function; gathers all interface->methods,
1619 generates introspection XML for them.
1620 (handle_introspect): Invoke introspect_interfaces.
1621 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
1622 (lookup_object_and_method): New function; examines an incoming message
1623 and attempts to match it up (via interface, method name, and argument
1624 signature) with a known object and method.
1625 (gerror_domaincode_to_dbus_error_name): New function; converts a
1626 GError domain and code into a DBus error name. Needs GError data
1627 added to object introspection to work well.
1628 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
1630 (invoke_object_method): New function to invoke an object method
1631 looked up via lookup_object_and_method. Parses the incoming
1632 message, turns it into a GValue array, then invokes the marshaller
1633 specified in the DBusGMethodInfo. Creates a new message with
1634 either return values or error message as appropriate.
1635 (gobject_message_function): Invoke lookup_object_and_method and
1636 invoke_object_method.
1638 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
1639 (enum DBusBindingOutputMode): New enum for binding output modes.
1640 (pretty_print): Print binding names.
1641 (dbus_binding_tool_error_quark): GError bits.
1642 (version): Fix typo.
1643 (main): Create GIOChannel for output. Parse new --mode argument,
1644 possible values are "pretty-print", "glib-server", "glib-client".
1645 Use mode to invoke appropriate function.
1647 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
1649 * glib/dbus-glib-tool.h: New header, just includes GError bits
1652 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
1653 maps binding style to name.
1654 (struct MethodInfo): Ditto.
1655 (get_hash_keys, get_hash_key): Utility function, returns keys for
1657 (interface_info_new, method_info_new): Initialize bindings.
1658 (interface_info_unref, method_info_unref): Destroy bindings.
1659 (method_info_get_binding_names, method_info_get_binding_name)
1660 (interface_info_get_binding_names, interface_info_get_binding_name):
1661 Functions for retrieving binding names.
1662 (method_info_set_binding_name, interface_info_set_binding_name):
1663 Functions for setting binding names.
1665 * glib/dbus-binding-tool-glib.h: New file, has prototypes
1666 for glib binding generation.
1668 * glib/dbus-binding-tool-glib.c: New file, implements server-side
1669 and client-side glib glue generation.
1671 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
1672 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
1675 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
1676 of using GClosureMarshal directly.
1677 (struct DBusGObjectInfo): Add n_infos member.
1679 * test/glib/test-service-glib.xml: New file; contains introspection data
1680 for MyTestObject used in test-service-glib.c.
1682 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
1683 (my_object_do_nothing, my_object_increment, my_object_throw_error)
1684 (my_object_uppercase, my_object_many_args): New test methods.
1685 (main): Use dbus_g_object_class_install_info to include generated object
1688 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
1689 as well as client-side bindings.
1691 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
1692 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
1693 using both the dbus_gproxy stuff directly as well as the generated bindings.
1695 2005-02-15 Havoc Pennington <hp@redhat.com>
1697 * dbus/dbus-connection.c (dbus_connection_dispatch): always
1698 complete a pending call, don't run filters first.
1700 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
1701 dbus_pending_call_steal_reply
1703 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
1704 _dbus_connection_block_pending_call
1705 (dbus_pending_call_get_reply): change to steal_reply and return a
1708 * dbus/dbus-connection.c
1709 (dbus_connection_send_with_reply_and_block): port to work in terms
1711 (_dbus_connection_block_pending_call): replace block_for_reply
1714 2005-02-14 Havoc Pennington <hp@redhat.com>
1716 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
1717 properly handle looking up group information by name; fix
1720 2005-02-13 Havoc Pennington <hp@redhat.com>
1722 * dbus/dbus-connection.c (dbus_connection_return_message)
1723 (dbus_connection_borrow_message): hold dispatch lock while message
1725 (_dbus_connection_block_for_reply): hold dispatch lock while we
1726 block for the reply, so nobody steals our reply
1727 (dbus_connection_pop_message): hold the dispatch lock while we
1730 2005-02-13 Havoc Pennington <hp@redhat.com>
1732 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
1733 (_dbus_connection_release_dispatch)
1734 (_dbus_connection_acquire_io_path)
1735 (_dbus_connection_release_io_path): make the mutex and condvar
1736 control access to the "acquired" flag. Drop the connection lock
1737 while waiting on the condvar. Hopefully these are baby steps in
1738 roughly the right direction.
1740 2005-02-13 Havoc Pennington <hp@redhat.com>
1742 * dbus/dbus-connection.c: use separate mutexes for the condition
1743 variables; this is some kind of baseline for sanity, but the
1744 condition variables still aren't used correctly afaict
1746 2005-02-13 Havoc Pennington <hp@redhat.com>
1748 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
1751 * dbus/dbus-connection.c
1752 (_dbus_connection_detach_pending_call_unlocked): add this
1754 Initial semi-correct pass through to fix thread locking; there are
1755 still some issues with the condition variable paths I'm pretty
1758 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
1761 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
1762 rename to add _unlocked
1763 (struct DBusConnection): move "dispatch_acquired" and
1764 "io_path_acquired" to use only one bit each.
1765 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
1766 (dbus_connection_set_watch_functions): hacky fix to reentrancy
1767 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
1768 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
1769 (_dbus_connection_remove_timeout)
1770 (_dbus_connection_toggle_timeout): drop lock when calling out to
1771 user functions; done in a hacky/bad way.
1772 (_dbus_connection_send_and_unlock): add a missing unlock
1773 (_dbus_connection_block_for_reply): add a missing unlock
1775 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
1776 drop lock in a hacky probably unsafe way to call out to user
1779 2005-02-12 Havoc Pennington <hp@redhat.com>
1781 * tools/dbus-tree-view.c (info_set_func_text): display more
1784 * bus/driver.c (bus_driver_handle_list_services): list the bus
1787 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
1789 * glib/dbus-gidl.c (signal_info_get_n_args): new function
1790 (method_info_get_n_args): new function
1792 2005-02-12 Havoc Pennington <hp@redhat.com>
1794 * bus/driver.c (bus_driver_handle_introspect): add introspection
1797 2005-02-12 Havoc Pennington <hp@redhat.com>
1799 * bus/driver.c: put the signature of each bus driver method in the
1800 table of handlers and check it on incoming calls; this isn't
1801 really useful, but going to add introspect support in a minute.
1803 2005-02-11 Joe Shaw <joeshaw@novell.com>
1805 * mono/Connection.cs: The unpredictability of finalizers in mono
1806 prevents us from deterministically disconnecting the filters from
1807 the Service class's finalizer, so move tracking of filters and
1808 matches here. Add API for that.
1810 * mono/Service.cs: Remove the code, add code which calls the
1811 methods now on the Connection class.
1813 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
1815 * python/dbus.py (class Sender): added to support dbus signals better
1816 (Bus::add_signal_receiver): added expand_args parameter which defaults
1817 to True. When expand args is True the signal handler will pass the
1818 message arguments as parameters to the signal handler. If False
1819 revert to previous behavior where the signal handler must get the
1820 argument list from the message. This is to help port applications
1821 like HAL that have a tendancy to send variable length argument lists.
1822 self._match_rule_to_receivers is now a dict of dicts.
1823 (Bus::remove_signal_receiver): pop handler off the dict intead of
1824 removing it from a list
1825 (Bus::_signal_func): change signal handlers so that interface,
1826 signal_name, service, path and message are packed into a Sender
1827 object and that is passed to the handler. If expand_args is True
1828 extract the args list from the message and append it to the parameter
1831 * python/dbus_bindings.pyx.in (class Signature): added to support
1833 (MessageIter::__init__): changed iteration limit to match D-BUS
1834 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
1835 STRUCT and VARIENT type support
1836 (MessageIter::python_value_to_dbus_sig): made recursive to support
1838 (MessageIter::append*): added Signature, dict, tuple
1841 * python/examples/example-client.py: added examples of getting tuples
1844 * python/examples/example-service.py: added examples of sending tuples
1847 * python/examples/example-signal-recipient.py: Fixed to handle new
1848 signal callback format
1850 2005-02-10 Havoc Pennington <hp@redhat.com>
1852 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
1853 (call dbus_g_proxy_add_signal)
1855 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1857 (_dbus_server_new_for_domain_socket): escape the path
1859 * dbus/dbus-address.c (dbus_address_escape_value): new
1860 (dbus_address_unescape_value): new
1861 (dbus_parse_address): unescape values
1863 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
1865 * doc/dbus-specification.xml: explain how to escape values in
1868 2005-02-10 Havoc Pennington <hp@redhat.com>
1870 * dbus/dbus-message-factory.c (generate_special): modify test to
1871 avoid using a non-basic dict key
1873 * dbus/dbus-marshal-validate-util.c: add test for the below
1875 * doc/dbus-specification.xml: require that dict keys are a basic
1878 * dbus/dbus-marshal-validate.c
1879 (_dbus_validate_signature_with_reason): require that dict key is a
1882 2005-02-10 Havoc Pennington <hp@redhat.com>
1884 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
1885 change to be _and_unlock instead of _unlocked
1887 * dbus/dbus-connection.c
1888 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
1889 have no_update so we can find this bug quickly in future
1891 2005-02-10 Havoc Pennington <hp@redhat.com>
1893 * dbus/dbus-message-util.c (verify_test_message): tests for string
1896 * dbus/dbus-message.c (dbus_message_append_args_valist): add
1897 support for arrays of string/signature/path
1899 2005-02-10 Joe Shaw <joeshaw@novell.com>
1901 * dbus/dbus-connection.c
1902 (_dbus_connection_queue_received_message_link,
1903 _dbus_connection_message_sent): Add the path to
1905 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
1906 _dbus_connection_send_preallocated_unlocked(), updated the
1907 dispatch status, and unlocks. Fixes a bug where certain
1908 situations (like a broken pipe) could cause a Disconnect message
1909 to not be sent, tricking the bus into thinking a service was still
1910 there when the process had quit.
1911 (_dbus_connection_send_preallocated): Call
1912 _dbus_connection_send_preallocated_and_unlock().
1913 (_dbus_connection_send_and_unlock): Added. Calls
1914 _dbus_connection_send_preallocated_and_unlock().
1915 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
1916 (dbus_connection_send_with_reply): Update the dispatch status and
1919 * mono/Service.cs (~Service): Added. Removes the filter so that
1920 we don't get unmanaged code calling back into a GCed delegate.
1921 (RemoveFilter); Added.
1923 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
1925 * dbus/dbus-message.c (dbus_message_iter_open_container):
1926 - Removed check for iterator type being an array because
1927 get_arg_type does not work with writer iterators
1928 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
1930 2005-02-07 Havoc Pennington <hp@redhat.com>
1932 * doc/dbus-specification.xml: some more language cleanups; add
1933 stuff about how to deal with invalid protocol and extension
1934 points; add _ to allowed chars in auth commands; add EXTENSION_
1937 2005-02-06 Havoc Pennington <hp@redhat.com>
1939 * s/expected/required/ in a couple places for clarity
1941 2005-02-07 Colin Walters <walters@verbum.org>
1943 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
1944 sender or proposed_recipient.
1946 2005-02-06 Havoc Pennington <hp@redhat.com>
1948 * dbus/dbus-message-factory.c (generate_special): more tests
1950 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
1951 array length that exceeds the maximum
1953 2005-02-05 Havoc Pennington <hp@redhat.com>
1955 * dbus/dbus-message-factory.c (generate_special): more test cases,
1958 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
1959 reason why a signature was invalid
1961 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
1962 skip the length of the string before we look at it in validation
1964 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
1967 * dbus/dbus-message.c (_dbus_message_loader_new): default
1968 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
1970 2005-02-05 Havoc Pennington <hp@redhat.com>
1972 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
1973 if the signature of a variant was empty
1974 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
1975 struct with no element type)
1977 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
1978 mangled messages to break things
1980 2005-02-04 Havoc Pennington <hp@redhat.com>
1982 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
1983 g_quark_try_string() so it actually can return 0
1984 (dbus_g_proxy_connect_signal): ditto
1986 2005-02-04 Havoc Pennington <hp@redhat.com>
1988 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
1990 (tristring_from_message): assert cleanly on null path/interface
1991 (should not be possible though I decided later)
1992 (dbus_g_proxy_dispose): move proxy manager unregistration here
1993 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
1994 g_return_if_fail() checks
1996 2005-02-04 Havoc Pennington <hp@redhat.com>
1998 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
2000 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
2001 (with some minor changes)
2003 * doc/dbus-specification.xml: add deprecated attribute to
2004 introspection format
2006 2005-01-31 Havoc Pennington <hp@redhat.com>
2008 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
2009 think it's sort of right
2011 2005-01-30 Havoc Pennington <hp@redhat.com>
2013 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
2015 2005-01-30 Havoc Pennington <hp@redhat.com>
2017 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
2019 * autogen.sh: change to autotools 1.9
2021 * glib/dbus-gproxy.c: completely change how signals work
2022 (dbus_g_proxy_add_signal): new function to specify signature of a
2024 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
2025 and g_warning if the incoming message has the wrong signature.
2027 2005-01-30 Havoc Pennington <hp@redhat.com>
2029 * tools/dbus-names-model.c (have_names_notify): fix this
2031 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
2032 up the string array handling a bit
2034 2005-01-30 Havoc Pennington <hp@redhat.com>
2036 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
2037 (dbus_g_pending_call_cancel): new function
2039 * dbus/dbus-glib.h: move GType decls for connection/message here;
2040 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
2041 here, just kind of rationalizing how we handle all that
2043 * tools/dbus-names-model.c: new file for a tree model listing the
2046 * tools/dbus-tree-view.c (model_new): use proper typing on the
2049 2005-01-30 Havoc Pennington <hp@redhat.com>
2051 * glib/dbus-gmain.c: add a custom GSource back that just checks
2052 whether the message queue has anything in it; otherwise, there are
2053 cases where we won't see messages in the queue since there was no
2054 IO visible to the glib main loop
2056 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
2057 increase default message timeout to 25 seconds
2059 2005-01-30 Havoc Pennington <hp@redhat.com>
2061 * test/glib/test-profile.c (no_bus_stop_server): remove the
2062 warning about the g_warning that I just fixed
2064 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
2065 custom source, seems to be a lot easier to understand and work
2068 2005-01-30 Havoc Pennington <hp@redhat.com>
2070 I think this main loop thing is conceptually broken, but here are
2071 some band aids. I'll maybe rewrite it in a minute.
2073 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
2074 custom GSource, so don't pass it in; confusing
2075 (gsource_server_finalize, gsource_connection_finalize): add
2076 finalize handlers that remove all the watches.
2078 2005-01-30 Havoc Pennington <hp@redhat.com>
2080 * glib/dbus-gobject.c (introspect_properties): fix the XML
2083 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
2084 which effectively detects the use of freed messages
2086 * glib/dbus-gobject.c (handle_introspect): modify and return the
2087 reply message instead of the incoming message
2089 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
2090 gee, maybe it should SEND THE XML instead of just making a string
2091 and freeing it again ;-)
2093 * tools/dbus-print-message.c (print_message): improve printing of
2096 * configure.in: add debug-glib.service to the output
2098 2005-01-30 Havoc Pennington <hp@redhat.com>
2100 dbus-viewer introspected and displayed the bus driver
2102 * dbus/dbus-object-tree.c
2103 (object_tree_test_iteration): add tests for a handler registered on "/"
2105 * dbus/dbus-object-tree.c
2106 (_dbus_decompose_path): fix to handle path "/" properly
2107 (run_decompose_tests): add tests for path decomposition
2109 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
2112 * glib/dbus-gobject.c (handle_introspect): fix quotes
2114 * test/glib/run-test.sh: support launching the bus, then running
2117 * test/glib/test-service-glib.c (main): put in a trivial gobject
2118 subclass and register it on the connection
2120 * bus/driver.c (bus_driver_handle_introspect): implement
2121 introspection of the bus driver service
2123 * dbus/dbus-protocol.h: add #defines for the XML namespace,
2124 identifiers, doctype decl
2126 * bus/driver.c (bus_driver_handle_get_service_owner): handle
2127 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
2128 returning the service unchanged.
2129 (bus_driver_handle_message): remove old check for reply_serial in
2130 method calls, now the message type deals with that
2131 (bus_driver_handle_message): handle NULL interface
2133 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
2135 * glib/dbus-gloader-expat.c (description_load_from_string): allow
2138 * tools/dbus-viewer.c: add support for introspecting a service on
2141 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
2142 (dbus_g_pending_call_unref): add
2144 2005-01-29 Havoc Pennington <hp@redhat.com>
2146 * tools/dbus-tree-view.c: add support for displaying properties.
2147 (run dbus-viewer with an introspect xml file as arg, then resize
2148 the window so the tree elements show up, not sure what that is)
2150 * glib/dbus-gobject.c (handle_introspect): return
2151 org.freedesktop.Properties and org.freedesktop.Introspectable
2152 interfaces when we are introspected.
2154 * doc/dbus-specification.xml: allow empty interface name when
2157 2005-01-29 Havoc Pennington <hp@redhat.com>
2159 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
2160 though it uses glib, it could be extended for any binding in
2163 * glib/dbus-gobject.c (gobject_message_function): change to the
2164 new way properties work
2166 * dbus/dbus-protocol.h: add the new interfaces
2168 * doc/dbus-specification.xml: document the introspection format,
2169 Introspectable interface, and add an org.freedesktop.Properties
2172 * glib/dbus-gparser.c: add support for a <property> element
2174 * glib/dbus-gidl.c: add PropertyInfo
2176 * glib/dbus-gobject.c (handle_introspect): put the outermost
2177 <node> outside the signal and property descriptions.
2178 (introspect_properties): export properties as <property> rather
2179 than as method calls
2181 2005-01-28 Havoc Pennington <hp@redhat.com>
2183 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
2184 related to authentication protocol
2186 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
2188 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
2189 - BUS_ACTIVATION -> BUS_STARTER
2190 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
2191 - class MessageIter (__init__): Added recursion checking
2192 so we throw a nice error instead of just disconnecting from the
2194 (get): Added arg_type parameter for recursion.
2195 Removed the nil type
2196 Added signiture type placeholder (not implemented)
2197 Added struct type placeholder (not implemented)
2198 Added varient type placeholder (not implemented)
2199 Commented out dict type for now
2200 (get_element_type): renamed from get_array_type
2201 (get_*): changed to use the dbus_message_iter_get_basic API
2202 (get_*_array): removed in favor of recursive get_array method
2203 (get_array): new recursive method which calls get to marshal
2204 the elements of the array
2205 (value_to_dbus_sig): New method returns the corrasponding
2206 dbus signiture to a python value
2207 (append): Comment out dict handling for now
2208 Handle lists with the new recursive API
2209 Comment out None handling for now
2210 (append_nil): removed
2211 (append_*): changed to use dbus_message_iter_append_basic API
2212 (append_*_array): removed in favor of recursive append_array
2214 (__str__): Make it easier to print out recursive iterators
2216 - class Message (__str__): moved type inspection to the
2217 MessageIter class' __str__ method
2218 (get_iter): Added an append parameter wich defaults to False
2219 If True use the new API's to create an append iterator
2221 * python/dbus.py: Update to use new bindings API
2222 - TYPE_ACTIVATION -> TYPE_STARTER
2223 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
2224 - class ActivationBus -> class StarterBus
2225 - class RemoteObject (__call__): get an append iterator
2226 - (_dispatch_dbus_method_call): get an append iterator
2227 - class Object (emit_signal): get an append iterator
2229 * python/examples/: Fixed up the examples to work with the new API
2231 2005-01-28 Joe Shaw <joeshaw@novell.com>
2233 * configure.in: Bump version up to 0.30.
2235 * HACKING: Add a release item to bump the version number up after
2238 2005-01-28 Havoc Pennington <hp@redhat.com>
2240 * doc/dbus-specification.xml: update to describe 16-bit types and
2243 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
2246 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
2249 * dbus/dbus-marshal-recursive.c: implement
2251 2005-01-27 Havoc Pennington <hp@redhat.com>
2253 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
2255 * configure.in: find the right type for 16 and 32 bit ints as well
2258 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
2259 the 16-bit types so people don't have to stuff them in 32-bit or
2262 2005-01-27 Havoc Pennington <hp@redhat.com>
2264 * dbus/dbus-message.c: byteswap the message if you init an
2265 iterator to read/write from it
2267 * dbus/dbus-marshal-byteswap.c: new file implementing
2268 _dbus_marshal_byteswap()
2270 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
2272 2005-01-26 Havoc Pennington <hp@redhat.com>
2274 * dbus/dbus-marshal-validate-util.c: break this out (and fix
2275 build, apparently - nobody noticed?)
2277 2005-01-26 Havoc Pennington <hp@redhat.com>
2279 * dbus/dbus-marshal-recursive.h: remove todo comment
2281 2005-01-25 Joe Shaw <joeshaw@novell.com>
2283 * Land the mono binding changes to conform to the new APIs.
2285 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
2286 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
2288 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
2289 type code as a string.
2290 (InitAppending): Rename dbus_message_append_iter_init() to
2291 dbus_message_iter_init_append().
2293 * mono/BusDriver.cs: Rename ServiceEventHandler to
2294 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
2295 Rename ServiceOwnerChanged to NameOwnerChanged.
2297 * mono/Connection.cs: Rename BaseService to UniqueName, and the
2300 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
2302 * mono/Service.cs: Rename Exists to HasOwner, internally rename
2303 dbus_bus_acquire_service() to dbus_bus_request_name().
2305 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
2306 of Type.UnderlyingSystemType to get the correct element type for
2308 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
2309 dbus_message_get_{element|arg}_type() instead of
2310 dbus_message_iter_init_array_iterator().
2311 (Append): Replace dbus_message_iter_append_array() with
2312 dbus_message_iter_open_container() and
2313 dbus_message_iter_close_container().
2315 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
2316 types have been removed.
2318 * mono/DBusType/*.cs: Replace calls of
2319 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
2320 but specify the type in the DllImport extern declaration. Ditto
2321 for dbus_message_iter_append_[type]() ->
2322 dbus_message_iter_append_basic().
2324 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
2325 NameOwnerChangedHandler.
2327 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
2329 * python/dbus_bindings.pyx.in: Rename of methods and bindings
2330 - get_base_service -> get_unique_name
2331 - bus_get_base_service -> bus_get_unique_name
2332 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
2333 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
2334 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
2335 - bus_activate_service -> bus_start_service_by_name
2336 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
2337 - bus_acquire_service -> bus_request_name
2338 - dbus_bus_acquire_service -> dbus_bus_request_name
2339 - bus_service_exists -> bus_name_has_owner
2340 - dbus_bus_service_exists -> dbus_bus_name_has_owner
2342 * python/dbus.py: Rename of methods
2343 - activate_service -> start_service_by_name
2344 - bus_acquire_service -> bus_request_name
2345 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
2346 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
2349 2005-01-24 Joe Shaw <joeshaw@novell.com>
2351 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
2352 signature for the method that can't be found.
2354 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
2355 the message has any arguments, we need to call
2356 _dbus_type_reader_get_current_type(), not
2357 _dbus_type_reader_has_next().
2359 2005-01-24 Havoc Pennington <hp@redhat.com>
2361 * dbus/dbus-message-factory.c: more testing of message validation
2363 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
2366 2005-01-23 Havoc Pennington <hp@redhat.com>
2368 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
2369 get this all working, not many tests in the framework yet though
2371 2005-01-22 Havoc Pennington <hp@redhat.com>
2373 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
2374 tutorial, based on work from David Wheeler.
2376 2005-01-21 Havoc Pennington <hp@redhat.com>
2378 * dbus/dbus-bus.c: add more return_if_fail checks
2380 * dbus/dbus-message.c (load_message): have the "no validation"
2381 mode (have to edit the code to toggle the mode for now though)
2383 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
2384 skips all validation; I want to use this at least for benchmark
2385 baseline, I'm not sure if it should be a publicly-available switch.
2387 2005-01-21 Havoc Pennington <hp@redhat.com>
2389 * glib/dbus-gmain.c: don't put the GLib bindings in the same
2390 toplevel doxygen group as the low-level API stuff
2392 * dbus/dbus.h: note that libdbus is the low-level API
2394 2005-01-20 Havoc Pennington <hp@redhat.com>
2396 * update-dbus-docs.sh: script to update docs on the web site, only
2397 works for me though. neener.
2399 2005-01-20 Havoc Pennington <hp@redhat.com>
2401 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
2402 code can reveal bugs in it
2404 2005-01-20 Havoc Pennington <hp@redhat.com>
2406 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
2407 select() version, patches from Tor Lillqvist
2409 2005-01-20 Havoc Pennington <hp@redhat.com>
2411 * doc/dbus-tutorial.xml: replace > with >
2413 * bus/services.c (bus_registry_acquire_service): validate the name
2414 and return a better error if it's no good.
2416 * doc/dbus-specification.xml: note NO_AUTO_START change
2418 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
2419 from AUTO_START, we're toggling the default
2421 * bus/dispatch.c: adapt the tests to change of auto-start default
2423 2005-01-18 Havoc Pennington <hp@redhat.com>
2425 * rename dbus-daemon-1 to dbus-daemon throughout
2427 2005-01-18 Havoc Pennington <hp@redhat.com>
2429 * Throughout, grand renaming to strip out the use of "service",
2430 just say "name" instead (or "bus name" when ambiguous). Did not
2431 change the internal code of the message bus itself, only the
2432 programmer-facing API and messages.
2434 * doc/dbus-specification.xml: further update the message bus section
2436 * bus/config-parser.c (all_are_equiv): fix bug using freed string
2439 2005-01-17 Havoc Pennington <hp@redhat.com>
2441 * dbus/dbus-types.h: remove 16-bit types since we don't use them
2444 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
2445 "invalid name character" not only non-ASCII
2447 * doc/dbus-specification.xml: further update spec, message bus
2448 parts are still out-of-date but the marshaling etc. stuff is now
2451 2005-01-17 Havoc Pennington <hp@redhat.com>
2453 * doc/dbus-specification.xml: partially update spec
2455 2005-01-17 Havoc Pennington <hp@redhat.com>
2457 * Throughout, align variant bodies according to the contained
2458 type, rather than always to 8. Should save a fair bit of space in
2461 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
2462 fix handling of case where p == end
2464 * doc/TODO: remove the dbus_bool_t item and variant alignment items
2466 2005-01-17 Havoc Pennington <hp@redhat.com>
2468 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
2470 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
2471 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
2472 are marshaling/unmarshaling a boolean.
2474 2005-01-16 Havoc Pennington <hp@redhat.com>
2476 This is about it on what can be disabled/deleted from libdbus
2477 easily, back below 150K anyhow. Deeper cuts are more work than
2478 just turning the code off as I've done here.
2480 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
2481 signed int convenience funcs
2483 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
2486 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
2487 things out of libdbus
2489 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
2491 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
2492 tests-enabled-only, though it should probably be deleted)
2494 * dbus/dbus-message-util.c: same stuff
2496 * dbus/dbus-auth-util.c: same stuff
2498 2005-01-16 Havoc Pennington <hp@redhat.com>
2500 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
2502 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
2503 way for stripping down dbus-userdb.c stuff included in libdbus.
2504 Rename _dbus_parse_uid for consistency.
2506 2005-01-16 Havoc Pennington <hp@redhat.com>
2508 * dbus/dbus-internals.c (_dbus_real_assert): print the function
2509 name the assertion failed in
2511 * dbus/dbus-internals.h (_dbus_return_if_fail)
2512 (_dbus_return_val_if_fail): assert that the name of the function
2513 containing the check doesn't start with '_', since we only want to
2514 use checks on public functions
2516 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
2517 checks to assertions
2519 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
2520 change checks to asserts for private function
2522 * dbus/dbus-message.c (_dbus_message_set_serial): checks
2523 to asserts for private function
2525 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
2526 broken assertion that was breaking make check
2527 (_dbus_type_reader_array_is_empty): remove this rather than fix
2528 it, was only used in assertions
2530 2005-01-16 Havoc Pennington <hp@redhat.com>
2532 * test/unused-code-gc.py: hacky script to find code that's used
2533 only by the bus (not libdbus) or used only by tests or not used at
2534 all. It has some false alarms, but looks like we can clean up a
2535 lot of size from libdbus.
2537 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
2538 dbus/Makefile.am: initially move 10K of binary size out of libdbus
2540 2005-01-16 Havoc Pennington <hp@redhat.com>
2542 * Add and fix docs according to Doxygen warnings throughout
2545 * dbus/dbus-marshal-recursive.c
2546 (_dbus_type_reader_array_is_empty): change this to just call
2547 array_reader_get_array_len() and make it static
2549 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
2551 (dbus_message_iter_init_append): rename from append_iter_init
2553 * dbus/dbus-marshal-recursive.c
2554 (_dbus_type_reader_get_element_type): rename from
2555 _dbus_type_reader_get_array_type
2557 2005-01-15 Havoc Pennington <hp@redhat.com>
2559 * test/glib/test-profile.c (with_bus_server_filter): fix crash
2561 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
2562 when DBUS_DISABLE_ASSERT
2563 (_dbus_marshal_set_basic): be sure we align for the string length
2565 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
2568 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
2569 inline macro version
2570 (_dbus_string_set_byte): provide inline macro version
2572 2005-01-15 Havoc Pennington <hp@redhat.com>
2574 * Land the new message args API and type system.
2576 This patch is huge, but the public API change is not
2577 really large. The set of D-BUS types has changed somewhat,
2578 and the arg "getters" are more geared toward language bindings;
2579 they don't make a copy, etc.
2581 There are also some known issues. See these emails for details
2583 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
2584 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
2586 * dbus/dbus-marshal-*: all the new stuff
2588 * dbus/dbus-message.c: basically rewritten
2590 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
2591 freed blocks to be all non-nul bytes so using freed memory is less
2592 likely to work right
2594 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
2595 DBUS_FAIL_MALLOC=N environment variable, so you can do
2596 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
2597 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
2600 * qt/message.cpp: port to the new message args API
2601 (operator<<): use str.utf8() rather than str.unicode()
2602 (pretty sure this is right from the Qt docs?)
2604 * glib/dbus-gvalue.c: port to the new message args API
2606 * bus/dispatch.c, bus/driver.c: port to the new message args API
2608 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
2609 "locked" flag to TRUE and align_offset to 0; I guess we never
2610 looked at these anyhow, but seems cleaner.
2612 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
2613 move allocation padding macro to this header; use it to implement
2614 (_DBUS_STRING_STATIC): ability to declare a static string.
2616 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
2617 change to return TRUE if the interface is not set.
2619 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
2620 to dbus-marshal-validate.[hc]
2622 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
2625 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
2626 to dbus-marshal-*.[hc]
2628 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
2629 function here from dbus-marshal.c
2631 2005-01-12 Joe Shaw <joeshaw@novell.com>
2633 * NEWS: Update for 0.23.
2635 * configure.in: Release 0.23.
2637 2005-01-12 Joe Shaw <joeshaw@novell.com>
2639 * mono/Makefile.am, mono/example/Makefile.am: Always build the
2640 dbus DLL with --debug. Clean up after the .mdb files this leaves
2643 * mono/doc/Makefile.am: Need to uninstall the docs on "make
2646 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
2647 is an enum, get the enum's underlying type. Another mono
2650 2005-01-11 Joe Shaw <joeshaw@novell.com>
2652 Patch from Sjoerd Simons <sjoerd@luon.net>
2654 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
2655 DESTDIR. It breaks stuff.
2657 2005-01-11 Joe Shaw <joeshaw@novell.com>
2659 Patch from Tambet Ingo <tambet@ximian.com>
2661 * mono/DBusType/Array.cs (Get): Get the underlying element type by
2662 calling type.GetElementType(). The code previously depended on
2663 broken Mono behavior, which was fixed in Mono 1.1.3.
2665 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
2666 Activator.CreateInstance() so that the class's constructor is
2667 called with the right parameters.
2669 2005-01-11 Joe Shaw <joeshaw@novell.com>
2671 Patch from Timo Teräs <ext-timo.teras@nokia.com>
2673 * dbus/dbus-connection.c
2674 (_dbus_connection_queue_received_message_link): Call
2675 _dbus_connection_remove_timeout() instead of the _locked()
2676 variant, since it's always called from
2677 _dbus_connection_handle_watch(), which handles the locking.
2678 Removed the _locked() variant since it's no longer used.
2680 2005-01-03 Havoc Pennington <hp@redhat.com>
2682 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
2685 2004-12-26 Havoc Pennington <hp@redhat.com>
2687 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
2689 2005-01-03 Havoc Pennington <hp@redhat.com>
2691 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
2694 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
2696 2005-01-02 Havoc Pennington <hp@redhat.com>
2698 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
2700 2005-01-01 Havoc Pennington <hp@redhat.com>
2702 * configure.in: add -Wfloat-equal
2704 2005-01-01 Havoc Pennington <hp@redhat.com>
2706 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
2707 for a variety of reasons '==' doesn't do this.
2709 2004-12-31 Havoc Pennington <hp@redhat.com>
2711 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
2712 I keep wishing I had
2714 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
2716 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
2718 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
2720 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
2721 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
2722 dbus-protocol.h. Because they are defines and not enums they are not
2725 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
2727 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
2728 dbus_bus_activate_service
2730 * python/dbus.py (Bus.activate_service): activate a service on the
2733 2004-12-24 Havoc Pennington <hp@redhat.com>
2735 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
2736 file format has also changed and I haven't adapted to that yet
2738 * Makefile.am: load .gcno files from latest gcc
2740 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
2741 * Patch from Rob Taylor <robtaylor@fastmail.fm>
2743 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
2746 * python/dbus.py (get_unix_user): Added binding to
2747 call dbus_bindings.bus_get_unix_user
2749 * python/extract.py: Modified the proto_pat regex to
2750 handle unsigned long
2752 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2754 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
2755 better POSIX compliance.
2757 2004-12-19 Havoc Pennington <hp@redhat.com>
2759 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
2760 (_dbus_string_insert_8_aligned): new functions
2762 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
2764 2004-12-18 Havoc Pennington <hp@redhat.com>
2766 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
2769 * dbus/dbus-message.c: fix a comment, and add a still-unused
2770 not-implemented function
2772 * dbus/dbus-marshal.h: fix comment
2774 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
2776 2004-12-17 Joe Shaw <joeshaw@novell.com>
2778 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
2779 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
2780 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
2781 Type.UnderlyingSystemType to get the actual system type
2782 underneath. This code previously depended on the broken Mono
2783 behavior, which was fixed in 1.1.3.
2785 2004-11-27 Havoc Pennington <hp@redhat.com>
2787 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
2789 (_dbus_string_get_const_data): inline when asserts are disabled
2791 * dbus/dbus-message.c: record the _dbus_current_generation of
2792 creation so we can complain if dbus_shutdown() is used improperly.
2793 Do this only if checks are enabled.
2795 * dbus/dbus-connection.c: ditto
2797 2004-11-26 Havoc Pennington <hp@redhat.com>
2799 * test/glib/test-profile.c: add with_bus mode to profile echoes
2800 that go through the bus.
2802 * test/glib/run-test.sh: add ability to run test-profile
2804 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
2807 2004-11-26 Havoc Pennington <hp@redhat.com>
2809 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
2810 thing was implemented
2812 2004-11-26 Havoc Pennington <hp@redhat.com>
2814 * test/glib/test-profile.c: tweak a bit, add support for some
2815 made-up minimal malloc overhead with plain sockets, since in
2816 real life some sort of buffers are unavoidable thus we could
2817 count them in the theoretical best case
2819 2004-11-26 Havoc Pennington <hp@redhat.com>
2821 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
2822 where I was trying to cache one too many messages
2824 2004-11-26 Havoc Pennington <hp@redhat.com>
2826 * dbus/dbus-message.c: reimplement message cache as an array which
2827 makes the cache about twice as fast and saves maybe 1.5% overall
2829 2004-11-26 Havoc Pennington <hp@redhat.com>
2831 * dbus/dbus-threads.c (init_global_locks): forgot to put the
2832 message cache lock here
2834 2004-11-26 Havoc Pennington <hp@redhat.com>
2836 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
2837 the "char byte_order" next to each other to save 4 bytes
2838 (dbus_message_new_empty_header): reduce preallocation, since the
2839 message cache should achieve a similar effect
2840 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
2841 message cache that keeps a few DBusMessage around in a pool,
2842 another 8% speedup or so.
2844 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
2846 2004-11-25 Havoc Pennington <hp@redhat.com>
2848 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
2849 to write, without reading or blocking, try it before the poll()
2850 and skip the poll() if nothing remains to write. This is about a
2851 3% speedup in the echo client/server
2853 2004-11-25 Havoc Pennington <hp@redhat.com>
2855 The primary change here is to always write() once before adding
2856 the write watch, which gives us about a 10% performance increase.
2858 * dbus/dbus-transport-unix.c: a number of modifications to cope
2859 with removing messages_pending
2860 (check_write_watch): properly handle
2861 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
2862 messages_pending stuff
2863 (check_read_watch): properly handle WAITING_FOR_MEMORY and
2865 (unix_handle_watch): after writing, see if the write watch can be
2867 (unix_do_iteration): assert that write_watch/read_watch are
2868 non-NULL rather than testing that they aren't, since they
2869 aren't allowed to be NULL. check_write_watch() at the end so
2870 we add the watch if we did not finish writing (e.g. got EAGAIN)
2872 * dbus/dbus-transport-protected.h: remove messages_pending call,
2873 since it resulted in too much inefficient watch adding/removing;
2874 instead we now require that the transport user does an iteration
2875 after queueing outgoing messages, and after trying the first
2876 write() we add a write watch if we got EAGAIN or exceeded our
2877 max bytes to write per iteration setting
2879 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
2882 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
2883 freed and then accessed, valgrind flagged this bug, fix it
2885 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
2886 as the last valid field plus 1, where really it is equal to the
2887 last valid field. Corrects some message corruption issues.
2889 * dbus/dbus-mainloop.c: verbosity changes
2891 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
2892 instead of aborting in one of the test codepaths
2894 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
2895 caused not printing the pid ever again if a verbose was missing
2896 the newline at the end
2897 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
2899 * dbus/dbus-connection.c: verbosity changes;
2900 (dbus_connection_has_messages_to_send): new function
2901 (_dbus_connection_message_sent): no longer call transport->messages_pending
2902 (_dbus_connection_send_preallocated_unlocked): do one iteration to
2903 try to write() immediately, so we can avoid the write watch. This
2904 is the core purpose of this patchset
2905 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
2906 dump the outgoing message queue, so nobody will get confused
2907 trying to send them or thinking stuff is pending to be sent
2909 * bus/test.c: verbosity changes
2911 * bus/driver.c: verbosity/assertion changes
2913 * bus/dispatch.c: a bunch of little tweaks to get it working again
2914 because this patchset changes when/where you need to block.
2916 2004-11-23 Havoc Pennington <hp@redhat.com>
2918 * test/glib/test-profile.c: modify to accept a plain_sockets
2919 argument in which case it will bench plain sockets instead of
2920 libdbus, for comparison purposes.
2922 2004-11-22 Havoc Pennington <hp@redhat.com>
2924 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
2925 threads for more time, so sysprof can get a grip on it.
2927 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
2930 2004-11-13 Havoc Pennington <hp@redhat.com>
2932 * test/glib/test-profile.c: fix this thing up a bit
2934 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
2935 preallocation sizes by a fair bit; not sure if this will be an
2936 overall performance win or not, but it does reduce reallocs.
2938 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
2939 the test hack that forced constant realloc if asserts are
2940 disabled, so we can profile sanely. Sprinkle in some
2941 _DBUS_UNLIKELY() which are probably pointless, but before I
2942 noticed the real performance problem I put them in.
2943 (_dbus_string_validate_utf8): micro-optimize this thing a little
2944 bit, though callgrind says it didn't help; then special-case
2945 ascii, which did help a lot; then be sure we detect nul bytes as
2946 invalid, which is a bugfix.
2947 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
2948 superstition; use memset to nul the padding instead of a manual
2950 (_dbus_string_get_length): inline this as a
2951 macro; it showed up in the profile because it's used for loop
2954 2004-11-10 Colin Walters <walters@verbum.org>
2956 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
2959 2004-11-09 Colin Walters <walters@verbum.org>
2961 * dbus/dbus-string.c (_dbus_string_get_length): New
2962 function, writes DBusString to C buffer.
2964 * dbus/dbus-string.h: Prototype it.
2966 * dbus/dbus-message.c (dbus_message_type_to_string): New
2967 function, converts message type into C string.
2969 * dbus/dbus-message.h: Prototype it.
2971 * bus/selinux.c (bus_selinux_check): Take source pid,
2972 target pid, and audit data. Pass audit data to
2974 (log_audit_callback): New function, appends extra
2976 (bus_selinux_allows_acquire_service): Also take
2977 service name, add it to audit data.
2978 (bus_selinux_allows_send): Also take message
2979 type, interface, method member, error name,
2980 and destination, and add them to audit data.
2981 (log_cb): Initialize func_audit.
2983 * bus/selinux.h (bus_selinux_allows_acquire_service)
2984 (bus_selinux_allows_send): Update prototypes
2986 * bus/services.c (bus_registry_acquire_service): Pass
2987 service name to bus_selinux_allows_acquire_service.
2989 * bus/bus.c (bus_context_check_security_policy): Pass
2990 additional audit data. Move assignment of dest
2993 2004-11-07 Colin Walters <walters@verbum.org>
2995 * dbus/dbus-transport-unix.c (do_authentication): Always
2996 initialize auth_completed.
2998 2004-11-07 Colin Walters <walters@verbum.org>
3000 * bus/bus.c (load_config): Break into three
3001 separate functions: process_config_first_time_only,
3002 process_config_every_time, and process_config_postinit.
3003 (process_config_every_time): Move call of
3004 bus_registry_set_service_context_table into
3005 process_config_postinit.
3006 (process_config_postinit): New function, does
3007 any processing that needs to happen late
3008 in initialization (and also on reload).
3009 (bus_context_new): Instead of calling load_config,
3010 open config parser here and call process_config_first_time_only
3011 and process_config_every_time directly. Later, after
3012 we have forked but before changing UID,
3013 invoke bus_selinux_full_init, and then call
3014 process_config_postinit.
3015 (bus_context_reload_config): As in bus_context_new,
3016 load parse file inside here, and call process_config_every_time
3017 and process_config_postinit.
3019 * bus/services.h, bus/services.c
3020 (bus_registry_set_service_context_table): Rename
3021 from bus_registry_set_sid_table. Take string hash from config
3022 parser, and convert them here into SIDs.
3024 * bus/config-parser.c (struct BusConfigParser): Have
3025 config parser only store a mapping of service->context
3027 (merge_service_context_hash): New function.
3028 (merge_included): Merge context string hashes instead
3029 of using bus_selinux_id_table_union.
3030 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
3031 simply create a new string hash.
3032 (bus_config_parser_unref): Unref it.
3033 (start_selinux_child): Simply insert strings into hash,
3034 don't call bus_selinux_id_table_copy_over.
3036 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
3037 (bus_selinux_id_table_copy_over): Delete.
3039 2004-11-03 Colin Walters <walters@verbum.org>
3041 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
3044 2004-11-03 Colin Walters <walters@verbum.org>
3046 * bus/test-main.c (test_pre_hook): Fix test logic,
3047 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
3049 2004-11-02 Colin Walters <walters@redhat.com>
3051 * bus/selinux.c (bus_selinux_init): Split into two functions,
3052 bus_selinux_pre_init and bus_selinux_post_init.
3053 (bus_selinux_pre_init): Just determine whether SELinux is
3055 (bus_selinux_post_init): Do everything else.
3057 * bus/main.c (main): Call bus_selinux_pre_init before parsing
3058 config file, and bus_selinux_post_init after. This ensures that
3059 we don't lose the policyreload notification thread that
3060 bus_selinux_init created before forking previously.
3062 * bus/test-main.c (test_pre_hook): Update for split.
3064 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
3066 Patch from Johan Fischer <linux@fischaz.com>
3068 * mono/doc/Makefile.am (install-data-local): Added directory
3071 2004-10-29 Colin Walters <walters@redhat.com>
3073 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
3074 parameter for fd to write pid to.
3076 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
3078 * bus/bus.c (bus_context_new): Pass print_pid_fd
3079 to _dbus_become_daemon (bug #1720)
3081 2004-10-29 Colin Walters <walters@redhat.com>
3083 Patch from Ed Catmur <ed@catmur.co.uk>
3085 * mono/doc/Makefile.am (install-data-local): Handle
3088 2004-10-29 Colin Walters <walters@redhat.com>
3090 * bus/.cvsignore, qt/.cvsignore: Update.
3092 2004-10-29 Colin Walters <walters@redhat.com>
3094 Patch from Kristof Vansant <de_lupus@pandora.be>
3096 * configure.in: Detect Slackware.
3097 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
3098 * bus/rc.messagebus.in: New file.
3100 2004-10-29 Colin Walters <walters@redhat.com>
3102 * tools/dbus-monitor.c (filter_func): Return
3103 DBUS_HANDLER_RESULT_HANDLED in filter function
3105 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
3107 2004-10-29 Colin Walters <walters@redhat.com>
3109 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
3111 * bus/services.c (bus_registry_acquire_service):
3112 Correctly retrieve service name from DBusString
3115 2004-10-29 Colin Walters <walters@redhat.com>
3117 * dbus/dbus-glib.h: Update documentation to not
3118 refer to internal APIs.
3120 2004-10-27 Joe Shaw <joeshaw@novell.com>
3122 * mono/Arguments.cs (GetDBusTypeConstructor):
3123 type.UnderlyingSystemType will return "System.Byte" if you do it
3124 on "byte[]", which is not what we want. So check the type.IsArray
3125 property and use System.Array instead.
3127 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
3129 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
3130 the DBusUserInfo structure since this is passed into the function.
3131 This would cause a double free when the function that allocated
3132 the structure would try to free it when an error occured.
3134 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
3135 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
3136 for service activation to avoid 32bit/64bit parallel install issues
3138 2004-10-21 Colin Walters <walters@verbum.org>
3140 * AUTHORS: Fix my email address, the @gnu.org one
3141 has been bouncing for some time. Also add J5.
3143 2004-10-21 Colin Walters <walters@verbum.org>
3145 * dbus/dbus-transport-unix.c (do_authentication): Return
3146 authentication status to callers.
3147 (unix_handle_watch): If we completed authentication this round,
3148 don't do another read. Instead wait until the next iteration,
3149 after we've read any pending data in the auth buffer.
3150 (unix_do_iteration): Ditto.
3151 (unix_handle_watch): Updated for new do_authentication prototype.
3153 2004-10-18 Colin Walters <walters@verbum.org>
3155 * bus/selinux.c (bus_selinux_enabled): Handle
3156 --disable-selinux case.
3158 2004-10-18 Colin Walters <walters@verbum.org>
3160 * bus/selinux.h: Add bus_selinux_enabled.
3162 * bus/selinux.c (bus_selinux_enabled): Implement it.
3164 * bus/config-parser.c (struct include): Add
3165 if_selinux_enabled member.
3166 (start_busconfig_child): Parse if_selinux_enabled
3167 attribute for include.
3168 (bus_config_parser_content): Handle it.
3170 * bus/session.conf.in, bus/system.conf.in: Add
3171 inclusion of context mapping to default config files;
3172 conditional on SELinux being enabled.
3174 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
3176 * test/data/invalid-config-files/badselinux-1.conf,
3177 test/data/invalid-config-files/badselinux-2.conf:
3178 Test files for bad syntax.
3180 2004-10-17 Colin Walters <walters@verbum.org>
3182 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
3183 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
3184 format specifier mismatches.
3186 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
3188 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
3191 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
3192 pointer (bug #1540, Leonardo Boiko).
3194 2004-09-28 Jon Trowbridge <trow@ximian.com>
3196 * mono/BusDriver.cs: Changed BusDriver struct to remove
3197 the ServiceCreated and ServiceDeleted events and replace them
3198 with the new ServiceOwnerChanged event.
3200 * mono/example/BusListener.cs: Added a new example program,
3201 which listens for and reports any ServiceOwnerChanged events
3204 * mono/example/Makefile.am (DESTDIR): Build changes for the
3205 new BusListener.cs example.
3207 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
3209 * bus/signals.c (bus_match_rule_parse): validate the components of
3210 match rules (bug #1439).
3212 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
3214 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
3216 * doc/dbus-specification.xml: document ServiceOwnerChanged
3219 * bus/driver.c, bus/driver.h, bus/services.c: Use
3220 ServiceOwnerChanged signal instead of ServiceCreated and
3223 * bus/dispatch.c: update testcase for the new signal.
3225 2004-09-20 Jon Trowbridge <trow@ximian.com>
3227 Patch from Nat Friedman <nat@novell.com>
3229 * mono/Makefile.am: A number of small build fixes to allow "make
3230 distcheck" to succeed.
3232 * mono/example/Makefile.am: "make distcheck" fixes.
3234 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
3237 * test/Makefile.am: "make distcheck" fixes.
3239 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
3241 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
3243 * doc/busconfig.dtd: update the DTD for the at_console attribute.
3245 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
3246 messages after the first one (bug #1389).
3248 * bus/dispatch.c (check_double_hello_message): add a test case for
3249 the double hello message bug.
3250 (check_existent_service_activation): fix check of spawning error.
3252 2004-09-16 David Zeuthen <david@fubar.dk>
3254 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
3256 2004-09-12 David Zeuthen <david@fubar.dk>
3258 Patch from Kay Sievers <kay.sievers@vrfy.org>
3260 * bus/bus.c (bus_context_new):
3262 * bus/main.c (usage)
3264 Add commandline option --nofork to override configuration file
3267 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
3269 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
3270 compilers don't like it (bug #974).
3272 2004-09-04 Harald Fernengel <harry@kdevelop.org>
3274 * qt/connection.*: Applied patch by Jérôme Lodewyck
3275 <lodewyck@clipper.ens.fr> to integrate an existing
3276 connection into the Qt eventloop
3278 2004-08-30 Jon Trowbridge <trow@ximian.com>
3280 * mono/BusDriver.cs: Added. This is a class for interacting with
3281 the org.freedesktop.DBus service.
3283 * mono/Message.cs: Added a mechanism to expose the message that is
3284 currently being dispatched via the static Message.Current
3285 property. Added Message.Sender and Message.Destination
3288 * mono/Handler.cs: Expose the dispatched message via
3289 Message.Current when handling method calls.
3291 * mono/Service.cs: Expose the dispatched message via
3292 Message.Current when handling signal emissions.
3294 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
3295 Connection.BaseService property.
3297 2004-08-28 Havoc Pennington <hp@redhat.com>
3299 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
3301 More fixes from Steve Grubb
3303 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
3304 (_dbus_listen_tcp_socket): fix fd leak
3306 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
3307 EINTR to a bit lower in the code
3309 2004-08-26 Jon Trowbridge <trow@ximian.com>
3311 * bus/driver.c (bus_driver_handle_service_exists): Respond with
3312 TRUE if we are inquiring about the existence of the built-in
3313 org.freedesktop.DBus service.
3315 2004-08-25 John Palmieri <johnp@redhat.com>
3316 * bus/config-parser.c:
3317 (struct PolicyType): Add POLICY_CONSOLE
3318 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
3319 (start_busconfig_child): Sets up console element when
3320 <policy at_console=""> is encountered in a policy file
3321 (append_rule_from_element): Convert console elements to console
3325 (bus_policy_create_client_policy): Add console rules to the client
3326 policy based on if the client is at the console
3327 (bus_policy_append_console_rule): New function for adding a
3328 console rule to a policy
3329 (bus_policy_merge): Handle console rule merging
3331 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
3332 where we check for console user files
3334 * dbus/dbus-sysdeps.c:
3335 (_dbus_file_exists): New function which checks if the given
3337 (_dbus_user_at_console): New function which does the system
3338 specific process of checking if the user is at the console
3340 * dbus/dbus-userdb.c:
3341 (_dbus_is_console_user): New function converts a UID to user name
3342 and then calls the system specific _dbus_user_at_console to
3343 see if the user is at the console and therefor a console user
3345 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
3347 * bus/config-parser.c (set_limit):
3348 * bus/dbus-daemon-1.1.in:
3349 * test/data/valid-config-files/many-rules.conf: set the
3350 max_match_rules_per_connection limt from the config file.
3352 * doc/busconfig.dtd: update the DTD.
3354 * bus/driver.c: remove some unused variables.
3356 2004-08-24 Mikael Hallendal <micke@imendio.com>
3358 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
3359 it's been replaced by dbus_g_bus_get
3361 2004-08-23 Colin Walters <walters@redhat.com>
3363 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
3365 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
3367 * bus/selinux.c: Create a thread for policy reload notification.
3368 (bus_selinux_get_policy_root): Implement.
3370 * bus/config-parser.c (start_busconfig_child)
3371 (bus_config_parser_content): Support SELinux-root relative
3374 * configure.in <HAVE_SELINUX>: Add -lpthread.
3376 * bus/test-main.c (test_pre_hook, test_post_hook): New.
3377 (test_post_hook): Move memory checking into here.
3378 (test_pre_hook, test_post_hook): Move SELinux checks in
3379 here, but conditional on a DBUS_TEST_SELINUX environment
3380 variable. Unfortunately we can't run the SELinux checks
3381 as a normal user, since they won't have any permissions
3382 for /selinux. So this will have to be tested manually
3383 for now, until we have virtualization for most of
3386 2004-08-23 Havoc Pennington <hp@redhat.com>
3388 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
3389 drop supplementary groups, suggested by Steve Grubb
3391 2004-08-20 Colin Walters <walters@redhat.com>
3393 * bus/config-parser.c (start_busconfig_child): Remove some unused
3396 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
3399 2004-08-17 Joe Shaw <joeshaw@novell.com>
3401 * configure.in: If --enable-mono is passed in, if we can't find
3404 * mono/Makefile.am: Use /gacutil to install assemblies into the
3407 2004-08-12 Havoc Pennington <hp@redhat.com>
3409 * NEWS: update for 0.22
3411 * configure.in: release 0.22
3413 2004-08-11 Colin Walters <walters@redhat.com>
3415 * tools/dbus-send.c (main, usage): Add --reply-timeout
3418 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
3420 * bus/bus.c (process_config_first_time_only): get rid of an unused
3421 DBusError that was causing a memoy leak (bug #989).
3423 * dbus/dbus-keyring.c, dbus/dbus-message.c:
3424 fix compilation on Solaris/Forte C (bug #974)
3426 * bus/main.c (main): plug two minuscule memleaks.
3428 2004-08-10 Havoc Pennington <hp@redhat.com>
3430 * doc/dbus-tutorial.xml: add some more info on GLib bindings
3432 2004-08-09 Havoc Pennington <hp@redhat.com>
3434 * COPYING: switch to Academic Free License version 2.1 instead of
3435 2.0, to resolve complaints about patent termination clause.
3437 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
3439 * README: added documentation for the --enable-python
3442 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
3444 * bus/config-parser.c (bus_config_parser_new): fix an invalid
3445 _unref in the SELinux support.
3447 * doc/busconfig.dtd: update DTD for SELinux support.
3449 * bus/config-loader-libxml.c: fix error handler and parser
3450 initialisation/cleanup. OOM test now works with libxml2 HEAD.
3452 * configure.in: remove the warning about libxml2.
3454 * dbus/dbus-bus.c: silence doxygen warning.
3456 2004-07-31 Colin Walters <walters@redhat.com>
3458 * configure.in: Move #error in SELinux check to its own line.
3460 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
3462 * dbus/dbus-internals.h (_DBUS_SET_OOM):
3463 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
3466 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
3467 broken by the change in the _SET_OOM macros.
3469 2004-07-31 Colin Walters <walters@redhat.com>
3471 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
3474 2004-07-31 Colin Walters <walters@redhat.com>
3476 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
3477 to correctly detect DBUS__ACQUIRE_SVC. Also add an
3480 2004-07-24 Havoc Pennington <hp@redhat.com>
3482 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
3484 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
3487 * configure.in: add --enable-selinux
3489 * bus/policy.c (bus_policy_merge): add FIXME to a comment
3491 * bus/main.c (main): initialize and shut down selinux
3493 * bus/connection.c: store SELinux ID on each connection, to avoid
3494 repeated getting of the string context and converting it into
3497 * bus/bus.c (bus_context_get_policy): new accessor, though it
3499 (bus_context_check_security_policy): check whether the security
3500 context of sender connection can send to the security context of
3501 recipient connection
3503 * bus/config-parser.c: add parsing for <selinux> and <associate>
3505 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
3506 implement dbus_connection_get_unix_fd()
3508 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
3509 function, used by the selinux stuff
3511 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
3513 * bus/config-loader-libxml.c: complete the implementation of
3514 libxml backend for config file loader. Doesn't work with full OOM
3517 * configure.in: change error when selecting libxml into a warning.
3519 * test/data/invalid-config-files: add two non-well-formed XML
3522 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
3524 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
3525 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
3526 be necessary to read all the buffer. (bug #894)
3528 * bus/activation.c (bus_activation_activate_service): fix a
3529 potential assertion failure (bug #896). Small optimization in the
3530 case of auto-activation messages.
3532 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
3533 add test case for byte-through-vararg bug (#901). patch by Kimmo
3536 2004-07-28 Anders Carlsson <andersca@gnome.org>
3539 * python/dbus_bindings.pyx.in:
3540 Add dbus.init_gthreads (), allow emit_signal to pass
3541 arguments to the signal.
3543 2004-07-24 Havoc Pennington <hp@redhat.com>
3545 * AUTHORS: add some people, not really comprehensively, let me
3546 know if I missed you
3548 2004-07-24 Havoc Pennington <hp@redhat.com>
3550 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
3553 * test/Makefile.am (DIST_SUBDIRS): here also
3555 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
3557 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
3558 breaking build on Solaris, reported by Farhad Saberi on the ML.
3560 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
3561 va_arg invocation to account for integer promotion in the case of
3562 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
3564 * bus/services.c (bus_service_remove_owner): fix bug #902, use
3565 _dbus_list_get_first_link, not _dbus_list_get_first.
3567 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
3569 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
3570 handler functions so that the asserts in _dbus_object_subtree_unref
3573 * dbus/dbus-transport-unix.c (do_reading):
3574 _dbus_transport_queue_messages return value is of type
3575 dbus_bool_t, not DBusDispatchStatus.
3577 2004-07-19 David Zeuthen <david@fubar.dk>
3579 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
3582 (check_get_connection_unix_user): Debug says GetProperty; but the
3583 method is called GetConnectionUnixUser
3584 (check_get_connection_unix_process_id): New function
3585 (bus_dispatch_test): Actually call check_get_connection_unix_user();
3586 also call check_get_connection_unix_process_id()
3589 (bus_driver_handle_get_connection_unix_process_id): New function,
3590 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
3594 (handle_server_data_external_mech): Set pid from the credentials
3595 obtained from the socket
3597 * dbus/dbus-connection.c:
3598 (dbus_connection_get_unix_process_id): New function
3600 * dbus/dbus-connection.h:
3601 Add prototype for dbus_connection_get_unix_process_id
3603 * dbus/dbus-transport.c:
3604 (_dbus_transport_get_unix_process_id): New function
3606 * dbus/dbus-transport.h:
3607 Add prototype for _dbus_transport_get_unix_process_id
3609 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
3611 * dbus/dbus-message.c: Message counter fix, patch by Christian
3612 Hammond <chipx86@gnupdate.org>
3614 2004-07-18 Seth Nickell <seth@gnome.org>
3617 * python/dbus_bindings.pyx.in:
3618 * python/tests/test-client.py:
3620 Add dbus.ByteArray and dbus_bindings.ByteArray
3621 types so that byte streams can be passed back.
3623 Give jdahlin the heaps of credit that are so
3626 2004-07-12 Seth Nickell <seth@gnome.org>
3630 Add message argument to the default object_method_handler
3633 * python/dbus_bindings.pyx.in:
3635 Automatically return NIL when passed an empty list
3636 (we can't pass back a list since lists are typed
3637 and we don't have any idea what type the the client
3638 intended the list to be... :-( )
3640 2004-07-10 Seth Nickell <seth@gnome.org>
3642 * python/examples/Makefile.am:
3644 Fix distcheck breakage caused by new examples.
3646 2004-07-10 Seth Nickell <seth@gnome.org>
3650 Add "message" argument to service-side dbus.Object
3651 methods. This will break existing services written
3652 using the python bindings, but will allow extraction
3653 of all the message information (e.g. who its from).
3655 Add improved "object oriented" signal handling/emission.
3657 * python/examples/example-service.py:
3661 * python/examples/example-signal-emitter.py:
3662 * python/examples/example-signal-recipient.py:
3664 Two new examples that show how to emit and receive
3665 signals using the new APIs.
3667 * python/examples/example-signals.py:
3668 * python/examples/gconf-proxy-service.py:
3669 * python/examples/gconf-proxy-service2.py:
3671 Add "message" argument to service methods.
3673 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
3675 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
3676 * dbus/bus.c (dbus_bus_get_unix_user)
3677 * doc/dbus-specification.xml: implement GetConnectionUnixUser
3678 method of org.freedesktop.DBus interface.
3680 * bus/dispatch.c: test case
3682 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
3684 * python/Makefile.am: switched include directory from glib/ to dbus/
3685 since dbus-glib.h moved
3687 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
3689 * configure.in: prevent building the gcj stuff and libxml loader
3690 since they are broken.
3692 2004-06-20 Havoc Pennington <hp@redhat.com>
3694 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
3695 codes from the dbus error names
3697 * glib/dbus-glib.h: move to subdir dbus/ since it's included
3698 as dbus/dbus-glib.h and that breakage is now visible due to
3699 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
3701 * glib/dbus-glib.h: s/gproxy/g_proxy/
3703 * dbus/dbus-shared.h: new header to hold stuff shared with
3706 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
3709 * glib/dbus-glib.h (dbus_set_g_error): move to
3710 dbus-glib-lowlevel.h
3712 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
3713 of stuff to enable this
3715 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
3717 * a bunch of other changes with the same basic "separate glib
3718 bindings from dbus.h" theme
3720 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
3722 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
3724 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
3726 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
3728 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
3729 the reply value of the ServiceExists message.
3731 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
3733 * python/dbus_bindings.pyx.in: No longer need to parse path
3734 elements and pass them as arrays of strings. The C API now
3735 accepts plain path strings.
3736 (_build_parsed_path): removed
3738 2004-06-07 Havoc Pennington <hp@redhat.com>
3740 * doc/TODO: remove auto-activation item since it's done; sort
3741 items by importance/milestone
3743 2004-06-07 Havoc Pennington <hp@redhat.com>
3745 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
3746 random signature when using REQUIRED_FIELDS (this hack won't work
3749 * dbus/dbus-message.c: change the signature to be a header field,
3750 instead of message->signature special-case string. Incremental
3751 step forward. Then we can fix up code to send the signature in the
3752 message, then fix up code to validate said signature, then fix up
3753 code to not put the typecodes inline, etc.
3754 (load_one_message): don't make up the signature after the fact
3755 (decode_header_data): require signature field for the known
3758 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
3760 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
3762 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
3764 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
3766 * mono/Handler.cs: Updated to follow new path argument for
3767 (un-)registering objects.
3769 * mono/example/Makefile.am:
3771 * configure.in: Bumped required version for mono and use new -pkg
3774 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
3776 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
3777 registration functions take the path argument as char* instead of
3780 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
3781 split off the path decompostion part of
3782 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
3785 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
3787 2004-06-02 Kristian Høgsberg <krh@redhat.com>
3789 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
3790 machine approach. A state is implemented as a function that
3791 handles incoming events as specified for that state.
3793 * doc/dbus-specification.xml: Update auth protocol state machine
3794 specification to match implementation. Remove some leftover
3797 2004-06-02 Kristian Høgsberg <krh@redhat.com>
3799 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
3800 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
3803 * Doxyfile.in: remove deprecated options.
3805 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
3806 glib/test-thread.h, glib/test-thread-client.c,
3807 glib/test-thread-server.c, glib/test-profile.c,
3808 glib/test-dbus-glib.c: remove these unused files.
3810 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
3812 * dbus/dbus-object-tree.c
3813 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
3814 non-fallback handlers (bug #684).
3815 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
3816 (find_subtree_recurse): report wether the returned subtree is an
3817 exact match or a "fallback" match higher up in the tree.
3818 (object_tree_test_iteration): update test case.
3820 2004-06-01 Seth Nickell <seth@gnome.org>
3822 * python/dbus_bindings.pyx.in:
3823 * python/tests/test-client.py:
3825 Round off basic type support. Add dicts (yay!), and
3826 remaining array types.
3828 Make MessageIter more general so it works for dicts too.
3830 Mark all loop variables as C integers.
3832 2004-05-31 Havoc Pennington <hp@redhat.com>
3834 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
3837 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
3839 * glib/dbus-glib-tool.c (main): set up to have a --self-test
3840 option that runs the tests, and start filling in some code
3841 including for starters just dumping the interfaces to stdout
3843 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
3845 * test/data/valid-introspection-files/lots-of-types.xml: test of
3846 an example introspection file
3848 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
3851 2004-05-31 Seth Nickell <seth@gnome.org>
3853 * python/dbus_bindings.pyx.in:
3854 * python/tests/test-client.py:
3859 Fix string array memory trashing bug... oops...
3861 2004-05-30 Seth Nickell <seth@gnome.org>
3865 Add a nicer-but-less-flexible alternate API for handling
3866 calls to virtual objects in dbus.ObjectTree.
3868 Screw up the argument order to the dbus.Object constructor
3869 for consistency with dbus.ObjectTree (and to make dbus_methods
3870 optional for future extension)
3872 * python/examples/Makefile.am:
3873 * python/examples/gconf-proxy-service.py:
3874 * python/examples/gconf-proxy-service2.py:
3876 Alternate implementation of gconf-proxy-service using the
3877 nicer dbus.ObjectTree API.
3879 * python/examples/example-service.py:
3880 * python/tests/test-server.py
3882 Reverse the argument order to deal with dbus.Object constructor
3885 2004-05-30 Seth Nickell <seth@gnome.org>
3887 * python/examples/example-client.py:
3888 * python/examples/example-service.py:
3890 Take it back. Lists seem to work but they're broken
3891 in the test suite. Make the base examples use
3894 2004-05-30 Seth Nickell <seth@gnome.org>
3896 * python/dbus_bindings.pyx.in:
3897 * python/tests/test-client.py:
3899 Add some more tests and fix errors that crop up.
3900 Unfortunately, currently it seems like marshalling
3901 and unmarshalling of lists is completely broken :-(
3903 2004-05-30 Seth Nickell <seth@gnome.org>
3905 * python/dbus_bindings.pyx.in:
3907 Add support for ObjectPath type.
3911 Refactor message handling code to a common function.
3913 * python/tests/test-client.py:
3914 * python/tests/test-server.py:
3916 Add tests that check to make sure values of all types
3917 can be echoed from a service w/o mangling.
3919 2004-05-29 Seth Nickell <seth@gnome.org>
3923 Add ObjectTree class which allows implementation
3924 of trees of "virtual" objects. Basically the python
3925 wrapper for "register_fallback".
3927 * python/examples/Makefile.am
3928 * python/examples/gconf-proxy-client.py:
3929 * python/examples/gconf-proxy-service.py:
3931 Implement a simple GConf proxy service that supports
3932 get/set on string and int GConf keys using the ObjectTree.
3934 2004-05-29 Seth Nickell <seth@gnome.org>
3937 * python/examples/example-client.py:
3938 * python/examples/example-service.py:
3939 * python/examples/list-system-services.py:
3941 Add SessionBus, SystemBus and ActivationBus classes
3942 so you don't need to know the special little BUS_TYPE
3945 2004-05-29 Havoc Pennington <hp@redhat.com>
3947 * bus/config-parser.c (process_test_valid_subdir): temporarily
3948 stop testing config parser OOM handling, since expat has issues
3949 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
3951 * bus/dbus-daemon-1.1.in: change requested_reply to
3952 send_requested_reply/receive_requested_reply so we can send the
3953 replies, not just receive them.
3955 * bus/config-parser.c: parse the new
3956 send_requested_reply/receive_requested_reply
3958 * bus/policy.c (bus_client_policy_check_can_send): add
3959 requested_reply argument and use it
3961 * bus/bus.c (bus_context_check_security_policy): pass through
3962 requested_reply status to message send check
3964 * bus/system.conf.in: adapt to requested_reply change
3966 2004-05-28 Havoc Pennington <hp@redhat.com>
3968 * test/glib/test-service-glib.c (main): remove unused variable
3970 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
3972 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
3973 from the enum, no longer in use.
3975 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
3978 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
3979 whether error_name passed in is a valid error name.
3981 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
3983 * dbus/dbus-message.c (dbus_message_get_args): Added support for
3984 OBJECT_PATH and OBJECT_PATH_ARRAY
3986 2004-05-28 Seth Nickell <seth@gnome.org>
3988 * python/examples/Makefile.am:
3990 Forget to add Makefile.am. Do not pass go.
3992 2004-05-28 Michael Meeks <michael@ximian.com>
3994 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
3997 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
3999 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
4000 (_dbus_message_iter_get_basic_type_array): impl.
4001 drastically simplify ~all relevant _get methods to use these.
4002 (_dbus_message_iter_append_basic_array),
4003 (dbus_message_iter_append_basic): impl
4004 drastically simplify ~all relevant _append methods to use these.
4006 * dbus/dbus-message-builder.c (parse_basic_type)
4007 (parse_basic_array, lookup_basic_type): impl.
4008 (_dbus_message_data_load): prune scads of duplicate /
4011 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
4012 (_dbus_demarshal_basic_type): implement,
4013 (demarshal_and_validate_len/arg): beef up debug.
4014 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
4016 2004-05-27 Seth Nickell <seth@gnome.org>
4019 * python/Makefile.am:
4021 Include the example python apps in the tarball.
4023 * python/examples/list-system-services.py
4025 Add a python new example that fetches the list of services
4026 from the system bus.
4028 2004-05-27 Seth Nickell <seth@gnome.org>
4031 * python/dbus_bindings.pyx.in:
4033 Fix failure to notify that a signal was not handled,
4034 resulted in hung functions.
4036 2004-05-25 Colin Walters <walters@redhat.com>
4038 * tools/dbus-monitor.c (main): Monitor all types of messages.
4040 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
4042 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
4043 which unregisters the object path and disposes the handler.
4045 2004-05-23 Kristian Høgsberg <krh@redhat.com>
4047 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
4049 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
4050 operands to && so we call dbus_message_iter_next () for the last
4053 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
4055 * dbus/dbus-object-tree.c
4056 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
4057 children even if the requested path isn't registered.
4058 (object_tree_test_iteration): test object_tree_list_registered.
4060 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
4063 2004-05-20 Kristian Høgsberg <krh@redhat.com>
4065 * doc/TODO: Remove resolved items.
4067 * bus/expirelist.h (struct BusExpireList): remove unused n_items
4070 * bus/connection.c (bus_connections_expect_reply): Enforce the
4071 per-connection limit on pending replies.
4073 Patch from Jon Trowbridge <trow@ximian.com>:
4075 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
4076 up a watch that triggers a config reload when one end of the pipe
4078 (signal_handler): Instead of doing the config reload in our SIGHUP
4079 handler, just write to the reload pipe and let the associated
4080 watch handle the reload when control returns to the main loop.
4082 * bus/driver.c (bus_driver_handle_reload_config): Added.
4083 Implements a ReloadConfig method for requesting a configuration
4084 file reload via the bus driver.
4086 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
4088 * HACKING: Updated release instructions concerning the wiki page.
4090 2004-05-18 Kristian Høgsberg <krh@redhat.com>
4092 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
4093 filter against auth->allowed_mechs; we only add allowed mechs in
4094 record_mechanisms().
4096 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
4097 ALLOWED_MECHS to auth-script format so we can set the list of
4100 * data/auth/client-out-of-mechanisms.auth-script: New test to
4101 check client disconnects when it is out of mechanisms to try.
4103 * dbus/dbus-auth.c (process_command): Remove check for lines
4104 longer that 1 MB; we only buffer up maximum 16 kB.
4106 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
4107 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
4108 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
4109 assume there might be unused bytes.
4111 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
4112 client-out-of-mechs, it is handled in process_reject(). Move check
4113 for max failures to send_rejected(), as it's a server-only thing.
4115 * dbus/dbus-auth.c: Factor out protocol reply code into functions
4116 send_auth(), send_data(), send_rejected(), send_error(),
4117 send_ok(), send_begin() and send_cancel().
4119 2004-05-17 Kristian Høgsberg <krh@redhat.com>
4121 Remove base64 encoding, replace with hex encoding. Original patch
4122 from trow@ximian.com, added error handling.
4124 * dbus/dbus-string.c (_dbus_string_base64_encode)
4125 (_dbus_string_base64_decode): Remove.
4126 (_dbus_string_hex_decode): Add end_return argument so we can
4127 distinguish between OOM and invalid hex encoding.
4128 (_dbus_string_test): Remove base64 tests and add test case for
4131 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
4132 Replace base64 with hex.
4134 * test/data/auth/invalid-hex-encoding.auth-script: New test case
4135 for invalid hex encoded data in auth protocol.
4137 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
4139 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
4142 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
4144 * mono/dbus-sharp.dll.config.in: Added for GAC
4145 * mono/dbus-sharp.snk: Added for GAC
4146 * mono/Assembly.cs.in: Added for GAC
4147 * mono/Makefile.am: Changes for GAC installation
4148 * configure.in: Added refs for dbus-sharp.dll.config.in and
4149 Assembly.cs.in. More fixes for mono testing
4150 * mono/example/Makefile.am: Changed var to CSC
4151 * Makefile.am: Changed flag name to DBUS_USE_CSC
4153 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
4155 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
4156 * mono/doc/*: Added documentation framework
4157 * configure.in: Added monodoc check
4158 * README: Added description of mono configure flags
4160 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
4162 * doc/dbus-specification.xml: Added a "Required" column to the
4163 header fields table and changed the "zero or more" verbage in
4164 the above paragraph to read "The header must contain the required
4165 named header fields and zero or more of the optional named header
4167 * test/data/invalid-messages/*.message: Added the required PATH
4168 named header field to the tests so that they don't fail on
4169 'Missing path field'
4171 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
4173 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
4174 the stack by implicitly defining variable and parameter types and
4175 removing the hack of defining C pointers as python objects and later
4178 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
4180 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
4182 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
4184 * mono/DBusType/Dict.cs: Handle empty dicts
4185 * mono/DBusType/Array.cs: Handle empty arrays
4186 * mono/Arguments.cs: Handle empty arguments
4188 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
4190 * dbus-sharp.pc.in: Modified to include include Libs and Requires
4193 2004-04-25 Kristian Høgsberg <krh@redhat.com>
4195 * test/data/valid-messages/standard-*.message: Update message
4196 test scripts to new header field names.
4198 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
4200 * test/break-loader.c (randomly_do_n_things): tracked down buffer
4201 overflow to times_we_did_each_thing array which would chop off the
4202 first character of the failure_dir string. Increased the size of
4203 the array to 7 to reflect the number of random mutation functions
4206 2004-04-21 Kristian Høgsberg <krh@redhat.com>
4208 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
4209 unix_server->watch here, it is unreffed in disconnect.
4210 (_dbus_server_new_for_tcp_socket): convert NULL host to
4211 "localhost" here so we don't append NULL to address.
4213 * dbus/dbus-server.c (_dbus_server_test): Add test case for
4214 various addresses, including tcp with no explicit host.
4216 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
4218 * dbus/dbus-message.c (decode_header_data, decode_string_field):
4219 fix incorrect setting of .name_offset in the HeaderField (it was
4220 off by two bytes, positioned right after the name and typecode)
4222 * bus/bus.c (bus_context_new, bus_context_unref): test before
4223 calling dbus_server_free_data_slot and _dbus_user_database_unref
4224 in case of an error.
4226 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
4229 2004-04-19 Kristian Høgsberg <krh@redhat.com>
4231 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
4232 _dbus_poll() instead of select().
4234 2004-04-15 Jon Trowbridge <trow@ximian.com>
4236 * bus/main.c (signal_handler): Reload the configuration files
4238 (main): Set up our SIGHUP handler.
4240 * bus/bus.c (struct BusContext): Store the config file, user and
4241 fork flag in the BusContext.
4242 (process_config_first_time_only): Added. Contains the code
4243 (previously in bus_context_new) for setting up the BusContext from
4244 the BusConfigParser that should only be run the first time the
4245 config files are read.
4246 (process_config_every_time): Added. Contains the code (previously
4247 in bus_context_new) for setting up the BusContext from the
4248 BusConfigParser that should be run every time the config files are
4250 (load_config): Added. Builds a BusConfigParser from the config
4251 files and passes the resulting structure off to
4252 process_config_first_time_only (assuming this is the first time)
4253 and process_config_every_time.
4254 (bus_context_new): All of the config-related code has been moved
4255 to process_config_first_time_only and process_config_every_time.
4256 Now this function just does the non-config-related initializations
4257 and calls load_config.
4258 (bus_context_reload_config): Added.
4260 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
4262 * bus/driver.c (bus_driver_handle_get_service_owner):
4263 implement a GetServiceOwner method.
4264 * doc/dbus-specification.xml: document it.
4265 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
4267 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
4268 implement, using the bus GetServiceOwner method.
4270 * test/glib/test-dbus-glib.c:
4271 use dbus_gproxy_new_for_service_owner so that we can receive the
4274 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
4276 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
4277 dbus/dbus-message.c, dbus/dbus-protocol.h
4278 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
4280 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
4281 dbus/dbus-message.c, dbus/dbus-protocol.h
4282 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
4284 * dbus/dbus-internals.c (_dbus_header_field_to_string):
4285 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
4286 DBUS_HEADER_FIELD_SENDER resolves to "sender"
4288 * doc/dbus-specification.xml (Header Fields Table):
4289 s/SERVICE/DESTINATION
4290 s/SENDER_SERVICE/SENDER
4293 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
4295 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
4298 2004-04-13 Michael Meeks <michael@ximian.com>
4300 * glib/dbus-gobject.c (handle_introspect): split out
4301 (introspect_properties): this.
4302 (handle_introspect): implement this.
4304 * test/glib/Makefile.am: use the absolute path so the bus
4305 daemon's chdir ("/") doesn't kill us dead.
4307 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
4309 2004-04-12 Jon Trowbridge <trow@ximian.com>
4311 * bus/config-parser.c (struct BusConfigParser): Added
4312 included_files field.
4313 (seen_include): Added. Checks whether or not a file has already
4314 been included by any parent BusConfigParser.
4315 (bus_config_parser_new): Copy the parent's included_files.
4316 (include_file): Track which files have been included, and fail on
4317 circular inclusions.
4318 (process_test_valid_subdir): Changed printf to report if we are
4319 testing valid or invalid conf files.
4320 (all_are_equiv): Changed printf to be a bit clearer about
4321 what we are actually doing.
4322 (bus_config_parser_test): Test invalid configuration files.
4324 2004-04-09 Jon Trowbridge <trow@ximian.com>
4326 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
4327 argument. If non-null, the newly-constructed BusConfigParser will
4328 be initialized with the parent's BusLimits instead of the default
4330 (include_file): When including a config file, pass in
4331 the current parser as the parent and then copy the BusLimits
4332 from the included BusConfigParser pack to the current parser.
4333 (process_test_valid_subdir): Renamed from process_test_subdir.
4334 (process_test_equiv_subdir): Added. Walks through a directory,
4335 descending into each subdirectory and loading the config files
4336 it finds there. If any subdirectory contains two config files
4337 that don't produce identical BusConfigParser structs, fail.
4338 For now, the BusConfigParser's BusPolicies are not compared.
4339 (bus_config_parser_test): Call both process_test_valid_subdir and
4340 process_test_equiv_subdir.
4342 * bus/config-loader-libxml.c (bus_config_load): Take a parent
4343 argument and pass it along to the call to bus_config_parser_new.
4344 Also made a few small changes to allow this code to compile.
4346 * bus/config-loader-expat.c (bus_config_load): Take a parent
4347 argument and pass it along to the call to bus_config_parser_new.
4349 * bus/bus.c (bus_context_new): Load the config file
4350 with a NULL parent argument.
4352 2004-03-29 Michael Meeks <michael@ximian.com>
4354 * glib/dbus-gobject.c (introspect_properties): split
4355 out, fix mangled 'while' flow control.
4356 (introspect_signals): implement.
4357 (handle_introspect): update.
4359 2004-03-29 Michael Meeks <michael@ximian.com>
4361 * glib/dbus-gobject.c (set_object_property): split out /
4362 re-work, use the property type, and not the message type(!)
4363 (get_object_property): ditto.
4365 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
4366 (dbus_gvalue_marshal): make this code re-usable, needed
4367 for signals too, also on both proxy and server side.
4368 Re-write for more efficiency / readability.
4370 2004-03-29 Michael Meeks <michael@ximian.com>
4372 * dbus/dbus-message.c
4373 (dbus_message_new_error_printf): impl.
4375 * dbus/dbus-connection.c
4376 (dbus_connection_unregister_object_path): fix warning.
4378 * configure.in: fix no-mono-installed situation.
4380 2004-03-27 Havoc Pennington <hp@redhat.com>
4382 Patch from Timo Teräs:
4384 * tools/dbus-send.c (main): if --print-reply, assume type is
4385 method call; support boolean type args
4387 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
4388 bunch of memleak and logic bugs
4390 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
4392 * mono/Arguments.cs:
4393 * mono/Introspector.cs:
4395 * mono/InterfaceProxy.cs:
4397 * mono/ProxyBuilder.cs:
4399 Added InterfaceProxy class to avoid building proxies for every
4403 * dbus-message.c (dbus_message_append_args_valist)
4404 (dbus_message_iter_get_object_path)
4405 (dbus_message_iter_get_object_path_array)
4406 (dbus_message_iter_append_object_path)
4407 (dbus_message_iter_append_object_path_array):
4408 Added object_path iter functions to handle OBJECT_PATH arguments
4410 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
4412 First checkin of mono bindings.
4415 Build stuff for the bindings
4416 * dbus-sharp.pc.in: Added for pkgconfig
4418 2004-03-21 Havoc Pennington <hp@redhat.com>
4420 * test/test-service.c (main): remove debug spew
4422 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
4424 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
4427 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
4428 (dbus_message_iter_init_array_iterator)
4429 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
4430 indicate whether the iterator is empty
4432 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
4435 2004-03-19 Havoc Pennington <hp@redhat.com>
4437 * NEWS: 0.21 updates
4439 * configure.in: 0.21
4441 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
4443 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
4444 you don't need pyrex to make dist
4446 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
4449 2004-03-18 Richard Hult <richard@imendio.com>
4451 * dbus/dbus-message.c (dbus_message_get_auto_activation)
4452 (dbus_message_set_auto_activation): Add doxygen docs.
4454 2004-03-16 Richard Hult <richard@imendio.com>
4456 * bus/activation.c: (bus_activation_service_created),
4457 (bus_activation_send_pending_auto_activation_messages),
4458 (bus_activation_activate_service):
4460 * bus/dispatch.c: (bus_dispatch),
4461 (check_nonexistent_service_auto_activation),
4462 (check_service_auto_activated),
4463 (check_segfault_service_auto_activation),
4464 (check_existent_service_auto_activation), (bus_dispatch_test):
4465 * bus/driver.c: (bus_driver_handle_activate_service):
4466 * bus/services.c: (bus_registry_acquire_service):
4467 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
4468 (dbus_message_get_auto_activation):
4469 * dbus/dbus-message.h:
4470 * dbus/dbus-protocol.h: Implement auto-activation.
4472 * doc/dbus-specification.xml: Add auto-activation to the spec.
4474 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
4476 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
4477 fix a bug with CUSTOM types.
4479 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
4480 a unit test for this bug (used to fail).
4482 2004-03-12 Mikael Hallendal <micke@imendio.com>
4485 (babysitter_watch_callback): notify all pending activations waiting for
4486 the same exec that the activation failed.
4487 (bus_activation_activate_service): shortcut the activation if we
4488 already waiting for the same executable to start up.
4490 2004-03-12 Mikael Hallendal <micke@imendio.com>
4493 - Added service file reloading.
4494 Each service files directory is kept in an hash table in
4495 BusActivation and each BusActivationEntry knows what .service-file it
4496 was read from. So when you try to activate a service the bus will
4497 check if it's been updated, removed or if new .service-files has
4499 - Test code at the bottom for the service file reloading.
4500 * bus/test-main.c: (main):
4502 - added service reloading test.
4503 * dbus/dbus-sysdeps.c:
4504 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
4506 2004-03-08 Michael Meeks <michael@ximian.com>
4508 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
4509 bail immediately if disconnected, to avoid busy loop.
4511 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
4512 cleanup cut/paste/inefficiency.
4514 2004-03-01 David Zeuthen <david@fubar.dk>
4516 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
4517 bug where args were used twice. This bug resulted in a segfault
4518 on a Debian/PPC system when starting the messagebus daemon. Include
4519 dbus-sysdeps.h for DBUS_VA_COPY
4521 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
4523 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
4524 appropriate va_copy implementation. From GLib
4526 2004-02-24 Joe Shaw <joe@ximian.com>
4528 * bus/services.c (bus_registry_acquire_service): We need to pass
4529 in the service name to dbus_set_error() to prevent a crash.
4531 2003-12-26 Anders Carlsson <andersca@gnome.org>
4533 * AUTHORS: Reveal my True identity.
4535 2003-12-17 Mikael Hallendal <micke@imendio.com>
4537 * dbus/dbus-message.c: (dbus_message_append_args_valist):
4538 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
4540 2003-12-13 Mikael Hallendal <micke@imendio.com>
4542 * doc/TODO: Added not about better error check of configuration files.
4544 2003-12-02 Richard Hult <richard@imendio.com>
4546 * Update AFL version to 2.0 throughout the source files to reflect
4547 the update that was done a while ago.
4549 2003-12-02 Richard Hult <richard@imendio.com>
4551 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
4552 wrote_dict_key to FALSE on the iter that the dict is appended to,
4553 just like when appending other types. Fixes a bug where a dict
4554 couldn't be put inside a dict.
4555 (dbus_message_iter_append_dict_key): Fix typo in warning message.
4556 (message_iter_test, _dbus_message_test): Add test case for dict
4559 2003-12-01 David Zeuthen <david@fubar.dk>
4561 * python/dbus.py: Add the actual message when calling the reciever
4562 of a signal such that parameters can be inspected. Add the method
4563 remove_signal_receiver
4565 2003-11-26 Mikael Hallendal <micke@imendio.com>
4569 * glib/*.[ch]: Made ref functions return the pointer
4571 2003-11-25 Zack Rusin <zack@kde.org>
4573 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
4575 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
4578 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
4579 the Integrator and to better fit with the server,
4581 2003-11-24 Zack Rusin <zack@kde.org>
4583 * qt/connection.h, qt/connection.cpp: removing initDbus method since
4584 the integrator handles it now
4586 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
4587 since QTimer wasn't really meant to be used the way DBusTimeout is
4589 2003-11-24 Zack Rusin <zack@kde.org>
4591 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
4592 Integrator class which integrates D-BUS with the Qt event loop,
4594 * qt/connection.h, qt/connection.cpp: Move all the code which
4595 was dealing with D-BUS integration to the Integrator class,
4596 and start using Integrator,
4598 2003-11-23 Zack Rusin <zack@kde.org>
4600 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
4603 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
4604 switching namespaces to DBusQt, reworking the class,
4606 * Makefile.cvs: switching dependencies so that it matches KDE
4609 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
4612 2003-11-19 Havoc Pennington <hp@redhat.com>
4616 * configure.in: bump version to 0.20
4618 * configure.in (have_qt): add yet another place to look for qt
4619 (someone hand trolltech a .pc file...)
4621 2003-11-01 Havoc Pennington <hp@redhat.com>
4623 * doc/dbus-specification.xml: add state machine docs on the auth
4624 protocol; just a first draft, I'm sure it's wrong.
4626 2003-10-28 David Zeuthen <david@fubar.dk>
4628 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
4629 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
4631 2003-10-28 Havoc Pennington <hp@redhat.com>
4633 * dbus/dbus-message.c (get_next_field): delete unused function
4635 2003-10-28 Havoc Pennington <hp@redhat.com>
4637 * bus/expirelist.c (do_expiration_with_current_time): detect
4638 failure of the expire_func due to OOM
4640 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
4642 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
4643 NoReply error that's now created by the bus when the service exits
4645 2003-10-28 Havoc Pennington <hp@redhat.com>
4647 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
4648 tests for set_path, set_interface, set_member, etc.
4650 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
4652 * dbus/dbus-message.c (set_string_field): always just delete and
4653 re-append the field; accept NULL for deletion
4654 (re_align_fields_recurse): reimplement
4656 2003-10-26 Havoc Pennington <hp@redhat.com>
4658 * dbus/dbus-connection.c: fix docs to properly describe the
4659 disconnected message
4660 (_dbus_connection_notify_disconnected): remove this function;
4661 we can't synchronously add the disconnected message, we have to
4662 do it after we've queued any remaining real messages
4663 (_dbus_connection_get_dispatch_status_unlocked): queue the
4664 disconnect message only if the transport has finished queueing all
4665 its real messages and is disconnected.
4666 (dbus_connection_disconnect): update the dispatch status here
4668 2003-10-22 Havoc Pennington <hp@redhat.com>
4670 * bus/bus.c (bus_context_check_security_policy): fix up assertion
4672 * bus/connection.c (bus_transaction_send_from_driver): set the
4673 destination to the connection's base service
4675 2003-10-20 Havoc Pennington <hp@redhat.com>
4677 hmm, make check is currently not passing.
4679 * doc/dbus-specification.xml: add requirement that custom type
4680 names follow the same rules as interface names.
4682 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
4683 duplication and allow 'c' to be 'custom'; dict is now 'm' for
4686 * doc/dbus-specification.xml: update type codes to match
4687 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
4688 CUSTOM. Add type OBJECT_PATH to the spec.
4690 2003-10-17 Havoc Pennington <hp@redhat.com>
4692 * bus/driver.c (create_unique_client_name): use "." as separator
4693 in base service names instead of '-'
4695 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
4696 byte at the end of the string
4698 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
4699 optimization macros since string validation seems to be a slow
4702 * doc/dbus-specification.xml: restrict valid
4703 service/interface/member/error names. Add test suite code for the
4706 * dbus/dbus-string.c: limit service/interface/member/error names
4709 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
4710 format arg to verbose spew
4712 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
4713 memory, return instead of g_error
4715 * test/test-service.c (path_message_func): support emitting a
4718 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
4719 activation bus type if DBUS_BUS_ACTIVATION was set; default to
4720 assuming the activation bus was the session bus so that services
4721 started manually will still register.
4722 (init_connections_unlocked): fix so that in OOM situation we get
4723 the same semantics when retrying the function
4725 * test/test-service.c (main): change to use path registration, to
4726 test those codepaths; register with DBUS_BUS_ACTIVATION rather
4727 than DBUS_BUS_SESSION
4729 2003-10-16 Havoc Pennington <hp@redhat.com>
4731 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
4733 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
4734 coverage of the tests
4735 (coverage-report.txt): don't move the .da and .bbg files around
4737 2003-10-16 Havoc Pennington <hp@redhat.com>
4739 * bus/bus.c (struct BusContext): remove struct field I didn't mean
4742 2003-10-16 Havoc Pennington <hp@redhat.com>
4744 * bus/connection.c (bus_pending_reply_expired): either cancel or
4746 (bus_connections_check_reply): use unlink, not remove_link, as we
4747 don't want to free the link; fixes double free mess
4749 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
4750 where no reply was received
4752 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
4755 * bus/signals.c (match_rule_matches): add special cases for the
4756 bus driver, so you can match on sender/destination for it.
4758 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
4759 DBUS_PRINT_BACKTRACE is set
4761 * dbus/dbus-internals.c: add pid to assertion failure messages
4763 * dbus/dbus-connection.c: add message type code to the debug spew
4765 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
4766 sender=foo not service=foo
4768 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
4769 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
4770 DBUS_ACTIVATION_ADDRESS instead
4772 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
4773 DBUS_SYSTEM_BUS_ADDRESS if appropriate
4775 * bus/bus.c (bus_context_new): handle OOM copying bus type into
4778 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
4779 (dbus_message_iter_get_object_path_array): new function (half
4780 finished, disabled for the moment)
4782 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
4783 DBUS_MESSAGE_TYPE_ERROR
4785 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
4786 avoid redirecting stderr to /dev/null
4787 (babysit): close stdin if not doing the "exit_with_session" thing
4789 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
4790 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
4791 stdout/stdin, so things don't get confused
4793 * bus/system.conf.in: fix to allow replies, I modified .conf
4794 instead of .conf.in again.
4796 2003-10-14 David Zeuthen <david@fubar.dk>
4798 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
4799 argtype to arg_type when raising unknown arg type exception.
4800 Changed type list to reflect the changes in dbus-protocol.h so
4801 the bindings actually work.
4803 2003-10-14 Havoc Pennington <hp@redhat.com>
4805 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
4806 to have a bug keeping it from outputting the .da files sometimes
4807 (string_get_string): don't append garbage nul bytes to the string.
4809 2003-10-15 Seth Nickell <seth@gnome.org>
4811 * python/Makefile.am:
4813 Include dbus_h_wrapper.h in the dist tarball.
4815 2003-10-14 Havoc Pennington <hp@redhat.com>
4817 * bus/bus.c (bus_context_check_security_policy): revamp this to
4818 work more sanely with new policy-based requested reply setup
4820 * bus/connection.c (bus_transaction_send_from_driver): set bus
4821 driver messages as no reply
4823 * bus/policy.c (bus_client_policy_check_can_receive): handle a
4824 requested_reply attribute on allow/deny rules
4826 * bus/system.conf: add <allow requested_reply="true"/>
4828 * bus/driver.c (bus_driver_handle_message): fix check for replies
4829 sent to the bus driver, which was backward. How did this ever work
4830 at all though? I think I'm missing something.
4832 * dbus/dbus-message.c (decode_header_data): require error and
4833 method return messages to have a reply serial field to be valid
4834 (_dbus_message_loader_queue_messages): break up this function;
4835 validate that reply serial and plain serial are nonzero;
4836 clean up the OOM/error handling.
4837 (get_uint_field): don't return -1 from this
4838 (dbus_message_create_header): fix signed/unsigned bug
4840 * bus/connection.c (bus_connections_expect_reply): save serial of
4841 the incoming message, not reply serial
4843 2003-10-14 Havoc Pennington <hp@redhat.com>
4845 * bus/connection.c: implement pending reply tracking using
4848 * bus/bus.c (bus_context_check_security_policy): verify that a
4849 reply is pending in order to allow a reply to be sent. Deny
4850 messages of unknown type.
4852 * bus/dbus-daemon-1.1.in: update to mention new resource limits
4854 * bus/bus.c (bus_context_get_max_replies_per_connection): new
4855 (bus_context_get_reply_timeout): new
4857 2003-10-13 Seth Nickell <seth@gnome.org>
4859 * python/Makefile.am:
4861 Pass "make distcheck": remove a couple files from DIST_FILES
4862 that weren't included in the final version.
4864 2003-10-12 Havoc Pennington <hp@pobox.com>
4866 Added test code that 1) starts an actual bus daemon and 2) uses
4867 DBusGProxy; fixed bugs that were revealed by the test. Lots
4868 more testing possible, but this is the basic framework.
4870 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
4871 empty proxy lists from the proxy list hash
4873 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
4874 couple of return_if_fail checks
4876 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
4877 to allocate, so everything is cleared to NULL as it should be.
4879 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
4880 source as data to dbus_connection_set_timeout_functions() as the
4881 timeout functions expected
4883 * test/glib/run-test.sh: add a little script to start up a message
4884 bus and run tests using it
4886 * tools/dbus-launch.1: updates
4888 * tools/dbus-launch.c (main): add --config-file option
4890 * tools/dbus-launch.c (main): remove confusing else if (runprog)
4891 that could never be reached.
4893 * dbus/dbus-message.c (dbus_message_new_method_return)
4894 (dbus_message_new_error, dbus_message_new_signal): set the
4895 no-reply-expected flag on all these. Redundant, but may
4896 as well be consistent.
4898 2003-10-11 Havoc Pennington <hp@pobox.com>
4900 * test/decode-gcov.c (function_solve_graph): make broken block
4901 graph a nonfatal error since it seems to be broken. Need to debug
4904 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
4905 can't just check type > INVALID < LAST anymore
4907 * dbus/dbus-message.c (dbus_message_get_signature): new function
4908 (dbus_message_has_signature): new function
4909 (struct DBusMessage): add signature field (right now it isn't sent
4910 over the wire, just generated on the fly)
4911 (dbus_message_copy): copy the signature, and init strings to
4912 proper length to avoid some reallocs
4913 (dbus_message_iter_init_array_iterator): return void, since it
4915 (dbus_message_iter_init_dict_iterator): return void since it can't fail
4916 (_dbus_message_loader_queue_messages): add silly temporary hack to
4917 fill in message->signature on load
4919 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
4920 characters, so they are relatively human-readable.
4922 2003-10-11 Havoc Pennington <hp@pobox.com>
4924 * dbus/dbus-message.c (_dbus_message_test): add more test
4925 coverage, but #if 0 for now since they uncover a bug
4926 not fixed yet; I think in re_align_field_recurse()
4927 (re_align_field_recurse): add FIXME about broken assertion
4929 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
4931 * bus/connection.c: share a couple code bits with expirelist.c
4933 * bus/expirelist.h, bus/expirelist.c: implement a generic
4934 expire-items-after-N-seconds facility, was going to share between
4935 expiring connections and replies, decided not to use for expiring
4936 connections for now.
4938 * COPYING: include AFL 2.0 (still need to change all the file headers)
4940 2003-10-09 Havoc Pennington <hp@redhat.com>
4942 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
4943 gcc 3.3. Not that we do anything about it yet.
4945 * bus/signals.c (bus_match_rule_parse): impose max length on the
4948 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
4950 2003-10-09 Havoc Pennington <hp@redhat.com>
4952 Make matching rules theoretically work (add parser).
4954 * bus/bus.c (bus_context_check_security_policy): fix up to handle
4955 the case where destination is explicitly specified as bus driver
4956 and someone else is eavesdropping.
4958 * bus/policy.c (bus_client_policy_check_can_receive): fix up
4959 definition of eavesdropping and assertion
4961 * tools/dbus-send.c (main): use dbus_message_type_from_string
4963 * bus/signals.c (bus_match_rule_parse): implement
4965 * dbus/dbus-message.c (dbus_message_type_from_string): new
4967 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
4969 2003-10-02 Havoc Pennington <hp@pobox.com>
4971 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
4972 dbus_gproxy_oneway_call
4974 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
4975 (dbus_server_setup_with_g_main): fix to allow calling them more
4976 than once on the same args
4977 (dbus_bus_get_with_g_main): new function
4979 2003-10-02 Havoc Pennington <hp@redhat.com>
4981 * doc/dbus-tutorial.xml: write some stuff
4983 2003-09-29 Havoc Pennington <hp@pobox.com>
4985 * configure.in: split checks for Doxygen from XML docs, check for
4988 * doc/Makefile.am: XML-ify all the docs, and add a blank
4991 2003-09-29 Havoc Pennington <hp@pobox.com>
4993 * Merge dbus-object-names branch. To see the entire patch
4994 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
4995 it's huuuuge though.
4996 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
4998 2003-09-28 Havoc Pennington <hp@pobox.com>
5000 * HACKING: update to reflect new server
5002 2003-09-26 Seth Nickell <seth@gnome.org>
5005 * python/examples/example-signals.py:
5007 Start implementing some notions of signals. The API
5008 is really terrible, but they sort of work (with the
5009 exception of being able to filter by service, and to
5010 transmit signals *as* a particular service). Need to
5011 figure out how to make messages come from the service
5014 * python/dbus_bindings.pyx.in:
5016 Removed duplicate message_handler callbacks.
5018 2003-09-25 Havoc Pennington <hp@redhat.com>
5020 * bus/session.conf.in: fix my mess
5022 2003-09-25 Havoc Pennington <hp@pobox.com>
5024 * bus/session.conf.in: fix security policy, reported by Seth Nickell
5026 2003-09-25 Seth Nickell <seth@gnome.org>
5028 * python/examples/example-service.py:
5030 Johan notices complete wrong code in example-service, but
5031 completely wrong in a way that works exactly the same (!).
5032 Johan is confused, how could this possibly work? Example
5033 code fails to serve purpose of making things clear.
5036 2003-09-25 Mark McLoughlin <mark@skynet.ie>
5038 * doc/dbus-specification.sgml: don't require header fields
5039 to be 4-byte aligned and specify that fields should be
5040 distinguished from padding by the fact that zero is not
5043 * doc/TODO: remove re-alignment item and add item to doc
5044 the OBJECT_PATH type.
5046 * dbus/dbus-message.c:
5047 (HeaderField): rename the original member to value_offset
5048 and introduce a name_offset member to keep track of where
5049 the field actually begins.
5050 (adjust_field_offsets): remove.
5051 (append_int_field), (append_uint_field),
5052 (append_string_field): don't align the start of the header
5053 field to a 4-byte boundary.
5054 (get_next_field): impl finding the next marhsalled field
5055 after a given field.
5056 (re_align_field_recurse): impl re-aligning a number of
5057 already marshalled fields.
5058 (delete_field): impl deleting a field of any type and
5059 re-aligning any following fields.
5060 (delete_int_or_uint_field), (delete_string_field): remove.
5061 (set_int_field), (set_uint_field): no need to re-check
5062 that we have the correct type for the field.
5063 (set_string_field): ditto and impl re-aligning any
5065 (decode_header_data): update to take into account that
5066 the fields aren't 4-byte aligned any more and the new
5067 way to distinguish padding from header fields. Also,
5068 don't exit when there is too much header padding.
5069 (process_test_subdir): print the directory.
5070 (_dbus_message_test): add test to make sure a following
5071 field is re-aligned correctly after field deletion.
5073 * dbus/dbus-string.[ch]:
5074 (_dbus_string_insert_bytes): rename from insert_byte and
5075 allow the insert of multiple bytes.
5076 (_dbus_string_test): test inserting multiple bytes.
5078 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
5079 warning note to docs about having to re-align any
5080 marshalled values following the string.
5082 * dbus/dbus-message-builder.c:
5083 (append_string_field), (_dbus_message_data_load):
5084 don't align the header field.
5086 * dbus/dbus-auth.c: (process_test_subdir): print the
5089 * test/break-loader.c: (randomly_add_one_byte): upd. for
5092 * test/data/invalid-messages/bad-header-field-alignment.message:
5095 * test/data/valid-messages/unknown-header-field.message: shove
5096 a dict in the unknown field.
5098 2003-09-25 Seth Nickell <seth@gnome.org>
5101 * python/dbus_bindings.pyx.in:
5103 Handle return values.
5105 * python/examples/example-client.py:
5106 * python/examples/example-service.py:
5108 Pass back return values from the service to the client.
5110 2003-09-24 Seth Nickell <seth@gnome.org>
5114 Connect Object methods (when you are sharing an object) up... pass
5115 in a list of methods to be shared. Sharing all the methods just
5116 worked out too weird. You can now create nice Services over the
5119 * python/dbus_bindings.pyx.in:
5121 Keep references to user_data tuples passed into C functions so
5122 Python doesn't garbage collect on us.
5124 Implement MethodReturn and Error subclasses of Message for creating
5125 DBusMessage's of those types.
5127 * python/examples/example-client.py:
5128 * python/examples/example-service.py:
5130 Simple example code showing both how create DBus services and objects,
5131 and how to use them.
5133 2003-09-23 Havoc Pennington <hp@pobox.com>
5135 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
5137 2003-09-23 Havoc Pennington <hp@redhat.com>
5139 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
5140 (dbus_gproxy_disconnect_signal): implement
5141 (dbus_gproxy_manager_remove_signal_match): implement
5142 (dbus_gproxy_manager_add_signal_match): implement
5143 (dbus_gproxy_oneway_call): implement
5145 2003-09-23 Havoc Pennington <hp@pobox.com>
5147 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
5148 subclass. This means dropping the transparent thread safety of the
5149 proxy; you now need a separate proxy per-thread, or your own
5150 locking on the proxy. Probably right anyway.
5151 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
5153 2003-09-22 Havoc Pennington <hp@redhat.com>
5155 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
5157 2003-09-21 Seth Nickell <seth@gnome.org>
5159 First checkin of the Python bindings.
5161 * python/.cvsignore:
5162 * python/Makefile.am:
5163 * python/dbus_bindings.pyx.in:
5164 * python/dbus_h_wrapper.h:
5166 Pieces for Pyrex to operate on, building a dbus_bindings.so
5167 python module for low-level access to the DBus APIs.
5171 High-level Python module for accessing DBus objects.
5176 Build stuff for the python bindings.
5180 Extra macro needed for finding the Python C header files.
5182 2003-09-21 Havoc Pennington <hp@pobox.com>
5184 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
5185 implementing the proxy manager, didn't get very far.
5187 * dbus/dbus-bus.c (dbus_bus_add_match): new
5188 (dbus_bus_remove_match): new
5190 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
5191 path_name argument; adjust the other not-yet-implemented
5192 gproxy constructors to be what I think they should be.
5194 2003-09-21 Havoc Pennington <hp@pobox.com>
5196 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
5197 by default for message bus connections.
5199 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
5200 exit_on_disconnect flag is set and we process the disconnected
5202 (dbus_connection_set_exit_on_disconnect): new function
5204 2003-09-21 Havoc Pennington <hp@pobox.com>
5206 Get matching rules mostly working in the bus; only actually
5207 parsing the rule text remains. However, the client side of
5208 "signal connections" hasn't been started, this patch is only the
5211 * dbus/dispatch.c: fix for the matching rules changes
5213 * bus/driver.c (bus_driver_handle_remove_match)
5214 (bus_driver_handle_add_match): send an ack reply from these
5217 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
5218 arguments, reported by Seth Nickell
5220 * bus/config-parser.c (append_rule_from_element): support
5221 eavesdrop=true|false attribute on policies so match rules
5222 can be prevented from snooping on the system bus.
5224 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
5225 and "destination" in attribute names; fix some docs bugs;
5226 add eavesdrop=true|false attribute
5228 * bus/driver.c (bus_driver_handle_add_match)
5229 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
5232 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
5233 rid of broadcast service concept, signals are just always broadcast
5235 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
5236 mostly implement matching rules stuff (currently only exposed as signal
5239 2003-09-21 Mark McLoughlin <mark@skynet.ie>
5241 * doc/dbus-specification.sgml: Change the header field name
5242 to be an enum and update the rest of the spec to reference
5243 the fields using the conventinal name.
5245 * dbus/dbus-protocol.h: update to reflect the spec.
5247 * doc/TODO: add item to remove the 4 byte alignment requirement.
5249 * dbus/dbus-message.c: Remove the code to generalise the
5250 header/body length and serial number header fields as named
5251 header fields so we can reference field names using the
5253 (append_int_field), (append_uint_field), (append_string_field):
5254 Append the field name as a byte rather than four chars.
5255 (delete_int_or_uint_field), (delete_string_field): reflect the
5256 fact that the field name and typecode now occupy 4 bytes instead
5258 (decode_string_field), (decode_header_data): update to reflect
5259 protocol changes and move the field specific encoding from
5260 decode_string_field() back into decode_header_data().
5262 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
5263 Add utility to aid debugging.
5265 * dbus/dbus-message-builder.c:
5266 (append_string_field), (_dbus_message_data_load): Update to
5267 reflect protocol changes; Change the FIELD_NAME directive
5268 to HEADER_FIELD and allow it to take the field's conventional
5269 name rather than the actual value.
5271 * test/data/*/*.message: Update to use HEADER_FIELD instead
5272 of FIELD_NAME; Always align the header on an 8 byte boundary
5273 *before* updating the header length.
5275 2003-09-15 Havoc Pennington <hp@pobox.com>
5277 * dbus/dbus-pending-call.c: add the get/set object data
5278 boilerplate as for DBusConnection, etc. Use generic object data
5279 for the notify callback.
5281 * glib/dbus-gparser.c (parse_node): parse child nodes
5283 * tools/dbus-viewer.c: more hacking on the dbus-viewer
5285 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
5286 contain functions shared between the convenience lib and the
5289 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
5290 -export-symbols-regex to the GLib library
5292 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
5293 fix the locking in here, and add a default handler for
5294 Introspect() that just returns sub-nodes.
5296 2003-09-14 Havoc Pennington <hp@pobox.com>
5298 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
5299 rather than gfoo consistent
5301 * glib/dbus-gproxy.h: delete for now, move contents to
5302 dbus-glib.h, because the include files don't work right since we
5303 aren't in the dbus/ subdir.
5305 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
5306 (dbus_gproxy_end_call): finish
5307 (dbus_gproxy_begin_call): finish
5309 * glib/dbus-gmain.c (dbus_set_g_error): new
5311 * glib/dbus-gobject.c (handle_introspect): include information
5312 about child nodes in the introspection
5314 * dbus/dbus-connection.c (dbus_connection_list_registered): new
5315 function to help in implementation of introspection
5317 * dbus/dbus-object-tree.c
5318 (_dbus_object_tree_list_registered_and_unlock): new function
5320 2003-09-12 Havoc Pennington <hp@pobox.com>
5322 * glib/dbus-gidl.h: add common base class for all the foo_info
5325 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
5328 * test/Makefile.am: try test srcdir -ef . in addition to test
5329 srcdir = ., one of them should work (yeah lame)
5331 * glib/Makefile.am: build the "idl" parser stuff as a convenience
5334 * glib/dbus-gparser.h: make description_load routines return
5335 NodeInfo* not Parser*
5337 * Makefile.am (SUBDIRS): build test dir after all library dirs
5339 * configure.in: add GTK+ detection
5341 2003-09-07 Havoc Pennington <hp@pobox.com>
5343 * Make Doxygen contented.
5345 2003-09-07 Havoc Pennington <hp@pobox.com>
5347 * doc/dbus-specification.sgml: more updates
5349 2003-09-06 Havoc Pennington <hp@pobox.com>
5351 * doc/dbus-specification.sgml: partial updates
5353 * bus/dbus-daemon-1.1.in: fix the config file docs for the
5354 zillionth time; hopefully I edited the right file this time.
5356 * bus/config-parser.c (append_rule_from_element): support
5357 send_type, send_path, receive_type, receive_path
5359 * bus/policy.c: add message type and path to the list of things
5360 that can be "firewalled"
5362 2003-09-06 Havoc Pennington <hp@pobox.com>
5364 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
5365 (dbus_connection_register_object_path): make this not handle
5366 messages to paths below the given path
5368 2003-09-03 Havoc Pennington <hp@pobox.com>
5370 * test/glib/Makefile.am: add this with random glib-linked test
5373 * glib/Makefile.am: remove the random test programs from here,
5374 leave only the unit tests
5376 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
5377 uscore/javacaps conversion, and fix
5378 (get_object_property, set_object_property): change to .NET
5379 convention for mapping props to methods, set_FooBar/get_FooBar,
5380 since one language has such a convention we may as well copy it.
5381 Plus real methods in either getFooBar or get_foo_bar style won't
5382 collide with this convention.
5384 2003-09-01 Havoc Pennington <hp@pobox.com>
5386 * glib/dbus-gparser.c: implement
5388 * glib/dbus-gobject.c: start implementing skeletons support
5390 * configure.in: when disabling checks/assert, also define
5391 G_DISABLE_ASSERT and G_DISABLE_CHECKS
5393 2003-09-01 Havoc Pennington <hp@pobox.com>
5395 * glib/Makefile.am: rearrange a bunch of files and get "make
5396 check" framework set up
5398 2003-08-31 Havoc Pennington <hp@pobox.com>
5400 * fix build with --disable-tests
5402 2003-08-30 Havoc Pennington <hp@pobox.com>
5404 * dbus/dbus-connection.c: purge DBusMessageHandler
5406 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
5407 use callbacks everywhere
5409 2003-08-30 Havoc Pennington <hp@pobox.com>
5411 * test/data/valid-config-files/system.d/test.conf: change to
5412 root for the user so warnings don't get printed
5414 * dbus/dbus-message.c: add dbus_message_get_path,
5415 dbus_message_set_path
5417 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
5418 dispatching to a path
5420 * dbus/dbus-string.c (_dbus_string_validate_path): add
5422 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
5423 (_dbus_marshal_object_path): implement
5425 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
5426 to contain the path to the target object
5427 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
5428 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
5430 2003-08-30 Havoc Pennington <hp@pobox.com>
5432 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
5434 2003-08-29 Havoc Pennington <hp@pobox.com>
5436 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
5438 (struct DBusObjectSubtree): shrink this
5439 a lot, since we may have a lot of them
5440 (_dbus_object_tree_free_all_unlocked): implement
5441 (_dbus_object_tree_dispatch_and_unlock): implement
5443 2003-08-29 Havoc Pennington <hp@pobox.com>
5445 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
5447 2003-08-28 Havoc Pennington <hp@pobox.com>
5451 * dbus/dbus-connection.c: port to no ObjectID, create a
5452 DBusObjectTree, rename ObjectTree to ObjectPath in public API
5454 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
5455 everything except UnregisterFunction and MessageFunction
5457 * dbus/dbus-marshal.c: port away from DBusObjectID,
5458 add DBUS_TYPE_OBJECT_PATH
5460 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
5461 dbus/dbus-objectid.[hc]: remove these, we are moving to
5462 path-based object IDs
5464 2003-08-25 Havoc Pennington <hp@pobox.com>
5466 Just noticed that dbus_message_test is hosed, I wonder when I
5467 broke that. I thought make check was passing earlier...
5469 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
5470 container tree, will replace most of dbus-object-registry
5472 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
5475 2003-08-19 Havoc Pennington <hp@pobox.com>
5477 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
5478 (dbus_message_is_error): fix this function
5480 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
5483 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
5484 reflect clarified man page
5485 (bus_client_policy_check_can_send): ditto
5487 * bus/session.conf.in: fixup
5489 * bus/system.conf.in: fixup
5491 2003-08-18 Havoc Pennington <hp@redhat.com>
5493 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
5495 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
5496 dumb bug created earlier (wrong order of args to
5497 decode_header_data())
5499 * tools/dbus-send.c: port
5501 * tools/dbus-print-message.c (print_message): port
5503 * test/data/*messages: port all messages over
5505 * dbus/dbus-message-builder.c: support including
5508 * bus/driver.c: port over
5510 * bus/dispatch.c: port over to new stuff
5512 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5513 rename disconnect signal to "Disconnected"
5515 2003-08-17 Havoc Pennington <hp@pobox.com>
5517 This doesn't compile yet, but syncing up so I can hack on it from
5518 work. What are branches for if not broken code? ;-)
5520 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
5521 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
5522 DBUS_HEADER_FIELD_ERROR_NAME
5524 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
5525 for the interface+member pairs
5526 (string_hash): change to use g_str_hash algorithm
5527 (find_direct_function, find_string_function): refactor these to
5530 * dbus/dbus-message.c: port all of this over to support
5531 interface/member fields instead of name field
5533 * dbus/dbus-object-registry.c: port over
5535 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
5536 from _dbus_string_validate_name
5538 * bus/dbus-daemon-1.1: change file format for the
5539 <deny>/<allow> stuff to match new message naming scheme
5541 * bus/policy.c: port over
5543 * bus/config-parser.c: parse new format
5545 2003-08-16 Havoc Pennington <hp@pobox.com>
5547 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
5550 * glib/dbus-gproxy.c: some hacking
5552 2003-08-15 Havoc Pennington <hp@redhat.com>
5554 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
5556 * dbus/dbus-connection.c
5557 (dbus_connection_send_with_reply_and_block): factor out internals;
5558 change to convert any error replies to DBusError instead of
5559 returning them as a message
5561 2003-08-15 Havoc Pennington <hp@pobox.com>
5563 * dbus/dbus-connection.c,
5564 dbus/dbus-pending-call.c: Finish the pending call stuff
5566 2003-08-14 Havoc Pennington <hp@redhat.com>
5568 * dbus/dbus-pending-call.c: start on new object that will replace
5569 DBusMessageHandler and ReplyHandlerData for tracking outstanding
5572 * dbus/dbus-gproxy.c: start on proxy object used to communicate
5573 with remote interfaces
5575 * dbus/dbus-gidl.c: do the boring boilerplate in here
5577 2003-08-12 Havoc Pennington <hp@pobox.com>
5579 * bus/dispatch.c (bus_dispatch): make this return proper
5580 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
5582 * dbus/dbus-errors.c (dbus_set_error): use
5583 _dbus_string_append_printf_valist
5585 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
5586 (_dbus_string_append_printf): new
5588 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
5591 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
5592 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
5593 message is unhandled.
5595 2003-08-11 Havoc Pennington <hp@pobox.com>
5597 * bus/test.c (client_disconnect_handler): change to return
5598 HANDLED (would have been REMOVE_MESSAGE)
5600 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
5601 HANDLED/NOT_YET_HANDLED instead of
5602 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
5605 2003-08-10 Havoc Pennington <hp@pobox.com>
5607 * tools/dbus-send.c (main): add --type argument, for now
5608 supporting only method_call and signal types.
5610 * tools/dbus-print-message.c: print message type
5612 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5613 init connection->objects
5615 * doc/dbus-specification.sgml: fix sgml
5617 * bus/*.c: port over to object-instance API changes
5619 * test/test-service.c: ditto
5621 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
5622 name, we will have to fix up the rest of the code to also handle
5624 (dbus_message_new): generic message-creation call
5625 (set_string_field): allow appending name field
5627 2003-08-06 Havoc Pennington <hp@pobox.com>
5629 * dbus/dbus-object-registry.c: implement signal connection
5632 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
5634 * dbus/dbus-internals.c (_dbus_memdup): new function
5636 2003-08-02 Havoc Pennington <hp@pobox.com>
5638 * dbus/dbus-message.c (dbus_message_get_no_reply)
5639 (dbus_message_set_no_reply): add these and remove
5640 set_is_error/get_is_error
5642 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
5643 remove the ERROR flag, since there's now an ERROR type
5645 2003-08-01 Havoc Pennington <hp@pobox.com>
5647 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
5650 * dbus/dbus-message.c (dbus_message_get_type): new function
5652 * doc/dbus-specification.sgml: add "type" byte to messages
5654 2003-08-01 Havoc Pennington <hp@pobox.com>
5656 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
5657 a message type enum to distinguish kinds of message
5658 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
5659 that need not be replied to
5661 2003-08-01 Havoc Pennington <hp@pobox.com>
5663 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
5664 (unpack_8_octets): fix no-64-bit-int bug
5666 * dbus/dbus-object-registry.c (validate_id): validate the
5667 connection ID bits, not just the instance ID.
5669 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
5670 the connection-global 33 bits of the object ID
5672 * dbus/dbus-object-registry.c (info_from_entry): fill in
5673 object ID in the new way
5675 * dbus/dbus-objectid.h: rather than high/low bits, specifically
5676 define server/client/instance bits.
5678 2003-07-30 Havoc Pennington <hp@pobox.com>
5680 * dbus/dbus-connection.c (dbus_connection_register_object): fix
5683 2003-07-13 Havoc Pennington <hp@pobox.com>
5685 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
5686 fields to DBusObjectVTable and DBusObjectInfo
5688 2003-07-12 Havoc Pennington <hp@pobox.com>
5690 * dbus/dbus-object-registry.c: implement unit test,
5691 fix bugs discovered in process
5693 * dbus/dbus-connection.c: remove handler_table and
5694 register_handler(), add DBusObjectRegistry usage
5696 * dbus/dbus-objectid.c (dbus_object_id_is_null)
5697 (dbus_object_id_set_null): new functions
5699 2003-07-08 Havoc Pennington <hp@pobox.com>
5701 * dbus/dbus-object.c: implement some of this
5703 * dbus/dbus-object-registry.c
5704 (_dbus_object_registry_add_and_unlock): fill in the object_id out
5706 (_dbus_object_registry_new): handle OOM
5708 2003-07-08 Havoc Pennington <hp@pobox.com>
5710 * dbus/dbus-object.h: sketch out an API for registering objects
5711 with a connection, that allows us to use as little as 24 bytes
5712 per object and lets application code represent an object in
5713 any conceivable way.
5715 * dbus/dbus-object-registry.c: implement the hard bits of the
5716 DBusConnection aspect of object API. Not yet wired up.
5718 2003-07-06 Havoc Pennington <hp@pobox.com>
5720 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
5721 (_dbus_marshal_object_id): new
5722 (_dbus_demarshal_object_id): new
5723 (_dbus_marshal_get_arg_end_pos): support object ID type, and
5724 consolidate identical switch cases. Don't conditionalize handling
5725 of DBUS_TYPE_UINT64, need to handle the type always.
5726 (_dbus_marshal_validate_arg): consolidate identical cases, and
5727 handle DBUS_TYPE_OBJECT_ID
5729 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
5731 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
5733 2003-09-28 Havoc Pennington <hp@pobox.com>
5737 2003-09-28 Havoc Pennington <hp@pobox.com>
5739 * doc/Makefile.am (dbus-specification.html): testing a funky hack
5740 to work with Debian db2html
5742 2003-09-28 Havoc Pennington <hp@pobox.com>
5744 * configure.in: 0.13
5746 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
5747 stylesheet-images for benefit of Debian
5749 Change back to using filesystem-linked sockets for the system
5750 bus, so only root can create the default system bus address.
5752 * bus/system.conf.in: change to use
5753 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
5755 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
5758 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
5759 here, and AC_DEFINE DBUS_SYSTEM_PATH
5761 2003-08-09 Anders Carlsson <andersca@codefactory.se>
5764 * doc/busconfig.dtd:
5767 2003-08-09 Anders Carlsson <andersca@codefactory.se>
5769 * doc/dbus-specification.sgml:
5770 Add activation reply values.
5772 2003-08-05 Havoc Pennington <hp@redhat.com>
5774 * configure.in: 0.12
5776 2003-08-05 Anders Carlsson <andersca@codefactory.se>
5778 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
5779 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
5780 (add_watch), (remove_watch), (create_source):
5781 Refcount fds, fixes some reentrancy issues.
5783 2003-07-30 Havoc Pennington <hp@redhat.com>
5785 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
5786 bus address to be abstract if we have abstract sockets
5790 2003-07-28 Havoc Pennington <hp@redhat.com>
5792 * bus/messagebus.in: fix to avoid processname/servicename
5793 confusion, from Michael Kearey
5794 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
5796 2003-07-23 Havoc Pennington <hp@pobox.com>
5798 * dbus/dbus-message.c (dbus_message_iter_get_named):
5799 fix from Andy Hanton to remove broken "+1"
5801 2003-07-16 Havoc Pennington <hp@pobox.com>
5803 * tools/dbus-launch.c (babysit): close stdout/stderr in the
5804 babysitter process, as suggested by Thomas Leonard, so
5805 an "eval `dbus-launch --exit-with-session`" will actually
5808 2003-07-16 Havoc Pennington <hp@pobox.com>
5810 * configure.in: print out EXPANDED_* variables in the summary at
5811 the end; clean up the code that computes EXPANDED_ variables and
5812 get the ones using exec_prefix right. Should make things work
5813 when you build without --prefix
5815 2003-06-29 Havoc Pennington <hp@pobox.com>
5817 * mono/Test.cs (class Test): fire up a main loop and run it
5819 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
5820 done once, the app has to do it
5822 2003-06-26 Havoc Pennington <hp@pobox.com>
5824 * mono/Connection.cs: set up connection with the glib main loop
5826 2003-07-01 Havoc Pennington <hp@redhat.com>
5828 * doc/dbus-specification.sgml: clarify the format of a type code,
5829 change suggested by Jim Blandy
5831 2003-06-29 Miloslav Trmac <mitr@volny.cz>
5834 * tools/Makefile.am: Don't assume srcdir == builddir.
5836 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
5837 the allocated block.
5838 (_dbus_memory_test): New function.
5839 * dbus/dbus-test.h: Add _dbus_memory_test ().
5840 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
5842 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
5844 (dbus_message_new): Remove obsolete @todo.
5846 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
5847 (_dbus_marshal_set_uint64): Fix comment.
5849 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
5850 hardcode FIELD_REPLY_SERIAL.
5852 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
5853 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
5855 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
5856 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
5858 2003-06-24 Havoc Pennington <hp@pobox.com>
5860 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
5862 2003-06-23 Anders Carlsson <andersca@codefactory.se>
5868 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
5869 * gcj/org/.cvsignore:
5870 * gcj/org/Makefile.am:
5871 * gcj/org/freedesktop/.cvsignore:
5872 * gcj/org/freedesktop/Makefile.am:
5873 * gcj/org/freedesktop/dbus/.cvsignore:
5874 * gcj/org/freedesktop/dbus/Makefile.am:
5875 * gcj/org/freedesktop/dbus/Message.java: (Message),
5877 * gcj/org/freedesktop/dbus/natMessage.cc:
5878 Fix the build system.
5880 2003-06-22 Havoc Pennington <hp@pobox.com>
5882 * mono/Connection.cs: add more bindings
5884 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
5887 2003-06-22 Havoc Pennington <hp@pobox.com>
5889 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
5890 Start wrapping more stuff.
5892 2003-06-22 Havoc Pennington <hp@pobox.com>
5894 * mono/Message.cs: implement Message.Wrap() that ensures we only
5895 have a single C# wrapper per DBusMessage, assuming it works which
5896 it probably doesn't.
5898 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
5899 (dbus_message_free_data_slot): new
5900 (dbus_message_set_data): new
5901 (dbus_message_get_data): new
5903 2003-06-22 Havoc Pennington <hp@pobox.com>
5905 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
5906 (_dbus_data_slot_allocator_alloc): rework these to keep a
5907 reference count on each slot and automatically manage a global
5908 slot ID variable passed in by address
5910 * bus/bus.c: convert to new dataslot API
5912 * dbus/dbus-bus.c: convert to new dataslot API
5914 * dbus/dbus-connection.c: convert to new dataslot API
5916 * dbus/dbus-server.c: convert to new dataslot API
5918 * glib/dbus-gmain.c: ditto
5922 * bus/connection.c: ditto
5924 2003-06-22 Anders Carlsson <andersca@codefactory.se>
5926 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
5927 after the gcj checks so that the correct configuration tags
5928 will be added to libtool.
5930 * dbus-glib-1.pc.in: No need to specify any includes since
5931 dbus-1.pc.in has those.
5933 2003-06-22 Havoc Pennington <hp@pobox.com>
5935 * mono/*, gcj/*, configure.in, Makefile.am:
5936 Check in makefiles and subdirs for mono and gcj bindings.
5937 Neither binding actually exists, just trying to get through
5938 all the build and other boring bits.
5940 2003-06-21 Philip Blundell <philb@gnu.org>
5942 * tools/dbus-monitor.1: Updated.
5944 * tools/dbus-send.1: Likewise.
5946 2003-06-20 Anders Carlsson <andersca@codefactory.se>
5948 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
5949 for hangup and error after checking read so we won't discard
5950 pending data if both hangup and read are set.
5952 2003-06-19 Philip Blundell <philb@gnu.org>
5954 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
5956 * tools/dbus-send.c: Accept both --system and --session.
5958 * tools/dbus-monitor.c: Same here.
5960 2003-06-19 Anders Carlsson <andersca@codefactory.se>
5962 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
5963 from C++ (Patch by Miloslav Trmac).
5965 2003-06-15 Joe Shaw <joe@assbarn.com>
5967 * configure.in: Check for socklen_t.
5969 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
5971 * test/test-segfault.c: Add #include <sys/time.h>
5973 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
5974 dbus-launch needs it.
5976 2003-06-09 Havoc Pennington <hp@redhat.com>
5978 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
5979 SUN_LEN, it breaks abstract socket usage
5981 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
5984 2003-06-04 Havoc Pennington <hp@pobox.com>
5986 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
5987 using unix:abstract=/foo, and when listening in a tmpdir
5988 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
5990 * dbus/dbus-transport.c (_dbus_transport_open): support
5993 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
5994 support abstract sockets
5996 * dbus/dbus-transport-unix.c
5997 (_dbus_transport_new_for_domain_socket): support abstract sockets
5999 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
6000 toggle as an argument, implement abstract namespace support
6001 (_dbus_listen_unix_socket): ditto
6003 * configure.in: add --enable-abstract-sockets and implement
6004 a configure check for autodetection of the right value.
6006 2003-06-01 Havoc Pennington <hp@pobox.com>
6008 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
6009 in /tmp (though on Linux this will end up being useless,
6010 when we add abstract namespace support)
6012 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
6015 2003-05-28 Colin Walters <walters@verbum.org>
6017 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
6019 2003-05-18 Anders Carlsson <andersca@codefactory.se>
6021 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
6023 2003-05-17 Colin Walters <walters@gnu.org>
6025 * tools/dbus-send.c: Don't exit with an error code if --help was
6026 passed. Default to using the session bus instead of the system
6029 * tools/dbus-launch.c: Ditto.
6031 * tools/dbus-monitor.c: Ditto.
6033 * tools/dbus-send.1: Update with new arguments.
6035 * tools/dbus-launch.c: Emit code to export variables. New
6036 arguments -s and -c to specify shell syntax, and a bit of code to
6037 autodetect syntax. Also, allow specifying a program to run.
6039 * tools/dbus-launch.1: Update with new arguments.
6041 * tools/dbus-send.1: Ditto.
6043 * tools/dbus-monitor.1: Ditto.
6045 2003-05-17 Havoc Pennington <hp@pobox.com>
6047 * bus/config-parser.c (merge_included): merge in policies from
6048 child configuration file.
6050 * bus/policy.c (bus_policy_merge): function to merge two policies
6053 2003-05-16 Havoc Pennington <hp@redhat.com>
6055 * dbus/dbus-connection.c: disable verbose lock spew
6057 * tools/dbus-send.c: add --print-reply command line option
6059 * tools/dbus-print-message.h (print_message): new util function
6060 shared by dbus-send and dbus-monitor
6062 * tools/dbus-monitor.c (handler_func): exit on disconnect
6064 * dbus/dbus-transport-unix.c (do_reading): if the transport is
6065 disconnected, don't try to use the read_watch
6067 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
6068 so we can find this bug more easily
6070 2003-05-16 Havoc Pennington <hp@redhat.com>
6072 * bus/policy.c (free_rule_list_func): avoid a crash when passed
6073 NULL as DBusHashTable is annoyingly likely to do.
6075 2003-05-16 Colin Walters <walters@verbum.org>
6077 * tools/dbus-monitor.c: Add --session argument and usage()
6080 * tools/dbus-monitor.1: Update with new --session arg.
6082 * bus/Makefile.am (install-data-hook): Create
6083 $(libdir)/dbus-1.0/services so that the session bus is happy.
6085 2003-05-15 Havoc Pennington <hp@redhat.com>
6087 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
6088 on non-x86. ifdef's are evil.
6090 2003-05-15 Havoc Pennington <hp@redhat.com>
6092 * configure.in: 0.11
6096 * bus/Makefile.am (initddir): apparently we are supposed to put
6097 init scripts in /etc/rc.d/init.d not /etc/init.d
6099 * bus/Makefile.am: remove the "you must --enable-tests to make
6100 check" as it broke distcheck
6102 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
6104 2003-05-13 James Willcox <jwillcox@gnome.org>
6107 * bus/activation.c: (bus_activation_service_created),
6108 (bus_activation_activate_service):
6109 * bus/driver.c: (bus_driver_send_service_deleted),
6110 (bus_driver_send_service_created), (bus_driver_send_service_lost),
6111 (bus_driver_send_service_acquired),
6112 (bus_driver_send_welcome_message),
6113 (bus_driver_handle_list_services):
6114 * bus/session.conf.in:
6115 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
6116 (dbus_bus_service_exists), (dbus_bus_activate_service):
6119 Add some convenience API which lets you activate a service, and did a
6120 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
6121 and dbus_message_get_args()
6123 2003-05-11 Havoc Pennington <hp@pobox.com>
6125 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
6126 calling _dbus_marshal_validate_arg() for every byte in a byte
6129 * dbus/dbus-message-handler.c: use atomic reference counting to
6130 reduce number of locks slightly; the global lock in here sucks
6132 * dbus/dbus-connection.c
6133 (_dbus_connection_update_dispatch_status_and_unlock): variant of
6134 update_dispatch_status that can be called with lock held; then use
6135 in a couple places to reduce locking/unlocking
6136 (dbus_connection_send): hold the lock over the whole function
6137 instead of acquiring it twice.
6139 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
6141 * bus/connection.c (bus_connections_setup_connection): fix access
6142 to already-freed memory.
6144 * dbus/dbus-connection.c: keep a little cache of linked list
6145 nodes, to avoid using the global linked list alloc lock in the
6146 normal send-message case. Instead we just use the connection lock
6147 that we already have to take.
6149 * dbus/dbus-list.c (_dbus_list_find_last): new function
6151 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
6152 change to use a struct for the atomic type; fix docs,
6153 they return value before increment, not after increment.
6155 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
6156 (_dbus_string_append_8_aligned): new functions to try to
6157 microoptimize this operation.
6158 (reallocate_for_length): break this out of set_length(), to
6159 improve profile info, and also so we can consider inlining the
6162 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
6163 strings with some preallocation, cuts down on our calls to realloc
6164 a fair bit. Though if we can get the "move entire string to empty
6165 string" optimization below to kick in here, it would be better.
6167 * dbus/dbus-string.c (_dbus_string_move): just call
6168 _dbus_string_move_len
6169 (_dbus_string_move_len): add a special case for moving
6170 an entire string into an empty string; we can just
6171 swap the string data instead of doing any reallocs.
6172 (_dbus_string_init_preallocated): new function
6174 2003-05-11 Havoc Pennington <hp@pobox.com>
6176 Write a "test-profile" that does echo client-server with threads;
6177 profile reveals lock contention, memcpy/realloc of buffers, and
6178 UTF-8 validation as hot spots. 20% of lock contention eliminated
6179 with dbus_atomic_inc/dec implementation on x86. Much remaining
6180 contention is global mempool locks for GList and DBusList.
6182 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
6185 * dbus/dbus-connection.c (struct DBusConnection): use
6186 dbus_atomic_t for the reference count
6188 * dbus/dbus-message.c (struct DBusMessage): declare
6189 dbus_atomic_t values as volatile
6191 * configure.in: code to detect ability to use atomic integer
6192 operations in assembly, from GLib patch
6194 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
6195 time, tired of it being wrong in threads and forked processes
6197 * glib/test-profile.c: a little program to bounce messages back
6198 and forth between threads and eat CPU
6200 * dbus/dbus-connection.c: add debug spew macros for debugging
6201 thread locks; include config.h at top; fix deadlock in
6202 dbus_connection_flush()
6204 2003-05-08 Havoc Pennington <hp@pobox.com>
6206 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
6207 data from getting written, and there wasn't a good reason to
6210 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
6211 dbus_verbose lines in test coverage
6212 (main): add list of functions sorted by # of untested blocks
6213 to the coverage report
6215 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
6217 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
6219 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
6220 extend test coverage
6222 * test/data/auth/cancel.auth-script: test canceling an
6225 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
6226 aren't used. in CVS history if we end up needing them.
6228 2003-05-04 Havoc Pennington <hp@pobox.com>
6230 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
6233 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
6234 function, which assumed length was in # of strings, not bytes
6236 * dbus/dbus-message.c (_dbus_message_test): add tests for some
6239 * dbus/dbus-connection.c
6240 (_dbus_connection_queue_received_message): disable function for
6241 now, we are only using it in test mode
6243 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6244 remove a mistaken FIXME
6246 2003-05-04 Havoc Pennington <hp@pobox.com>
6248 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
6249 unlock mutex on successful return, patch from Anders Gustafsson
6251 2003-05-04 Havoc Pennington <hp@pobox.com>
6253 * dbus-glib-1.pc.in (Requires): fix dependencies, from
6256 2003-05-04 Havoc Pennington <hp@pobox.com>
6258 * tools/dbus-launch.c: implement
6260 * bus/main.c (main), bus/bus.c (bus_context_new):
6261 implement --print-pid and --fork
6263 2003-05-03 Havoc Pennington <hp@redhat.com>
6265 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
6266 the address had no value, and add to test suite. Fix and
6267 regression test from Miloslav Trmac
6269 2003-05-03 Havoc Pennington <hp@pobox.com>
6271 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
6272 watch is invalid when handled
6274 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
6275 dbus-launch utility to launch the bus from a shell script. Didn't
6276 actually implement dbus-launch yet, it's just a placeholder still.
6278 2003-05-03 Havoc Pennington <hp@pobox.com>
6280 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
6281 daemon; also documents daemon config file, so replaces
6282 doc/config-file.txt. Corrected some stuff from config-file.txt in
6283 the process of moving it.
6285 2003-05-03 Havoc Pennington <hp@pobox.com>
6287 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
6290 2003-05-03 Colin Walters <walters@verbum.org>
6292 * dbus/dbus-sysdeps.c (fill_user_info): Test against
6293 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
6295 * Makefile.am: Update to use new .pc versioning scheme.
6297 2003-05-02 Havoc Pennington <hp@redhat.com>
6299 * bus/system.conf.in: allow send/receive to/from message bus
6302 2003-04-30 Havoc Pennington <hp@redhat.com>
6304 * configure.in: print a note when building with unit tests and
6307 2003-04-30 Havoc Pennington <hp@redhat.com>
6309 * Makefile.am: add a check-local that complains if you didn't
6310 configure with --enable-tests
6312 2003-04-29 Havoc Pennington <hp@redhat.com>
6314 * glib/dbus-gmain.c: docs cleanups
6316 * dbus/dbus-types.h: add docs on int64 types
6318 * dbus/dbus-memory.c: fix docs to avoid putting private API in
6319 public API docs section
6321 2003-04-29 Havoc Pennington <hp@redhat.com>
6323 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
6324 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
6325 parallel install API version, not with the D-BUS package version.
6327 * HACKING: move some of README over here
6329 * README: updates, and document API/ABI policy
6331 * configure.in: reindentation
6333 2003-04-29 Havoc Pennington <hp@redhat.com>
6335 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
6336 to use this library" to be sure people have the right
6339 2003-04-28 Havoc Pennington <hp@redhat.com>
6341 * configure.in: add --enable-docs which by default is auto yes if
6342 doxygen and db2html found, no otherwise; but can be forced on/off
6344 * doc/Makefile.am: conditionalize whether to build docs on
6347 2003-04-28 Havoc Pennington <hp@redhat.com>
6349 * configure.in: 0.10
6353 * bus/system.conf.in: add <includedir>system.d</includedir>
6355 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
6356 username was provided but not uid
6358 * bus/config-parser.c (struct BusConfigParser): keep track of
6359 whether the parser is toplevel or was included; change some
6360 of the error handling if it's included.
6362 2003-04-27 Havoc Pennington <hp@pobox.com>
6366 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
6367 report correct status if we finish processing authentication
6368 inside this function.
6370 * bus/activation.c (try_send_activation_failure): use
6371 bus_transaction_send_error_reply
6373 * bus/connection.c (bus_connection_get_groups): return an error
6374 explaining the problem
6376 * bus/bus.c (bus_context_check_security_policy): implement
6377 restriction here that inactive connections can only send the
6378 hello message. Also, allow bus driver to send anything to
6381 * bus/connection.c (bus_connection_complete): create the
6382 BusClientPolicy here instead of on-demand.
6383 (bus_connection_get_policy): don't return an error
6385 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
6386 sender field in message being replied to
6388 * bus/bus.c (bus_context_check_security_policy): fix silly typo
6389 causing it to return FALSE always
6391 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
6392 we checked sender rather than destination
6394 2003-04-25 Havoc Pennington <hp@redhat.com>
6396 test suite is slightly hosed at the moment, will fix soon
6398 * bus/connection.c (bus_connections_expire_incomplete): fix to
6399 properly disable the timeout when required
6400 (bus_connection_set_name): check whether we can remove incomplete
6401 connections timeout after we complete each connection.
6403 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
6404 probably still broken.
6406 * bus/services.c (bus_registry_acquire_service): implement max
6407 number of services owned, and honor allow/deny rules on which
6408 services a connection can own.
6410 * bus/connection.c (bus_connection_get_policy): report errors here
6412 * bus/activation.c: implement limit on number of pending
6415 2003-04-25 Havoc Pennington <hp@redhat.com>
6417 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
6418 where we used >= 0 instead of != DBUS_UID_UNSET.
6420 2003-04-25 Havoc Pennington <hp@redhat.com>
6422 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
6423 were toggled without add/remove, fix from Anders Gustafsson
6425 2003-04-24 Havoc Pennington <hp@redhat.com>
6427 * test/data/valid-config-files/basic.conf: add <limit> tags to
6430 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
6431 <limit> tag in configuration file.
6433 2003-04-24 Havoc Pennington <hp@redhat.com>
6435 * bus/dispatch.c: somehow missed some name_is
6437 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
6438 (_dbus_timeout_set_interval): new
6440 * bus/connection.c (bus_connections_setup_connection): record time
6441 when each connection is first set up, and expire them after the
6442 auth timeout passes.
6444 2003-04-24 Havoc Pennington <hp@redhat.com>
6446 * dbus/dbus-message.c (dbus_message_name_is): rename
6447 (dbus_message_service_is): rename
6448 (dbus_message_sender_is): rename
6449 (dbus_message_get_service): rename
6451 2003-04-24 Havoc Pennington <hp@redhat.com>
6453 * configure.in: add --enable-checks
6455 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
6457 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
6458 to use thread locks.
6459 (_dbus_connection_handler_destroyed_locked): move some private
6460 functions into proper docs group
6462 * dbus/dbus-internals.h: add _dbus_return_if_fail,
6463 _dbus_return_val_if_fail
6465 Throughout: use dbus_return_if_fail
6467 2003-04-23 James Willcox <jwillcox@gnome.org>
6470 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
6471 (dbus_connection_setup_with_g_main),
6472 (dbus_server_setup_with_g_main):
6473 * glib/test-dbus-glib.c: (main):
6474 * glib/test-thread-client.c: (main):
6475 * glib/test-thread-server.c: (new_connection_callback), (main):
6476 * tools/dbus-monitor.c: (main):
6478 Added a GMainContext argument to dbus_connection_setup_with_g_main()
6479 and dbus_server_setup_with_g_main().
6481 2003-04-20 Havoc Pennington <hp@pobox.com>
6483 * doc/dbus-specification.sgml: document the restrictions on
6484 message and service names
6486 2003-04-22 Havoc Pennington <hp@redhat.com>
6488 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
6489 support, and do some code cleanups to share more code and
6490 speed up array marshal/demarshal.
6492 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
6494 * configure.in: generate dbus-arch-deps.h
6496 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
6499 2003-04-22 Havoc Pennington <hp@redhat.com>
6501 * test/data/valid-messages/opposite-endian.message: fix test
6502 to use proper type for rply field
6504 * test/data/invalid-messages: add tests for below validation
6506 * dbus/dbus-message.c (decode_header_data): validate field types,
6507 and validate that named fields are valid names
6508 (decode_name_field): consider messages in the
6509 org.freedesktop.Local. namespace to be invalid.
6511 * dbus/dbus-string.c (_dbus_string_validate_name): new
6513 2003-04-19 Havoc Pennington <hp@pobox.com>
6515 * bus/driver.c (bus_driver_handle_hello): check limits and
6516 return an error if they are exceeded.
6518 * bus/connection.c: maintain separate lists of active and inactive
6519 connections, and a count of each. Maintain count of completed
6520 connections per user. Implement code to check connection limits.
6522 * dbus/dbus-list.c (_dbus_list_unlink): export
6524 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
6525 number of bytes in the message queue for a connection
6527 2003-04-18 Havoc Pennington <hp@pobox.com>
6529 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
6531 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
6534 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
6535 on realloc be sure to update the pointer in the keyring
6537 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
6538 offset to avoid writing to unallocated memory
6540 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
6541 try the next mechanism, so we properly handle OOM
6543 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
6545 (_dbus_keyring_new): fix OOM bug
6546 (_dbus_keyring_new_homedir): always set error; impose a maximum
6547 number of keys we'll load from the file, mostly to speed up the
6548 test suite and make its OOM checks more useful, but also for
6551 * dbus/dbus-auth.c (process_error_server): reject authentication
6552 if we get an error from the client
6553 (process_cancel): on cancel, send REJECTED, per the spec
6554 (process_error_client): send CANCEL if we get an error from the
6557 2003-04-18 Havoc Pennington <hp@pobox.com>
6559 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
6562 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
6565 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
6566 about DBUS_TEST_HOMEDIR once
6568 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
6571 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
6572 config file so we test the right thing
6574 Throughout: assorted docs improvements
6576 2003-04-18 Havoc Pennington <hp@pobox.com>
6578 * glib/dbus-gmain.c: adapt to watch changes
6580 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
6582 * dbus/dbus-server.h: remove dbus_server_handle_watch
6584 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
6586 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
6587 like DBusTimeout, so we don't need dbus_connection_handle_watch
6590 2003-04-17 Havoc Pennington <hp@redhat.com>
6592 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
6593 database usage so it all goes via the DBusUserDatabase cache.
6595 2003-04-17 Havoc Pennington <hp@redhat.com>
6597 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
6598 there was an OOM watch we skipped, we always return TRUE so we
6599 iterate again to have a look at it again. Fixes test suite hang.
6600 Code rearrangement also lets us lose some memset and only iterate
6601 over callbacks once.
6603 * bus/driver.c (bus_driver_handle_message): sense of test for
6606 2003-04-16 Havoc Pennington <hp@pobox.com>
6608 * doc/dbus-specification.sgml: make spec say serials are unsigned
6610 * dbus/dbus-message.h: change message serials to unsigned
6612 * dbus/dbus-connection.c: adapt to message serials being unsigned
6614 2003-04-15 Havoc Pennington <hp@pobox.com>
6616 * bus/bus.c: create and keep around a shared DBusUserDatabase
6619 * bus/connection.c (bus_connection_get_groups): don't cache
6620 groups for user in the connection object, since user database
6621 object now does that.
6623 2003-04-16 Havoc Pennington <hp@redhat.com>
6625 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
6626 list of size counters
6627 (_dbus_message_loader_putback_message_link): put back a popped link
6629 * dbus/dbus-connection.c
6630 (dbus_connection_set_max_live_messages_size): rename
6632 (dbus_connection_get_outgoing_size): get size of outgoing
6634 (_dbus_connection_set_connection_counter): remove this cruft
6636 2003-04-14 Havoc Pennington <hp@redhat.com>
6638 * dbus/dbus-userdb.c: user database abstraction, mostly to get
6639 caching, but at some point we might want to be able to use a
6642 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
6643 SHA1 conf file to test the sha1 auth mechanism, since the regular
6644 test always uses EXTERNAL when available.
6647 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
6648 add conf file that requires use of sha1 auth
6650 2003-04-13 Havoc Pennington <hp@pobox.com>
6652 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
6653 from Philip Blundell to send messages and monitor them.
6655 2003-04-13 Havoc Pennington <hp@pobox.com>
6657 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
6660 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
6663 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
6664 fix to only recover unused bytes if we're already authenticated
6665 (_dbus_transport_get_is_authenticated): fix to still mark us
6666 authenticated if there are unused bytes.
6668 * bus/dispatch.c: implement security policy checking
6670 * bus/connection.c (bus_transaction_send_from_driver): new
6672 * bus/bus.c (bus_context_check_security_policy): new
6674 * bus/dispatch.c (send_service_nonexistent_error): delete this,
6675 now we just set the DBusError and it gets converted to an error
6678 * bus/connection.c (allow_user_function): enable code using actual
6679 data from the config file
6681 * bus/policy.c (list_allows_user): handle wildcard rules for
6682 user/group connection perms
6684 2003-04-13 Havoc Pennington <hp@pobox.com>
6686 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
6688 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
6690 * bus/policy.c (bus_policy_append_mandatory_rule)
6691 (bus_policy_append_default_rule, bus_policy_append_user_rule)
6692 (bus_policy_append_group_rule): new functions
6694 2003-04-12 Havoc Pennington <hp@pobox.com>
6696 * bus/config-parser.c (bus_config_parser_new): fix a memleak
6698 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
6699 the pid/gid/uid, just for paranoia.
6701 * test/break-loader.c (randomly_do_n_things): find a byte
6702 containing a type code, and randomly change it to a different
6705 2003-04-12 Havoc Pennington <hp@pobox.com>
6707 * bus/policy.h: change BusPolicy to be the thing from the config
6708 file, and rename old BusPolicy to BusClientPolicy
6710 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
6711 match change in how policy works
6713 * dbus/dbus-internals.h: mark assert_not_reached as
6714 __attribute((noreturn))__
6716 2003-04-11 Havoc Pennington <hp@redhat.com>
6718 * doc/dbus-specification.sgml: fix a spot with the wrong name for
6719 the broadcast service. Use boolean return for ServiceExists.
6721 2003-04-11 Havoc Pennington <hp@redhat.com>
6723 * configure.in: add another directory to look for qt in.
6725 2003-04-11 Havoc Pennington <hp@redhat.com>
6727 * AUTHORS: add Colin Walters
6729 2003-04-11 Havoc Pennington <hp@redhat.com>
6735 2003-04-11 Havoc Pennington <hp@redhat.com>
6737 * bus/messagebus.in: remove pid file when stopping the
6738 message bus, since the bus won't have privileges to remove it
6741 2003-04-11 Havoc Pennington <hp@redhat.com>
6743 * bus/bus.c (bus_context_new): move credentials change after
6746 2003-04-11 Havoc Pennington <hp@pobox.com>
6748 * test/decode-gcov.c: add "below average functions" to the
6749 coverage report, and change how some of the code works.
6751 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
6752 not in the coverage stats.
6754 * test/test-service.c (main): use _dbus_verbose not fprintf in a
6755 couple places so running the test suite doesn't result in megaspam.
6757 2003-04-11 Havoc Pennington <hp@pobox.com>
6759 * bus/dispatch.c (check_existent_service_activation): accept a no
6760 memory error in a place we didn't before
6762 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
6763 in case the first one failed," since the test suite is less
6766 2003-04-10 Havoc Pennington <hp@pobox.com>
6768 * bus/dispatch.c (check_segfault_service_activation): add test
6769 for launching an executable that just crashes.
6771 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
6772 don't leave a million cores. We'll see how portable this is.
6774 2003-04-10 Havoc Pennington <hp@pobox.com>
6776 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
6777 the possible parent failures before we fork, so that we don't
6778 fail to create a babysitter after creating the child.
6780 * bus/activation.c (bus_activation_activate_service): kill child
6781 if we don't successfully complete the activation.
6783 2003-04-10 Havoc Pennington <hp@redhat.com>
6785 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
6786 the connection if it's disconnected
6788 * bus/activation.c (bus_activation_service_created): use new
6789 transaction features to roll back removal of pending activation if
6790 we don't successfully create the service after all. Don't remove
6791 pending activation if the function fails.
6793 * dbus/dbus-list.c (_dbus_list_insert_before_link)
6794 (_dbus_list_insert_after_link): new code to facilitate
6797 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
6798 new functionality, so we can preallocate the ability to insert
6801 * bus/connection.c (bus_transaction_add_cancel_hook): new function
6802 allowing us to put custom hooks in a transaction to be used for
6803 cancelling said transaction
6805 * doc/dbus-specification.sgml: add some discussion of secondary
6806 service owners, and disallow zero-length service names
6808 * bus/services.c (bus_registry_acquire_service): new function,
6809 splits out part of bus_driver_handle_acquire_service() and fixes
6810 a bug where we didn't remove the service doing the acquiring
6811 from the secondary queue if we failed to remove the current owner
6812 from the front of the queue.
6814 2003-04-10 Alexander Larsson <alexl@redhat.com>
6816 * doc/dbus-specification.sgml:
6817 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
6819 2003-04-10 Alexander Larsson <alexl@redhat.com>
6824 Added files to cvsignore
6826 * dbus/dbus-message.h:
6827 * dbus/dbus-message.c: (dbus_message_iter_get_named):
6828 Make get_named() take two out argument and return a boolean.
6829 (dbus_message_iter_get_args_valist):
6830 Update usage of get_named().
6831 (dbus_message_iter_append_byte):
6833 (dbus_message_iter_append_named)
6835 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
6838 2003-04-10 Alexander Larsson <alexl@redhat.com>
6840 * dbus/dbus-marshal.[ch]:
6841 Add array_type_pos argument to _dbus_marshal_validate_arg.
6842 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
6844 * dbus/dbus-message.[ch]:
6845 Multi-dimensional arrays have full type specification in the
6846 outermost array. Iter code re-arranged to handle this.
6847 Added some more iter tests.
6849 * doc/dbus-specification.sgml:
6852 Update new array encoding description.
6853 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
6855 * test/data/invalid-messages/array-with-mixed-types.message:
6856 * test/data/valid-messages/array-of-array-of-uint32.message:
6857 Change to the new array format.
6859 * test/data/invalid-messages/too-short-dict.message:
6862 * test/data/valid-messages/recursive-types.message:
6863 Fix up and extend test.
6865 2003-04-10 Havoc Pennington <hp@pobox.com>
6867 * bus/dispatch.c: lots of fixes
6869 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
6870 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
6871 that was crack, broke the test service.
6873 * dbus/dbus-transport.c (_dbus_transport_open): fix error
6874 handling to avoid piling up errors if we get a failure on the
6877 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
6878 pid in assertion failures.
6880 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
6881 to some fixed size of file descriptor array. Don't return TRUE
6882 anytime a timeout exists, that led to lots of busy loop silliness
6885 2003-04-09 Havoc Pennington <hp@redhat.com>
6887 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
6888 I'd checked this in earlier but hadn't.
6890 2003-04-09 Havoc Pennington <hp@redhat.com>
6892 * bus/dispatch.c (bus_dispatch_test): get a bit further through
6893 the activation test (man this is getting old!)
6895 2003-04-09 Havoc Pennington <hp@redhat.com>
6897 * test/test-utils.c: use dispatch status function to fix this up
6899 * bus/connection.c (connection_watch_callback): don't dispatch
6901 (connection_timeout_callback): don't dispatch from here
6902 (bus_connections_setup_connection): set the dispatch status function
6903 (bus_connection_disconnected): unset it
6905 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
6906 used to add a connection to be dispatched
6907 (_dbus_loop_iterate): do the dispatching at the end of each
6910 * dbus/dbus-connection.c
6911 (dbus_connection_set_dispatch_status_function): new function
6912 allowing us to fix up main loop usage
6913 (_dbus_connection_last_unref): free all the various function
6915 (dbus_connection_dispatch): call the DispatchStatusFunction
6916 whenever this function returns
6917 (dbus_connection_handle_watch): call DispatchStatusFunction
6918 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
6919 (reply_handler_timeout): call DispatchStatusFunction
6920 (dbus_connection_flush): call DispatchStatusFunction
6922 2003-04-09 Havoc Pennington <hp@redhat.com>
6924 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
6927 * bus/dispatch.c (check_service_activated): fix bug in test
6929 * dbus/dbus-mainloop.c (check_timeout): fix this up
6931 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
6932 verbose output so we can sort out output from different processes,
6933 e.g. in the activation case.
6935 2003-04-08 Colin Walters <walters@gnu.org>
6937 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
6939 (bus_context_new): Set it.
6940 (bus_context_unref): Use it to delete the pid file.
6942 2003-04-08 Havoc Pennington <hp@redhat.com>
6944 * test/data/invalid-messages/array-with-mixed-types.message:
6945 regression test that fails for the moment
6947 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
6948 tests for convenience
6950 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
6951 array of nil, it broke things.
6953 * test/data/invalid-messages/array-of-nil.message: regression test
6955 * test/data/valid-messages/array-of-array-of-uint32.message:
6956 happened to write this so added it to suite
6958 2003-04-08 Havoc Pennington <hp@redhat.com>
6960 * bus/driver.c (bus_driver_handle_acquire_service): init
6961 retval/reply before checking name
6963 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
6964 recursion depth argument
6966 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
6967 in the public struct for future extension
6969 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
6972 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
6975 * doc/dbus-specification.sgml: fix typo
6977 2003-04-08 Alexander Larsson <alexl@redhat.com>
6979 Implemented recursive types, named types and new-style iters
6982 * glib/test-thread-client.c: (thread_func):
6983 * glib/test-thread-server.c: (handle_test_message):
6984 * test/test-service.c: (handle_echo):
6993 * dbus/dbus-internals.c: (_dbus_type_to_string):
6994 Update for new types.
6996 * dbus/dbus-marshal.[ch]:
6997 Implement recursive types and the new marshalling format.
6998 Remove hardcoded dict marshalling.
6999 Marshal named types.
7001 * dbus/dbus-message-builder.c:
7003 Remove references to old types
7005 * dbus/dbus-message.[ch]:
7006 New non-refcounted iter API that supports recursive iters.
7007 Use iters for appending, including support for recursive
7009 Add byte and named type support.
7010 Update everything to new marshalling formats.
7011 Add tests for new API.
7013 * dbus/dbus-protocol.h:
7014 Remove old array types.
7015 Add types: BYTE, ARRAY, DICT, NAMED
7017 * dbus/dbus-string.c:
7018 * dbus/dbus-sysdeps.c:
7019 Make parse_double locale safe.
7021 * dbus/dbus-test-main.c:
7027 * doc/dbus-specification.sgml:
7030 * test/data/incomplete-messages/missing-body.message:
7031 * test/data/invalid-messages/bad-boolean.message:
7032 * test/data/invalid-messages/bad-boolean-array.message:
7033 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
7034 * test/data/invalid-messages/boolean-has-no-value.message-raw:
7035 * test/data/invalid-messages/too-short-dict.message:
7036 * test/data/valid-messages/dict-simple.message:
7037 * test/data/valid-messages/dict.message:
7038 * test/data/valid-messages/emptiness.message:
7039 * test/data/valid-messages/lots-of-arguments.message:
7040 * test/data/valid-messages/no-padding.message:
7041 * test/data/valid-messages/recursive-types.message:
7042 Add missing NAME fields
7043 Fix up dicts & arrays
7045 * test/data/invalid-messages/dict-with-nil-value.message:
7046 Removed, this is not invalid anymore.
7048 * test/data/valid-messages/recursive-types.message:
7049 Add new test for deeply recursive types.
7051 2003-04-07 Havoc Pennington <hp@pobox.com>
7053 * bus/driver.c (bus_driver_handle_acquire_service): return an
7054 error if you try to acquire a service that starts with ':'
7056 2003-04-07 Havoc Pennington <hp@redhat.com>
7058 * doc/dbus-specification.sgml: require that base service names
7059 start with ':' and that the base service is created/deleted
7060 as first and last things a connection does on the bus
7062 * bus/dispatch.c (check_existent_service_activation): lots more
7063 work on the activation test; it doesn't fully pass yet...
7065 * test/test-service.c (main): fix so we don't memleak the
7066 connection to the message bus
7067 (filter_func): accept a message asking us to exit
7069 2003-04-06 Havoc Pennington <hp@pobox.com>
7071 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
7074 * configure.in: fixes to Qt detection from Colin Walters
7076 * doc/Makefile.am: Only remove generated docbook dirs if they
7077 exist, from Colin Walters
7079 * dbus/dbus-bus.c: change how we set well-known connections to
7080 NULL, so that it works if a single connection is stored in
7081 two well-known array slots.
7083 * test/Makefile.am: remove a lot of stuff that isn't immediately
7084 useful, it's in CVS history if we want it.
7086 * test/test-service.c: use dbus-mainloop instead of that
7089 2003-04-06 Havoc Pennington <hp@pobox.com>
7091 * dbus/Makefile.am: split lists of sources into stuff that goes in
7092 the library, util functions that go in the lib and are also used
7093 elsewhere, and util functions that are used in tests/daemon but
7094 don't go in the lib.
7096 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
7097 here so it can be used in test binaries also
7099 2003-04-06 Havoc Pennington <hp@pobox.com>
7101 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
7102 here in the parent process, so we can return an error if it
7103 fails. Also, move some of the code into the child so the parent
7104 is less hosed if we fail midway through.
7106 * bus/bus.c (bus_context_new): move pidfile detection further up
7107 in the function, before we start overwriting sockets and such.
7109 * bus/messagebus.in: adjust this a bit, not sure if it will work.
7111 * configure.in: add --with-system-pid-file and --with-system-socket
7113 2003-04-06 Colin Walters <walters@verbum.org>
7115 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
7117 * bus/system.conf.in: Declare a pidfile.
7119 * bus/bus.c (bus_context_new): Test for an existing pid file, and
7120 create one (if appropriate).
7122 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
7123 (struct BusConfigParser) [pidfile]: New.
7124 (element_type_to_name, merge_included, start_busconfig_child)
7125 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
7126 (bus_config_parser_unref): Free it.
7127 (bus_config_parser_get_pidfile): New function.
7129 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
7131 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
7133 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
7135 * dbus/dbus-sysdeps.h: Prototype it.
7137 2003-04-06 Havoc Pennington <hp@pobox.com>
7139 * bus/bus.c (bus_context_new): print the address in here, rather
7140 than in main(), because we need to do it before forking the daemon
7142 * bus/dispatch.c (send_service_nonexistent_error): set the sender
7143 on the service nonexistent error
7145 * bus/driver.c (bus_driver_handle_acquire_service): set the
7146 sender on the AcquireService reply
7148 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
7149 server also listen on a UNIX socket so services can connect to it.
7151 2003-04-06 Havoc Pennington <hp@pobox.com>
7153 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
7154 so it detects deadlocks and also we actually init threads when
7157 2003-04-06 Havoc Pennington <hp@pobox.com>
7159 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
7160 save the domain socket name, and unlink it when we disconnect the
7161 server. Means that at least when we exit normally, we won't leave
7162 a bunch of junk in /tmp
7164 * dbus/dbus-transport-unix.c
7165 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
7166 memory management). (I was making a real change here but then
7169 2003-04-06 Havoc Pennington <hp@pobox.com>
7171 * bus/bus.c (bus_context_new): fix wrong handling of
7172 server_data_slot_unref() in the error case.
7174 * dbus/dbus-internals.h (_dbus_assert): change so it passes
7175 "(condition) != 0" to _dbus_real_assert so that
7176 "_dbus_assert (pointer)" doesn't cause a warning
7178 * bus/main.c (main): accept --print-address option to print out
7179 the message bus address
7181 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
7183 * dbus/dbus-transport.c (_dbus_transport_open): special error for
7184 "tmpdir" option to unix: address on client side
7186 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
7189 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
7190 we can use to create sockets in the test suite.
7192 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
7193 cleanly. To be used for testing.
7195 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
7197 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
7199 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
7200 handle trying to call this when there's no servers active
7202 2003-04-05 Havoc Pennington <hp@pobox.com>
7208 2003-04-05 Havoc Pennington <hp@pobox.com>
7210 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
7211 crash on startup. Need to get "try starting the daemon"
7212 in the test suite I guess. ;-)
7214 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
7215 tracked the number of open connections; it's better done in
7216 application-specific code as you want it to span all servers etc.
7218 2003-04-05 Havoc Pennington <hp@pobox.com>
7220 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
7221 patch from Colin Walters
7223 2003-04-05 Havoc Pennington <hp@pobox.com>
7225 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
7226 reality; in fact multiple mechanisms are allowed.
7228 * dbus/dbus-internals.c (_dbus_real_assert)
7229 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
7230 _dbus_assert_not_reached() into functions, so that they don't show
7231 up in basic block counts for test coverage, and don't use up as
7232 much disk space. Does mean slower execution speed though, so
7233 assumes --disable-asserts is the normal production case.
7235 2003-04-05 Havoc Pennington <hp@pobox.com>
7237 * test/Makefile.am (dist-hook): also dist *.in files
7243 2003-04-05 Havoc Pennington <hp@pobox.com>
7245 * dbus/dbus-string.c: docs warning
7247 * dbus/dbus-spawn.c: missing docs
7249 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
7251 2003-04-05 Havoc Pennington <hp@pobox.com>
7253 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
7256 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
7257 to -1 once we've reaped the babysitter
7258 (_dbus_babysitter_handle_watch): do as much work as we can, not
7261 * bus/activation.c: add code using DBusBabysitter so that we
7262 handle it when a service fails to start up properly.
7263 (bus_activation_service_created): don't remove the activation
7264 entries as we go, just let them get removed when we free the pending
7265 activation. Unref reply messages after sending them.
7267 2003-04-05 Havoc Pennington <hp@pobox.com>
7269 * test/decode-gcov.c (main): print per-directory stats in the report
7271 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
7273 2003-04-05 Havoc Pennington <hp@pobox.com>
7275 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
7277 * test/decode-gcov.c: hack up a little program to suck data
7278 out of gcov files. Yes this is sort of silly.
7280 * configure.in: define something in config.h and do an
7281 AM_CONDITIONAL when gcov is enabled
7283 2003-04-04 Havoc Pennington <hp@redhat.com>
7285 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
7286 return a "babysitter" object that is used to monitor the status of
7287 the spawned process and reap it when required.
7289 * test/test-segfault.c, test/test-exit.c,
7290 test/test-sleep-forever.c: binaries that do various lame things,
7291 used in the test suite.
7293 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
7295 2003-04-03 Havoc Pennington <hp@pobox.com>
7297 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
7298 in preparation for modifying it, dbus-sysdeps is getting
7301 2003-04-03 Havoc Pennington <hp@redhat.com>
7303 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
7306 * bus/*.[hc]: adapt to mainloop change
7308 2003-04-03 Havoc Pennington <hp@redhat.com>
7310 * bus/activation.c (load_directory): fix up memleaks
7311 (bus_activation_entry_free): free the entry
7313 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
7314 we get one from the message bus; fix memleaks.
7316 * dbus/dbus-message.c (dbus_set_error_from_message): new function
7318 2003-04-03 Havoc Pennington <hp@pobox.com>
7320 * bus/config-parser.c (bus_config_parser_unref): free
7321 list of mechanisms, bug discovered by test suite enhancements
7322 (putting system.conf and session.conf into suite)
7324 * test/Makefile.am, test/test-service.c: add placeholder for a
7325 test service that we'll activate as part of test suite. Doesn't
7328 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
7329 setting NULL value, and use system malloc not dbus_malloc()
7330 when we have unavoidable memleakage.
7332 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
7333 didn't work, and support DBUS_BUS_ACTIVATION.
7335 * bus/activation.c (child_setup): pass our well-known bus type to
7338 * bus/config-parser.c: support <type> to specify well-known type
7340 * doc/dbus-specification.sgml: document the env variables to
7341 locate well-known buses and find service activator
7343 2003-04-02 Havoc Pennington <hp@redhat.com>
7345 * test/Makefile.am (all-local): add a rule to copy tests to
7346 builddir, so we can have generated tests. Use this to remove the
7347 silly hack for testing system.conf and session.conf. Will use this
7348 shortly to generate .service files pointing to test binaries.
7350 2003-04-02 Havoc Pennington <hp@redhat.com>
7352 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
7353 current alloc and needed new length, not max of the doubled
7354 allocation and needed new length. Also, when building tests,
7355 don't do the double-allocation stuff, just realloc every time.
7357 2003-04-02 Havoc Pennington <hp@redhat.com>
7359 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
7361 (_dbus_string_get_dirname): new
7362 (_dbus_sysdeps_test): new
7363 (_dbus_directory_open): include dirnames in error messages
7365 * bus/config-parser.c: interpret <include> and <includedir> and
7366 <servicedir> relative to config file location if the given
7367 filename is not absolute.
7369 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
7371 2003-04-02 Havoc Pennington <hp@redhat.com>
7373 * bus/connection.c (bus_transaction_send_error_reply): set sender
7374 service for the error, and unref the reply on success
7376 * bus/activation.c: convert to use BusTransaction so OOM can be
7378 (bus_activation_service_created): set sender of the message
7380 2003-04-01 Havoc Pennington <hp@redhat.com>
7382 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
7383 <includedir> (at least mostly)
7385 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
7386 first, then the user ID
7388 2003-04-01 Havoc Pennington <hp@pobox.com>
7390 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
7393 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
7395 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
7397 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
7398 socket 0777, and unlink any existing socket.
7400 * bus/bus.c (bus_context_new): change our UID/GID and fork if
7401 the configuration file so specifies; set up auth mechanism
7404 * bus/config-parser.c (bus_config_parser_content): add support
7405 for <fork> option and fill in code for <auth>
7407 * bus/system.conf.in: add <fork/> to default configuration,
7408 and limit auth mechanisms to EXTERNAL
7410 * doc/config-file.txt (Elements): add <fork>
7412 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
7413 (_dbus_change_identity): new function
7415 2003-03-31 Havoc Pennington <hp@redhat.com>
7417 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
7418 (_dbus_listen_unix_socket): fix off-by-one error in null
7419 termination spotted by Nalin
7421 2003-03-31 Havoc Pennington <hp@redhat.com>
7423 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
7424 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
7425 having a real home directory available.
7427 2003-03-31 Havoc Pennington <hp@redhat.com>
7429 * bus/Makefile.am (install-data-hook): create /var/run/dbus
7431 * bus/messagebus.in: add init script for Red Hat /etc/init.d
7433 * configure.in: add support for specifying a style of init script
7436 2003-03-31 Havoc Pennington <hp@redhat.com>
7438 Fix some annoying DBusString API and fix all affected code.
7440 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
7442 (_dbus_string_get_data): change to return string instead of using
7444 (_dbus_string_get_const_data): ditto
7445 (_dbus_string_get_data_len): ditto
7446 (_dbus_string_get_const_data_len): ditto
7448 2003-03-31 Havoc Pennington <hp@redhat.com>
7450 * bus/main.c (main): fix up the command line arguments to be nicer
7452 2003-03-31 Havoc Pennington <hp@redhat.com>
7454 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
7455 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
7456 final location that lands in the config file
7458 * bus/config-loader-expat.c (bus_config_load): fix type of
7461 * doc/TODO: remove TODO item for dbus_bus_get()
7463 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
7465 2003-03-31 Havoc Pennington <hp@pobox.com>
7467 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
7468 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
7469 argument since they are always client side
7471 * dbus/dbus-server.c (dbus_server_get_address): new function
7473 * bus/main.c (main): take the configuration file as an argument.
7475 * test/data/valid-config-files/debug-allow-all.conf: new file to
7476 use with dispatch.c tests for example
7478 * bus/test-main.c (main): require test data dir
7480 * bus/bus.c (bus_context_new): change this to take a
7481 configuration file name as argument
7483 * doc/config-file.txt (Elements): add <servicedir>
7485 * bus/system.conf, bus/session.conf: new files
7487 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
7488 well-known socket if none set
7490 * configure.in: create system.conf and session.conf
7492 2003-03-30 Havoc Pennington <hp@pobox.com>
7494 * bus/config-parser.c: hacking
7496 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
7497 to shut down, since it could cause weirdness with the DBusList
7500 * dbus/dbus-list.c (_dbus_list_test): add tests for the
7501 link-oriented stack routines
7502 (alloc_link): free the mempool if the first alloc from it fails
7504 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
7506 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
7508 (_dbus_string_skip_white): new
7510 * doc/config-file.txt (Elements): add <includedir>
7512 2003-03-28 Havoc Pennington <hp@pobox.com>
7514 * dbus/dbus-string.c (_dbus_string_copy_data_len)
7515 (_dbus_string_copy_data): new functions
7517 2003-03-28 Anders Carlsson <andersca@codefactory.se>
7519 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
7523 * dbus/dbus-memory.c:
7526 2003-03-28 Havoc Pennington <hp@pobox.com>
7528 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
7529 I think it may have just been superstition. Not sure.
7531 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
7532 failures that were not being handled.
7534 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
7536 * dbus/dbus-memory.c: add ability to set number of mallocs in a
7537 row that will fail on out-of-memory.
7539 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
7540 function for testing out-of-memory handling.
7542 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
7543 allocation functions, they do map exactly to the expat ones.
7545 2003-03-27 Havoc Pennington <hp@redhat.com>
7547 * bus/config-loader-libxml.c (bus_config_load): add another error
7550 2003-03-26 Anders Carlsson <andersca@codefactory.se>
7553 Add note about automatic service activation.
7555 * doc/dbus-specification.sgml:
7556 Rename the specification and clarify a few things.
7558 2003-03-26 Anders Carlsson <andersca@codefactory.se>
7561 * dbus/dbus-address.c:
7563 * dbus/dbus-marshal.c:
7564 * dbus/dbus-server-debug-pipe.c:
7565 * dbus/dbus-transport-unix.c:
7566 Fix documentation warnings.
7568 2003-03-26 Havoc Pennington <hp@pobox.com>
7570 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
7571 after every test so it's quick and easy to see which leaked, and
7572 so we test multiple dbus_shutdown() calls
7574 * configure.in: change configure.in XML stuff to also support
7577 * config-loader-libxml.c: some hacking
7579 * config-loader-expat.c: some hacking
7581 * config-parser.c: some hacking, plus tests
7583 2003-03-25 Havoc Pennington <hp@redhat.com>
7585 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
7587 * configure.in: add --with-xml option to specify XML library,
7588 right now only libxml is supported.
7590 * bus/config-loader-libxml.c, config-parser.c: sync some minor
7591 nonworking code between home and work, still just stubs
7593 2003-03-24 Havoc Pennington <hp@redhat.com>
7595 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
7598 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
7599 NULL argument for "message" if the error is a well-known one,
7600 fill in a generic message in this case.
7602 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
7605 * bus/test.c (bus_test_flush_bus): add
7607 * bus/policy.c (bus_policy_test): test code stub
7609 2003-03-24 Havoc Pennington <hp@pobox.com>
7611 * bus/connection.c (bus_connections_setup_connection): set up
7612 the "can this user connect" function, but it always returns
7613 TRUE until we have a config file parser so we can have a config
7614 file that allows connections.
7616 2003-03-23 Havoc Pennington <hp@pobox.com>
7618 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
7619 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
7620 the mutex, so we can check for proper memory management
7623 * dbus/dbus-dataslot.c: remove the mutex from
7624 DBusDataSlotAllocator and lock it manually when using it,
7625 to simplify fitting it into the global slots framework.
7627 * dbus/dbus-threads.c (init_static_locks): rework how we're
7628 handling global locks so they are easily shut down.
7630 * bus/policy.c (bus_policy_append_rule): fix
7632 * bus/test-main.c (main): check for memleaks
7634 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
7635 test suite check for memleaks
7637 * dbus/dbus-memory.c: add support in test mode for tracking
7638 number of outstanding blocks
7640 2003-03-23 Havoc Pennington <hp@pobox.com>
7642 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
7645 * dbus/dbus-hash.h: add ULONG hash keys
7647 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
7648 (_dbus_get_group_id): new function
7650 2003-03-20 Havoc Pennington <hp@redhat.com>
7652 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
7654 (dbus_connection_get_unix_user): new function
7656 2003-03-20 Havoc Pennington <hp@pobox.com>
7658 * bus/connection.c (bus_connection_send_oom_error): assert that
7659 message has a sender
7660 (connection_execute_transaction): ditto
7661 (bus_connection_preallocate_oom_error): fix to set the sender, and
7662 set recipient to the destination service, not the bus driver
7664 * bus/policy.c: hacking
7666 * dbus/dbus-message.c (dbus_message_service_is): new function
7667 (dbus_message_sender_is): new
7669 2003-03-19 Havoc Pennington <hp@redhat.com>
7671 * bus/policy.c: start sketching code for policy restrictions on
7672 what connections can do.
7674 2003-03-18 Havoc Pennington <hp@redhat.com>
7676 * doc/TODO: some notes on high-level todo items. Little nitpick
7677 stuff is all in @todo, so no need to add it here.
7679 * doc/config-file.txt: some notes on how config file might look
7681 2003-03-18 Anders Carlsson <andersca@codefactory.se>
7687 2003-03-17 Havoc Pennington <hp@redhat.com>
7689 * dbus/dbus-internals.h: add gcc attributes so that
7690 our printf-style functions warn on bad arguments to
7693 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
7696 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7699 2003-03-17 Havoc Pennington <hp@redhat.com>
7701 * bus/test-main.c (main): make it print something as it runs
7702 so make check doesn't look stuck
7704 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
7705 from CVS, now obsolete
7707 2003-03-17 Anders Carlsson <andersca@codefactory.se>
7709 * bus/dispatch.c: (bus_dispatch):
7710 Refetch the service name since it may have been reallocated
7711 when dbus_message_set_sender was called.
7713 * dbus/dbus-sysdeps.c: (_dbus_accept):
7714 Add address and address length variables and use them to stop
7715 valgrind from complaining.
7717 2003-03-17 Havoc Pennington <hp@pobox.com>
7719 All tests pass, no memleaks, no valgrind complaints.
7721 * bus/test.c: refcount handler_slot
7723 * bus/connection.c (bus_connections_new): refcount
7724 connection_data_slot
7726 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
7727 bytes so that auth scripts pass.
7729 * bus/dispatch.c: init message_handler_slot so it gets allocated
7732 * bus/dispatch.c (message_handler_slot_ref): fix memleak
7734 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
7735 dealloc server_pipe_hash when no longer used for benefit of
7738 * dbus/dbus-auth.c (process_command): memleak fix
7740 * bus/dispatch.c (check_hello_message): memleak fix
7742 2003-03-16 Havoc Pennington <hp@pobox.com>
7744 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
7746 2003-03-17 Anders Carlsson <andersca@codefactory.se>
7748 * bus/activation.c (bus_activation_activate_service): Append
7749 the pending activation entry to the list of pending activations.
7751 2003-03-16 Havoc Pennington <hp@pobox.com>
7753 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
7756 * dbus/dbus-address.c (create_entry): fix OOM handling when
7757 failing to alloc entry->method
7759 2003-03-16 Havoc Pennington <hp@pobox.com>
7761 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
7764 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
7765 add some missing dbus_set_result
7767 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
7768 alloc the DBusMessageHandler
7770 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
7771 the transport here, since we call this from the finalizer; it
7772 resulted in a double-finalize.
7774 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
7775 where we tried to use transport->connection that was NULL,
7776 happened when transport was disconnected early on due to OOM
7778 * bus/*.c: adapt to handle OOM for watches/timeouts
7780 * dbus/dbus-transport-unix.c: port to handle OOM during
7783 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
7784 reference to unused bytes instead of a copy
7786 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
7789 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
7792 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
7795 2003-03-16 Anders Carlsson <andersca@codefactory.se>
7797 * doc/dbus-specification.sgml:
7798 Document reply message for ActivateService.
7800 2003-03-16 Anders Carlsson <andersca@codefactory.se>
7802 * bus/activation.c: (bus_pending_activation_entry_free),
7803 (bus_pending_activation_free), (bus_activation_new),
7804 (bus_activation_unref), (bus_activation_service_created),
7805 (bus_activation_activate_service):
7807 * bus/bus.c: (bus_context_new):
7808 * bus/desktop-file.c: (new_section):
7809 * bus/driver.c: (bus_driver_send_service_deleted),
7810 (bus_driver_handle_activate_service):
7811 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
7813 * dbus/dbus-connection.c:
7814 (dbus_connection_send_with_reply_and_block):
7815 * dbus/dbus-message.c: (dbus_message_append_args_valist):
7816 * dbus/dbus-protocol.h:
7817 Make activation work better. Now pending activations will be queued
7818 and the daemon won't try to activate services that are already registered.
7820 2003-03-16 Havoc Pennington <hp@pobox.com>
7822 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
7825 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
7826 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
7828 2003-03-16 Havoc Pennington <hp@pobox.com>
7830 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
7831 this. always run the test suite before commit...
7833 * bus/*: adapt to DBusConnection API changes
7835 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
7836 requires renaming stuff to avoid dbus_connection_dispatch name
7839 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
7842 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
7843 separate from _dbus_message_loader_return_buffer()
7845 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
7846 this, because it's now always broken to use; the number of
7847 messages in queue vs. the number still buffered by the message
7848 loader is undefined/meaningless. Should use
7849 dbus_connection_get_dispatch_state().
7850 (dbus_connection_dispatch): rename from
7851 dbus_connection_dispatch_message
7853 2003-03-16 Havoc Pennington <hp@pobox.com>
7855 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
7858 2003-03-16 Anders Carlsson <andersca@codefactory.se>
7860 * dbus/dbus-connection.c:
7861 (dbus_connection_send_with_reply_and_block):
7862 Decrease connection->n_incoming when removing an entry
7864 * dbus/dbus-dict.c: (dbus_dict_entry_free),
7865 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
7866 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
7867 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
7868 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
7869 (dbus_dict_get_byte_array):
7870 Handle NULL arrays and strings. Also add support for byte arrays.
7872 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
7873 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
7874 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
7875 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
7876 (_dbus_demarshal_dict), (demarshal_and_validate_len),
7877 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
7878 * dbus/dbus-marshal.h:
7879 Add support for marshalling and demarshalling empty arrays and strings.
7881 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7882 (dbus_message_append_string_array),
7883 (dbus_message_iter_get_boolean),
7884 (dbus_message_iter_get_boolean_array),
7885 (dbus_message_iter_get_int32_array),
7886 (dbus_message_iter_get_uint32_array),
7887 (dbus_message_iter_get_double_array),
7888 (dbus_message_iter_get_byte_array),
7889 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
7890 (check_message_handling):
7891 Add support for getting empty arrays and dicts.
7893 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
7894 Don't do any validation at all for now, that's better than just checking
7897 * test/data/valid-messages/emptiness.message:
7898 New test message with lots of empty arrays.
7900 2003-03-16 Havoc Pennington <hp@pobox.com>
7902 * dbus/dbus-connection.c
7903 (_dbus_connection_queue_received_message_link): new function that
7904 can't fail due to OOM
7906 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
7907 new function pops a message together with a list link
7910 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
7911 message queuing functions to avoid needing to alloc memory
7913 2003-03-16 Havoc Pennington <hp@pobox.com>
7915 Oops - test code was only testing failure of around 30 of the
7916 mallocs in the test path, but it turns out there are 500+
7917 mallocs. I believe this was due to misguided linking setup such
7918 that there was one copy of dbus_malloc etc. in the daemon and one
7919 in the shared lib, and only daemon mallocs were tested. In any
7920 case, the test case now tests all 500+ mallocs, and doesn't pass
7921 yet, though there are lots of fixes in this patch.
7923 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7924 this so that it doesn't need to allocate memory, since it
7925 has no way of indicating failure due to OOM (and would be
7926 annoying if it did).
7928 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
7930 * bus/Makefile.am: rearrange to create two self-contained
7931 libraries, to avoid having libraries with overlapping symbols.
7932 that was resulting in weirdness, e.g. I'm pretty sure there
7933 were two copies of global static variables.
7935 * dbus/dbus-internals.c: move the malloc debug stuff to
7938 * dbus/dbus-list.c (free_link): free list mempool if it becomes
7941 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
7943 * dbus/dbus-address.c (dbus_parse_address): free list nodes
7946 * bus/dispatch.c (bus_dispatch_add_connection): free
7947 message_handler_slot when no longer using it, so
7948 memory leak checkers are happy for the test suite.
7950 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
7952 * bus/bus.c (new_connection_callback): disconnect in here if
7953 bus_connections_setup_connection fails.
7955 * bus/connection.c (bus_connections_unref): fix to free the
7957 (bus_connections_setup_connection): if this fails, don't
7958 disconnect the connection, just be sure there are no side
7961 * dbus/dbus-string.c (undo_alignment): unbreak this
7963 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
7965 (_dbus_auth_new): fix the order in which we free strings
7968 * bus/connection.c (bus_connection_disconnected): fix to
7969 not send ServiceDeleted multiple times in case of memory
7972 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
7973 get the base service name
7974 (dbus_bus_register_client): don't return base service name,
7975 instead store it on the DBusConnection and have an accessor
7977 (dbus_bus_register_client): rename dbus_bus_register()
7979 * bus/dispatch.c (check_hello_message): verify that other
7980 connections on the bus also got the correct results, not
7981 just the one sending hello
7983 2003-03-15 Havoc Pennington <hp@pobox.com>
7985 Make it pass the Hello handling test including all OOM codepaths.
7986 Now to do other messages...
7988 * bus/services.c (bus_service_remove_owner): fix crash when
7989 removing owner from an empty list of owners
7990 (bus_registry_ensure): don't leave service in the list of
7991 a connection's owned services if we fail to put the service
7994 * bus/connection.c (bus_connection_preallocate_oom_error): set
7995 error flag on the OOM error.
7997 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7998 handle _dbus_transport_set_connection failure
8000 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
8001 to create watches up front and simply enable/disable them as
8003 (unix_connection_set): this can now fail on OOM
8005 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
8006 of enabling/disabling a watch or timeout.
8008 * bus/loop.c (bus_loop_iterate): don't touch disabled
8011 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
8013 2003-03-15 Havoc Pennington <hp@pobox.com>
8015 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
8016 write useful test code, after all that futzing around ;-)
8018 Test does not yet pass because we can't handle OOM in
8019 _dbus_transport_messages_pending (basically,
8020 dbus_connection_preallocate_send() does not prealloc the write
8021 watch). To fix this, I think we need to add new stuff to
8022 set_watch_functions, namely a SetEnabled function so we can alloc
8023 the watch earlier, then enable it later.
8025 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
8026 dbus-memory.c to the convenience lib
8028 * bus/test.c: rename some static functions to keep them clearly
8029 distinct from stuff in connection.c. Handle client disconnection.
8031 2003-03-14 Havoc Pennington <hp@pobox.com>
8033 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
8034 transport, tests more of the real codepath. Set up clients
8035 with bus_setup_debug_client.
8037 * bus/test.c (bus_setup_debug_client): function to set up debug
8038 "clients" on the main loop
8040 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
8043 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
8046 * dbus/dbus-server-debug.c: support a debug server based on pipes
8048 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
8049 (_dbus_close): new function
8051 * configure.in: check for socketpair
8053 2003-03-14 Havoc Pennington <hp@redhat.com>
8055 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
8058 * dbus/dbus-transport-debug.c: rework this a good bit to be
8059 less complicated. hopefully still works.
8061 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
8064 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
8067 * dbus/dbus-message.c (dbus_message_copy): rename from
8068 dbus_message_new_from_message, fix it up to copy
8069 all the message fields, add test case
8071 * bus/dispatch.c (bus_dispatch_test): add some more test code,
8072 not quite passing yet
8074 2003-03-14 Havoc Pennington <hp@pobox.com>
8076 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
8077 until no work remains" in test code. (the large diff here
8078 is just code movement, no actual changes)
8080 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
8081 1, no point waiting around for test code.
8082 (_dbus_server_debug_accept_transport): unref the timeout
8083 after adding it (right?)
8085 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
8087 2003-03-13 Havoc Pennington <hp@redhat.com>
8089 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
8092 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
8095 * dbus/dbus-connection.h: Make AddWatchFunction and
8096 AddTimeoutFunction return a bool so they can fail on out-of-memory
8098 * bus/bus.c (bus_context_new): set up timeout handlers
8100 * bus/connection.c (bus_connections_setup_connection): set up
8103 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
8106 * bus/bus.c (bus_context_new): adapt to changes
8108 * bus/connection.c: adapt to changes
8110 * test/watch.c: adapt to DBusWatch changes
8112 * bus/dispatch.c (bus_dispatch_test): started adding this but
8115 2003-03-14 Anders Carlsson <andersca@codefactory.se>
8117 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
8119 2003-03-13 Havoc Pennington <hp@pobox.com>
8121 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
8122 set up a test framework as for the library
8124 2003-03-12 Havoc Pennington <hp@pobox.com>
8126 Throughout: purge global variables, introduce BusActivation,
8127 BusConnections, BusRegistry, etc. objects instead.
8129 * bus/bus.h, bus/bus.c: introduce BusContext as a global
8132 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
8133 going to redo this a bit differently I think
8135 2003-03-12 Havoc Pennington <hp@redhat.com>
8137 Mega-patch that gets the message bus daemon initially handling
8138 out-of-memory. Work still needed. Also lots of random
8139 moving stuff to DBusError instead of ResultCode.
8141 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
8143 * dbus/dbus-connection.c
8144 (dbus_connection_send_with_reply_and_block): use DBusError
8146 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
8149 * dbus/dbus-connection.c (dbus_connection_send): drop the result
8150 code here, as the only failure possible is OOM.
8152 * bus/connection.c (bus_connection_disconnect):
8153 rename bus_connection_disconnected as it's a notification only
8155 * bus/driver.c (bus_driver_handle_acquire_service): don't free
8156 "name" on get_args failure, should be done by get_args;
8157 don't disconnect client for bad args, just return an error.
8158 (bus_driver_handle_service_exists): ditto
8160 * bus/services.c (bus_services_list): NULL-terminate returned array
8162 * bus/driver.c (bus_driver_send_service_lost)
8163 (bus_driver_send_service_acquired): send messages from driver to a
8164 specific client to the client's unique name, not to the broadcast
8167 * dbus/dbus-message.c (decode_header_data): reject messages that
8168 contain no name field
8169 (_dbus_message_get_client_serial): rename to
8170 dbus_message_get_serial and make public
8171 (_dbus_message_set_serial): rename from set_client_serial
8172 (_dbus_message_set_reply_serial): make public
8173 (_dbus_message_get_reply_serial): make public
8175 * bus/connection.c (bus_connection_foreach): allow stopping
8176 iteration by returning FALSE from foreach function.
8178 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
8179 (dbus_connection_free_preallocated_send)
8180 (dbus_connection_preallocate_send): new API for sending a message
8181 without possibility of malloc failure.
8182 (dbus_connection_send_message): rename to just
8183 dbus_connection_send (and same for whole function family)
8185 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
8187 * dbus/dbus-sysdeps.c (_dbus_exit): new function
8189 * bus/activation.c: handle/return errors
8191 * dbus/dbus-errors.h: add more DBUS_ERROR #define
8193 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
8194 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
8195 (_dbus_result_from_errno): move to this file
8197 2003-03-10 Anders Carlsson <andersca@codefactory.se>
8199 * dbus/dbus-marshal.c:
8200 (_dbus_marshal_set_string):
8201 Take a length argument so we can marshal the correct string
8204 (_dbus_marshal_dict), (_dbus_demarshal_dict),
8205 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
8206 (_dbus_marshal_test):
8207 * dbus/dbus-marshal.h:
8208 Add support for marshalling and demarshalling dicts.
8210 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8211 Add support for TYPE DICT.
8213 * dbus/dbus-message.c: (set_string_field):
8214 Adjust header padding.
8216 (dbus_message_append_args_valist), (dbus_message_append_dict),
8217 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
8218 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
8219 (check_message_handling), (check_have_valid_message):
8220 * dbus/dbus-message.h:
8221 Add functions for setting and getting dicts.
8223 * dbus/dbus-protocol.h:
8229 * doc/dbus-specification.sgml:
8230 Add information about how dicts are marshalled.
8232 * test/data/invalid-messages/dict-with-nil-value.message:
8233 * test/data/invalid-messages/too-short-dict.message:
8234 * test/data/valid-messages/dict-simple.message:
8235 * test/data/valid-messages/dict.message:
8236 Add sample messages containing dicts.
8238 2003-03-08 Anders Carlsson <andersca@codefactory.se>
8240 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
8242 2003-03-07 Anders Carlsson <andersca@codefactory.se>
8245 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
8246 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
8247 (dbus_dict_set_int32), (dbus_dict_set_uint32),
8248 (dbus_dict_set_double), (dbus_dict_set_string),
8249 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
8250 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
8251 (dbus_dict_set_string_array), (_dbus_dict_test):
8253 Fix according to comments from Havoc.
8255 2003-03-06 Michael Meeks <michael@server.home>
8257 * configure.in: if we don't have kde-config, disable have_qt.
8259 2003-03-07 Anders Carlsson <andersca@codefactory.se>
8264 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
8265 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
8266 (dbus_dict_remove), (dbus_dict_get_value_type),
8267 (dbus_dict_get_keys), (dbus_dict_put_boolean),
8268 (dbus_dict_put_int32), (dbus_dict_put_uint32),
8269 (dbus_dict_put_double), (dbus_dict_put_string),
8270 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
8271 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
8272 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
8273 (dbus_dict_get_int32), (dbus_dict_get_uint32),
8274 (dbus_dict_get_double), (dbus_dict_get_string),
8275 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
8276 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
8277 (dbus_dict_get_string_array), (_dbus_dict_test):
8279 Add DBusDict implementation
8281 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
8285 2003-03-04 Havoc Pennington <hp@pobox.com>
8287 * test/data/auth/*: adapt to changes
8289 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
8290 USERID_BASE64 and change USERNAME_BASE64 to put in username not
8293 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
8294 more stuff from being in a context name, to make the protocol
8295 simpler to deal with
8297 * dbus/dbus-errors.c (dbus_error_has_name): new function
8298 (dbus_error_is_set): new function
8300 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
8301 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
8303 * dbus/dbus-connection.c (dbus_connection_flush): also read
8304 messages during a flush operation
8306 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
8308 2003-03-05 Anders Carlsson <andersca@codefactory.se>
8310 * configure.in: Check for gethostbyname on Solaris.
8312 * dbus/dbus-transport.c: (_dbus_transport_open):
8313 Remove duplicate "tcp" entry.
8315 * doc/dbus-specification.sgml:
8316 Clarify some things.
8318 2003-03-05 Anders Carlsson <andersca@codefactory.se>
8320 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
8321 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
8322 (_dbus_keyring_test):
8323 * dbus/dbus-md5.c: (_dbus_md5_compute):
8324 * dbus/dbus-sha.c: (_dbus_sha_compute):
8327 2003-03-05 Anders Carlsson <andersca@codefactory.se>
8329 * README: Add some things.
8331 2003-03-04 Anders Carlsson <andersca@codefactory.se>
8333 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
8334 after case DBUS_TYPE_BOOELAN.
8336 2003-03-02 Havoc Pennington <hp@pobox.com>
8338 * test/break-loader.c (randomly_set_extreme_ints): add test that
8339 sets really huge and small integers
8341 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
8342 that length of boolean array fits in the string, and that
8343 string has room for boolean value in single-bool case.
8345 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
8346 optional value to "ALIGN" command which is what to fill the
8349 * test/data/valid-messages/no-padding.message: add regression
8350 test for the message padding problem
8352 2003-03-02 Havoc Pennington <hp@pobox.com>
8354 * dbus/dbus-message.c (decode_header_data): fix to always init
8355 message_padding, from Benjamin Dauvergne
8357 2003-03-02 Havoc Pennington <hp@pobox.com>
8363 2003-03-01 Joe Shaw <joe@assbarn.com>
8365 * configure.in: Check for "struct cmsgcred" and try to access its
8366 members for BSD-like unices.
8368 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
8369 _dbus_read_credentials_unix_socket().
8370 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
8371 read() for reading the credential byte off the unix socket. Use
8372 struct cmsgcred on systems that support it.
8374 2003-02-27 Alexander Larsson <alexl@redhat.com>
8378 Make gthreads-2.0 dependency optional. Don't build thread test if
8381 2003-02-27 Havoc Pennington <hp@pobox.com>
8383 * dbus/dbus-connection.c
8384 (dbus_connection_send_message_with_reply_and_block): fix doh!
8385 doh! doh! bug that resulted in never removing a reply from the
8386 queue, no wonder we called get_reply_serial so much ;-)
8388 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
8389 and client serial instead of demarshaling them every time
8391 2003-02-27 Havoc Pennington <hp@pobox.com>
8393 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
8394 more inlined, using dbus-string-private.h, speeds things up
8397 * dbus/dbus-string.c (_dbus_string_free): apply align offset
8398 when freeing the string
8399 (_dbus_string_steal_data): fix for align offset
8400 (undo_alignment): new function
8402 2003-02-26 Havoc Pennington <hp@redhat.com>
8404 All kinds of audit fixes from Owen, plus initial attempt to
8405 handle unaligned memory returned from malloc.
8407 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
8408 leave room for align_offset and nul byte
8409 (fixup_alignment): function to track an align_offset and
8410 ensure real->str is aligned
8411 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
8412 to allow a nul byte plus align offset
8413 (_dbus_string_lock): fix overflow issue
8414 (_dbus_string_init_const_len): add assertions on sanity of len,
8415 assign allocated to be ALLOCATION_PADDING larger than len
8416 (set_length): fixup the overflow handling
8417 (_dbus_string_get_data_len): fix overflow in assertion
8418 (open_gap): detect overflow in size of gap to be opened
8419 (_dbus_string_lengthen): add overflow check
8420 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
8421 (_dbus_string_append): add overflow check
8422 (_dbus_string_append_unichar): overflow
8423 (_dbus_string_delete): fix overflow in assertion
8424 (_dbus_string_copy_len): overflow in assertion
8425 (_dbus_string_replace_len): overflows in assertions
8426 (_dbus_string_find): change to implement in terms of
8427 _dbus_string_find_to
8428 (_dbus_string_find_to): assorted fixage
8429 (_dbus_string_equal_c_str): assert c_str != NULL,
8430 fix logic so the function works
8431 (_dbus_string_ends_with_c_str): fix overflow thingy
8432 (_dbus_string_base64_encode): overflow fix
8433 (_dbus_string_validate_ascii): overflow
8434 (_dbus_string_validate_nul): overflow
8436 2003-02-26 Havoc Pennington <hp@redhat.com>
8438 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
8440 2003-02-26 Alexander Larsson <alexl@redhat.com>
8443 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
8445 * dbus/dbus-connection.c:
8446 * dbus/dbus-connection.h:
8447 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
8448 Add dbus_connection_set_wakeup_main_function and use it when queueing
8449 incoming and outgoing messages.
8452 * dbus/dbus-dataslot.c:
8453 Threadsafe usage of DBusDataSlotAllocator
8455 * dbus/dbus-message.c: (dbus_message_get_args_iter):
8458 * dbus/dbus-server-unix.c:
8461 * glib/dbus-gmain.c:
8462 Implement the new wakeup functions for glib.
8465 * glib/test-thread-client.c:
8466 * glib/test-thread-server.c:
8467 * glib/test-thread.h:
8468 Initial cut at some thread test code. Not really done yet.
8470 2003-02-26 Havoc Pennington <hp@pobox.com>
8472 * dbus/dbus-connection.c
8473 (dbus_connection_send_message_with_reply_and_block): fix crash
8474 where we ref'd the outgoing message instead of the returned reply
8476 * dbus/dbus-transport-unix.c (do_authentication): check read watch
8477 at the end of this function, so if we didn't need to read for
8478 authentication, we reinstall it for receiving messages
8480 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
8481 a NULL sender for peer-to-peer case
8483 * dbus/dbus-transport-unix.c (check_read_watch): handle
8484 !authenticated case correctly
8486 * glib/dbus-gmain.c: add support for DBusServer
8488 * dbus/dbus-server.c: add data slot support
8490 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
8491 return values and handle errors
8493 * dbus/dbus-dataslot.c: factor out the data slot stuff from
8496 * Doxyfile.in (INPUT): add glib subdir
8498 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
8499 setup_with_g_main instead of hookup_with_g_main; write docs
8501 2003-02-24 Anders Carlsson <andersca@codefactory.se>
8503 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
8504 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8505 * dbus/dbus-message.c: (dbus_message_append_boolean),
8506 (dbus_message_append_boolean_array),
8507 (dbus_message_get_args_valist), (_dbus_message_test):
8508 * dbus/dbus-message.h:
8509 * doc/dbus-specification.sgml:
8510 Various fixes as pointed out by Havoc.
8512 * test/data/invalid-messages/bad-boolean-array.message:
8513 * test/data/invalid-messages/bad-boolean.message:
8514 Add invalid boolean value test cases.
8516 2003-02-24 Anders Carlsson <andersca@codefactory.se>
8518 * dbus/dbus-internals.c: (_dbus_type_to_string):
8519 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
8520 (_dbus_marshal_validate_arg):
8521 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8522 * dbus/dbus-message.c: (dbus_message_append_args_valist),
8523 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
8524 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
8525 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
8526 (dbus_message_iter_get_double),
8527 (dbus_message_iter_get_boolean_array), (message_iter_test):
8528 * dbus/dbus-message.h:
8529 * dbus/dbus-protocol.h:
8530 * doc/dbus-specification.sgml:
8531 * test/data/valid-messages/lots-of-arguments.message:
8532 Add support for boolean and boolean array types.
8534 2003-02-23 Havoc Pennington <hp@pobox.com>
8536 * dbus/dbus-keyring.c: finish most of this implementation and
8539 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
8540 these barf if the error isn't cleared to NULL
8542 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
8543 (_dbus_create_directory): new function
8545 * dbus/dbus-errors.c (dbus_set_error): fix warning
8547 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
8548 (_dbus_string_hex_decode): new function
8549 (test_hex_roundtrip): test code
8551 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
8553 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
8555 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
8556 the save-to-temp/rename trick to atomically write the new file
8557 (_dbus_string_parse_uint): new function
8559 2003-02-22 Havoc Pennington <hp@pobox.com>
8561 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
8563 2003-02-22 Havoc Pennington <hp@pobox.com>
8565 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
8566 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
8568 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
8570 * dbus/test/data/sha-1: add US government test suite for SHA-1
8572 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8574 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8575 Make string arrays NULL-terminated.
8577 * dbus/dbus-memory.c: (dbus_free_string_array):
8578 * dbus/dbus-memory.h:
8579 New function for freeing NULL-terminated string arrays.
8581 * dbus/dbus-message-builder.c: (append_quoted_string),
8582 (_dbus_message_data_load):
8583 Add support for array types.
8585 * dbus/dbus-message.c: (check_message_handling):
8586 Add more types as test cases.
8588 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
8589 (_dbus_string_parse_double):
8590 Add the start offset to the end offset.
8592 * test/data/valid-messages/lots-of-arguments.message:
8593 New test message with lots of arguments.
8595 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8597 * dbus/dbus-message.c: (dbus_message_append_nil),
8598 (dbus_message_append_int32), (dbus_message_append_uint32),
8599 (dbus_message_append_double), (dbus_message_append_string),
8600 (dbus_message_append_int32_array),
8601 (dbus_message_append_uint32_array),
8602 (dbus_message_append_double_array),
8603 (dbus_message_append_byte_array),
8604 (dbus_message_append_string_array):
8605 Fix all out-of-memory handling in these functions.
8607 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8609 * dbus/dbus-message.c: (dbus_message_append_nil):
8612 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8614 * dbus/dbus-message.c: (dbus_message_append_args_valist),
8615 (dbus_message_append_nil), (dbus_message_append_int32_array),
8616 (dbus_message_append_uint32_array),
8617 (dbus_message_append_double_array),
8618 (dbus_message_append_byte_array),
8619 (dbus_message_append_string_array), (dbus_message_get_args_valist),
8620 (dbus_message_iter_get_int32_array),
8621 (dbus_message_iter_get_uint32_array),
8622 (dbus_message_iter_get_double_array),
8623 (dbus_message_iter_get_byte_array),
8624 (dbus_message_iter_get_string_array):
8626 * dbus/dbus-message.h:
8627 Add functions for appending and getting arrays.
8629 2003-02-21 Anders Carlsson <andersca@codefactory.se>
8631 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
8632 element size at least 8 bytes, fixes mempool tests on
8635 2003-02-20 Alexander Larsson <alexl@redhat.com>
8637 * dbus/dbus-transport-unix.c (unix_do_iteration):
8638 Unlock the connection mutex during a blocking select call.
8639 Add todo about how we need a way to wake up the select.
8641 * dbus/dbus-connection-internal.h:
8642 * dbus/dbus-connection.c:
8643 Add _dbus_connection_lock and _dbus_connection_unlock.
8645 2003-02-19 Havoc Pennington <hp@pobox.com>
8647 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
8648 Doxyfile.in, not Doxyfile
8650 * dbus/dbus-keyring.c: do some hacking on this
8652 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
8654 * dbus/dbus-errors.c (dbus_set_error_const): do not call
8656 (dbus_set_error): remove dbus_error_init, check for message ==
8657 NULL *before* we sprintf into it, and add @todo about including
8658 system headers in this file
8660 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
8662 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
8664 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
8665 get various bits of user information based on either username
8667 (_dbus_homedir_from_username): new function
8669 2003-02-19 Anders Carlsson <andersca@codefactory.se>
8672 Add check for nonposix getpwnam_r
8674 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
8675 Align the pool element size to a sizeof (void *) boundary.
8677 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
8678 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
8679 General Solaris fixes.
8681 * test/data/valid-messages/simplest-manual.message:
8682 Explicitly state that we want little-endian packing.
8684 2003-02-19 Mikael Hallendal <micke@codefactory.se>
8686 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
8688 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
8689 Added to create a transport connecting using a tcp/ip socket.
8691 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
8692 to a tcp socket at given host and port.
8693 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
8696 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
8698 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
8699 Added to create a server listening on a TCP/IP socket.
8701 2003-02-19 Havoc Pennington <hp@pobox.com>
8703 Throughout: mop up all the Doxygen warnings and undocumented
8706 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
8707 to search any paths.
8709 * dbus/dbus-threads.c: move global mutex initializers to
8710 dbus-internals.h, multiple prototypes was confusing doxygen
8711 besides being kind of ugly
8713 * Doxyfile (PREDEFINED): have Doxygen define
8714 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
8715 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
8716 (do not abuse the feature! it's for stuff like the autogenerated
8717 macros in dbus-md5.c, not just for things you don't feel like
8720 2003-02-18 Havoc Pennington <hp@pobox.com>
8722 * dbus/dbus-string.c (_dbus_string_zero): new function
8724 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
8725 wrap it in some dbus-friendly API
8727 * dbus/dbus-types.h: add 16-bit types
8729 2003-02-18 Joe Shaw <joe@assbarn.com>
8731 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
8732 credentials from our currently running process.
8733 (get_word): Fix a buglet where we were copying the entire length
8734 instead of relative to our position.
8736 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
8737 keys on the stack... it's 640k of data.
8739 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
8740 read the credentials byte off the socket, even if we don't have
8742 (_dbus_poll): Implement poll() using select() for systems which
8745 * glib/test-dbus-glib.c (main): Print out an error if no
8746 parameters are given.
8748 * test/data/auth/fallback.auth-script: Added. Tests that a client
8749 can fallback to a secondary auth mechanism if the first fails.
8751 2003-02-18 Havoc Pennington <hp@pobox.com>
8755 2003-02-17 Havoc Pennington <hp@pobox.com>
8757 * doc/dbus-specification.sgml: lots of cosmetic
8758 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
8759 env variable to DBUS_BUS_ADDRESS, s/client/application/,
8760 s/server/bus/ (except in authentication section). Add a section
8761 "Message Bus Message Routing"
8763 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
8769 2003-02-17 Anders Carlsson <andersca@codefactory.se>
8771 * doc/dbus-specification.sgml:
8772 Specification updates.
8774 2003-02-17 Anders Carlsson <andersca@codefactory.se>
8776 * bus/activation.c: (bus_activation_init), (child_setup),
8777 (bus_activation_activate_service):
8779 * bus/main.c: (main):
8780 Set DBUS_ADDRESS environment variable.
8782 * dbus/dbus-errors.c: (dbus_set_error):
8783 Don't use va_copy since that's a C99 feature.
8785 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
8786 (_dbus_spawn_async):
8787 * dbus/dbus-sysdeps.h:
8788 Add child_setup_func to _dbus_spawn_async.
8790 * doc/dbus-specification.sgml:
8791 Update specification.
8793 * test/spawn-test.c: (setup_func), (main):
8796 2003-02-17 Alexander Larsson <alexl@redhat.com>
8798 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
8801 2003-02-17 Anders Carlsson <andersca@codefactory.se>
8805 * doc/dbus-test-plan.sgml:
8806 Add test plan document.
8811 2003-02-17 Anders Carlsson <andersca@codefactory.se>
8813 * dbus/dbus-message.c: (decode_header_data),
8814 (_dbus_message_loader_return_buffer):
8815 Set the header padding amount when loading a message.
8817 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8819 * bus/dispatch.c: (send_one_message):
8820 Only send broadcast messages to registered connections.
8822 * dbus/dbus-message.c: (dbus_message_name_is):
8823 * dbus/dbus-message.h:
8824 New convenience function.
8826 * dbus/dbus-transport-debug.c: (do_reading):
8827 Only dispatch one message per run.
8830 * test/bus-test.c: (new_connection_callback), (die),
8831 (test_hello_client1_handler), (test_hello_client2_handler),
8832 (test_hello_replies), (main):
8834 * test/bus-test-loop.[ch]:
8837 2003-02-16 Havoc Pennington <hp@pobox.com>
8839 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
8840 backward conditional
8842 2003-02-16 Alexander Larsson <alexl@redhat.com>
8844 * dbus/dbus-connection.c:
8845 Implement sent_message_with_reply. (with_reply_and block is still
8847 Made dispatch_message not lose message if OOM.
8849 * dbus/dbus-errors.h:
8850 Add NoReply error (for reply timeouts).
8852 2003-02-16 Alexander Larsson <alexl@redhat.com>
8854 * dbus/dbus-hash.c (_dbus_hash_table_unref):
8855 Actually free keys and values when destroying hashtable.
8857 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8859 * dbus/dbus-auth.c: (client_try_next_mechanism):
8862 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
8863 Return TRUE if there's no thread implementation around.
8865 * glib/dbus-gmain.c: (free_source),
8866 (dbus_connection_hookup_with_g_main):
8867 Make sure to remove the GSource when the connection is finalized.
8869 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8871 * bus/dispatch.c: (bus_dispatch_message_handler):
8872 * dbus/dbus-errors.h:
8873 Return an error if someone tries to send a message to a service
8876 2003-02-16 Anders Carlsson <andersca@codefactory.se>
8878 * bus/activation.c: (load_directory), (bus_activation_init),
8879 (bus_activation_activate_service):
8882 (bus_driver_handle_activate_service), (bus_driver_handle_message):
8883 More work on the activation handling.
8885 * dbus/dbus-errors.h:
8886 Add some error messages
8888 * dbus/dbus-message.c: (dbus_message_new_error_reply):
8889 * dbus/dbus-message.h:
8890 New function that creates an error message.
8892 * dbus/dbus-protocol.h:
8893 Add ACTIVATE_SERVER message.
8895 * dbus/dbus-server-unix.c: (unix_handle_watch),
8896 (_dbus_server_new_for_domain_socket):
8897 Call _dbus_fd_set_close_on_exec.
8899 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
8900 (_dbus_spawn_async), (_dbus_disable_sigpipe),
8901 (_dbus_fd_set_close_on_exec):
8902 * dbus/dbus-sysdeps.h:
8903 Add _dbus_fd_set_close_on exec function. Also add function that checks
8904 that all open fds are set to close-on-exec and warns otherwise.
8906 * dbus/dbus-transport-unix.c:
8907 (_dbus_transport_new_for_domain_socket):
8908 Call _dbus_fd_set_close_on_exec.
8910 2003-02-16 Havoc Pennington <hp@pobox.com>
8912 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
8913 allow people to avoid setting SIGPIPE to SIG_IGN
8914 (_dbus_connection_new_for_transport): disable SIGPIPE unless
8915 we've been asked not to
8917 2003-02-15 Anders Carlsson <andersca@codefactory.se>
8919 * dbus/dbus-list.c: (_dbus_list_append_link),
8920 (_dbus_list_prepend_link):
8921 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
8925 2003-02-15 Anders Carlsson <andersca@codefactory.se>
8928 * bus/activation.c: (bus_activation_entry_free),
8929 (add_desktop_file_entry), (load_directory), (bus_activation_init):
8931 * bus/main.c: (main):
8932 Add simple activation support, doesn't work yet though.
8934 2003-02-15 Zack Rusin <zack@kde.org>
8936 * qt/dbus-qthread.cpp: small casting fix
8938 2003-02-15 Anders Carlsson <andersca@codefactory.se>
8940 * dbus/dbus-errors.c: (dbus_set_error):
8941 * dbus/dbus-errors.h:
8942 Add a few errors and make dbus_set_error void.
8944 * dbus/dbus-sysdeps.c:
8945 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
8946 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
8947 * dbus/dbus-sysdeps.h:
8948 Add _dbus_spawn_async.
8950 * test/spawn-test.c: (main):
8951 Test for _dbus_spawn_async.
8953 2003-02-15 Anders Carlsson <andersca@codefactory.se>
8955 * dbus/dbus-internals.h:
8956 Fix build without tests.
8958 * dbus/dbus-list.c: (alloc_link):
8959 Fix a segfault when a malloc fails.
8961 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
8962 (dbus_malloc0), (dbus_realloc):
8963 Add support for malloc debugging.
8965 2003-02-15 Alexander Larsson <alexl@redhat.com>
8967 * dbus/dbus-threads.c:
8968 * dbus/dbus-threads.h:
8969 Add condvars. Remove static mutext from API.
8970 Implement static mutexes by initializing them from threads_init.
8972 * glib/dbus-gthread.c:
8973 * qt/dbus-qthread.cpp:
8974 Update with the thread api changes.
8979 Turn StaticMutex into normal mutex + init function.
8980 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
8981 _dbus_list_append_link, _dbus_list_prepend_link
8984 * dbus/dbus-sysdeps.c:
8985 * dbus/dbus-sysdeps.h:
8986 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
8987 _dbus_atomic_dec. Only slow fallback implementation at the moment.
8989 * dbus/dbus-protocol.h:
8990 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
8992 * dbus/dbus-message.c:
8993 Make ref/unref atomic.
8996 * dbus/dbus-connection-internal.h:
8997 * dbus/dbus-connection.c:
8998 * dbus/dbus-connection.h:
9000 Change _peek to _borrow,_return & _steal_borrowed.
9001 Change disconnect callback to event.
9002 Make dbus_connection_dispatch_messages reentrant.
9004 * dbus/dbus-transport.c:
9005 Don't ref the connection on calls to the transport
9008 * dbus/dbus-message-handler.c:
9011 * glib/dbus-gmain.c:
9012 Don't use peek_message anymore
9015 * test/debug-thread.c:
9016 * test/debug-thread.h:
9017 Simple thread implementation that asserts() on deadlocks in
9018 single-threaded code.
9021 (main) Call debug_threads_init.
9024 Use disconnect message instead of disconnect callback.
9028 Don't call dbus_connection_set_disconnect_function. Instead export
9029 bus_connection_disconnect.
9032 Call bus_connection_disconnect when we get a disconnected message.
9034 2003-02-15 Havoc Pennington <hp@pobox.com>
9036 * dbus/dbus-message.c (dbus_message_new): fool around with the
9039 2003-02-14 Havoc Pennington <hp@pobox.com>
9041 * dbus/dbus-mempool.c: fail if the debug functions so indicate
9043 * dbus/dbus-memory.c: fail if the debug functions indicate we
9046 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
9047 (_dbus_decrement_fail_alloc_counter): debug functions to
9048 simulate memory allocation failures
9050 2003-02-14 Havoc Pennington <hp@pobox.com>
9052 * dbus/dbus-errors.h (struct DBusError): add a word of padding
9055 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9057 * bus/driver.c: (bus_driver_handle_hello):
9059 * bus/services.c: (bus_service_lookup):
9060 Reorder message sending so we get a more sane order.
9062 * test/bus-test.c: (message_handler):
9065 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9067 * bus/driver.c: (bus_driver_send_service_deleted),
9068 (bus_driver_send_service_created), (bus_driver_send_service_lost),
9069 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
9070 (bus_driver_send_welcome_message),
9071 (bus_driver_handle_list_services),
9072 (bus_driver_handle_acquire_service),
9073 (bus_driver_handle_service_exists):
9074 * dbus/dbus-bus.c: (dbus_bus_register_client),
9075 (dbus_bus_acquire_service), (dbus_bus_service_exists):
9076 * dbus/dbus-errors.c: (dbus_result_to_string):
9077 * dbus/dbus-errors.h:
9078 * dbus/dbus-message.c: (dbus_message_append_args),
9079 (dbus_message_append_args_valist), (dbus_message_get_args),
9080 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
9081 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
9082 (dbus_message_iter_get_byte_array),
9083 (dbus_message_iter_get_string_array), (message_iter_test),
9084 (check_message_handling), (_dbus_message_test):
9085 * dbus/dbus-message.h:
9086 * test/bus-test.c: (main):
9087 Change fields to arguments in messages, so that they won't be
9088 confused with header fields.
9090 * glib/test-dbus-glib.c: (main):
9091 Remove append_fields from hello message.
9093 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9095 * dbus/dbus-errors.c:
9096 * dbus/dbus-message.c:
9097 * dbus/dbus-string.c:
9098 Documentation fixes.
9100 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9102 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
9104 Implement support for timeouts in dbus-glib.
9106 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9108 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
9109 * dbus/dbus-message.c: (process_test_subdir):
9110 * test/break-loader.c: (find_breaks_based_on):
9111 Plug some memory leaks.
9113 2003-02-13 Richard Hult <rhult@codefactory.se>
9115 * bus/main.c: Fix build.
9117 * dbus/dbus-errors.h:
9118 * dbus/dbus-errors.c: Fix copyright for Anders.
9120 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9125 * bus/connection.c: (bus_connection_foreach):
9128 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
9129 (unescape_string), (new_section), (parse_section_start),
9130 (parse_key_value), (report_error), (bus_desktop_file_load),
9131 (bus_desktop_file_get_string):
9132 * bus/desktop-file.h:
9133 Use DBusError for error reporting.
9135 * bus/dispatch.c: (send_one_message),
9136 (bus_dispatch_message_handler):
9137 * bus/driver.c: (bus_driver_send_service_deleted),
9138 (bus_driver_send_service_created), (bus_driver_send_service_lost),
9139 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
9140 (bus_driver_send_welcome_message),
9141 (bus_driver_handle_list_services),
9142 (bus_driver_handle_acquire_service),
9143 (bus_driver_handle_service_exists):
9144 * bus/loop.c: (bus_loop_run):
9146 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
9148 * bus/utils.c: (bus_wait_for_memory):
9150 New files with general utility functions.
9152 * dbus/dbus-internals.h:
9153 Remove _DBUS_HANDLE_OOM.
9155 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9157 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
9158 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
9159 * dbus/dbus-errors.h:
9160 Add DBusError structure.
9162 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9164 * test/data/valid-messages/standard-acquire-service.message:
9165 * test/data/valid-messages/standard-hello.message:
9166 * test/data/valid-messages/standard-list-services.message:
9167 * test/data/valid-messages/standard-service-exists.message:
9168 Add some standard messages.
9170 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9172 * bus/driver.c: (bus_driver_send_welcome_message),
9173 (bus_driver_handle_list_services),
9174 (bus_driver_handle_acquire_service),
9175 (bus_driver_handle_service_exists), (bus_driver_handle_message):
9176 Update for API changes in libdbus.
9178 * dbus/dbus-message.c: (dbus_message_new_reply):
9179 * dbus/dbus-message.h:
9180 Remove the name argument. The spec states that replies shouldn't
9183 2003-02-13 Anders Carlsson <andersca@codefactory.se>
9185 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
9186 (report_error), (bus_desktop_file_load), (lookup_section),
9187 (lookup_line), (bus_desktop_file_get_raw),
9188 (bus_desktop_file_get_string):
9189 * bus/desktop-file.h:
9190 Some fixes, and new functions for getting a key value from a section.
9192 2003-02-13 Havoc Pennington <hp@pobox.com>
9194 * test/data/auth/fail-after-n-attempts.auth-script: new test
9196 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
9199 2003-02-13 Havoc Pennington <hp@pobox.com>
9201 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
9202 dbus_credentials_match were backward
9204 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
9205 NO_CREDENTIALS and ROOT_CREDENTIALS
9207 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
9208 into here. Never process more commands after we've reached an
9209 end state; store further data as unused bytes.
9211 * test/data/auth/*: add more auth tests
9213 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
9214 command to match exact string and EXPECT_UNUSED to match unused
9217 * test/Makefile.am (dist-hook): fix to dist all the test stuff
9219 2003-02-12 Havoc Pennington <hp@pobox.com>
9221 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
9222 \r off of popped lines
9224 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
9227 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
9230 2003-02-12 Havoc Pennington <hp@pobox.com>
9232 * dbus/Makefile.am: remove break-loader from the build, since it
9235 * configure.in: add --enable-gcov to turn on coverage profiling
9236 flags and disable optimization
9238 2003-02-10 Havoc Pennington <hp@pobox.com>
9240 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
9241 initial cut at test framework for DBusAuth from laptop.
9242 Doesn't quite work yet but it compiles and I need to get
9243 it off the 266mhz laptop. ;-)
9245 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
9246 fix a memleak in error case
9248 2003-02-12 Anders Carlsson <andersca@codefactory.se>
9251 * bus/desktop-file.c:
9252 * bus/desktop-file.h:
9253 Add a desktop file parser.
9255 2003-02-11 Zack Rusin <zack@kde.org>
9257 * qt/message.[h|cpp]: sample implementation
9258 of the KDE wrapper for DBusMessage
9260 2003-02-09 Zack Rusin <zack@kde.org>
9262 * test/bus-test.c: make_it_compile
9263 * doc/dbus-specification.sgml: minimal semantic fix
9265 2003-02-06 Anders Carlsson <andersca@codefactory.se>
9271 2003-02-06 Anders Carlsson <andersca@codefactory.se>
9274 * dbus/dbus-break-loader.c:
9276 * test/break-loader.c:
9277 Move dbus-break-loader to test/ and rename it to break-loader.
9279 2003-02-02 Havoc Pennington <hp@pobox.com>
9281 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
9282 for code to manage cookies in your home directory
9284 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
9286 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
9287 to authenticate, then disconnect the client.
9289 2003-02-03 Alexander Larsson <alexl@redhat.com>
9291 * dbus/dbus-message.c (dbus_message_append_fields):
9294 2003-02-02 Anders Carlsson <andersca@codefactory.se>
9296 * doc/dbus-specification.sgml:
9297 Update address format section.
9299 2003-02-02 Anders Carlsson <andersca@codefactory.se>
9302 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
9303 (message_handler), (new_connection_callback), (loop_quit),
9307 2003-02-02 Anders Carlsson <andersca@codefactory.se>
9309 * bus/driver.c: (bus_driver_handle_service_exists):
9310 Simplify the code a bit.
9312 * dbus/dbus-bus.c: (dbus_bus_service_exists):
9315 2003-02-02 Anders Carlsson <andersca@codefactory.se>
9318 Add libdbus-daemon.la and link to it.
9320 2003-02-01 James Willcox <jwillcox@gnome.org>
9322 * bus/driver.c: (bus_driver_handle_own_service):
9323 Actually include the service reply code in the message.
9325 2003-02-02 Anders Carlsson <andersca@codefactory.se>
9327 * bus/driver.c: (bus_driver_handle_service_exists):
9328 Don't unref the incoming message.
9330 2003-02-02 Anders Carlsson <andersca@codefactory.se>
9332 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
9334 2003-02-02 Anders Carlsson <andersca@codefactory.se>
9336 * dbus/dbus-server.c: (dbus_server_listen):
9337 * dbus/dbus-transport.c: (_dbus_transport_open):
9338 ifdef out the calls to the debug transport and server.
9340 2003-02-02 Alexander Larsson <alexl@redhat.com>
9342 * dbus/dbus-watch.c (dbus_watch_get_flags):
9343 Add note in the docs that ERROR or HANGUP won't be returned
9344 and are assumed always on.
9346 * glib/dbus-gmain.c (add_watch):
9347 Always add IO_ERR | IO_HUP
9349 * dbus/dbus-message.h:
9350 Add semicolon after dbus_message_iter_get_string_array().
9351 Makes qt code build again
9353 2003-02-01 Anders Carlsson <andersca@codefactory.se>
9355 * bus/driver.c: (create_unique_client_name),
9356 (bus_driver_handle_hello):
9357 Don't take a name, just use a numeric id to identify
9361 * dbus/dbus-bus.c: (dbus_bus_register_client),
9362 (dbus_bus_acquire_service), (dbus_bus_service_exists):
9364 Add new convenience functions for communicating with the bus.
9366 * dbus/dbus-message.h:
9368 * dbus/dbus-protocol.h:
9371 2003-02-01 Alexander Larsson <alexl@redhat.com>
9373 * dbus/dbus-message.c (dbus_message_append_fields):
9374 Add some more doc comments.
9376 2003-02-01 Havoc Pennington <hp@pobox.com>
9378 * dbus/dbus-break-loader.c (randomly_modify_length): change
9379 a 4-byte value in the message as if it were a length
9381 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
9382 execute bit on saved files
9384 2003-02-01 Havoc Pennington <hp@pobox.com>
9386 * dbus/dbus-break-loader.c (main): new program to find messages
9387 that break the loader.
9389 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
9390 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
9392 * dbus/dbus-string.c (_dbus_string_set_byte): new
9394 2003-01-31 Havoc Pennington <hp@pobox.com>
9396 * dbus/dbus-message.c: refactor the test code to be more general,
9397 in preparation for writing a "randomly permute test cases to
9398 try to break the loader" program.
9400 2003-01-31 Havoc Pennington <hp@pobox.com>
9402 * doc/dbus-specification.sgml: work on the specification
9404 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
9405 the protocol version of the message.
9407 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
9408 no longer specifies that.
9409 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
9412 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
9413 "break" for DBUS_TYPE_NIL, remove @todo
9415 2003-01-31 Havoc Pennington <hp@pobox.com>
9417 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
9418 just set_is_error/get_is_error as this is a commonly-used
9419 function, and write docs.
9421 2003-01-31 Anders Carlsson <andersca@codefactory.se>
9423 * dbus/dbus-address.c: (dbus_address_entry_free):
9424 Free key and value lists.
9426 * dbus/dbus-internals.c: (_dbus_type_to_string):
9427 Add the types we didn't have.
9429 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
9430 (_dbus_marshal_validate_arg):
9433 * dbus/dbus-message.c: (dbus_message_set_sender):
9434 Remove todo about being able to set sender to NULL.
9436 (dbus_message_set_is_error_reply),
9437 (dbus_message_get_is_error_reply):
9438 * dbus/dbus-message.h:
9441 * dbus/dbus-protocol.h:
9442 Add error reply flag.
9444 * test/data/valid-messages/opposite-endian.message:
9445 Add NIL type to test.
9447 2003-01-31 Havoc Pennington <hp@pobox.com>
9449 * doc/dbus-specification.sgml: fully specify the header. Add
9450 flags and major protocol version, and change header/body len to
9453 * dbus/dbus-message-builder.c (append_saved_length): append length
9456 * dbus/dbus-message.c (dbus_message_create_header): change header
9457 length and body length to unsigned. Add the new fields from the
9459 (_dbus_message_loader_return_buffer): unsigned header/body len
9461 2003-01-30 Havoc Pennington <hp@pobox.com>
9463 * dbus/dbus-auth.c: rework to use only REJECTED, no
9466 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
9467 use REJECTED, suggested by Mark McLoughlin
9469 2003-01-30 Havoc Pennington <hp@pobox.com>
9471 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
9472 a better way to report errors here. e.g. "unix address lacks
9473 path" or something. also "no such file" when the path doesn't
9476 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
9478 (dbus_parse_address): add @todo about documenting address format,
9479 and allowing , and ; to be escaped
9481 2003-01-30 Anders Carlsson <andersca@codefactory.se>
9484 Add dbus-address.[ch]
9486 * dbus/dbus-address.c: (dbus_address_entry_free),
9487 (dbus_address_entries_free), (create_entry),
9488 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
9489 (dbus_parse_address), (_dbus_address_test):
9490 * dbus/dbus-address.h:
9491 New files for dealing with address parsing.
9493 * dbus/dbus-connection.c:
9494 Document timeout functions.
9496 * dbus/dbus-message.c:
9497 Document dbus_message_new_from_message.
9499 * dbus/dbus-server-debug.c:
9502 * dbus/dbus-server.c: (dbus_server_listen):
9503 Parse address and use correct server implementation.
9505 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
9506 * dbus/dbus-string.h:
9507 New function with test.
9509 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
9513 * dbus/dbus-transport-debug.c:
9516 * dbus/dbus-transport.c: (_dbus_transport_open):
9517 Parse address and use correct transport implementation.
9519 2003-01-30 Havoc Pennington <hp@pobox.com>
9521 * dbus/dbus-message.c: use message->byte_order instead of
9522 DBUS_COMPILER_BYTE_ORDER throughout.
9523 (dbus_message_create_header): pad header to align the
9524 start of the body of the message to 8-byte boundary
9526 * dbus/dbus-marshal.h: make all the demarshalers take const
9527 DBusString arguments.
9529 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
9530 validate message args here, so we don't have to do slow validation
9531 later, and so we catch bad messages as they are incoming. Also add
9532 better checks on header_len and body_len. Also fill in
9535 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
9536 implemented properly)
9537 (_dbus_string_validate_nul): new function to check all-nul
9539 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
9540 get_arg_end_pos and remove all validation
9541 (_dbus_marshal_validate_arg): actually do validation here.
9543 2003-01-29 Havoc Pennington <hp@pobox.com>
9545 * dbus/dbus-message.c (check_message_handling): fix assertion
9546 failure on set_client_serial
9548 2003-01-28 Havoc Pennington <hp@pobox.com>
9550 * dbus/dbus-server-debug.c: Add doc section comments
9552 * dbus/dbus-transport-debug.c: add doc section comments
9554 2003-01-28 Havoc Pennington <hp@redhat.com>
9556 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
9557 the reverse order from how I had it
9558 (_dbus_string_base64_encode): reverse encoding order. I was
9559 basically byteswapping everything during encoding.
9561 2003-01-28 Anders Carlsson <andersca@codefactory.se>
9563 * dbus/dbus-connection-internal.h:
9564 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
9565 (_dbus_connection_remove_timeout):
9566 Add functions for adding and removing timeouts.
9568 * dbus/dbus-message.c: (dbus_message_new_from_message):
9569 Add new function that takes a message and creates an exact
9570 copy of it, but with the refcount set to 1.
9571 (check_message_handling):
9574 * dbus/dbus-server-protected.h:
9575 * dbus/dbus-server.c: (_dbus_server_init_base),
9576 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
9577 (dbus_server_set_timeout_functions):
9578 (_dbus_server_remove_timeout):
9579 New functions so that a server can add and remove timeouts.
9581 (dbus_server_listen):
9582 Add commented out call to dbus_server_debug_new.
9584 * dbus/dbus-timeout.c: (_dbus_timeout_new):
9585 Actually set the handler, doh.
9587 * dbus/dbus-transport.c: (_dbus_transport_open):
9588 Add commented out call to dbus_transport_debug_client_new.
9591 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
9593 2003-01-28 Havoc Pennington <hp@pobox.com>
9595 * dbus/dbus-message.c (check_message_handling): function to check
9596 on the loaded message, iterates over it etc.
9598 2003-01-28 Havoc Pennington <hp@pobox.com>
9600 * test/Makefile.am (dist-hook): fix make distdir
9602 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
9604 2003-01-27 Havoc Pennington <hp@pobox.com>
9606 * dbus/dbus-mempool.c (time_for_size): replace printf with
9609 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
9610 empty lines; fix the SAVE_LENGTH stuff to be
9611 START_LENGTH/END_LENGTH so it actually works; couple other
9614 * test/Makefile.am (dist-hook): add dist-hook for .message files
9616 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
9617 can be constant or locked.
9618 (_dbus_string_free): allow freeing a const string as
9621 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
9623 * dbus/dbus-test-main.c (main): take an argument which is the
9624 directory containing test data
9626 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
9627 argument to this and load all the messages in test/data/
9628 checking that they can be loaded or not loaded as appropriate.
9630 2003-01-27 Anders Carlsson <andersca@codefactory.se>
9632 * bus/dispatch.c: (bus_dispatch_message_handler):
9633 Dispatch messages sent to services.
9635 * bus/driver.c: (bus_driver_send_service_deleted),
9636 (bus_driver_send_service_created), (bus_driver_send_service_lost),
9637 (bus_driver_send_service_acquired):
9638 Add helper functions for sending service related messages.
9640 (bus_driver_send_welcome_message):
9641 Send HELLO_REPLY instead of WELCOME.
9643 (bus_driver_handle_list_services):
9644 Send LIST_SERVICES_REPLY instead of SERVICES.
9646 (bus_driver_handle_own_service),
9647 (bus_driver_handle_service_exists):
9648 New message handlers.
9650 (bus_driver_handle_message):
9651 Invoke new message handlers.
9653 (bus_driver_remove_connection):
9654 Don't remove any services here since that's done automatically
9655 by bus_service_remove_owner now.
9658 New function signatures.
9660 * bus/services.c: (bus_service_add_owner):
9661 Send ServiceAcquired message if we're the only primary owner.
9663 (bus_service_remove_owner):
9664 Send ServiceAcquired/ServiceLost messages.
9666 (bus_service_set_prohibit_replacement),
9667 (bus_service_get_prohibit_replacement):
9668 Functions for setting prohibit replacement.
9670 (bus_service_has_owner):
9671 New function that checks if a connection is in the owner queue of
9675 Add new function signatures.
9677 * dbus/dbus-list.c: (_dbus_list_test):
9678 Add tests for _dbus_list_remove_last and traversing the list backwards.
9681 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
9682 go any further, so return NULL then.
9684 * dbus/dbus-protocol.h:
9685 Add new messages, service flags and service replies.
9687 2003-01-26 Havoc Pennington <hp@pobox.com>
9689 * dbus/dbus-message-builder.c: implement, completely untested.
9691 * test/data/*: add data to be used in testing.
9692 ".message" files are our simple loadable text format.
9693 ".message-raw" will be binary dumps of messages.
9695 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
9697 2003-01-26 Havoc Pennington <hp@pobox.com>
9699 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
9701 * dbus/dbus-errors.c (dbus_result_to_string): add
9704 * dbus/dbus-message-builder.c: new file, will contain code to load
9705 up messages from files. Not implemented yet.
9707 2003-01-26 Havoc Pennington <hp@pobox.com>
9709 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
9710 the sender by setting to NULL
9712 2003-01-26 Havoc Pennington <hp@pobox.com>
9714 The unit tests pass, but otherwise untested. If it breaks, the
9715 tests should have been better. ;-)
9717 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
9720 * dbus/dbus-message.c: redo everything so we maintain
9721 message->header as the only copy of the various fields.
9722 This avoids the possibility of out-of-memory in some cases,
9723 for example dbus_message_lock() can't run out of memory anymore,
9724 and avoids extra copying. Figured I may as well go ahead and do
9725 this since it was busted for dbus_message_lock to not return
9726 failure on OOM, and dbus_message_write_header was totally
9727 unchecked for OOM. Also fixed some random other bugs.
9729 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
9730 that strings are nul-terminated. Also, end_pos can be equal
9731 to string length just not greater than, I think.
9732 (_dbus_marshal_set_int32): new function
9733 (_dbus_marshal_set_uint32): new function
9734 (_dbus_marshal_set_string): new function
9736 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
9737 a warning, init timeout_list to NULL
9738 (dbus_connection_send_message): don't use uninitialized variable
9741 * dbus/dbus-string.c (_dbus_string_replace_len): new function
9743 2003-01-26 Anders Carlsson <andersca@codefactory.se>
9745 * bus/driver.c: (bus_driver_handle_hello),
9746 (bus_driver_send_welcome_message):
9749 2003-01-26 Anders Carlsson <andersca@codefactory.se>
9751 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
9752 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
9753 (dbus_connection_unref):
9754 * dbus/dbus-marshal.c: (_dbus_marshal_test):
9755 * dbus/dbus-message.c: (dbus_message_unref),
9758 (dbus_message_get_fields):
9759 Remove debugging printout.
9761 (_dbus_message_loader_return_buffer):
9762 Don't store the header string.
9764 (_dbus_message_test):
9767 2003-01-26 Richard Hult <rhult@codefactory.se>
9769 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
9770 the file descriptor list, since it can change under us.
9772 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9774 * glib/dbus-gmain.c: (dbus_connection_prepare),
9775 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
9776 (remove_watch), (dbus_connection_hookup_with_g_main):
9777 Rewrite the glib handling to use its own GSource instead of a
9778 GIOChannel so we can catch messages put in the queue while waiting
9781 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9784 * bus/connection.c: (connection_disconnect_handler),
9785 (connection_watch_callback), (bus_connection_setup):
9786 * bus/dispatch.c: (send_one_message),
9787 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
9788 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
9790 * bus/driver.c: (bus_driver_send_service_deleted),
9791 (bus_driver_send_service_created), (bus_driver_handle_hello),
9792 (bus_driver_send_welcome_message),
9793 (bus_driver_handle_list_services), (bus_driver_remove_connection),
9794 (bus_driver_handle_message):
9796 Refactor code, put the message dispatching in its own file. Use
9797 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
9800 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9802 * dbus/dbus-internals.h:
9803 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
9805 * dbus/dbus-message.c: (dbus_message_get_sender):
9806 * dbus/dbus-message.h:
9807 Implement dbus_message_get_sender.
9809 * dbus/dbus-protocol.h:
9810 Add message and service defines.
9812 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9814 * dbus/dbus-connection.c: (dbus_connection_send_message):
9815 * dbus/dbus-message-internal.h:
9816 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
9817 (dbus_message_write_header):
9818 Remove _dbus_messag_unlock and don't set the client serial on a
9819 message if one already exists.
9821 2003-01-24 Havoc Pennington <hp@pobox.com>
9823 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
9826 * bus/driver.c (bus_driver_handle_list_services): fix a leak
9829 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9831 * dbus/dbus-list.c: (alloc_link), (free_link):
9832 Use a memory pool for the links.
9834 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9836 * bus/connection.c: (bus_connection_foreach):
9838 Add new bus_connection_foreach function.
9840 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
9841 Add function that broadcasts a message to all clients.
9843 (bus_driver_send_service_created), (bus_driver_handle_hello),
9844 (bus_driver_send_welcome_message),
9845 (bus_driver_handle_list_services), (bus_driver_message_handler):
9846 Implement functions that take care of listing services, and notifying
9847 clients when new services are created.
9849 * bus/services.c: (bus_services_list):
9851 Add new function that returns an array of strings with the currently
9852 registered services.
9855 * glib/dbus-gmain.c:
9856 Update copyright year.
9858 2003-01-25 Anders Carlsson <andersca@codefactory.se>
9860 * dbus/dbus-connection.c: (dbus_connection_send_message):
9861 Unlock the message in case it was sent earlier.
9863 (dbus_connection_send_message_with_reply_and_block):
9864 Remove the reply message from the list.
9866 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
9867 Set array_len and new_pos correctly.
9869 (_dbus_marshal_test):
9870 Remove debug output.
9872 * dbus/dbus-message-internal.h:
9873 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
9874 New function that returns the reply serial.
9876 (_dbus_message_unlock):
9877 New function that unlocks a message and resets its header.
9879 (dbus_message_append_string_array),
9880 (dbus_message_get_fields_valist),
9881 (dbus_message_iter_get_field_type),
9882 (dbus_message_iter_get_string_array),
9883 (dbus_message_get_fields),
9884 (dbus_message_append_fields_valist):
9885 Handle string arrays.
9887 (dbus_message_set_sender):
9888 Make this function public since the bus daemon needs it.
9890 (decode_header_data):
9891 Set the reply serial to -1 initially.
9893 * dbus/dbus-message.h:
9894 Add dbus_message_set_sender.
9896 2003-01-24 Havoc Pennington <hp@pobox.com>
9898 * doc/dbus-specification.sgml: add some stuff
9900 2003-01-22 Havoc Pennington <hp@pobox.com>
9902 * doc/dbus-specification.sgml: Start to document the protocol.
9904 2003-01-22 Havoc Pennington <hp@pobox.com>
9906 * dbus/dbus-connection.c
9907 (dbus_connection_send_message_with_reply_and_block): add some @todo
9909 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
9911 2003-01-21 Havoc Pennington <hp@pobox.com>
9913 (patch untested because can't compile)
9915 * bus/driver.c (create_unique_client_name): make this function
9916 never recycle client names. Also, caller should initialize
9919 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
9921 2003-01-21 Anders Carlsson <andersca@codefactory.se>
9923 * dbus/dbus-marshal.c: (_dbus_marshal_double),
9924 (_dbus_marshal_int32), (_dbus_marshal_uint32),
9925 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
9926 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
9927 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9928 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9929 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
9930 * dbus/dbus-marshal.h:
9931 * dbus/dbus-protocol.h:
9932 Add support for marshalling and demarshalling integer, double
9935 2003-01-21 Anders Carlsson <andersca@codefactory.se>
9940 * bus/connection.c: (connection_disconnect_handler):
9941 Remove the connection from the bus driver's list.
9943 (connection_watch_callback): Dispatch messages.
9945 (free_connection_data): Free connection name.
9947 (bus_connection_setup): Add connection to the bus driver's list.
9948 (bus_connection_remove_owned_service):
9949 (bus_connection_set_name), (bus_connection_get_name):
9950 Add functions for setting and getting the connection's name.
9953 Add function headers.
9955 * bus/driver.c: (create_unique_client_name),
9956 (bus_driver_handle_hello_message),
9957 (bus_driver_send_welcome_message), (bus_driver_message_handler),
9958 (bus_driver_add_connection), (bus_driver_remove_connection):
9961 * bus/services.c: (bus_service_free):
9963 New file that handles communication and registreation with the bus
9966 2003-01-21 Anders Carlsson <andersca@codefactory.se>
9968 * dbus/dbus-connection.c: (dbus_connection_send_message):
9969 Add a new client_serial parameter.
9971 (dbus_connection_send_message_with_reply):
9972 Remove a @todo since we've implemented the blocking function.
9974 (dbus_connection_send_message_with_reply_and_block):
9975 New function that sends a message and waits for a reply and
9976 then returns the reply.
9978 * dbus/dbus-connection.h:
9981 * dbus/dbus-errors.c: (dbus_result_to_string):
9982 * dbus/dbus-errors.h:
9983 Add new DBUS_RESULT.
9985 * dbus/dbus-message-internal.h:
9986 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
9987 (_dbus_message_set_sender), (dbus_message_write_header),
9988 (dbus_message_new_reply), (decode_header_data),
9989 (_dbus_message_loader_return_buffer), (_dbus_message_test):
9990 * dbus/dbus-message.h:
9991 Add new functions that set the reply serial and sender.
9992 Also marshal and demarshal them correctly and add test.
9994 * dbus/dbus-protocol.h:
9995 Add new DBUS_MESSAGE_TYPE_SENDER.
9998 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
9999 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
10000 (dbus_connection_hookup_with_g_main):
10001 * glib/test-dbus-glib.c: (main):
10002 Rewrite to use GIOChannel and remove the GSource crack.
10004 * test/echo-client.c: (main):
10005 * test/watch.c: (check_messages):
10006 Update for changed APIs
10008 2003-01-19 Anders Carlsson <andersca@codefactory.se>
10010 * dbus/Makefile.am: Add dbus-timeout.[cħ]
10012 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
10013 Create a DBusTimeoutList.
10014 (dbus_connection_set_timeout_functions): Add new function to
10015 set timeout callbacks
10017 * dbus/dbus-connection.h: Add public DBusTimeout API.
10019 * dbus/dbus-message.c: (dbus_message_get_service):
10020 * dbus/dbus-message.h: New function.
10022 * dbus/dbus-server.c: Fix small doc typo.
10024 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
10026 2003-01-19 Anders Carlsson <andersca@codefactory.se>
10028 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
10029 of the string, just as long as specified.
10031 2003-01-19 Havoc Pennington <hp@pobox.com>
10033 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
10036 * dbus/dbus-server.c (dbus_server_set_max_connections)
10037 (dbus_server_get_max_connections, dbus_server_get_n_connections):
10038 keep track of current number of connections, and add API for
10039 setting a max (but haven't implemented enforcing the max yet)
10041 2003-01-18 Havoc Pennington <hp@pobox.com>
10043 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
10044 reading/writing if read_watch != NULL or write_watch != NULL.
10046 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
10047 the message loader code to actually load message->header and
10048 message->body into the newly-created message.
10050 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
10053 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
10054 (dbus_connection_get_max_message_size)
10055 (dbus_connection_set_max_live_messages_size)
10056 (dbus_connection_get_max_live_messages_size): implement some
10057 resource limitation functions
10059 * dbus/dbus-resources.c: new file implementing some of the
10060 resource limits stuff
10062 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
10063 missing docs, add @todo to handle OOM etc.
10065 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
10068 2003-01-18 Havoc Pennington <hp@pobox.com>
10070 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
10071 connection if it hasn't been already.
10073 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
10074 replace with DisconnectFunction.
10076 2003-01-18 Havoc Pennington <hp@pobox.com>
10078 Building --disable-verbose-mode --disable-asserts --disable-tests
10079 cuts the library from 112K to 45K or so
10081 * configure.in: check for varargs macro support,
10082 add --enable-verbose-mode, --enable-asserts.
10084 * dbus/dbus-internals.h (_dbus_assert): support
10085 DBUS_DISABLE_ASSERT
10086 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
10088 2003-01-18 Havoc Pennington <hp@pobox.com>
10090 * dbus/dbus-test.c: include config.h so that tests actually run
10092 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
10093 so the failure mode when that assumption fails will be plenty
10096 2003-01-18 Havoc Pennington <hp@pobox.com>
10098 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
10100 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
10103 * test/Makefile.am: don't use special variable "TESTS" for echo-*
10104 since we don't want to use those in make check
10106 2003-01-15 Havoc Pennington <hp@redhat.com>
10112 2003-01-15 Havoc Pennington <hp@redhat.com>
10114 * test/Makefile.am: fix so that test source code ends up in the
10115 distribution on make distcheck
10117 2003-01-15 Havoc Pennington <hp@redhat.com>
10123 2003-01-15 Havoc Pennington <hp@redhat.com>
10125 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
10126 fix build when --disable-tests
10128 * Makefile.am (EXTRA_DIST): put HACKING in here
10130 * HACKING: document procedure for making a tarball release.
10132 2003-01-14 Anders Carlsson <andersca@codefactory.se>
10134 * bus/connection.c: (connection_error_handler),
10135 (bus_connection_setup):
10136 * bus/main.c: (main):
10137 Make sure that the DBusConnectionData struct is NULLed
10138 out to prevent a segfault.
10140 * dbus/dbus-errors.c: (dbus_result_to_string):
10141 * dbus/dbus-errors.h:
10142 * dbus/dbus-message.c: (dbus_message_get_fields),
10143 (dbus_message_get_fields_valist), (_dbus_message_test):
10144 * dbus/dbus-message.h:
10145 Make dbus_message_get_fields return a result code so we can
10146 track invalid fields as well as oom.
10148 2003-01-11 Havoc Pennington <hp@pobox.com>
10150 * configure.in: change --enable-test/--enable-ansi action-if-given
10151 to enable_foo=$enableval instead of enable_foo=yes
10153 2003-01-08 Havoc Pennington <hp@pobox.com>
10155 * dbus/dbus-string.c (_dbus_string_align_length): new function
10157 * dbus/dbus-test-main.c: move main() for test app here
10159 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
10160 symbol to run tests, because dbus-test isn't in the main
10163 Code review nitpicks.
10165 * dbus/dbus-message.c (dbus_message_write_header): add newlines
10166 for people with narrow emacs ;-). Assert client_serial was filled
10167 in. Assert message->name != NULL.
10168 (dbus_message_append_fields): have "first_field_type" arg separate
10169 from va list, needed for C++ binding that also uses varargs IIRC
10170 and helps with type safety
10171 (dbus_message_new): add @todo about using DBusString to store
10172 service/name internally
10173 (dbus_message_new): don't leak ->service and ->name on OOM later
10175 (dbus_message_unref): free the service name
10176 (dbus_message_get_fields): same change to varargs
10177 i.e. first_field_type
10178 (_dbus_message_loader_return_buffer): assert that the message data
10179 is aligned (if not it's a bug in our code). Put in verbose griping
10180 about why we set corrupted = TRUE.
10181 (decode_header_data): add FIXME that char* is evil. Was going to
10182 add FIXME about evil locale-specific string.h strncmp, but just
10183 switched to wacky string-as-uint32 optimization. Move check for
10184 "no room for field name" above get_const_data_len() to avoid
10185 assertion failure in get_const_data_len if we have trailing 2
10186 bytes or the like. Check for service and name fields being
10187 provided twice. Don't leak service/name on error. Require field
10188 names to be aligned to 4 bytes.
10190 * dbus/dbus-marshal.c: move byte swap stuff to header
10191 (_dbus_pack_int32): uscore-prefix
10192 (_dbus_unpack_int32): uscore-prefix
10193 (_dbus_unpack_uint32): export
10194 (_dbus_demarshal_string): add @todo complaining about use of
10196 (_dbus_marshal_get_field_end_pos): add @todo about bad error
10197 handling allowing corrupt data to go unchecked
10199 2003-01-08 Havoc Pennington <hp@redhat.com>
10201 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
10202 to the select() as needed for authentication. (should be using
10203 _dbus_poll() not select, but for another day)
10205 * dbus/dbus.h: include dbus/dbus-protocol.h
10207 2003-01-08 Anders Carlsson <andersca@codefactory.se>
10209 * dbus/Makefile.am (dbusinclude_HEADERS): Install
10212 2003-01-08 Anders Carlsson <andersca@codefactory.se>
10214 * dbus/dbus-internals.c: (_dbus_type_to_string):
10215 New function that returns a string describing a type.
10217 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
10218 * dbus/dbus-marshal.h:
10219 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
10220 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
10221 (dbus_message_iter_get_byte_array):
10222 * dbus/dbus-message.h:
10223 Add new convenience functions for appending and getting message fields.
10224 Also add demarshalling routines for byte arrays.
10226 2003-01-07 Anders Carlsson <andersca@codefactory.se>
10228 * dbus/dbus-connection-internal.h:
10229 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
10230 (_dbus_connection_get_next_client_serial),
10231 (dbus_connection_send_message):
10232 * dbus/dbus-internals.h:
10233 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
10234 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
10235 (_dbus_marshal_uint32), (_dbus_demarshal_double),
10236 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
10237 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
10238 (_dbus_verbose_bytes), (_dbus_marshal_test):
10239 * dbus/dbus-marshal.h:
10240 * dbus/dbus-message-internal.h:
10241 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
10242 (dbus_message_write_header), (_dbus_message_lock),
10243 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
10244 (dbus_message_get_name), (dbus_message_append_int32),
10245 (dbus_message_append_uint32), (dbus_message_append_double),
10246 (dbus_message_append_string), (dbus_message_append_byte_array),
10247 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
10248 (dbus_message_iter_unref), (dbus_message_iter_has_next),
10249 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
10250 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
10251 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
10252 (decode_header_data), (_dbus_message_loader_return_buffer),
10253 (message_iter_test), (_dbus_message_test):
10254 * dbus/dbus-message.h:
10255 * dbus/dbus-protocol.h:
10256 * dbus/dbus-test.c: (main):
10257 * dbus/dbus-test.h:
10258 * glib/test-dbus-glib.c: (message_handler), (main):
10259 * test/echo-client.c: (main):
10260 * test/watch.c: (check_messages):
10261 Make messages sendable and receivable for real.
10263 2003-01-07 Anders Carlsson <andersca@codefactory.se>
10265 * dbus/dbus-marshal.c: (_dbus_marshal_double),
10266 (_dbus_marshal_string), (_dbus_marshal_byte_array):
10267 * dbus/dbus-message.c: (dbus_message_append_int32),
10268 (dbus_message_append_uint32), (dbus_message_append_double),
10269 (dbus_message_append_string), (dbus_message_append_byte_array):
10270 Handle OOM restoration.
10272 2003-01-07 Anders Carlsson <andersca@codefactory.se>
10274 * dbus/dbus-marshal.c: (_dbus_marshal_string),
10275 (_dbus_demarshal_string), (_dbus_marshal_test):
10276 * dbus/dbus-marshal.h:
10277 * dbus/dbus-message.c: (dbus_message_get_name),
10278 Document these functions.
10280 (dbus_message_append_int32), (dbus_message_append_uint32),
10281 (dbus_message_append_double), (dbus_message_append_string),
10282 (dbus_message_append_byte_array):
10283 * dbus/dbus-message.h:
10284 Add functions for adding message fields of different types.
10286 * dbus/dbus-protocol.h:
10287 Add the different types.
10289 2003-01-05 Havoc Pennington <hp@pobox.com>
10291 * bus/connection.c: implement routines for handling connections,
10292 first thing is keeping a list of owned services on each connection
10293 and setting up watches etc.
10295 * bus/services.c: implement a mapping from service names to lists
10298 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
10300 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
10301 to use static mutexes for global data
10303 * dbus/dbus-connection.c (dbus_connection_set_data): add new
10304 collection of functions to set/get application-specific data
10305 on the DBusConnection.
10307 2003-01-04 Havoc Pennington <hp@pobox.com>
10309 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
10310 (_dbus_poll): new function
10312 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
10315 * bus/loop.c: initial code for the daemon main loop
10317 2003-01-04 Havoc Pennington <hp@pobox.com>
10319 * test/watch.c (error_handler): make it safe if the error handler
10320 is called multiple times (if we s/error handler/disconnect
10321 handler/ we should just guarantee it's called only once)
10323 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
10324 error handler on disconnect (it's quite possible we should
10325 just change the error handler to a "disconnect handler," I'm
10326 not sure we have any other meaningful errors)
10328 * configure.in: check for getpwnam_r
10330 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
10331 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
10332 mechanism as in SASL spec, using socket credentials
10334 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
10335 (_dbus_send_credentials_unix_socket): new function
10337 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
10339 (_dbus_write): only check errno if <0 returned
10340 (_dbus_write_two): ditto
10342 2003-01-02 Anders Carlsson <andersca@codefactory.se>
10344 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
10345 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
10346 (_dbus_marshal_test):
10347 * dbus/dbus-marshal.h:
10348 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
10349 to _dbus_marshal_utf8_string. Also fix some tests.
10351 2002-12-28 Harri Porten <porten@kde.org>
10353 * configure.in: added check for C++ compiler and a very cheesy
10354 check for the Qt integration
10356 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
10358 * qt/Makefile.am: added
10360 * qt/.cvsignore: added
10362 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
10363 latter, added #ifdef QT_THREAD_SUPPORT guard.
10365 * dbus/Makefile.am: added missing headers for make dist
10367 2002-12-28 Kristian Rietveld <kris@gtk.org>
10369 * dbus/Makefile.am: fixup export-symbols-regex.
10371 2002-12-27 Anders Carlsson <andersca@codefactory.se>
10373 * acinclude.m4: Add this file and put the
10374 PKG_CHECK_MODULE macro in it.
10376 2002-12-27 Anders Carlsson <andersca@codefactory.se>
10378 * dbus/dbus-marshal.c: (_dbus_marshal_string),
10379 (_dbus_demarshal_double), (_dbus_demarshal_int32),
10380 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
10381 (_dbus_marshal_test):
10382 Make the demarshalling routines align the pos argument.
10383 Add string marshalling tests and fix the obvious bugs
10386 2002-12-26 Havoc Pennington <hp@pobox.com>
10388 * dbus/dbus-auth.c: fixes fixes fixes
10390 * dbus/dbus-transport-unix.c: wire up support for
10391 encoding/decoding data on the wire
10393 * dbus/dbus-auth.c (_dbus_auth_encode_data)
10394 (_dbus_auth_decode_data): append to target string
10395 instead of nuking it.
10397 2002-12-26 Havoc Pennington <hp@pobox.com>
10399 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
10400 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
10403 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
10404 avoid swap_bytes() overhead (ignoring possible assembly stuff for
10405 now). Main point is because I wanted unpack_uint32 to implement
10406 _dbus_verbose_bytes
10407 (_dbus_verbose_bytes): new function
10409 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
10411 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
10412 mechanism to handle a corrupt message stream
10413 (_dbus_message_loader_new): fix preallocation to only prealloc,
10416 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
10417 (_dbus_string_test): enhance tests for copy/move and fix the
10420 * dbus/dbus-transport-unix.c: Hold references in more places to
10421 avoid reentrancy problems
10423 * dbus/dbus-transport.c: ditto
10425 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
10426 leak reference count in no-message case
10428 * test/watch.c (do_mainloop): handle adding/removing watches
10429 during iteration over the watches. Also, ref the connection/server
10430 stored on a watch, so we don't try to mangle a destroyed one.
10432 * dbus/dbus-transport-unix.c (do_authentication): perform
10435 * dbus/dbus-auth.c (get_state): add a state
10436 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
10437 (_dbus_auth_get_unused_bytes): append the unused bytes
10438 to the passed in string, rather than prepend
10440 * dbus/dbus-transport.c (_dbus_transport_init_base): create
10441 the auth conversation DBusAuth
10443 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
10444 (_dbus_transport_new_for_domain_socket): when creating a
10445 transport, pass in whether it's a client-side or server-side
10446 transport so we know which DBusAuth to create
10448 2002-12-03 Havoc Pennington <hp@pobox.com>
10450 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
10451 _after_ finalizing the derived members
10452 (unix_connection_set): unref watch if we fail to add it
10454 * dbus/dbus-connection.c (dbus_connection_unref): delete the
10455 transport first, so that the connection owned by the
10456 transport will be valid as the transport finalizes.
10458 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
10459 if necessary, and remove watches from the connection.
10461 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
10463 2002-12-26 Anders Carlsson <andersca@codefactory.se>
10465 * dbus/dbus-marshal.c: (_dbus_marshal_string),
10466 (_dbus_demarshal_double), (_dbus_demarshal_int32),
10467 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
10468 (_dbus_marshal_test):
10469 * dbus/dbus-marshal.h:
10470 Add string marshal functions and have the demarshal functions
10471 return the new position.
10473 2002-12-25 Havoc Pennington <hp@pobox.com>
10475 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
10476 it is a simple protocol that just maps directly to SASL.
10478 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
10479 initial implementation, not actually used yet.
10481 * dbus/dbus-string.c (_dbus_string_find): new function
10482 (_dbus_string_equal): new function
10483 (_dbus_string_base64_encode): new function
10484 (_dbus_string_base64_decode): new function
10486 2002-12-25 Anders Carlsson <andersca@codefactory.se>
10488 * dbus/Makefile.am:
10489 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
10490 (_dbus_marshal_int32), (_dbus_marshal_uint32),
10491 (_dbus_demarshal_double), (_dbus_demarshal_int32),
10492 (_dbus_demarshal_uint32), (_dbus_marshal_test):
10493 * dbus/dbus-marshal.h:
10494 * dbus/dbus-protocol.h:
10495 * dbus/dbus-test.c: (main):
10496 * dbus/dbus-test.h:
10497 Add un-optimized marshalling/demarshalling routines.
10499 2002-12-25 Harri Porten <porten@kde.org>
10501 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
10503 2002-12-24 Zack Rusin <zack@kde.org>
10505 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
10506 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
10509 2002-12-24 Havoc Pennington <hp@pobox.com>
10511 * glib/dbus-gthread.c: fix include
10513 * glib/dbus-glib.h: rename DBusMessageHandler for now.
10514 I think glib API needs to change, though, as you don't
10515 want to use DBusMessageFunction, you want to use the
10516 DBusMessageHandler object. Probably
10517 dbus_connection_open_with_g_main_loop()
10518 and dbus_connection_setup_g_main_loop() or something like that
10519 (but think of better names...) that just create a connection
10520 that has watch/timeout functions etc. already set up.
10522 * dbus/dbus-connection.c
10523 (dbus_connection_send_message_with_reply): new function just to
10524 show how the message handler helps us deal with replies.
10526 * dbus/dbus-list.c (_dbus_list_remove_last): new function
10528 * dbus/dbus-string.c (_dbus_string_test): free a string that
10531 * dbus/dbus-hash.c: use memory pools for the hash entries
10532 (rebuild_table): be more paranoid about overflow, and
10533 shrink table when we can
10534 (_dbus_hash_test): reduce number of sprintfs and write
10535 valid C89. Add tests for case where we grow and then
10536 shrink the hash table.
10538 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
10540 * dbus/dbus-connection.c (dbus_connection_register_handler)
10541 (dbus_connection_unregister_handler): new functions
10543 * dbus/dbus-message.c (dbus_message_get_name): new
10545 * dbus/dbus-list.c: fix docs typo
10547 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
10548 an object representing a handler for messages.
10550 2002-12-16 Anders Carlsson <andersca@codefactory.se>
10552 * glib/dbus-glib.h:
10553 * glib/dbus-gthread.c: (dbus_gthread_init):
10554 Don't use the gdbus prefix for public functions.
10556 2002-12-16 Anders Carlsson <andersca@codefactory.se>
10560 Add GLib checks and fixup .pc files
10562 * glib/Makefile.am:
10563 * glib/dbus-glib.h:
10564 * glib/dbus-gmain.c: (gdbus_connection_prepare),
10565 (gdbus_connection_check), (gdbus_connection_dispatch),
10566 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
10567 (dbus_connection_gsource_new):
10568 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
10569 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
10570 * glib/test-dbus-glib.c: (message_handler), (main):
10573 2002-12-15 Harri Porten <porten@kde.org>
10575 * autogen.sh: check for libtoolize before attempting to use it
10577 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
10580 * .cvsignore: ignore more stamp files
10582 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
10584 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
10585 without make install.
10587 2002-12-15 Havoc Pennington <hp@pobox.com>
10589 * dbus/dbus-threads.c: add thread stubs that a higher library
10590 layer can fill in. e.g. the GLib wrapper might fill them in with
10591 GThread stuff. We still need to use this thread API to
10592 thread-safe-ize the library.
10594 2002-12-12 Havoc Pennington <hp@pobox.com>
10596 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
10597 below new interfaces and include fewer system headers.
10599 * dbus/dbus-sysdeps.c (_dbus_read): new function
10600 (_dbus_write): new function
10601 (_dbus_write_two): new function
10602 (_dbus_connect_unix_socket): new function
10603 (_dbus_listen_unix_socket): new function
10605 * dbus/dbus-message-internal.h: change interfaces to use
10608 2002-12-11 Havoc Pennington <hp@pobox.com>
10610 * dbus/dbus-types.h: add dbus_unichar
10612 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
10614 * dbus/dbus-connection.c (dbus_connection_send_message): return
10617 * dbus/dbus-transport.c: include dbus-watch.h
10619 * dbus/dbus-connection.c: include dbus-message-internal.h
10621 * HACKING: add file with coding guidelines stuff.
10623 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
10624 handling here, for security purposes (as in vsftpd). Not actually
10625 using this class yet.
10627 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
10628 system/libc usage here, as in vsftpd, for ease of auditing (and
10629 should also simplify portability). Haven't actually moved all the
10630 system/libc usage into here yet.
10632 2002-11-25 Havoc Pennington <hp@pobox.com>
10634 * dbus/dbus-internals.c (_dbus_verbose): fix to not
10635 always print the first verbose message.
10637 2002-11-24 Havoc Pennington <hp@pobox.com>
10639 * test/echo-client.c, test/echo-server.c: cheesy test
10642 * configure.in (AC_CHECK_FUNCS): check for writev
10644 * dbus/dbus-message.c (_dbus_message_get_network_data): new
10647 * dbus/dbus-list.c (_dbus_list_foreach): new function
10649 * dbus/dbus-internals.c (_dbus_verbose): new function
10651 * dbus/dbus-server.c, dbus/dbus-server.h: public object
10652 representing a server that listens for connections.
10654 * dbus/.cvsignore: create
10656 * dbus/dbus-errors.h, dbus/dbus-errors.c:
10657 public API for reporting errors
10659 * dbus/dbus-connection.h, dbus/dbus-connection.c:
10660 public object representing a connection that
10661 sends/receives messages. (Same object used for
10662 both client and server.)
10664 * dbus/dbus-transport.h, dbus/dbus-transport.c:
10665 Basic abstraction for different kinds of stream
10666 that we might read/write messages from.
10668 2002-11-23 Havoc Pennington <hp@pobox.com>
10670 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
10673 * dbus/dbus-test.c (main): add list test, and include
10674 dbus-test.h as intended
10676 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
10677 (_dbus_hash_table_remove_int): return value indicates
10678 whether the entry existed to remove
10680 * dbus/dbus-list.c: add linked list utility class,
10681 with docs and tests
10683 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
10686 2002-11-23 Havoc Pennington <hp@pobox.com>
10688 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
10689 DBUS_END_DECLS to nothing, that should fix this once and for all
10691 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
10693 * dbus/dbus-message.c, dbus/dbus-hash.c:
10694 add some missing @brief
10696 2002-11-23 Havoc Pennington <hp@pobox.com>
10698 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
10699 to avoid confusing Doxygen
10701 * dbus/dbus-hash.c: @} not }@
10703 * dbus/dbus-message.c (struct DBusMessage): split out
10706 2002-11-23 Havoc Pennington <hp@pobox.com>
10708 * configure.in: pile on more warning flags if using gcc
10710 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
10711 to document static functions
10713 * configure.in: add summary to end of configure so it
10714 looks nice and attractive
10716 * dbus/dbus-hash.c: finish implementation and write unit
10719 * configure.in: add --enable-tests to enable unit tests
10721 * dbus/dbus-test.c: test program to run unit tests
10722 for all files in dbus/*, initially runs a test for
10725 * dbus/dbus-internals.h: file to hold some internal utility stuff
10727 2002-11-22 Havoc Pennington <hp@redhat.com>
10729 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
10730 "ported" away from Tcl
10732 * dbus/dbus-types.h: header for types such as dbus_bool_t
10734 2002-11-22 Havoc Pennington <hp@redhat.com>
10736 * dbus/dbus.h: fixups for doc warnings
10738 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
10740 (QUIET): make it quiet so we can see warnings
10742 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
10744 2002-11-22 Havoc Pennington <hp@redhat.com>
10746 * Makefile.am: include "Doxyfile" target in all-local
10748 * configure.in: generate the Doxyfile
10750 * Doxyfile.in: move Doxyfile here, so we can use
10751 configure to generate a Doxyfile with the right
10752 version number etc.
10754 2002-11-22 Havoc Pennington <hp@redhat.com>
10756 * dbus/dbus-message.c: move inline docs into .c file
10758 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
10759 so all docs are under doc/
10760 (MAN_EXTENSION): generate man pages. Use extension
10761 ".3dbus" which matches ".3qt" on my system,
10762 I guess this is OK, I don't know really.
10763 (FILE_PATTERNS): look for .c files not .h, makes sense
10764 for plain C I think
10766 2002-11-22 Havoc Pennington <hp@pobox.com>
10768 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
10769 because any app can be a server, and any app can be a client,
10770 the bus is a special kind of server.
10772 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
10774 * Doxyfile : adding. Still needs Makefile rules to be generated
10775 automatically (just run "doxygen" in the toplevel dir for now to
10778 * dbus/dbus-message.h : Adding sample docs (javadoc since
10779 resembles gtk-doc a little more)
10781 * dbus/dbus.h : Adding sample docs
10783 2002-11-21 Havoc Pennington <hp@redhat.com>
10785 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
10786 so we can allow ourselves to include files directly,
10787 instead of having to use dbus.h
10789 * dbus/dbus.h: fill in
10791 * dbus/dbus-message.h: sketch out a sample header file.
10792 Include griping if you include it directly instead of
10795 * dbus/dbus-macros.h: new file with macros for extern "C",
10796 TRUE/FALSE, NULL, etc.
10798 * doc/file-boilerplate.c: put include guards in here
10800 2002-11-21 Havoc Pennington <hp@redhat.com>
10802 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
10804 * COPYING: include the GPL as well, and license code
10805 under both AFL and GPL.
10807 2002-11-21 Havoc Pennington <hp@redhat.com>
10809 * acconfig.h: get rid of this
10811 * autogen.sh (run_configure): add --no-configure option
10813 * configure.in: remove AC_ARG_PROGRAM to make
10814 autoconf complain less. add AC_PREREQ.
10815 add AC_DEFINE third arg.
10817 2002-11-21 Anders Carlsson <andersca@codefactory.se>
10820 Fix references so we can distcheck.
10822 2002-11-21 Havoc Pennington <hp@redhat.com>
10824 * Initial module creation