1 2005-02-24 Colin Walters <walters@verbum.org>
3 * dbus/dbus-signature.c: New file; implements various functions
4 related to type signatures. Includes an interator for parsing,
6 (dbus_type_is_basic): Moved here from
7 dbus-marshal-basic.c:_dbus_type_is_basic.
8 (dbus_type_is_container): Moved here from
9 dbus-marshal-basic.c:_dbus_type_is_container.
11 All callers of _dbus_type_is_container and _dbus_type_is_basic
12 updated, and include dbus-signature.h.
14 * dbus/dbus-signature.h: New file; prototypes for the above.
16 * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
19 * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
20 function factored out of _dbus_first_type_in_signature.
21 (_dbus_first_type_in_signature_c_str): New function; returns first
22 type code for a type signature character.
24 * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
25 handle function moves.
27 * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
29 * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
30 function; skips to next complete type in type signature.
31 Implemented using previous skip_one_complete_type. Now
32 skip_one_complete_type just delegates to
33 _dbus_type_signature_next.
35 * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
37 (_dbus_type_is_container): Ditto.
39 * doc/dbus-specification.xml: Update introspection sample to
40 use real type signatures.
42 * dbus/dbus-test.h: Prototype signature test.
44 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
47 * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
49 2005-02-23 John (J5) Palmieri <johnp@redhat.com>
51 * python/dbus_bindings.pyx.in (PendingCall::get_reply):
52 s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
54 2005-02-21 Colin Walters <walters@verbum.org>
56 * dbus/dbus-test-main.c (main): Take optional specific test
59 * dbus/dbus-test.c (run_test): New function, runs a test function
60 with no data directory.
61 (run_data_test): Like above, but takes data directory.
62 (dbus_internal_do_not_use_run_tests): Take
63 specific test argument. Replace lots of cut n' paste code
64 with run_test and run_data_test.
66 * dbus/dbus-test.h: Update prototype for
67 dbus_internal_do_not_use_run_tests.
69 2005-02-20 Havoc Pennington <hp@redhat.com>
71 Fix bugs reported by Daniel P. Berrange
73 * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
74 (protected_change_watch): new function
75 (_dbus_server_toggle_watch, _dbus_server_remove_watch)
76 (_dbus_server_add_watch): change to work like the
77 dbus-connection.c equivalents; like those, probably kind of
78 busted, but should at least mostly work for now
79 (dbus_server_disconnect): drop the lock if we were already
80 disconnected, patch from Daniel P. Berrange
82 * dbus/dbus-server.c (_dbus_server_toggle_timeout)
83 (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
86 * doc/TODO: todo about unscrewing this mess
88 2005-02-19 Colin Walters <walters@verbum.org>
90 * glib/dbus-binding-tool-glib.c
91 (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
93 * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
94 as errno.h and sys/stat.h.
95 (lose): New function, prints error with
97 (lose_gerror): Similar, but takes GError for message.
98 (main): Add --output argument to specify output file to write to,
99 instead of always printing to stdout. In this mode, determine
100 timestamps on source files to see whether any are newer than the
101 target file. If not, exit. Also convert a number of error
102 messages to use lose (since it's shorter), and switch to using
103 g_io_channel_shutdown.
105 2005-02-19 Havoc Pennington <hp@redhat.com>
107 * glib/dbus-gobject.c
108 (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
110 * glib/dbus-glib.c: fix doxygen warnings
112 * glib/dbus-gparser.c (parse_annotation): error if an annotation
115 2005-02-17 Colin Walters <walters@verbum.org>
117 * glib/dbus-gobject.h: Don't export
118 _dbus_glib_marshal_dbus_message_to_gvalue_array.
120 * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
121 (invoke_object_method): Handle it.
123 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
126 2005-02-17 Colin Walters <walters@verbum.org>
128 * bus/.cvsignore, doc/.cvsignore
129 * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
132 2005-02-17 Colin Walters <walters@verbum.org>
134 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
135 Rename to DBUS_SERVICE_DBUS.
136 (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
137 (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
138 Change the value from "org.freedesktop.Local"
139 to "org.freedesktop.DBus.Local".
140 (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
141 (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
142 DBUS_INTERFACE_INTROSPECTABLE.
143 Change the value from "org.freedesktop.Introspectable"
144 to "org.freedesktop.DBus.Introspectable".
145 (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
146 DBUS_INTERFACE_PROPERTIES.
147 Change the value from "org.freedesktop.Properties"
148 to "org.freedesktop.DBus.Properties".
149 (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
151 Change the value from "org.freedesktop.Peer"
152 to "org.freedesktop.DBus.Peer".
153 (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
154 DBUS_INTERFACE_LOCAL.
155 Change the value from "org.freedesktop.Local"
156 to "org.freedesktop.DBus.Local".
158 All other users of those constants have been changed.
160 * bus/driver.c (bus_driver_handle_introspect): Use constants.
162 * glib/dbus-gobject.c (handle_introspect): Use constants.
164 * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
166 2005-02-17 Colin Walters <walters@verbum.org>
168 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
169 (parse_node, parse_interface, parse_method, parse_signal)
170 (parse_property, parse_annotation): Lose if we're currently in an
172 (parse_annotation): New function.
173 (parser_start_element, parser_end_element): Handle annotation.
174 (parse_method, parse_interface): Remove support for c_name attribute,
175 switch to annotations.
177 * glib/dbus-gidl.h (interface_info_get_binding_names)
178 (method_info_get_binding_names)
179 (interface_info_get_binding_name, method_info_get_binding_name)
180 (interface_info_set_binding_name, method_info_set_binding_name):
182 (interface_info_get_annotations, method_info_get_annotations)
183 (interface_info_get_annotation, method_info_get_annotation)
184 (interface_info_add_annotation, method_info_add_annotation):
187 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
189 (struct MethodInfo): Ditto.
190 Straightfoward conversion of binding methods into annotation methods
193 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
195 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
197 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
198 Use new annotation API.
200 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
203 * doc/dbus-specification.xml: Discuss introspection annotations,
204 include list of well-known annotations.
206 * test/glib/test-service-glib.xml: Make validate against new DTD.
208 2005-02-17 Colin Walters <walters@verbum.org>
210 This patch is based on initial work from
211 Paul Kuliniewicz <kuliniew@purdue.edu>.
213 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
214 initialization of GValue from dbus type to here.
215 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
216 for the "glib-genmarshal" program from a DBus type.
217 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
218 into the C name for it we use in the glib bindings.
219 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
220 glib C type (not GValue).
221 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
223 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
226 * glib/dbus-gutils.h: Prototype it.
228 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
229 (marshal_dbus_message_to_g_marshaller): Use new shared function
230 dbus_glib_marshal_dbus_message_to_gvalue_array.
232 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
233 Will be changed once we have annotations.
235 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
236 GStaticRWLock. Callers updated.
237 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
238 (string_table_next): New function for iterating over zero-terminated
240 (string_table_lookup): New function; retrieves specific entry in
242 (get_method_data): New function; look up method data in object data chunk.
243 (object_error_domain_prefix_from_object_info)
244 (object_error_code_from_object_info): New functions, but not implemented yet.
245 (method_interface_from_object_info): New function; retrieve interface name.
246 (method_name_from_object_info): New function; retrieve method name.
247 (method_arg_info_from_object_info): New function; retrieve argument data.
248 (arg_iterate): New function; iterates over serialized argument data.
249 (method_dir_signature_from_object_info): New function; returns a
250 GString holding type signature for arguments for just one
251 direction (input or output).
252 (method_input_signature_from_object_info)
253 (method_output_signature_from_object_info): New functions.
254 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
255 converts dbus message arguments into a GValue array. Used for both
256 signal handling and method invocation.
257 (struct DBusGlibWriteIterfaceData): New utility structure.
258 (write_interface): New function; generate introspection XML for
260 (introspect_interfaces): New function; gathers all interface->methods,
261 generates introspection XML for them.
262 (handle_introspect): Invoke introspect_interfaces.
263 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
264 (lookup_object_and_method): New function; examines an incoming message
265 and attempts to match it up (via interface, method name, and argument
266 signature) with a known object and method.
267 (gerror_domaincode_to_dbus_error_name): New function; converts a
268 GError domain and code into a DBus error name. Needs GError data
269 added to object introspection to work well.
270 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
272 (invoke_object_method): New function to invoke an object method
273 looked up via lookup_object_and_method. Parses the incoming
274 message, turns it into a GValue array, then invokes the marshaller
275 specified in the DBusGMethodInfo. Creates a new message with
276 either return values or error message as appropriate.
277 (gobject_message_function): Invoke lookup_object_and_method and
278 invoke_object_method.
280 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
281 (enum DBusBindingOutputMode): New enum for binding output modes.
282 (pretty_print): Print binding names.
283 (dbus_binding_tool_error_quark): GError bits.
285 (main): Create GIOChannel for output. Parse new --mode argument,
286 possible values are "pretty-print", "glib-server", "glib-client".
287 Use mode to invoke appropriate function.
289 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
291 * glib/dbus-glib-tool.h: New header, just includes GError bits
294 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
295 maps binding style to name.
296 (struct MethodInfo): Ditto.
297 (get_hash_keys, get_hash_key): Utility function, returns keys for
299 (interface_info_new, method_info_new): Initialize bindings.
300 (interface_info_unref, method_info_unref): Destroy bindings.
301 (method_info_get_binding_names, method_info_get_binding_name)
302 (interface_info_get_binding_names, interface_info_get_binding_name):
303 Functions for retrieving binding names.
304 (method_info_set_binding_name, interface_info_set_binding_name):
305 Functions for setting binding names.
307 * glib/dbus-binding-tool-glib.h: New file, has prototypes
308 for glib binding generation.
310 * glib/dbus-binding-tool-glib.c: New file, implements server-side
311 and client-side glib glue generation.
313 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
314 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
317 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
318 of using GClosureMarshal directly.
319 (struct DBusGObjectInfo): Add n_infos member.
321 * test/glib/test-service-glib.xml: New file; contains introspection data
322 for MyTestObject used in test-service-glib.c.
324 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
325 (my_object_do_nothing, my_object_increment, my_object_throw_error)
326 (my_object_uppercase, my_object_many_args): New test methods.
327 (main): Use dbus_g_object_class_install_info to include generated object
330 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
331 as well as client-side bindings.
333 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
334 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
335 using both the dbus_gproxy stuff directly as well as the generated bindings.
337 2005-02-15 Havoc Pennington <hp@redhat.com>
339 * dbus/dbus-connection.c (dbus_connection_dispatch): always
340 complete a pending call, don't run filters first.
342 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
343 dbus_pending_call_steal_reply
345 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
346 _dbus_connection_block_pending_call
347 (dbus_pending_call_get_reply): change to steal_reply and return a
350 * dbus/dbus-connection.c
351 (dbus_connection_send_with_reply_and_block): port to work in terms
353 (_dbus_connection_block_pending_call): replace block_for_reply
356 2005-02-14 Havoc Pennington <hp@redhat.com>
358 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
359 properly handle looking up group information by name; fix
362 2005-02-13 Havoc Pennington <hp@redhat.com>
364 * dbus/dbus-connection.c (dbus_connection_return_message)
365 (dbus_connection_borrow_message): hold dispatch lock while message
367 (_dbus_connection_block_for_reply): hold dispatch lock while we
368 block for the reply, so nobody steals our reply
369 (dbus_connection_pop_message): hold the dispatch lock while we
372 2005-02-13 Havoc Pennington <hp@redhat.com>
374 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
375 (_dbus_connection_release_dispatch)
376 (_dbus_connection_acquire_io_path)
377 (_dbus_connection_release_io_path): make the mutex and condvar
378 control access to the "acquired" flag. Drop the connection lock
379 while waiting on the condvar. Hopefully these are baby steps in
380 roughly the right direction.
382 2005-02-13 Havoc Pennington <hp@redhat.com>
384 * dbus/dbus-connection.c: use separate mutexes for the condition
385 variables; this is some kind of baseline for sanity, but the
386 condition variables still aren't used correctly afaict
388 2005-02-13 Havoc Pennington <hp@redhat.com>
390 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
393 * dbus/dbus-connection.c
394 (_dbus_connection_detach_pending_call_unlocked): add this
396 Initial semi-correct pass through to fix thread locking; there are
397 still some issues with the condition variable paths I'm pretty
400 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
403 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
404 rename to add _unlocked
405 (struct DBusConnection): move "dispatch_acquired" and
406 "io_path_acquired" to use only one bit each.
407 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
408 (dbus_connection_set_watch_functions): hacky fix to reentrancy
409 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
410 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
411 (_dbus_connection_remove_timeout)
412 (_dbus_connection_toggle_timeout): drop lock when calling out to
413 user functions; done in a hacky/bad way.
414 (_dbus_connection_send_and_unlock): add a missing unlock
415 (_dbus_connection_block_for_reply): add a missing unlock
417 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
418 drop lock in a hacky probably unsafe way to call out to user
421 2005-02-12 Havoc Pennington <hp@redhat.com>
423 * tools/dbus-tree-view.c (info_set_func_text): display more
426 * bus/driver.c (bus_driver_handle_list_services): list the bus
429 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
431 * glib/dbus-gidl.c (signal_info_get_n_args): new function
432 (method_info_get_n_args): new function
434 2005-02-12 Havoc Pennington <hp@redhat.com>
436 * bus/driver.c (bus_driver_handle_introspect): add introspection
439 2005-02-12 Havoc Pennington <hp@redhat.com>
441 * bus/driver.c: put the signature of each bus driver method in the
442 table of handlers and check it on incoming calls; this isn't
443 really useful, but going to add introspect support in a minute.
445 2005-02-11 Joe Shaw <joeshaw@novell.com>
447 * mono/Connection.cs: The unpredictability of finalizers in mono
448 prevents us from deterministically disconnecting the filters from
449 the Service class's finalizer, so move tracking of filters and
450 matches here. Add API for that.
452 * mono/Service.cs: Remove the code, add code which calls the
453 methods now on the Connection class.
455 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
457 * python/dbus.py (class Sender): added to support dbus signals better
458 (Bus::add_signal_receiver): added expand_args parameter which defaults
459 to True. When expand args is True the signal handler will pass the
460 message arguments as parameters to the signal handler. If False
461 revert to previous behavior where the signal handler must get the
462 argument list from the message. This is to help port applications
463 like HAL that have a tendancy to send variable length argument lists.
464 self._match_rule_to_receivers is now a dict of dicts.
465 (Bus::remove_signal_receiver): pop handler off the dict intead of
466 removing it from a list
467 (Bus::_signal_func): change signal handlers so that interface,
468 signal_name, service, path and message are packed into a Sender
469 object and that is passed to the handler. If expand_args is True
470 extract the args list from the message and append it to the parameter
473 * python/dbus_bindings.pyx.in (class Signature): added to support
475 (MessageIter::__init__): changed iteration limit to match D-BUS
476 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
477 STRUCT and VARIENT type support
478 (MessageIter::python_value_to_dbus_sig): made recursive to support
480 (MessageIter::append*): added Signature, dict, tuple
483 * python/examples/example-client.py: added examples of getting tuples
486 * python/examples/example-service.py: added examples of sending tuples
489 * python/examples/example-signal-recipient.py: Fixed to handle new
490 signal callback format
492 2005-02-10 Havoc Pennington <hp@redhat.com>
494 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
495 (call dbus_g_proxy_add_signal)
497 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
499 (_dbus_server_new_for_domain_socket): escape the path
501 * dbus/dbus-address.c (dbus_address_escape_value): new
502 (dbus_address_unescape_value): new
503 (dbus_parse_address): unescape values
505 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
507 * doc/dbus-specification.xml: explain how to escape values in
510 2005-02-10 Havoc Pennington <hp@redhat.com>
512 * dbus/dbus-message-factory.c (generate_special): modify test to
513 avoid using a non-basic dict key
515 * dbus/dbus-marshal-validate-util.c: add test for the below
517 * doc/dbus-specification.xml: require that dict keys are a basic
520 * dbus/dbus-marshal-validate.c
521 (_dbus_validate_signature_with_reason): require that dict key is a
524 2005-02-10 Havoc Pennington <hp@redhat.com>
526 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
527 change to be _and_unlock instead of _unlocked
529 * dbus/dbus-connection.c
530 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
531 have no_update so we can find this bug quickly in future
533 2005-02-10 Havoc Pennington <hp@redhat.com>
535 * dbus/dbus-message-util.c (verify_test_message): tests for string
538 * dbus/dbus-message.c (dbus_message_append_args_valist): add
539 support for arrays of string/signature/path
541 2005-02-10 Joe Shaw <joeshaw@novell.com>
543 * dbus/dbus-connection.c
544 (_dbus_connection_queue_received_message_link,
545 _dbus_connection_message_sent): Add the path to
547 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
548 _dbus_connection_send_preallocated_unlocked(), updated the
549 dispatch status, and unlocks. Fixes a bug where certain
550 situations (like a broken pipe) could cause a Disconnect message
551 to not be sent, tricking the bus into thinking a service was still
552 there when the process had quit.
553 (_dbus_connection_send_preallocated): Call
554 _dbus_connection_send_preallocated_and_unlock().
555 (_dbus_connection_send_and_unlock): Added. Calls
556 _dbus_connection_send_preallocated_and_unlock().
557 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
558 (dbus_connection_send_with_reply): Update the dispatch status and
561 * mono/Service.cs (~Service): Added. Removes the filter so that
562 we don't get unmanaged code calling back into a GCed delegate.
563 (RemoveFilter); Added.
565 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
567 * dbus/dbus-message.c (dbus_message_iter_open_container):
568 - Removed check for iterator type being an array because
569 get_arg_type does not work with writer iterators
570 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
572 2005-02-07 Havoc Pennington <hp@redhat.com>
574 * doc/dbus-specification.xml: some more language cleanups; add
575 stuff about how to deal with invalid protocol and extension
576 points; add _ to allowed chars in auth commands; add EXTENSION_
579 2005-02-06 Havoc Pennington <hp@redhat.com>
581 * s/expected/required/ in a couple places for clarity
583 2005-02-07 Colin Walters <walters@verbum.org>
585 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
586 sender or proposed_recipient.
588 2005-02-06 Havoc Pennington <hp@redhat.com>
590 * dbus/dbus-message-factory.c (generate_special): more tests
592 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
593 array length that exceeds the maximum
595 2005-02-05 Havoc Pennington <hp@redhat.com>
597 * dbus/dbus-message-factory.c (generate_special): more test cases,
600 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
601 reason why a signature was invalid
603 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
604 skip the length of the string before we look at it in validation
606 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
609 * dbus/dbus-message.c (_dbus_message_loader_new): default
610 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
612 2005-02-05 Havoc Pennington <hp@redhat.com>
614 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
615 if the signature of a variant was empty
616 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
617 struct with no element type)
619 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
620 mangled messages to break things
622 2005-02-04 Havoc Pennington <hp@redhat.com>
624 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
625 g_quark_try_string() so it actually can return 0
626 (dbus_g_proxy_connect_signal): ditto
628 2005-02-04 Havoc Pennington <hp@redhat.com>
630 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
632 (tristring_from_message): assert cleanly on null path/interface
633 (should not be possible though I decided later)
634 (dbus_g_proxy_dispose): move proxy manager unregistration here
635 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
636 g_return_if_fail() checks
638 2005-02-04 Havoc Pennington <hp@redhat.com>
640 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
642 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
643 (with some minor changes)
645 * doc/dbus-specification.xml: add deprecated attribute to
648 2005-01-31 Havoc Pennington <hp@redhat.com>
650 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
651 think it's sort of right
653 2005-01-30 Havoc Pennington <hp@redhat.com>
655 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
657 2005-01-30 Havoc Pennington <hp@redhat.com>
659 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
661 * autogen.sh: change to autotools 1.9
663 * glib/dbus-gproxy.c: completely change how signals work
664 (dbus_g_proxy_add_signal): new function to specify signature of a
666 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
667 and g_warning if the incoming message has the wrong signature.
669 2005-01-30 Havoc Pennington <hp@redhat.com>
671 * tools/dbus-names-model.c (have_names_notify): fix this
673 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
674 up the string array handling a bit
676 2005-01-30 Havoc Pennington <hp@redhat.com>
678 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
679 (dbus_g_pending_call_cancel): new function
681 * dbus/dbus-glib.h: move GType decls for connection/message here;
682 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
683 here, just kind of rationalizing how we handle all that
685 * tools/dbus-names-model.c: new file for a tree model listing the
688 * tools/dbus-tree-view.c (model_new): use proper typing on the
691 2005-01-30 Havoc Pennington <hp@redhat.com>
693 * glib/dbus-gmain.c: add a custom GSource back that just checks
694 whether the message queue has anything in it; otherwise, there are
695 cases where we won't see messages in the queue since there was no
696 IO visible to the glib main loop
698 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
699 increase default message timeout to 25 seconds
701 2005-01-30 Havoc Pennington <hp@redhat.com>
703 * test/glib/test-profile.c (no_bus_stop_server): remove the
704 warning about the g_warning that I just fixed
706 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
707 custom source, seems to be a lot easier to understand and work
710 2005-01-30 Havoc Pennington <hp@redhat.com>
712 I think this main loop thing is conceptually broken, but here are
713 some band aids. I'll maybe rewrite it in a minute.
715 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
716 custom GSource, so don't pass it in; confusing
717 (gsource_server_finalize, gsource_connection_finalize): add
718 finalize handlers that remove all the watches.
720 2005-01-30 Havoc Pennington <hp@redhat.com>
722 * glib/dbus-gobject.c (introspect_properties): fix the XML
725 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
726 which effectively detects the use of freed messages
728 * glib/dbus-gobject.c (handle_introspect): modify and return the
729 reply message instead of the incoming message
731 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
732 gee, maybe it should SEND THE XML instead of just making a string
733 and freeing it again ;-)
735 * tools/dbus-print-message.c (print_message): improve printing of
738 * configure.in: add debug-glib.service to the output
740 2005-01-30 Havoc Pennington <hp@redhat.com>
742 dbus-viewer introspected and displayed the bus driver
744 * dbus/dbus-object-tree.c
745 (object_tree_test_iteration): add tests for a handler registered on "/"
747 * dbus/dbus-object-tree.c
748 (_dbus_decompose_path): fix to handle path "/" properly
749 (run_decompose_tests): add tests for path decomposition
751 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
754 * glib/dbus-gobject.c (handle_introspect): fix quotes
756 * test/glib/run-test.sh: support launching the bus, then running
759 * test/glib/test-service-glib.c (main): put in a trivial gobject
760 subclass and register it on the connection
762 * bus/driver.c (bus_driver_handle_introspect): implement
763 introspection of the bus driver service
765 * dbus/dbus-protocol.h: add #defines for the XML namespace,
766 identifiers, doctype decl
768 * bus/driver.c (bus_driver_handle_get_service_owner): handle
769 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
770 returning the service unchanged.
771 (bus_driver_handle_message): remove old check for reply_serial in
772 method calls, now the message type deals with that
773 (bus_driver_handle_message): handle NULL interface
775 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
777 * glib/dbus-gloader-expat.c (description_load_from_string): allow
780 * tools/dbus-viewer.c: add support for introspecting a service on
783 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
784 (dbus_g_pending_call_unref): add
786 2005-01-29 Havoc Pennington <hp@redhat.com>
788 * tools/dbus-tree-view.c: add support for displaying properties.
789 (run dbus-viewer with an introspect xml file as arg, then resize
790 the window so the tree elements show up, not sure what that is)
792 * glib/dbus-gobject.c (handle_introspect): return
793 org.freedesktop.Properties and org.freedesktop.Introspectable
794 interfaces when we are introspected.
796 * doc/dbus-specification.xml: allow empty interface name when
799 2005-01-29 Havoc Pennington <hp@redhat.com>
801 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
802 though it uses glib, it could be extended for any binding in
805 * glib/dbus-gobject.c (gobject_message_function): change to the
806 new way properties work
808 * dbus/dbus-protocol.h: add the new interfaces
810 * doc/dbus-specification.xml: document the introspection format,
811 Introspectable interface, and add an org.freedesktop.Properties
814 * glib/dbus-gparser.c: add support for a <property> element
816 * glib/dbus-gidl.c: add PropertyInfo
818 * glib/dbus-gobject.c (handle_introspect): put the outermost
819 <node> outside the signal and property descriptions.
820 (introspect_properties): export properties as <property> rather
823 2005-01-28 Havoc Pennington <hp@redhat.com>
825 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
826 related to authentication protocol
828 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
830 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
831 - BUS_ACTIVATION -> BUS_STARTER
832 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
833 - class MessageIter (__init__): Added recursion checking
834 so we throw a nice error instead of just disconnecting from the
836 (get): Added arg_type parameter for recursion.
838 Added signiture type placeholder (not implemented)
839 Added struct type placeholder (not implemented)
840 Added varient type placeholder (not implemented)
841 Commented out dict type for now
842 (get_element_type): renamed from get_array_type
843 (get_*): changed to use the dbus_message_iter_get_basic API
844 (get_*_array): removed in favor of recursive get_array method
845 (get_array): new recursive method which calls get to marshal
846 the elements of the array
847 (value_to_dbus_sig): New method returns the corrasponding
848 dbus signiture to a python value
849 (append): Comment out dict handling for now
850 Handle lists with the new recursive API
851 Comment out None handling for now
852 (append_nil): removed
853 (append_*): changed to use dbus_message_iter_append_basic API
854 (append_*_array): removed in favor of recursive append_array
856 (__str__): Make it easier to print out recursive iterators
858 - class Message (__str__): moved type inspection to the
859 MessageIter class' __str__ method
860 (get_iter): Added an append parameter wich defaults to False
861 If True use the new API's to create an append iterator
863 * python/dbus.py: Update to use new bindings API
864 - TYPE_ACTIVATION -> TYPE_STARTER
865 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
866 - class ActivationBus -> class StarterBus
867 - class RemoteObject (__call__): get an append iterator
868 - (_dispatch_dbus_method_call): get an append iterator
869 - class Object (emit_signal): get an append iterator
871 * python/examples/: Fixed up the examples to work with the new API
873 2005-01-28 Joe Shaw <joeshaw@novell.com>
875 * configure.in: Bump version up to 0.30.
877 * HACKING: Add a release item to bump the version number up after
880 2005-01-28 Havoc Pennington <hp@redhat.com>
882 * doc/dbus-specification.xml: update to describe 16-bit types and
885 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
888 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
891 * dbus/dbus-marshal-recursive.c: implement
893 2005-01-27 Havoc Pennington <hp@redhat.com>
895 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
897 * configure.in: find the right type for 16 and 32 bit ints as well
900 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
901 the 16-bit types so people don't have to stuff them in 32-bit or
904 2005-01-27 Havoc Pennington <hp@redhat.com>
906 * dbus/dbus-message.c: byteswap the message if you init an
907 iterator to read/write from it
909 * dbus/dbus-marshal-byteswap.c: new file implementing
910 _dbus_marshal_byteswap()
912 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
914 2005-01-26 Havoc Pennington <hp@redhat.com>
916 * dbus/dbus-marshal-validate-util.c: break this out (and fix
917 build, apparently - nobody noticed?)
919 2005-01-26 Havoc Pennington <hp@redhat.com>
921 * dbus/dbus-marshal-recursive.h: remove todo comment
923 2005-01-25 Joe Shaw <joeshaw@novell.com>
925 * Land the mono binding changes to conform to the new APIs.
927 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
928 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
930 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
931 type code as a string.
932 (InitAppending): Rename dbus_message_append_iter_init() to
933 dbus_message_iter_init_append().
935 * mono/BusDriver.cs: Rename ServiceEventHandler to
936 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
937 Rename ServiceOwnerChanged to NameOwnerChanged.
939 * mono/Connection.cs: Rename BaseService to UniqueName, and the
942 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
944 * mono/Service.cs: Rename Exists to HasOwner, internally rename
945 dbus_bus_acquire_service() to dbus_bus_request_name().
947 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
948 of Type.UnderlyingSystemType to get the correct element type for
950 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
951 dbus_message_get_{element|arg}_type() instead of
952 dbus_message_iter_init_array_iterator().
953 (Append): Replace dbus_message_iter_append_array() with
954 dbus_message_iter_open_container() and
955 dbus_message_iter_close_container().
957 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
958 types have been removed.
960 * mono/DBusType/*.cs: Replace calls of
961 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
962 but specify the type in the DllImport extern declaration. Ditto
963 for dbus_message_iter_append_[type]() ->
964 dbus_message_iter_append_basic().
966 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
967 NameOwnerChangedHandler.
969 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
971 * python/dbus_bindings.pyx.in: Rename of methods and bindings
972 - get_base_service -> get_unique_name
973 - bus_get_base_service -> bus_get_unique_name
974 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
975 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
976 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
977 - bus_activate_service -> bus_start_service_by_name
978 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
979 - bus_acquire_service -> bus_request_name
980 - dbus_bus_acquire_service -> dbus_bus_request_name
981 - bus_service_exists -> bus_name_has_owner
982 - dbus_bus_service_exists -> dbus_bus_name_has_owner
984 * python/dbus.py: Rename of methods
985 - activate_service -> start_service_by_name
986 - bus_acquire_service -> bus_request_name
987 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
988 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
991 2005-01-24 Joe Shaw <joeshaw@novell.com>
993 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
994 signature for the method that can't be found.
996 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
997 the message has any arguments, we need to call
998 _dbus_type_reader_get_current_type(), not
999 _dbus_type_reader_has_next().
1001 2005-01-24 Havoc Pennington <hp@redhat.com>
1003 * dbus/dbus-message-factory.c: more testing of message validation
1005 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
1008 2005-01-23 Havoc Pennington <hp@redhat.com>
1010 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
1011 get this all working, not many tests in the framework yet though
1013 2005-01-22 Havoc Pennington <hp@redhat.com>
1015 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
1016 tutorial, based on work from David Wheeler.
1018 2005-01-21 Havoc Pennington <hp@redhat.com>
1020 * dbus/dbus-bus.c: add more return_if_fail checks
1022 * dbus/dbus-message.c (load_message): have the "no validation"
1023 mode (have to edit the code to toggle the mode for now though)
1025 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
1026 skips all validation; I want to use this at least for benchmark
1027 baseline, I'm not sure if it should be a publicly-available switch.
1029 2005-01-21 Havoc Pennington <hp@redhat.com>
1031 * glib/dbus-gmain.c: don't put the GLib bindings in the same
1032 toplevel doxygen group as the low-level API stuff
1034 * dbus/dbus.h: note that libdbus is the low-level API
1036 2005-01-20 Havoc Pennington <hp@redhat.com>
1038 * update-dbus-docs.sh: script to update docs on the web site, only
1039 works for me though. neener.
1041 2005-01-20 Havoc Pennington <hp@redhat.com>
1043 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
1044 code can reveal bugs in it
1046 2005-01-20 Havoc Pennington <hp@redhat.com>
1048 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
1049 select() version, patches from Tor Lillqvist
1051 2005-01-20 Havoc Pennington <hp@redhat.com>
1053 * doc/dbus-tutorial.xml: replace > with >
1055 * bus/services.c (bus_registry_acquire_service): validate the name
1056 and return a better error if it's no good.
1058 * doc/dbus-specification.xml: note NO_AUTO_START change
1060 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
1061 from AUTO_START, we're toggling the default
1063 * bus/dispatch.c: adapt the tests to change of auto-start default
1065 2005-01-18 Havoc Pennington <hp@redhat.com>
1067 * rename dbus-daemon-1 to dbus-daemon throughout
1069 2005-01-18 Havoc Pennington <hp@redhat.com>
1071 * Throughout, grand renaming to strip out the use of "service",
1072 just say "name" instead (or "bus name" when ambiguous). Did not
1073 change the internal code of the message bus itself, only the
1074 programmer-facing API and messages.
1076 * doc/dbus-specification.xml: further update the message bus section
1078 * bus/config-parser.c (all_are_equiv): fix bug using freed string
1081 2005-01-17 Havoc Pennington <hp@redhat.com>
1083 * dbus/dbus-types.h: remove 16-bit types since we don't use them
1086 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
1087 "invalid name character" not only non-ASCII
1089 * doc/dbus-specification.xml: further update spec, message bus
1090 parts are still out-of-date but the marshaling etc. stuff is now
1093 2005-01-17 Havoc Pennington <hp@redhat.com>
1095 * doc/dbus-specification.xml: partially update spec
1097 2005-01-17 Havoc Pennington <hp@redhat.com>
1099 * Throughout, align variant bodies according to the contained
1100 type, rather than always to 8. Should save a fair bit of space in
1103 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
1104 fix handling of case where p == end
1106 * doc/TODO: remove the dbus_bool_t item and variant alignment items
1108 2005-01-17 Havoc Pennington <hp@redhat.com>
1110 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
1112 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
1113 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
1114 are marshaling/unmarshaling a boolean.
1116 2005-01-16 Havoc Pennington <hp@redhat.com>
1118 This is about it on what can be disabled/deleted from libdbus
1119 easily, back below 150K anyhow. Deeper cuts are more work than
1120 just turning the code off as I've done here.
1122 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
1123 signed int convenience funcs
1125 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
1128 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
1129 things out of libdbus
1131 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
1133 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
1134 tests-enabled-only, though it should probably be deleted)
1136 * dbus/dbus-message-util.c: same stuff
1138 * dbus/dbus-auth-util.c: same stuff
1140 2005-01-16 Havoc Pennington <hp@redhat.com>
1142 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
1144 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
1145 way for stripping down dbus-userdb.c stuff included in libdbus.
1146 Rename _dbus_parse_uid for consistency.
1148 2005-01-16 Havoc Pennington <hp@redhat.com>
1150 * dbus/dbus-internals.c (_dbus_real_assert): print the function
1151 name the assertion failed in
1153 * dbus/dbus-internals.h (_dbus_return_if_fail)
1154 (_dbus_return_val_if_fail): assert that the name of the function
1155 containing the check doesn't start with '_', since we only want to
1156 use checks on public functions
1158 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
1159 checks to assertions
1161 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
1162 change checks to asserts for private function
1164 * dbus/dbus-message.c (_dbus_message_set_serial): checks
1165 to asserts for private function
1167 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
1168 broken assertion that was breaking make check
1169 (_dbus_type_reader_array_is_empty): remove this rather than fix
1170 it, was only used in assertions
1172 2005-01-16 Havoc Pennington <hp@redhat.com>
1174 * test/unused-code-gc.py: hacky script to find code that's used
1175 only by the bus (not libdbus) or used only by tests or not used at
1176 all. It has some false alarms, but looks like we can clean up a
1177 lot of size from libdbus.
1179 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
1180 dbus/Makefile.am: initially move 10K of binary size out of libdbus
1182 2005-01-16 Havoc Pennington <hp@redhat.com>
1184 * Add and fix docs according to Doxygen warnings throughout
1187 * dbus/dbus-marshal-recursive.c
1188 (_dbus_type_reader_array_is_empty): change this to just call
1189 array_reader_get_array_len() and make it static
1191 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
1193 (dbus_message_iter_init_append): rename from append_iter_init
1195 * dbus/dbus-marshal-recursive.c
1196 (_dbus_type_reader_get_element_type): rename from
1197 _dbus_type_reader_get_array_type
1199 2005-01-15 Havoc Pennington <hp@redhat.com>
1201 * test/glib/test-profile.c (with_bus_server_filter): fix crash
1203 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
1204 when DBUS_DISABLE_ASSERT
1205 (_dbus_marshal_set_basic): be sure we align for the string length
1207 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
1210 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
1211 inline macro version
1212 (_dbus_string_set_byte): provide inline macro version
1214 2005-01-15 Havoc Pennington <hp@redhat.com>
1216 * Land the new message args API and type system.
1218 This patch is huge, but the public API change is not
1219 really large. The set of D-BUS types has changed somewhat,
1220 and the arg "getters" are more geared toward language bindings;
1221 they don't make a copy, etc.
1223 There are also some known issues. See these emails for details
1225 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
1226 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
1228 * dbus/dbus-marshal-*: all the new stuff
1230 * dbus/dbus-message.c: basically rewritten
1232 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
1233 freed blocks to be all non-nul bytes so using freed memory is less
1234 likely to work right
1236 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
1237 DBUS_FAIL_MALLOC=N environment variable, so you can do
1238 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
1239 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
1242 * qt/message.cpp: port to the new message args API
1243 (operator<<): use str.utf8() rather than str.unicode()
1244 (pretty sure this is right from the Qt docs?)
1246 * glib/dbus-gvalue.c: port to the new message args API
1248 * bus/dispatch.c, bus/driver.c: port to the new message args API
1250 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
1251 "locked" flag to TRUE and align_offset to 0; I guess we never
1252 looked at these anyhow, but seems cleaner.
1254 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
1255 move allocation padding macro to this header; use it to implement
1256 (_DBUS_STRING_STATIC): ability to declare a static string.
1258 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
1259 change to return TRUE if the interface is not set.
1261 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
1262 to dbus-marshal-validate.[hc]
1264 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
1267 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
1268 to dbus-marshal-*.[hc]
1270 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
1271 function here from dbus-marshal.c
1273 2005-01-12 Joe Shaw <joeshaw@novell.com>
1275 * NEWS: Update for 0.23.
1277 * configure.in: Release 0.23.
1279 2005-01-12 Joe Shaw <joeshaw@novell.com>
1281 * mono/Makefile.am, mono/example/Makefile.am: Always build the
1282 dbus DLL with --debug. Clean up after the .mdb files this leaves
1285 * mono/doc/Makefile.am: Need to uninstall the docs on "make
1288 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
1289 is an enum, get the enum's underlying type. Another mono
1292 2005-01-11 Joe Shaw <joeshaw@novell.com>
1294 Patch from Sjoerd Simons <sjoerd@luon.net>
1296 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
1297 DESTDIR. It breaks stuff.
1299 2005-01-11 Joe Shaw <joeshaw@novell.com>
1301 Patch from Tambet Ingo <tambet@ximian.com>
1303 * mono/DBusType/Array.cs (Get): Get the underlying element type by
1304 calling type.GetElementType(). The code previously depended on
1305 broken Mono behavior, which was fixed in Mono 1.1.3.
1307 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
1308 Activator.CreateInstance() so that the class's constructor is
1309 called with the right parameters.
1311 2005-01-11 Joe Shaw <joeshaw@novell.com>
1313 Patch from Timo Teräs <ext-timo.teras@nokia.com>
1315 * dbus/dbus-connection.c
1316 (_dbus_connection_queue_received_message_link): Call
1317 _dbus_connection_remove_timeout() instead of the _locked()
1318 variant, since it's always called from
1319 _dbus_connection_handle_watch(), which handles the locking.
1320 Removed the _locked() variant since it's no longer used.
1322 2005-01-03 Havoc Pennington <hp@redhat.com>
1324 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
1327 2004-12-26 Havoc Pennington <hp@redhat.com>
1329 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
1331 2005-01-03 Havoc Pennington <hp@redhat.com>
1333 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
1336 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
1338 2005-01-02 Havoc Pennington <hp@redhat.com>
1340 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
1342 2005-01-01 Havoc Pennington <hp@redhat.com>
1344 * configure.in: add -Wfloat-equal
1346 2005-01-01 Havoc Pennington <hp@redhat.com>
1348 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
1349 for a variety of reasons '==' doesn't do this.
1351 2004-12-31 Havoc Pennington <hp@redhat.com>
1353 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
1354 I keep wishing I had
1356 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1358 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
1360 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1362 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
1363 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
1364 dbus-protocol.h. Because they are defines and not enums they are not
1367 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
1369 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
1370 dbus_bus_activate_service
1372 * python/dbus.py (Bus.activate_service): activate a service on the
1375 2004-12-24 Havoc Pennington <hp@redhat.com>
1377 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
1378 file format has also changed and I haven't adapted to that yet
1380 * Makefile.am: load .gcno files from latest gcc
1382 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
1383 * Patch from Rob Taylor <robtaylor@fastmail.fm>
1385 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
1388 * python/dbus.py (get_unix_user): Added binding to
1389 call dbus_bindings.bus_get_unix_user
1391 * python/extract.py: Modified the proto_pat regex to
1392 handle unsigned long
1394 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1396 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
1397 better POSIX compliance.
1399 2004-12-19 Havoc Pennington <hp@redhat.com>
1401 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
1402 (_dbus_string_insert_8_aligned): new functions
1404 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
1406 2004-12-18 Havoc Pennington <hp@redhat.com>
1408 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
1411 * dbus/dbus-message.c: fix a comment, and add a still-unused
1412 not-implemented function
1414 * dbus/dbus-marshal.h: fix comment
1416 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
1418 2004-12-17 Joe Shaw <joeshaw@novell.com>
1420 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
1421 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
1422 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
1423 Type.UnderlyingSystemType to get the actual system type
1424 underneath. This code previously depended on the broken Mono
1425 behavior, which was fixed in 1.1.3.
1427 2004-11-27 Havoc Pennington <hp@redhat.com>
1429 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
1431 (_dbus_string_get_const_data): inline when asserts are disabled
1433 * dbus/dbus-message.c: record the _dbus_current_generation of
1434 creation so we can complain if dbus_shutdown() is used improperly.
1435 Do this only if checks are enabled.
1437 * dbus/dbus-connection.c: ditto
1439 2004-11-26 Havoc Pennington <hp@redhat.com>
1441 * test/glib/test-profile.c: add with_bus mode to profile echoes
1442 that go through the bus.
1444 * test/glib/run-test.sh: add ability to run test-profile
1446 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
1449 2004-11-26 Havoc Pennington <hp@redhat.com>
1451 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
1452 thing was implemented
1454 2004-11-26 Havoc Pennington <hp@redhat.com>
1456 * test/glib/test-profile.c: tweak a bit, add support for some
1457 made-up minimal malloc overhead with plain sockets, since in
1458 real life some sort of buffers are unavoidable thus we could
1459 count them in the theoretical best case
1461 2004-11-26 Havoc Pennington <hp@redhat.com>
1463 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
1464 where I was trying to cache one too many messages
1466 2004-11-26 Havoc Pennington <hp@redhat.com>
1468 * dbus/dbus-message.c: reimplement message cache as an array which
1469 makes the cache about twice as fast and saves maybe 1.5% overall
1471 2004-11-26 Havoc Pennington <hp@redhat.com>
1473 * dbus/dbus-threads.c (init_global_locks): forgot to put the
1474 message cache lock here
1476 2004-11-26 Havoc Pennington <hp@redhat.com>
1478 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
1479 the "char byte_order" next to each other to save 4 bytes
1480 (dbus_message_new_empty_header): reduce preallocation, since the
1481 message cache should achieve a similar effect
1482 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
1483 message cache that keeps a few DBusMessage around in a pool,
1484 another 8% speedup or so.
1486 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
1488 2004-11-25 Havoc Pennington <hp@redhat.com>
1490 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
1491 to write, without reading or blocking, try it before the poll()
1492 and skip the poll() if nothing remains to write. This is about a
1493 3% speedup in the echo client/server
1495 2004-11-25 Havoc Pennington <hp@redhat.com>
1497 The primary change here is to always write() once before adding
1498 the write watch, which gives us about a 10% performance increase.
1500 * dbus/dbus-transport-unix.c: a number of modifications to cope
1501 with removing messages_pending
1502 (check_write_watch): properly handle
1503 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
1504 messages_pending stuff
1505 (check_read_watch): properly handle WAITING_FOR_MEMORY and
1507 (unix_handle_watch): after writing, see if the write watch can be
1509 (unix_do_iteration): assert that write_watch/read_watch are
1510 non-NULL rather than testing that they aren't, since they
1511 aren't allowed to be NULL. check_write_watch() at the end so
1512 we add the watch if we did not finish writing (e.g. got EAGAIN)
1514 * dbus/dbus-transport-protected.h: remove messages_pending call,
1515 since it resulted in too much inefficient watch adding/removing;
1516 instead we now require that the transport user does an iteration
1517 after queueing outgoing messages, and after trying the first
1518 write() we add a write watch if we got EAGAIN or exceeded our
1519 max bytes to write per iteration setting
1521 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
1524 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
1525 freed and then accessed, valgrind flagged this bug, fix it
1527 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
1528 as the last valid field plus 1, where really it is equal to the
1529 last valid field. Corrects some message corruption issues.
1531 * dbus/dbus-mainloop.c: verbosity changes
1533 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
1534 instead of aborting in one of the test codepaths
1536 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
1537 caused not printing the pid ever again if a verbose was missing
1538 the newline at the end
1539 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
1541 * dbus/dbus-connection.c: verbosity changes;
1542 (dbus_connection_has_messages_to_send): new function
1543 (_dbus_connection_message_sent): no longer call transport->messages_pending
1544 (_dbus_connection_send_preallocated_unlocked): do one iteration to
1545 try to write() immediately, so we can avoid the write watch. This
1546 is the core purpose of this patchset
1547 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
1548 dump the outgoing message queue, so nobody will get confused
1549 trying to send them or thinking stuff is pending to be sent
1551 * bus/test.c: verbosity changes
1553 * bus/driver.c: verbosity/assertion changes
1555 * bus/dispatch.c: a bunch of little tweaks to get it working again
1556 because this patchset changes when/where you need to block.
1558 2004-11-23 Havoc Pennington <hp@redhat.com>
1560 * test/glib/test-profile.c: modify to accept a plain_sockets
1561 argument in which case it will bench plain sockets instead of
1562 libdbus, for comparison purposes.
1564 2004-11-22 Havoc Pennington <hp@redhat.com>
1566 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
1567 threads for more time, so sysprof can get a grip on it.
1569 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
1572 2004-11-13 Havoc Pennington <hp@redhat.com>
1574 * test/glib/test-profile.c: fix this thing up a bit
1576 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
1577 preallocation sizes by a fair bit; not sure if this will be an
1578 overall performance win or not, but it does reduce reallocs.
1580 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
1581 the test hack that forced constant realloc if asserts are
1582 disabled, so we can profile sanely. Sprinkle in some
1583 _DBUS_UNLIKELY() which are probably pointless, but before I
1584 noticed the real performance problem I put them in.
1585 (_dbus_string_validate_utf8): micro-optimize this thing a little
1586 bit, though callgrind says it didn't help; then special-case
1587 ascii, which did help a lot; then be sure we detect nul bytes as
1588 invalid, which is a bugfix.
1589 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
1590 superstition; use memset to nul the padding instead of a manual
1592 (_dbus_string_get_length): inline this as a
1593 macro; it showed up in the profile because it's used for loop
1596 2004-11-10 Colin Walters <walters@verbum.org>
1598 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
1601 2004-11-09 Colin Walters <walters@verbum.org>
1603 * dbus/dbus-string.c (_dbus_string_get_length): New
1604 function, writes DBusString to C buffer.
1606 * dbus/dbus-string.h: Prototype it.
1608 * dbus/dbus-message.c (dbus_message_type_to_string): New
1609 function, converts message type into C string.
1611 * dbus/dbus-message.h: Prototype it.
1613 * bus/selinux.c (bus_selinux_check): Take source pid,
1614 target pid, and audit data. Pass audit data to
1616 (log_audit_callback): New function, appends extra
1618 (bus_selinux_allows_acquire_service): Also take
1619 service name, add it to audit data.
1620 (bus_selinux_allows_send): Also take message
1621 type, interface, method member, error name,
1622 and destination, and add them to audit data.
1623 (log_cb): Initialize func_audit.
1625 * bus/selinux.h (bus_selinux_allows_acquire_service)
1626 (bus_selinux_allows_send): Update prototypes
1628 * bus/services.c (bus_registry_acquire_service): Pass
1629 service name to bus_selinux_allows_acquire_service.
1631 * bus/bus.c (bus_context_check_security_policy): Pass
1632 additional audit data. Move assignment of dest
1635 2004-11-07 Colin Walters <walters@verbum.org>
1637 * dbus/dbus-transport-unix.c (do_authentication): Always
1638 initialize auth_completed.
1640 2004-11-07 Colin Walters <walters@verbum.org>
1642 * bus/bus.c (load_config): Break into three
1643 separate functions: process_config_first_time_only,
1644 process_config_every_time, and process_config_postinit.
1645 (process_config_every_time): Move call of
1646 bus_registry_set_service_context_table into
1647 process_config_postinit.
1648 (process_config_postinit): New function, does
1649 any processing that needs to happen late
1650 in initialization (and also on reload).
1651 (bus_context_new): Instead of calling load_config,
1652 open config parser here and call process_config_first_time_only
1653 and process_config_every_time directly. Later, after
1654 we have forked but before changing UID,
1655 invoke bus_selinux_full_init, and then call
1656 process_config_postinit.
1657 (bus_context_reload_config): As in bus_context_new,
1658 load parse file inside here, and call process_config_every_time
1659 and process_config_postinit.
1661 * bus/services.h, bus/services.c
1662 (bus_registry_set_service_context_table): Rename
1663 from bus_registry_set_sid_table. Take string hash from config
1664 parser, and convert them here into SIDs.
1666 * bus/config-parser.c (struct BusConfigParser): Have
1667 config parser only store a mapping of service->context
1669 (merge_service_context_hash): New function.
1670 (merge_included): Merge context string hashes instead
1671 of using bus_selinux_id_table_union.
1672 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
1673 simply create a new string hash.
1674 (bus_config_parser_unref): Unref it.
1675 (start_selinux_child): Simply insert strings into hash,
1676 don't call bus_selinux_id_table_copy_over.
1678 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
1679 (bus_selinux_id_table_copy_over): Delete.
1681 2004-11-03 Colin Walters <walters@verbum.org>
1683 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
1686 2004-11-03 Colin Walters <walters@verbum.org>
1688 * bus/test-main.c (test_pre_hook): Fix test logic,
1689 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
1691 2004-11-02 Colin Walters <walters@redhat.com>
1693 * bus/selinux.c (bus_selinux_init): Split into two functions,
1694 bus_selinux_pre_init and bus_selinux_post_init.
1695 (bus_selinux_pre_init): Just determine whether SELinux is
1697 (bus_selinux_post_init): Do everything else.
1699 * bus/main.c (main): Call bus_selinux_pre_init before parsing
1700 config file, and bus_selinux_post_init after. This ensures that
1701 we don't lose the policyreload notification thread that
1702 bus_selinux_init created before forking previously.
1704 * bus/test-main.c (test_pre_hook): Update for split.
1706 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
1708 Patch from Johan Fischer <linux@fischaz.com>
1710 * mono/doc/Makefile.am (install-data-local): Added directory
1713 2004-10-29 Colin Walters <walters@redhat.com>
1715 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
1716 parameter for fd to write pid to.
1718 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
1720 * bus/bus.c (bus_context_new): Pass print_pid_fd
1721 to _dbus_become_daemon (bug #1720)
1723 2004-10-29 Colin Walters <walters@redhat.com>
1725 Patch from Ed Catmur <ed@catmur.co.uk>
1727 * mono/doc/Makefile.am (install-data-local): Handle
1730 2004-10-29 Colin Walters <walters@redhat.com>
1732 * bus/.cvsignore, qt/.cvsignore: Update.
1734 2004-10-29 Colin Walters <walters@redhat.com>
1736 Patch from Kristof Vansant <de_lupus@pandora.be>
1738 * configure.in: Detect Slackware.
1739 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
1740 * bus/rc.messagebus.in: New file.
1742 2004-10-29 Colin Walters <walters@redhat.com>
1744 * tools/dbus-monitor.c (filter_func): Return
1745 DBUS_HANDLER_RESULT_HANDLED in filter function
1747 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
1749 2004-10-29 Colin Walters <walters@redhat.com>
1751 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
1753 * bus/services.c (bus_registry_acquire_service):
1754 Correctly retrieve service name from DBusString
1757 2004-10-29 Colin Walters <walters@redhat.com>
1759 * dbus/dbus-glib.h: Update documentation to not
1760 refer to internal APIs.
1762 2004-10-27 Joe Shaw <joeshaw@novell.com>
1764 * mono/Arguments.cs (GetDBusTypeConstructor):
1765 type.UnderlyingSystemType will return "System.Byte" if you do it
1766 on "byte[]", which is not what we want. So check the type.IsArray
1767 property and use System.Array instead.
1769 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
1771 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
1772 the DBusUserInfo structure since this is passed into the function.
1773 This would cause a double free when the function that allocated
1774 the structure would try to free it when an error occured.
1776 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
1777 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
1778 for service activation to avoid 32bit/64bit parallel install issues
1780 2004-10-21 Colin Walters <walters@verbum.org>
1782 * AUTHORS: Fix my email address, the @gnu.org one
1783 has been bouncing for some time. Also add J5.
1785 2004-10-21 Colin Walters <walters@verbum.org>
1787 * dbus/dbus-transport-unix.c (do_authentication): Return
1788 authentication status to callers.
1789 (unix_handle_watch): If we completed authentication this round,
1790 don't do another read. Instead wait until the next iteration,
1791 after we've read any pending data in the auth buffer.
1792 (unix_do_iteration): Ditto.
1793 (unix_handle_watch): Updated for new do_authentication prototype.
1795 2004-10-18 Colin Walters <walters@verbum.org>
1797 * bus/selinux.c (bus_selinux_enabled): Handle
1798 --disable-selinux case.
1800 2004-10-18 Colin Walters <walters@verbum.org>
1802 * bus/selinux.h: Add bus_selinux_enabled.
1804 * bus/selinux.c (bus_selinux_enabled): Implement it.
1806 * bus/config-parser.c (struct include): Add
1807 if_selinux_enabled member.
1808 (start_busconfig_child): Parse if_selinux_enabled
1809 attribute for include.
1810 (bus_config_parser_content): Handle it.
1812 * bus/session.conf.in, bus/system.conf.in: Add
1813 inclusion of context mapping to default config files;
1814 conditional on SELinux being enabled.
1816 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
1818 * test/data/invalid-config-files/badselinux-1.conf,
1819 test/data/invalid-config-files/badselinux-2.conf:
1820 Test files for bad syntax.
1822 2004-10-17 Colin Walters <walters@verbum.org>
1824 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
1825 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
1826 format specifier mismatches.
1828 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
1830 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
1833 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
1834 pointer (bug #1540, Leonardo Boiko).
1836 2004-09-28 Jon Trowbridge <trow@ximian.com>
1838 * mono/BusDriver.cs: Changed BusDriver struct to remove
1839 the ServiceCreated and ServiceDeleted events and replace them
1840 with the new ServiceOwnerChanged event.
1842 * mono/example/BusListener.cs: Added a new example program,
1843 which listens for and reports any ServiceOwnerChanged events
1846 * mono/example/Makefile.am (DESTDIR): Build changes for the
1847 new BusListener.cs example.
1849 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
1851 * bus/signals.c (bus_match_rule_parse): validate the components of
1852 match rules (bug #1439).
1854 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
1856 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
1858 * doc/dbus-specification.xml: document ServiceOwnerChanged
1861 * bus/driver.c, bus/driver.h, bus/services.c: Use
1862 ServiceOwnerChanged signal instead of ServiceCreated and
1865 * bus/dispatch.c: update testcase for the new signal.
1867 2004-09-20 Jon Trowbridge <trow@ximian.com>
1869 Patch from Nat Friedman <nat@novell.com>
1871 * mono/Makefile.am: A number of small build fixes to allow "make
1872 distcheck" to succeed.
1874 * mono/example/Makefile.am: "make distcheck" fixes.
1876 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
1879 * test/Makefile.am: "make distcheck" fixes.
1881 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
1883 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
1885 * doc/busconfig.dtd: update the DTD for the at_console attribute.
1887 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
1888 messages after the first one (bug #1389).
1890 * bus/dispatch.c (check_double_hello_message): add a test case for
1891 the double hello message bug.
1892 (check_existent_service_activation): fix check of spawning error.
1894 2004-09-16 David Zeuthen <david@fubar.dk>
1896 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
1898 2004-09-12 David Zeuthen <david@fubar.dk>
1900 Patch from Kay Sievers <kay.sievers@vrfy.org>
1902 * bus/bus.c (bus_context_new):
1904 * bus/main.c (usage)
1906 Add commandline option --nofork to override configuration file
1909 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
1911 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
1912 compilers don't like it (bug #974).
1914 2004-09-04 Harald Fernengel <harry@kdevelop.org>
1916 * qt/connection.*: Applied patch by Jérôme Lodewyck
1917 <lodewyck@clipper.ens.fr> to integrate an existing
1918 connection into the Qt eventloop
1920 2004-08-30 Jon Trowbridge <trow@ximian.com>
1922 * mono/BusDriver.cs: Added. This is a class for interacting with
1923 the org.freedesktop.DBus service.
1925 * mono/Message.cs: Added a mechanism to expose the message that is
1926 currently being dispatched via the static Message.Current
1927 property. Added Message.Sender and Message.Destination
1930 * mono/Handler.cs: Expose the dispatched message via
1931 Message.Current when handling method calls.
1933 * mono/Service.cs: Expose the dispatched message via
1934 Message.Current when handling signal emissions.
1936 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
1937 Connection.BaseService property.
1939 2004-08-28 Havoc Pennington <hp@redhat.com>
1941 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
1943 More fixes from Steve Grubb
1945 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
1946 (_dbus_listen_tcp_socket): fix fd leak
1948 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
1949 EINTR to a bit lower in the code
1951 2004-08-26 Jon Trowbridge <trow@ximian.com>
1953 * bus/driver.c (bus_driver_handle_service_exists): Respond with
1954 TRUE if we are inquiring about the existence of the built-in
1955 org.freedesktop.DBus service.
1957 2004-08-25 John Palmieri <johnp@redhat.com>
1958 * bus/config-parser.c:
1959 (struct PolicyType): Add POLICY_CONSOLE
1960 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
1961 (start_busconfig_child): Sets up console element when
1962 <policy at_console=""> is encountered in a policy file
1963 (append_rule_from_element): Convert console elements to console
1967 (bus_policy_create_client_policy): Add console rules to the client
1968 policy based on if the client is at the console
1969 (bus_policy_append_console_rule): New function for adding a
1970 console rule to a policy
1971 (bus_policy_merge): Handle console rule merging
1973 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
1974 where we check for console user files
1976 * dbus/dbus-sysdeps.c:
1977 (_dbus_file_exists): New function which checks if the given
1979 (_dbus_user_at_console): New function which does the system
1980 specific process of checking if the user is at the console
1982 * dbus/dbus-userdb.c:
1983 (_dbus_is_console_user): New function converts a UID to user name
1984 and then calls the system specific _dbus_user_at_console to
1985 see if the user is at the console and therefor a console user
1987 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
1989 * bus/config-parser.c (set_limit):
1990 * bus/dbus-daemon-1.1.in:
1991 * test/data/valid-config-files/many-rules.conf: set the
1992 max_match_rules_per_connection limt from the config file.
1994 * doc/busconfig.dtd: update the DTD.
1996 * bus/driver.c: remove some unused variables.
1998 2004-08-24 Mikael Hallendal <micke@imendio.com>
2000 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
2001 it's been replaced by dbus_g_bus_get
2003 2004-08-23 Colin Walters <walters@redhat.com>
2005 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2007 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
2009 * bus/selinux.c: Create a thread for policy reload notification.
2010 (bus_selinux_get_policy_root): Implement.
2012 * bus/config-parser.c (start_busconfig_child)
2013 (bus_config_parser_content): Support SELinux-root relative
2016 * configure.in <HAVE_SELINUX>: Add -lpthread.
2018 * bus/test-main.c (test_pre_hook, test_post_hook): New.
2019 (test_post_hook): Move memory checking into here.
2020 (test_pre_hook, test_post_hook): Move SELinux checks in
2021 here, but conditional on a DBUS_TEST_SELINUX environment
2022 variable. Unfortunately we can't run the SELinux checks
2023 as a normal user, since they won't have any permissions
2024 for /selinux. So this will have to be tested manually
2025 for now, until we have virtualization for most of
2028 2004-08-23 Havoc Pennington <hp@redhat.com>
2030 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
2031 drop supplementary groups, suggested by Steve Grubb
2033 2004-08-20 Colin Walters <walters@redhat.com>
2035 * bus/config-parser.c (start_busconfig_child): Remove some unused
2038 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
2041 2004-08-17 Joe Shaw <joeshaw@novell.com>
2043 * configure.in: If --enable-mono is passed in, if we can't find
2046 * mono/Makefile.am: Use /gacutil to install assemblies into the
2049 2004-08-12 Havoc Pennington <hp@redhat.com>
2051 * NEWS: update for 0.22
2053 * configure.in: release 0.22
2055 2004-08-11 Colin Walters <walters@redhat.com>
2057 * tools/dbus-send.c (main, usage): Add --reply-timeout
2060 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
2062 * bus/bus.c (process_config_first_time_only): get rid of an unused
2063 DBusError that was causing a memoy leak (bug #989).
2065 * dbus/dbus-keyring.c, dbus/dbus-message.c:
2066 fix compilation on Solaris/Forte C (bug #974)
2068 * bus/main.c (main): plug two minuscule memleaks.
2070 2004-08-10 Havoc Pennington <hp@redhat.com>
2072 * doc/dbus-tutorial.xml: add some more info on GLib bindings
2074 2004-08-09 Havoc Pennington <hp@redhat.com>
2076 * COPYING: switch to Academic Free License version 2.1 instead of
2077 2.0, to resolve complaints about patent termination clause.
2079 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
2081 * README: added documentation for the --enable-python
2084 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
2086 * bus/config-parser.c (bus_config_parser_new): fix an invalid
2087 _unref in the SELinux support.
2089 * doc/busconfig.dtd: update DTD for SELinux support.
2091 * bus/config-loader-libxml.c: fix error handler and parser
2092 initialisation/cleanup. OOM test now works with libxml2 HEAD.
2094 * configure.in: remove the warning about libxml2.
2096 * dbus/dbus-bus.c: silence doxygen warning.
2098 2004-07-31 Colin Walters <walters@redhat.com>
2100 * configure.in: Move #error in SELinux check to its own line.
2102 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
2104 * dbus/dbus-internals.h (_DBUS_SET_OOM):
2105 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
2108 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
2109 broken by the change in the _SET_OOM macros.
2111 2004-07-31 Colin Walters <walters@redhat.com>
2113 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
2116 2004-07-31 Colin Walters <walters@redhat.com>
2118 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
2119 to correctly detect DBUS__ACQUIRE_SVC. Also add an
2122 2004-07-24 Havoc Pennington <hp@redhat.com>
2124 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2126 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
2129 * configure.in: add --enable-selinux
2131 * bus/policy.c (bus_policy_merge): add FIXME to a comment
2133 * bus/main.c (main): initialize and shut down selinux
2135 * bus/connection.c: store SELinux ID on each connection, to avoid
2136 repeated getting of the string context and converting it into
2139 * bus/bus.c (bus_context_get_policy): new accessor, though it
2141 (bus_context_check_security_policy): check whether the security
2142 context of sender connection can send to the security context of
2143 recipient connection
2145 * bus/config-parser.c: add parsing for <selinux> and <associate>
2147 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
2148 implement dbus_connection_get_unix_fd()
2150 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
2151 function, used by the selinux stuff
2153 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
2155 * bus/config-loader-libxml.c: complete the implementation of
2156 libxml backend for config file loader. Doesn't work with full OOM
2159 * configure.in: change error when selecting libxml into a warning.
2161 * test/data/invalid-config-files: add two non-well-formed XML
2164 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
2166 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
2167 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
2168 be necessary to read all the buffer. (bug #894)
2170 * bus/activation.c (bus_activation_activate_service): fix a
2171 potential assertion failure (bug #896). Small optimization in the
2172 case of auto-activation messages.
2174 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
2175 add test case for byte-through-vararg bug (#901). patch by Kimmo
2178 2004-07-28 Anders Carlsson <andersca@gnome.org>
2181 * python/dbus_bindings.pyx.in:
2182 Add dbus.init_gthreads (), allow emit_signal to pass
2183 arguments to the signal.
2185 2004-07-24 Havoc Pennington <hp@redhat.com>
2187 * AUTHORS: add some people, not really comprehensively, let me
2188 know if I missed you
2190 2004-07-24 Havoc Pennington <hp@redhat.com>
2192 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
2195 * test/Makefile.am (DIST_SUBDIRS): here also
2197 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2199 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
2200 breaking build on Solaris, reported by Farhad Saberi on the ML.
2202 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
2203 va_arg invocation to account for integer promotion in the case of
2204 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
2206 * bus/services.c (bus_service_remove_owner): fix bug #902, use
2207 _dbus_list_get_first_link, not _dbus_list_get_first.
2209 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
2211 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
2212 handler functions so that the asserts in _dbus_object_subtree_unref
2215 * dbus/dbus-transport-unix.c (do_reading):
2216 _dbus_transport_queue_messages return value is of type
2217 dbus_bool_t, not DBusDispatchStatus.
2219 2004-07-19 David Zeuthen <david@fubar.dk>
2221 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
2224 (check_get_connection_unix_user): Debug says GetProperty; but the
2225 method is called GetConnectionUnixUser
2226 (check_get_connection_unix_process_id): New function
2227 (bus_dispatch_test): Actually call check_get_connection_unix_user();
2228 also call check_get_connection_unix_process_id()
2231 (bus_driver_handle_get_connection_unix_process_id): New function,
2232 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
2236 (handle_server_data_external_mech): Set pid from the credentials
2237 obtained from the socket
2239 * dbus/dbus-connection.c:
2240 (dbus_connection_get_unix_process_id): New function
2242 * dbus/dbus-connection.h:
2243 Add prototype for dbus_connection_get_unix_process_id
2245 * dbus/dbus-transport.c:
2246 (_dbus_transport_get_unix_process_id): New function
2248 * dbus/dbus-transport.h:
2249 Add prototype for _dbus_transport_get_unix_process_id
2251 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
2253 * dbus/dbus-message.c: Message counter fix, patch by Christian
2254 Hammond <chipx86@gnupdate.org>
2256 2004-07-18 Seth Nickell <seth@gnome.org>
2259 * python/dbus_bindings.pyx.in:
2260 * python/tests/test-client.py:
2262 Add dbus.ByteArray and dbus_bindings.ByteArray
2263 types so that byte streams can be passed back.
2265 Give jdahlin the heaps of credit that are so
2268 2004-07-12 Seth Nickell <seth@gnome.org>
2272 Add message argument to the default object_method_handler
2275 * python/dbus_bindings.pyx.in:
2277 Automatically return NIL when passed an empty list
2278 (we can't pass back a list since lists are typed
2279 and we don't have any idea what type the the client
2280 intended the list to be... :-( )
2282 2004-07-10 Seth Nickell <seth@gnome.org>
2284 * python/examples/Makefile.am:
2286 Fix distcheck breakage caused by new examples.
2288 2004-07-10 Seth Nickell <seth@gnome.org>
2292 Add "message" argument to service-side dbus.Object
2293 methods. This will break existing services written
2294 using the python bindings, but will allow extraction
2295 of all the message information (e.g. who its from).
2297 Add improved "object oriented" signal handling/emission.
2299 * python/examples/example-service.py:
2303 * python/examples/example-signal-emitter.py:
2304 * python/examples/example-signal-recipient.py:
2306 Two new examples that show how to emit and receive
2307 signals using the new APIs.
2309 * python/examples/example-signals.py:
2310 * python/examples/gconf-proxy-service.py:
2311 * python/examples/gconf-proxy-service2.py:
2313 Add "message" argument to service methods.
2315 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
2317 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
2318 * dbus/bus.c (dbus_bus_get_unix_user)
2319 * doc/dbus-specification.xml: implement GetConnectionUnixUser
2320 method of org.freedesktop.DBus interface.
2322 * bus/dispatch.c: test case
2324 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
2326 * python/Makefile.am: switched include directory from glib/ to dbus/
2327 since dbus-glib.h moved
2329 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2331 * configure.in: prevent building the gcj stuff and libxml loader
2332 since they are broken.
2334 2004-06-20 Havoc Pennington <hp@redhat.com>
2336 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
2337 codes from the dbus error names
2339 * glib/dbus-glib.h: move to subdir dbus/ since it's included
2340 as dbus/dbus-glib.h and that breakage is now visible due to
2341 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
2343 * glib/dbus-glib.h: s/gproxy/g_proxy/
2345 * dbus/dbus-shared.h: new header to hold stuff shared with
2348 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
2351 * glib/dbus-glib.h (dbus_set_g_error): move to
2352 dbus-glib-lowlevel.h
2354 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
2355 of stuff to enable this
2357 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
2359 * a bunch of other changes with the same basic "separate glib
2360 bindings from dbus.h" theme
2362 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
2364 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
2366 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
2368 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
2370 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
2371 the reply value of the ServiceExists message.
2373 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
2375 * python/dbus_bindings.pyx.in: No longer need to parse path
2376 elements and pass them as arrays of strings. The C API now
2377 accepts plain path strings.
2378 (_build_parsed_path): removed
2380 2004-06-07 Havoc Pennington <hp@redhat.com>
2382 * doc/TODO: remove auto-activation item since it's done; sort
2383 items by importance/milestone
2385 2004-06-07 Havoc Pennington <hp@redhat.com>
2387 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
2388 random signature when using REQUIRED_FIELDS (this hack won't work
2391 * dbus/dbus-message.c: change the signature to be a header field,
2392 instead of message->signature special-case string. Incremental
2393 step forward. Then we can fix up code to send the signature in the
2394 message, then fix up code to validate said signature, then fix up
2395 code to not put the typecodes inline, etc.
2396 (load_one_message): don't make up the signature after the fact
2397 (decode_header_data): require signature field for the known
2400 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
2402 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
2404 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
2406 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
2408 * mono/Handler.cs: Updated to follow new path argument for
2409 (un-)registering objects.
2411 * mono/example/Makefile.am:
2413 * configure.in: Bumped required version for mono and use new -pkg
2416 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
2418 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
2419 registration functions take the path argument as char* instead of
2422 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
2423 split off the path decompostion part of
2424 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
2427 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
2429 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2431 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
2432 machine approach. A state is implemented as a function that
2433 handles incoming events as specified for that state.
2435 * doc/dbus-specification.xml: Update auth protocol state machine
2436 specification to match implementation. Remove some leftover
2439 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2441 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
2442 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
2445 * Doxyfile.in: remove deprecated options.
2447 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
2448 glib/test-thread.h, glib/test-thread-client.c,
2449 glib/test-thread-server.c, glib/test-profile.c,
2450 glib/test-dbus-glib.c: remove these unused files.
2452 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
2454 * dbus/dbus-object-tree.c
2455 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
2456 non-fallback handlers (bug #684).
2457 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
2458 (find_subtree_recurse): report wether the returned subtree is an
2459 exact match or a "fallback" match higher up in the tree.
2460 (object_tree_test_iteration): update test case.
2462 2004-06-01 Seth Nickell <seth@gnome.org>
2464 * python/dbus_bindings.pyx.in:
2465 * python/tests/test-client.py:
2467 Round off basic type support. Add dicts (yay!), and
2468 remaining array types.
2470 Make MessageIter more general so it works for dicts too.
2472 Mark all loop variables as C integers.
2474 2004-05-31 Havoc Pennington <hp@redhat.com>
2476 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
2479 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
2481 * glib/dbus-glib-tool.c (main): set up to have a --self-test
2482 option that runs the tests, and start filling in some code
2483 including for starters just dumping the interfaces to stdout
2485 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
2487 * test/data/valid-introspection-files/lots-of-types.xml: test of
2488 an example introspection file
2490 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
2493 2004-05-31 Seth Nickell <seth@gnome.org>
2495 * python/dbus_bindings.pyx.in:
2496 * python/tests/test-client.py:
2501 Fix string array memory trashing bug... oops...
2503 2004-05-30 Seth Nickell <seth@gnome.org>
2507 Add a nicer-but-less-flexible alternate API for handling
2508 calls to virtual objects in dbus.ObjectTree.
2510 Screw up the argument order to the dbus.Object constructor
2511 for consistency with dbus.ObjectTree (and to make dbus_methods
2512 optional for future extension)
2514 * python/examples/Makefile.am:
2515 * python/examples/gconf-proxy-service.py:
2516 * python/examples/gconf-proxy-service2.py:
2518 Alternate implementation of gconf-proxy-service using the
2519 nicer dbus.ObjectTree API.
2521 * python/examples/example-service.py:
2522 * python/tests/test-server.py
2524 Reverse the argument order to deal with dbus.Object constructor
2527 2004-05-30 Seth Nickell <seth@gnome.org>
2529 * python/examples/example-client.py:
2530 * python/examples/example-service.py:
2532 Take it back. Lists seem to work but they're broken
2533 in the test suite. Make the base examples use
2536 2004-05-30 Seth Nickell <seth@gnome.org>
2538 * python/dbus_bindings.pyx.in:
2539 * python/tests/test-client.py:
2541 Add some more tests and fix errors that crop up.
2542 Unfortunately, currently it seems like marshalling
2543 and unmarshalling of lists is completely broken :-(
2545 2004-05-30 Seth Nickell <seth@gnome.org>
2547 * python/dbus_bindings.pyx.in:
2549 Add support for ObjectPath type.
2553 Refactor message handling code to a common function.
2555 * python/tests/test-client.py:
2556 * python/tests/test-server.py:
2558 Add tests that check to make sure values of all types
2559 can be echoed from a service w/o mangling.
2561 2004-05-29 Seth Nickell <seth@gnome.org>
2565 Add ObjectTree class which allows implementation
2566 of trees of "virtual" objects. Basically the python
2567 wrapper for "register_fallback".
2569 * python/examples/Makefile.am
2570 * python/examples/gconf-proxy-client.py:
2571 * python/examples/gconf-proxy-service.py:
2573 Implement a simple GConf proxy service that supports
2574 get/set on string and int GConf keys using the ObjectTree.
2576 2004-05-29 Seth Nickell <seth@gnome.org>
2579 * python/examples/example-client.py:
2580 * python/examples/example-service.py:
2581 * python/examples/list-system-services.py:
2583 Add SessionBus, SystemBus and ActivationBus classes
2584 so you don't need to know the special little BUS_TYPE
2587 2004-05-29 Havoc Pennington <hp@redhat.com>
2589 * bus/config-parser.c (process_test_valid_subdir): temporarily
2590 stop testing config parser OOM handling, since expat has issues
2591 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
2593 * bus/dbus-daemon-1.1.in: change requested_reply to
2594 send_requested_reply/receive_requested_reply so we can send the
2595 replies, not just receive them.
2597 * bus/config-parser.c: parse the new
2598 send_requested_reply/receive_requested_reply
2600 * bus/policy.c (bus_client_policy_check_can_send): add
2601 requested_reply argument and use it
2603 * bus/bus.c (bus_context_check_security_policy): pass through
2604 requested_reply status to message send check
2606 * bus/system.conf.in: adapt to requested_reply change
2608 2004-05-28 Havoc Pennington <hp@redhat.com>
2610 * test/glib/test-service-glib.c (main): remove unused variable
2612 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
2614 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
2615 from the enum, no longer in use.
2617 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
2620 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
2621 whether error_name passed in is a valid error name.
2623 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
2625 * dbus/dbus-message.c (dbus_message_get_args): Added support for
2626 OBJECT_PATH and OBJECT_PATH_ARRAY
2628 2004-05-28 Seth Nickell <seth@gnome.org>
2630 * python/examples/Makefile.am:
2632 Forget to add Makefile.am. Do not pass go.
2634 2004-05-28 Michael Meeks <michael@ximian.com>
2636 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
2639 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
2641 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
2642 (_dbus_message_iter_get_basic_type_array): impl.
2643 drastically simplify ~all relevant _get methods to use these.
2644 (_dbus_message_iter_append_basic_array),
2645 (dbus_message_iter_append_basic): impl
2646 drastically simplify ~all relevant _append methods to use these.
2648 * dbus/dbus-message-builder.c (parse_basic_type)
2649 (parse_basic_array, lookup_basic_type): impl.
2650 (_dbus_message_data_load): prune scads of duplicate /
2653 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
2654 (_dbus_demarshal_basic_type): implement,
2655 (demarshal_and_validate_len/arg): beef up debug.
2656 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
2658 2004-05-27 Seth Nickell <seth@gnome.org>
2661 * python/Makefile.am:
2663 Include the example python apps in the tarball.
2665 * python/examples/list-system-services.py
2667 Add a python new example that fetches the list of services
2668 from the system bus.
2670 2004-05-27 Seth Nickell <seth@gnome.org>
2673 * python/dbus_bindings.pyx.in:
2675 Fix failure to notify that a signal was not handled,
2676 resulted in hung functions.
2678 2004-05-25 Colin Walters <walters@redhat.com>
2680 * tools/dbus-monitor.c (main): Monitor all types of messages.
2682 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
2684 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
2685 which unregisters the object path and disposes the handler.
2687 2004-05-23 Kristian Høgsberg <krh@redhat.com>
2689 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
2691 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
2692 operands to && so we call dbus_message_iter_next () for the last
2695 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2697 * dbus/dbus-object-tree.c
2698 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
2699 children even if the requested path isn't registered.
2700 (object_tree_test_iteration): test object_tree_list_registered.
2702 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
2705 2004-05-20 Kristian Høgsberg <krh@redhat.com>
2707 * doc/TODO: Remove resolved items.
2709 * bus/expirelist.h (struct BusExpireList): remove unused n_items
2712 * bus/connection.c (bus_connections_expect_reply): Enforce the
2713 per-connection limit on pending replies.
2715 Patch from Jon Trowbridge <trow@ximian.com>:
2717 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
2718 up a watch that triggers a config reload when one end of the pipe
2720 (signal_handler): Instead of doing the config reload in our SIGHUP
2721 handler, just write to the reload pipe and let the associated
2722 watch handle the reload when control returns to the main loop.
2724 * bus/driver.c (bus_driver_handle_reload_config): Added.
2725 Implements a ReloadConfig method for requesting a configuration
2726 file reload via the bus driver.
2728 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
2730 * HACKING: Updated release instructions concerning the wiki page.
2732 2004-05-18 Kristian Høgsberg <krh@redhat.com>
2734 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
2735 filter against auth->allowed_mechs; we only add allowed mechs in
2736 record_mechanisms().
2738 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
2739 ALLOWED_MECHS to auth-script format so we can set the list of
2742 * data/auth/client-out-of-mechanisms.auth-script: New test to
2743 check client disconnects when it is out of mechanisms to try.
2745 * dbus/dbus-auth.c (process_command): Remove check for lines
2746 longer that 1 MB; we only buffer up maximum 16 kB.
2748 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2749 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
2750 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
2751 assume there might be unused bytes.
2753 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
2754 client-out-of-mechs, it is handled in process_reject(). Move check
2755 for max failures to send_rejected(), as it's a server-only thing.
2757 * dbus/dbus-auth.c: Factor out protocol reply code into functions
2758 send_auth(), send_data(), send_rejected(), send_error(),
2759 send_ok(), send_begin() and send_cancel().
2761 2004-05-17 Kristian Høgsberg <krh@redhat.com>
2763 Remove base64 encoding, replace with hex encoding. Original patch
2764 from trow@ximian.com, added error handling.
2766 * dbus/dbus-string.c (_dbus_string_base64_encode)
2767 (_dbus_string_base64_decode): Remove.
2768 (_dbus_string_hex_decode): Add end_return argument so we can
2769 distinguish between OOM and invalid hex encoding.
2770 (_dbus_string_test): Remove base64 tests and add test case for
2773 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
2774 Replace base64 with hex.
2776 * test/data/auth/invalid-hex-encoding.auth-script: New test case
2777 for invalid hex encoded data in auth protocol.
2779 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
2781 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
2784 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
2786 * mono/dbus-sharp.dll.config.in: Added for GAC
2787 * mono/dbus-sharp.snk: Added for GAC
2788 * mono/Assembly.cs.in: Added for GAC
2789 * mono/Makefile.am: Changes for GAC installation
2790 * configure.in: Added refs for dbus-sharp.dll.config.in and
2791 Assembly.cs.in. More fixes for mono testing
2792 * mono/example/Makefile.am: Changed var to CSC
2793 * Makefile.am: Changed flag name to DBUS_USE_CSC
2795 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
2797 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
2798 * mono/doc/*: Added documentation framework
2799 * configure.in: Added monodoc check
2800 * README: Added description of mono configure flags
2802 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
2804 * doc/dbus-specification.xml: Added a "Required" column to the
2805 header fields table and changed the "zero or more" verbage in
2806 the above paragraph to read "The header must contain the required
2807 named header fields and zero or more of the optional named header
2809 * test/data/invalid-messages/*.message: Added the required PATH
2810 named header field to the tests so that they don't fail on
2811 'Missing path field'
2813 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
2815 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
2816 the stack by implicitly defining variable and parameter types and
2817 removing the hack of defining C pointers as python objects and later
2820 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
2822 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
2824 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
2826 * mono/DBusType/Dict.cs: Handle empty dicts
2827 * mono/DBusType/Array.cs: Handle empty arrays
2828 * mono/Arguments.cs: Handle empty arguments
2830 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
2832 * dbus-sharp.pc.in: Modified to include include Libs and Requires
2835 2004-04-25 Kristian Høgsberg <krh@redhat.com>
2837 * test/data/valid-messages/standard-*.message: Update message
2838 test scripts to new header field names.
2840 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
2842 * test/break-loader.c (randomly_do_n_things): tracked down buffer
2843 overflow to times_we_did_each_thing array which would chop off the
2844 first character of the failure_dir string. Increased the size of
2845 the array to 7 to reflect the number of random mutation functions
2848 2004-04-21 Kristian Høgsberg <krh@redhat.com>
2850 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
2851 unix_server->watch here, it is unreffed in disconnect.
2852 (_dbus_server_new_for_tcp_socket): convert NULL host to
2853 "localhost" here so we don't append NULL to address.
2855 * dbus/dbus-server.c (_dbus_server_test): Add test case for
2856 various addresses, including tcp with no explicit host.
2858 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2860 * dbus/dbus-message.c (decode_header_data, decode_string_field):
2861 fix incorrect setting of .name_offset in the HeaderField (it was
2862 off by two bytes, positioned right after the name and typecode)
2864 * bus/bus.c (bus_context_new, bus_context_unref): test before
2865 calling dbus_server_free_data_slot and _dbus_user_database_unref
2866 in case of an error.
2868 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
2871 2004-04-19 Kristian Høgsberg <krh@redhat.com>
2873 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
2874 _dbus_poll() instead of select().
2876 2004-04-15 Jon Trowbridge <trow@ximian.com>
2878 * bus/main.c (signal_handler): Reload the configuration files
2880 (main): Set up our SIGHUP handler.
2882 * bus/bus.c (struct BusContext): Store the config file, user and
2883 fork flag in the BusContext.
2884 (process_config_first_time_only): Added. Contains the code
2885 (previously in bus_context_new) for setting up the BusContext from
2886 the BusConfigParser that should only be run the first time the
2887 config files are read.
2888 (process_config_every_time): Added. Contains the code (previously
2889 in bus_context_new) for setting up the BusContext from the
2890 BusConfigParser that should be run every time the config files are
2892 (load_config): Added. Builds a BusConfigParser from the config
2893 files and passes the resulting structure off to
2894 process_config_first_time_only (assuming this is the first time)
2895 and process_config_every_time.
2896 (bus_context_new): All of the config-related code has been moved
2897 to process_config_first_time_only and process_config_every_time.
2898 Now this function just does the non-config-related initializations
2899 and calls load_config.
2900 (bus_context_reload_config): Added.
2902 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
2904 * bus/driver.c (bus_driver_handle_get_service_owner):
2905 implement a GetServiceOwner method.
2906 * doc/dbus-specification.xml: document it.
2907 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
2909 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
2910 implement, using the bus GetServiceOwner method.
2912 * test/glib/test-dbus-glib.c:
2913 use dbus_gproxy_new_for_service_owner so that we can receive the
2916 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
2918 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2919 dbus/dbus-message.c, dbus/dbus-protocol.h
2920 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
2922 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2923 dbus/dbus-message.c, dbus/dbus-protocol.h
2924 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
2926 * dbus/dbus-internals.c (_dbus_header_field_to_string):
2927 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
2928 DBUS_HEADER_FIELD_SENDER resolves to "sender"
2930 * doc/dbus-specification.xml (Header Fields Table):
2931 s/SERVICE/DESTINATION
2932 s/SENDER_SERVICE/SENDER
2935 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
2937 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
2940 2004-04-13 Michael Meeks <michael@ximian.com>
2942 * glib/dbus-gobject.c (handle_introspect): split out
2943 (introspect_properties): this.
2944 (handle_introspect): implement this.
2946 * test/glib/Makefile.am: use the absolute path so the bus
2947 daemon's chdir ("/") doesn't kill us dead.
2949 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
2951 2004-04-12 Jon Trowbridge <trow@ximian.com>
2953 * bus/config-parser.c (struct BusConfigParser): Added
2954 included_files field.
2955 (seen_include): Added. Checks whether or not a file has already
2956 been included by any parent BusConfigParser.
2957 (bus_config_parser_new): Copy the parent's included_files.
2958 (include_file): Track which files have been included, and fail on
2959 circular inclusions.
2960 (process_test_valid_subdir): Changed printf to report if we are
2961 testing valid or invalid conf files.
2962 (all_are_equiv): Changed printf to be a bit clearer about
2963 what we are actually doing.
2964 (bus_config_parser_test): Test invalid configuration files.
2966 2004-04-09 Jon Trowbridge <trow@ximian.com>
2968 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
2969 argument. If non-null, the newly-constructed BusConfigParser will
2970 be initialized with the parent's BusLimits instead of the default
2972 (include_file): When including a config file, pass in
2973 the current parser as the parent and then copy the BusLimits
2974 from the included BusConfigParser pack to the current parser.
2975 (process_test_valid_subdir): Renamed from process_test_subdir.
2976 (process_test_equiv_subdir): Added. Walks through a directory,
2977 descending into each subdirectory and loading the config files
2978 it finds there. If any subdirectory contains two config files
2979 that don't produce identical BusConfigParser structs, fail.
2980 For now, the BusConfigParser's BusPolicies are not compared.
2981 (bus_config_parser_test): Call both process_test_valid_subdir and
2982 process_test_equiv_subdir.
2984 * bus/config-loader-libxml.c (bus_config_load): Take a parent
2985 argument and pass it along to the call to bus_config_parser_new.
2986 Also made a few small changes to allow this code to compile.
2988 * bus/config-loader-expat.c (bus_config_load): Take a parent
2989 argument and pass it along to the call to bus_config_parser_new.
2991 * bus/bus.c (bus_context_new): Load the config file
2992 with a NULL parent argument.
2994 2004-03-29 Michael Meeks <michael@ximian.com>
2996 * glib/dbus-gobject.c (introspect_properties): split
2997 out, fix mangled 'while' flow control.
2998 (introspect_signals): implement.
2999 (handle_introspect): update.
3001 2004-03-29 Michael Meeks <michael@ximian.com>
3003 * glib/dbus-gobject.c (set_object_property): split out /
3004 re-work, use the property type, and not the message type(!)
3005 (get_object_property): ditto.
3007 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
3008 (dbus_gvalue_marshal): make this code re-usable, needed
3009 for signals too, also on both proxy and server side.
3010 Re-write for more efficiency / readability.
3012 2004-03-29 Michael Meeks <michael@ximian.com>
3014 * dbus/dbus-message.c
3015 (dbus_message_new_error_printf): impl.
3017 * dbus/dbus-connection.c
3018 (dbus_connection_unregister_object_path): fix warning.
3020 * configure.in: fix no-mono-installed situation.
3022 2004-03-27 Havoc Pennington <hp@redhat.com>
3024 Patch from Timo Teräs:
3026 * tools/dbus-send.c (main): if --print-reply, assume type is
3027 method call; support boolean type args
3029 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
3030 bunch of memleak and logic bugs
3032 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
3034 * mono/Arguments.cs:
3035 * mono/Introspector.cs:
3037 * mono/InterfaceProxy.cs:
3039 * mono/ProxyBuilder.cs:
3041 Added InterfaceProxy class to avoid building proxies for every
3045 * dbus-message.c (dbus_message_append_args_valist)
3046 (dbus_message_iter_get_object_path)
3047 (dbus_message_iter_get_object_path_array)
3048 (dbus_message_iter_append_object_path)
3049 (dbus_message_iter_append_object_path_array):
3050 Added object_path iter functions to handle OBJECT_PATH arguments
3052 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
3054 First checkin of mono bindings.
3057 Build stuff for the bindings
3058 * dbus-sharp.pc.in: Added for pkgconfig
3060 2004-03-21 Havoc Pennington <hp@redhat.com>
3062 * test/test-service.c (main): remove debug spew
3064 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3066 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
3069 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
3070 (dbus_message_iter_init_array_iterator)
3071 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
3072 indicate whether the iterator is empty
3074 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
3077 2004-03-19 Havoc Pennington <hp@redhat.com>
3079 * NEWS: 0.21 updates
3081 * configure.in: 0.21
3083 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
3085 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
3086 you don't need pyrex to make dist
3088 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
3091 2004-03-18 Richard Hult <richard@imendio.com>
3093 * dbus/dbus-message.c (dbus_message_get_auto_activation)
3094 (dbus_message_set_auto_activation): Add doxygen docs.
3096 2004-03-16 Richard Hult <richard@imendio.com>
3098 * bus/activation.c: (bus_activation_service_created),
3099 (bus_activation_send_pending_auto_activation_messages),
3100 (bus_activation_activate_service):
3102 * bus/dispatch.c: (bus_dispatch),
3103 (check_nonexistent_service_auto_activation),
3104 (check_service_auto_activated),
3105 (check_segfault_service_auto_activation),
3106 (check_existent_service_auto_activation), (bus_dispatch_test):
3107 * bus/driver.c: (bus_driver_handle_activate_service):
3108 * bus/services.c: (bus_registry_acquire_service):
3109 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
3110 (dbus_message_get_auto_activation):
3111 * dbus/dbus-message.h:
3112 * dbus/dbus-protocol.h: Implement auto-activation.
3114 * doc/dbus-specification.xml: Add auto-activation to the spec.
3116 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
3118 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
3119 fix a bug with CUSTOM types.
3121 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
3122 a unit test for this bug (used to fail).
3124 2004-03-12 Mikael Hallendal <micke@imendio.com>
3127 (babysitter_watch_callback): notify all pending activations waiting for
3128 the same exec that the activation failed.
3129 (bus_activation_activate_service): shortcut the activation if we
3130 already waiting for the same executable to start up.
3132 2004-03-12 Mikael Hallendal <micke@imendio.com>
3135 - Added service file reloading.
3136 Each service files directory is kept in an hash table in
3137 BusActivation and each BusActivationEntry knows what .service-file it
3138 was read from. So when you try to activate a service the bus will
3139 check if it's been updated, removed or if new .service-files has
3141 - Test code at the bottom for the service file reloading.
3142 * bus/test-main.c: (main):
3144 - added service reloading test.
3145 * dbus/dbus-sysdeps.c:
3146 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
3148 2004-03-08 Michael Meeks <michael@ximian.com>
3150 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
3151 bail immediately if disconnected, to avoid busy loop.
3153 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
3154 cleanup cut/paste/inefficiency.
3156 2004-03-01 David Zeuthen <david@fubar.dk>
3158 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
3159 bug where args were used twice. This bug resulted in a segfault
3160 on a Debian/PPC system when starting the messagebus daemon. Include
3161 dbus-sysdeps.h for DBUS_VA_COPY
3163 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
3165 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
3166 appropriate va_copy implementation. From GLib
3168 2004-02-24 Joe Shaw <joe@ximian.com>
3170 * bus/services.c (bus_registry_acquire_service): We need to pass
3171 in the service name to dbus_set_error() to prevent a crash.
3173 2003-12-26 Anders Carlsson <andersca@gnome.org>
3175 * AUTHORS: Reveal my True identity.
3177 2003-12-17 Mikael Hallendal <micke@imendio.com>
3179 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3180 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
3182 2003-12-13 Mikael Hallendal <micke@imendio.com>
3184 * doc/TODO: Added not about better error check of configuration files.
3186 2003-12-02 Richard Hult <richard@imendio.com>
3188 * Update AFL version to 2.0 throughout the source files to reflect
3189 the update that was done a while ago.
3191 2003-12-02 Richard Hult <richard@imendio.com>
3193 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
3194 wrote_dict_key to FALSE on the iter that the dict is appended to,
3195 just like when appending other types. Fixes a bug where a dict
3196 couldn't be put inside a dict.
3197 (dbus_message_iter_append_dict_key): Fix typo in warning message.
3198 (message_iter_test, _dbus_message_test): Add test case for dict
3201 2003-12-01 David Zeuthen <david@fubar.dk>
3203 * python/dbus.py: Add the actual message when calling the reciever
3204 of a signal such that parameters can be inspected. Add the method
3205 remove_signal_receiver
3207 2003-11-26 Mikael Hallendal <micke@imendio.com>
3211 * glib/*.[ch]: Made ref functions return the pointer
3213 2003-11-25 Zack Rusin <zack@kde.org>
3215 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
3217 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
3220 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
3221 the Integrator and to better fit with the server,
3223 2003-11-24 Zack Rusin <zack@kde.org>
3225 * qt/connection.h, qt/connection.cpp: removing initDbus method since
3226 the integrator handles it now
3228 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
3229 since QTimer wasn't really meant to be used the way DBusTimeout is
3231 2003-11-24 Zack Rusin <zack@kde.org>
3233 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
3234 Integrator class which integrates D-BUS with the Qt event loop,
3236 * qt/connection.h, qt/connection.cpp: Move all the code which
3237 was dealing with D-BUS integration to the Integrator class,
3238 and start using Integrator,
3240 2003-11-23 Zack Rusin <zack@kde.org>
3242 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
3245 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
3246 switching namespaces to DBusQt, reworking the class,
3248 * Makefile.cvs: switching dependencies so that it matches KDE
3251 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
3254 2003-11-19 Havoc Pennington <hp@redhat.com>
3258 * configure.in: bump version to 0.20
3260 * configure.in (have_qt): add yet another place to look for qt
3261 (someone hand trolltech a .pc file...)
3263 2003-11-01 Havoc Pennington <hp@redhat.com>
3265 * doc/dbus-specification.xml: add state machine docs on the auth
3266 protocol; just a first draft, I'm sure it's wrong.
3268 2003-10-28 David Zeuthen <david@fubar.dk>
3270 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
3271 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
3273 2003-10-28 Havoc Pennington <hp@redhat.com>
3275 * dbus/dbus-message.c (get_next_field): delete unused function
3277 2003-10-28 Havoc Pennington <hp@redhat.com>
3279 * bus/expirelist.c (do_expiration_with_current_time): detect
3280 failure of the expire_func due to OOM
3282 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
3284 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
3285 NoReply error that's now created by the bus when the service exits
3287 2003-10-28 Havoc Pennington <hp@redhat.com>
3289 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
3290 tests for set_path, set_interface, set_member, etc.
3292 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
3294 * dbus/dbus-message.c (set_string_field): always just delete and
3295 re-append the field; accept NULL for deletion
3296 (re_align_fields_recurse): reimplement
3298 2003-10-26 Havoc Pennington <hp@redhat.com>
3300 * dbus/dbus-connection.c: fix docs to properly describe the
3301 disconnected message
3302 (_dbus_connection_notify_disconnected): remove this function;
3303 we can't synchronously add the disconnected message, we have to
3304 do it after we've queued any remaining real messages
3305 (_dbus_connection_get_dispatch_status_unlocked): queue the
3306 disconnect message only if the transport has finished queueing all
3307 its real messages and is disconnected.
3308 (dbus_connection_disconnect): update the dispatch status here
3310 2003-10-22 Havoc Pennington <hp@redhat.com>
3312 * bus/bus.c (bus_context_check_security_policy): fix up assertion
3314 * bus/connection.c (bus_transaction_send_from_driver): set the
3315 destination to the connection's base service
3317 2003-10-20 Havoc Pennington <hp@redhat.com>
3319 hmm, make check is currently not passing.
3321 * doc/dbus-specification.xml: add requirement that custom type
3322 names follow the same rules as interface names.
3324 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
3325 duplication and allow 'c' to be 'custom'; dict is now 'm' for
3328 * doc/dbus-specification.xml: update type codes to match
3329 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
3330 CUSTOM. Add type OBJECT_PATH to the spec.
3332 2003-10-17 Havoc Pennington <hp@redhat.com>
3334 * bus/driver.c (create_unique_client_name): use "." as separator
3335 in base service names instead of '-'
3337 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
3338 byte at the end of the string
3340 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
3341 optimization macros since string validation seems to be a slow
3344 * doc/dbus-specification.xml: restrict valid
3345 service/interface/member/error names. Add test suite code for the
3348 * dbus/dbus-string.c: limit service/interface/member/error names
3351 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
3352 format arg to verbose spew
3354 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
3355 memory, return instead of g_error
3357 * test/test-service.c (path_message_func): support emitting a
3360 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
3361 activation bus type if DBUS_BUS_ACTIVATION was set; default to
3362 assuming the activation bus was the session bus so that services
3363 started manually will still register.
3364 (init_connections_unlocked): fix so that in OOM situation we get
3365 the same semantics when retrying the function
3367 * test/test-service.c (main): change to use path registration, to
3368 test those codepaths; register with DBUS_BUS_ACTIVATION rather
3369 than DBUS_BUS_SESSION
3371 2003-10-16 Havoc Pennington <hp@redhat.com>
3373 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
3375 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
3376 coverage of the tests
3377 (coverage-report.txt): don't move the .da and .bbg files around
3379 2003-10-16 Havoc Pennington <hp@redhat.com>
3381 * bus/bus.c (struct BusContext): remove struct field I didn't mean
3384 2003-10-16 Havoc Pennington <hp@redhat.com>
3386 * bus/connection.c (bus_pending_reply_expired): either cancel or
3388 (bus_connections_check_reply): use unlink, not remove_link, as we
3389 don't want to free the link; fixes double free mess
3391 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
3392 where no reply was received
3394 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
3397 * bus/signals.c (match_rule_matches): add special cases for the
3398 bus driver, so you can match on sender/destination for it.
3400 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
3401 DBUS_PRINT_BACKTRACE is set
3403 * dbus/dbus-internals.c: add pid to assertion failure messages
3405 * dbus/dbus-connection.c: add message type code to the debug spew
3407 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
3408 sender=foo not service=foo
3410 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
3411 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
3412 DBUS_ACTIVATION_ADDRESS instead
3414 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
3415 DBUS_SYSTEM_BUS_ADDRESS if appropriate
3417 * bus/bus.c (bus_context_new): handle OOM copying bus type into
3420 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
3421 (dbus_message_iter_get_object_path_array): new function (half
3422 finished, disabled for the moment)
3424 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
3425 DBUS_MESSAGE_TYPE_ERROR
3427 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
3428 avoid redirecting stderr to /dev/null
3429 (babysit): close stdin if not doing the "exit_with_session" thing
3431 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
3432 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
3433 stdout/stdin, so things don't get confused
3435 * bus/system.conf.in: fix to allow replies, I modified .conf
3436 instead of .conf.in again.
3438 2003-10-14 David Zeuthen <david@fubar.dk>
3440 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
3441 argtype to arg_type when raising unknown arg type exception.
3442 Changed type list to reflect the changes in dbus-protocol.h so
3443 the bindings actually work.
3445 2003-10-14 Havoc Pennington <hp@redhat.com>
3447 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
3448 to have a bug keeping it from outputting the .da files sometimes
3449 (string_get_string): don't append garbage nul bytes to the string.
3451 2003-10-15 Seth Nickell <seth@gnome.org>
3453 * python/Makefile.am:
3455 Include dbus_h_wrapper.h in the dist tarball.
3457 2003-10-14 Havoc Pennington <hp@redhat.com>
3459 * bus/bus.c (bus_context_check_security_policy): revamp this to
3460 work more sanely with new policy-based requested reply setup
3462 * bus/connection.c (bus_transaction_send_from_driver): set bus
3463 driver messages as no reply
3465 * bus/policy.c (bus_client_policy_check_can_receive): handle a
3466 requested_reply attribute on allow/deny rules
3468 * bus/system.conf: add <allow requested_reply="true"/>
3470 * bus/driver.c (bus_driver_handle_message): fix check for replies
3471 sent to the bus driver, which was backward. How did this ever work
3472 at all though? I think I'm missing something.
3474 * dbus/dbus-message.c (decode_header_data): require error and
3475 method return messages to have a reply serial field to be valid
3476 (_dbus_message_loader_queue_messages): break up this function;
3477 validate that reply serial and plain serial are nonzero;
3478 clean up the OOM/error handling.
3479 (get_uint_field): don't return -1 from this
3480 (dbus_message_create_header): fix signed/unsigned bug
3482 * bus/connection.c (bus_connections_expect_reply): save serial of
3483 the incoming message, not reply serial
3485 2003-10-14 Havoc Pennington <hp@redhat.com>
3487 * bus/connection.c: implement pending reply tracking using
3490 * bus/bus.c (bus_context_check_security_policy): verify that a
3491 reply is pending in order to allow a reply to be sent. Deny
3492 messages of unknown type.
3494 * bus/dbus-daemon-1.1.in: update to mention new resource limits
3496 * bus/bus.c (bus_context_get_max_replies_per_connection): new
3497 (bus_context_get_reply_timeout): new
3499 2003-10-13 Seth Nickell <seth@gnome.org>
3501 * python/Makefile.am:
3503 Pass "make distcheck": remove a couple files from DIST_FILES
3504 that weren't included in the final version.
3506 2003-10-12 Havoc Pennington <hp@pobox.com>
3508 Added test code that 1) starts an actual bus daemon and 2) uses
3509 DBusGProxy; fixed bugs that were revealed by the test. Lots
3510 more testing possible, but this is the basic framework.
3512 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
3513 empty proxy lists from the proxy list hash
3515 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
3516 couple of return_if_fail checks
3518 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
3519 to allocate, so everything is cleared to NULL as it should be.
3521 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
3522 source as data to dbus_connection_set_timeout_functions() as the
3523 timeout functions expected
3525 * test/glib/run-test.sh: add a little script to start up a message
3526 bus and run tests using it
3528 * tools/dbus-launch.1: updates
3530 * tools/dbus-launch.c (main): add --config-file option
3532 * tools/dbus-launch.c (main): remove confusing else if (runprog)
3533 that could never be reached.
3535 * dbus/dbus-message.c (dbus_message_new_method_return)
3536 (dbus_message_new_error, dbus_message_new_signal): set the
3537 no-reply-expected flag on all these. Redundant, but may
3538 as well be consistent.
3540 2003-10-11 Havoc Pennington <hp@pobox.com>
3542 * test/decode-gcov.c (function_solve_graph): make broken block
3543 graph a nonfatal error since it seems to be broken. Need to debug
3546 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
3547 can't just check type > INVALID < LAST anymore
3549 * dbus/dbus-message.c (dbus_message_get_signature): new function
3550 (dbus_message_has_signature): new function
3551 (struct DBusMessage): add signature field (right now it isn't sent
3552 over the wire, just generated on the fly)
3553 (dbus_message_copy): copy the signature, and init strings to
3554 proper length to avoid some reallocs
3555 (dbus_message_iter_init_array_iterator): return void, since it
3557 (dbus_message_iter_init_dict_iterator): return void since it can't fail
3558 (_dbus_message_loader_queue_messages): add silly temporary hack to
3559 fill in message->signature on load
3561 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
3562 characters, so they are relatively human-readable.
3564 2003-10-11 Havoc Pennington <hp@pobox.com>
3566 * dbus/dbus-message.c (_dbus_message_test): add more test
3567 coverage, but #if 0 for now since they uncover a bug
3568 not fixed yet; I think in re_align_field_recurse()
3569 (re_align_field_recurse): add FIXME about broken assertion
3571 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
3573 * bus/connection.c: share a couple code bits with expirelist.c
3575 * bus/expirelist.h, bus/expirelist.c: implement a generic
3576 expire-items-after-N-seconds facility, was going to share between
3577 expiring connections and replies, decided not to use for expiring
3578 connections for now.
3580 * COPYING: include AFL 2.0 (still need to change all the file headers)
3582 2003-10-09 Havoc Pennington <hp@redhat.com>
3584 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
3585 gcc 3.3. Not that we do anything about it yet.
3587 * bus/signals.c (bus_match_rule_parse): impose max length on the
3590 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
3592 2003-10-09 Havoc Pennington <hp@redhat.com>
3594 Make matching rules theoretically work (add parser).
3596 * bus/bus.c (bus_context_check_security_policy): fix up to handle
3597 the case where destination is explicitly specified as bus driver
3598 and someone else is eavesdropping.
3600 * bus/policy.c (bus_client_policy_check_can_receive): fix up
3601 definition of eavesdropping and assertion
3603 * tools/dbus-send.c (main): use dbus_message_type_from_string
3605 * bus/signals.c (bus_match_rule_parse): implement
3607 * dbus/dbus-message.c (dbus_message_type_from_string): new
3609 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
3611 2003-10-02 Havoc Pennington <hp@pobox.com>
3613 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
3614 dbus_gproxy_oneway_call
3616 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
3617 (dbus_server_setup_with_g_main): fix to allow calling them more
3618 than once on the same args
3619 (dbus_bus_get_with_g_main): new function
3621 2003-10-02 Havoc Pennington <hp@redhat.com>
3623 * doc/dbus-tutorial.xml: write some stuff
3625 2003-09-29 Havoc Pennington <hp@pobox.com>
3627 * configure.in: split checks for Doxygen from XML docs, check for
3630 * doc/Makefile.am: XML-ify all the docs, and add a blank
3633 2003-09-29 Havoc Pennington <hp@pobox.com>
3635 * Merge dbus-object-names branch. To see the entire patch
3636 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
3637 it's huuuuge though.
3638 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
3640 2003-09-28 Havoc Pennington <hp@pobox.com>
3642 * HACKING: update to reflect new server
3644 2003-09-26 Seth Nickell <seth@gnome.org>
3647 * python/examples/example-signals.py:
3649 Start implementing some notions of signals. The API
3650 is really terrible, but they sort of work (with the
3651 exception of being able to filter by service, and to
3652 transmit signals *as* a particular service). Need to
3653 figure out how to make messages come from the service
3656 * python/dbus_bindings.pyx.in:
3658 Removed duplicate message_handler callbacks.
3660 2003-09-25 Havoc Pennington <hp@redhat.com>
3662 * bus/session.conf.in: fix my mess
3664 2003-09-25 Havoc Pennington <hp@pobox.com>
3666 * bus/session.conf.in: fix security policy, reported by Seth Nickell
3668 2003-09-25 Seth Nickell <seth@gnome.org>
3670 * python/examples/example-service.py:
3672 Johan notices complete wrong code in example-service, but
3673 completely wrong in a way that works exactly the same (!).
3674 Johan is confused, how could this possibly work? Example
3675 code fails to serve purpose of making things clear.
3678 2003-09-25 Mark McLoughlin <mark@skynet.ie>
3680 * doc/dbus-specification.sgml: don't require header fields
3681 to be 4-byte aligned and specify that fields should be
3682 distinguished from padding by the fact that zero is not
3685 * doc/TODO: remove re-alignment item and add item to doc
3686 the OBJECT_PATH type.
3688 * dbus/dbus-message.c:
3689 (HeaderField): rename the original member to value_offset
3690 and introduce a name_offset member to keep track of where
3691 the field actually begins.
3692 (adjust_field_offsets): remove.
3693 (append_int_field), (append_uint_field),
3694 (append_string_field): don't align the start of the header
3695 field to a 4-byte boundary.
3696 (get_next_field): impl finding the next marhsalled field
3697 after a given field.
3698 (re_align_field_recurse): impl re-aligning a number of
3699 already marshalled fields.
3700 (delete_field): impl deleting a field of any type and
3701 re-aligning any following fields.
3702 (delete_int_or_uint_field), (delete_string_field): remove.
3703 (set_int_field), (set_uint_field): no need to re-check
3704 that we have the correct type for the field.
3705 (set_string_field): ditto and impl re-aligning any
3707 (decode_header_data): update to take into account that
3708 the fields aren't 4-byte aligned any more and the new
3709 way to distinguish padding from header fields. Also,
3710 don't exit when there is too much header padding.
3711 (process_test_subdir): print the directory.
3712 (_dbus_message_test): add test to make sure a following
3713 field is re-aligned correctly after field deletion.
3715 * dbus/dbus-string.[ch]:
3716 (_dbus_string_insert_bytes): rename from insert_byte and
3717 allow the insert of multiple bytes.
3718 (_dbus_string_test): test inserting multiple bytes.
3720 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
3721 warning note to docs about having to re-align any
3722 marshalled values following the string.
3724 * dbus/dbus-message-builder.c:
3725 (append_string_field), (_dbus_message_data_load):
3726 don't align the header field.
3728 * dbus/dbus-auth.c: (process_test_subdir): print the
3731 * test/break-loader.c: (randomly_add_one_byte): upd. for
3734 * test/data/invalid-messages/bad-header-field-alignment.message:
3737 * test/data/valid-messages/unknown-header-field.message: shove
3738 a dict in the unknown field.
3740 2003-09-25 Seth Nickell <seth@gnome.org>
3743 * python/dbus_bindings.pyx.in:
3745 Handle return values.
3747 * python/examples/example-client.py:
3748 * python/examples/example-service.py:
3750 Pass back return values from the service to the client.
3752 2003-09-24 Seth Nickell <seth@gnome.org>
3756 Connect Object methods (when you are sharing an object) up... pass
3757 in a list of methods to be shared. Sharing all the methods just
3758 worked out too weird. You can now create nice Services over the
3761 * python/dbus_bindings.pyx.in:
3763 Keep references to user_data tuples passed into C functions so
3764 Python doesn't garbage collect on us.
3766 Implement MethodReturn and Error subclasses of Message for creating
3767 DBusMessage's of those types.
3769 * python/examples/example-client.py:
3770 * python/examples/example-service.py:
3772 Simple example code showing both how create DBus services and objects,
3773 and how to use them.
3775 2003-09-23 Havoc Pennington <hp@pobox.com>
3777 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
3779 2003-09-23 Havoc Pennington <hp@redhat.com>
3781 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
3782 (dbus_gproxy_disconnect_signal): implement
3783 (dbus_gproxy_manager_remove_signal_match): implement
3784 (dbus_gproxy_manager_add_signal_match): implement
3785 (dbus_gproxy_oneway_call): implement
3787 2003-09-23 Havoc Pennington <hp@pobox.com>
3789 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
3790 subclass. This means dropping the transparent thread safety of the
3791 proxy; you now need a separate proxy per-thread, or your own
3792 locking on the proxy. Probably right anyway.
3793 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
3795 2003-09-22 Havoc Pennington <hp@redhat.com>
3797 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
3799 2003-09-21 Seth Nickell <seth@gnome.org>
3801 First checkin of the Python bindings.
3803 * python/.cvsignore:
3804 * python/Makefile.am:
3805 * python/dbus_bindings.pyx.in:
3806 * python/dbus_h_wrapper.h:
3808 Pieces for Pyrex to operate on, building a dbus_bindings.so
3809 python module for low-level access to the DBus APIs.
3813 High-level Python module for accessing DBus objects.
3818 Build stuff for the python bindings.
3822 Extra macro needed for finding the Python C header files.
3824 2003-09-21 Havoc Pennington <hp@pobox.com>
3826 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
3827 implementing the proxy manager, didn't get very far.
3829 * dbus/dbus-bus.c (dbus_bus_add_match): new
3830 (dbus_bus_remove_match): new
3832 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
3833 path_name argument; adjust the other not-yet-implemented
3834 gproxy constructors to be what I think they should be.
3836 2003-09-21 Havoc Pennington <hp@pobox.com>
3838 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
3839 by default for message bus connections.
3841 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
3842 exit_on_disconnect flag is set and we process the disconnected
3844 (dbus_connection_set_exit_on_disconnect): new function
3846 2003-09-21 Havoc Pennington <hp@pobox.com>
3848 Get matching rules mostly working in the bus; only actually
3849 parsing the rule text remains. However, the client side of
3850 "signal connections" hasn't been started, this patch is only the
3853 * dbus/dispatch.c: fix for the matching rules changes
3855 * bus/driver.c (bus_driver_handle_remove_match)
3856 (bus_driver_handle_add_match): send an ack reply from these
3859 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
3860 arguments, reported by Seth Nickell
3862 * bus/config-parser.c (append_rule_from_element): support
3863 eavesdrop=true|false attribute on policies so match rules
3864 can be prevented from snooping on the system bus.
3866 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
3867 and "destination" in attribute names; fix some docs bugs;
3868 add eavesdrop=true|false attribute
3870 * bus/driver.c (bus_driver_handle_add_match)
3871 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
3874 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
3875 rid of broadcast service concept, signals are just always broadcast
3877 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
3878 mostly implement matching rules stuff (currently only exposed as signal
3881 2003-09-21 Mark McLoughlin <mark@skynet.ie>
3883 * doc/dbus-specification.sgml: Change the header field name
3884 to be an enum and update the rest of the spec to reference
3885 the fields using the conventinal name.
3887 * dbus/dbus-protocol.h: update to reflect the spec.
3889 * doc/TODO: add item to remove the 4 byte alignment requirement.
3891 * dbus/dbus-message.c: Remove the code to generalise the
3892 header/body length and serial number header fields as named
3893 header fields so we can reference field names using the
3895 (append_int_field), (append_uint_field), (append_string_field):
3896 Append the field name as a byte rather than four chars.
3897 (delete_int_or_uint_field), (delete_string_field): reflect the
3898 fact that the field name and typecode now occupy 4 bytes instead
3900 (decode_string_field), (decode_header_data): update to reflect
3901 protocol changes and move the field specific encoding from
3902 decode_string_field() back into decode_header_data().
3904 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
3905 Add utility to aid debugging.
3907 * dbus/dbus-message-builder.c:
3908 (append_string_field), (_dbus_message_data_load): Update to
3909 reflect protocol changes; Change the FIELD_NAME directive
3910 to HEADER_FIELD and allow it to take the field's conventional
3911 name rather than the actual value.
3913 * test/data/*/*.message: Update to use HEADER_FIELD instead
3914 of FIELD_NAME; Always align the header on an 8 byte boundary
3915 *before* updating the header length.
3917 2003-09-15 Havoc Pennington <hp@pobox.com>
3919 * dbus/dbus-pending-call.c: add the get/set object data
3920 boilerplate as for DBusConnection, etc. Use generic object data
3921 for the notify callback.
3923 * glib/dbus-gparser.c (parse_node): parse child nodes
3925 * tools/dbus-viewer.c: more hacking on the dbus-viewer
3927 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
3928 contain functions shared between the convenience lib and the
3931 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
3932 -export-symbols-regex to the GLib library
3934 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
3935 fix the locking in here, and add a default handler for
3936 Introspect() that just returns sub-nodes.
3938 2003-09-14 Havoc Pennington <hp@pobox.com>
3940 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
3941 rather than gfoo consistent
3943 * glib/dbus-gproxy.h: delete for now, move contents to
3944 dbus-glib.h, because the include files don't work right since we
3945 aren't in the dbus/ subdir.
3947 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
3948 (dbus_gproxy_end_call): finish
3949 (dbus_gproxy_begin_call): finish
3951 * glib/dbus-gmain.c (dbus_set_g_error): new
3953 * glib/dbus-gobject.c (handle_introspect): include information
3954 about child nodes in the introspection
3956 * dbus/dbus-connection.c (dbus_connection_list_registered): new
3957 function to help in implementation of introspection
3959 * dbus/dbus-object-tree.c
3960 (_dbus_object_tree_list_registered_and_unlock): new function
3962 2003-09-12 Havoc Pennington <hp@pobox.com>
3964 * glib/dbus-gidl.h: add common base class for all the foo_info
3967 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
3970 * test/Makefile.am: try test srcdir -ef . in addition to test
3971 srcdir = ., one of them should work (yeah lame)
3973 * glib/Makefile.am: build the "idl" parser stuff as a convenience
3976 * glib/dbus-gparser.h: make description_load routines return
3977 NodeInfo* not Parser*
3979 * Makefile.am (SUBDIRS): build test dir after all library dirs
3981 * configure.in: add GTK+ detection
3983 2003-09-07 Havoc Pennington <hp@pobox.com>
3985 * Make Doxygen contented.
3987 2003-09-07 Havoc Pennington <hp@pobox.com>
3989 * doc/dbus-specification.sgml: more updates
3991 2003-09-06 Havoc Pennington <hp@pobox.com>
3993 * doc/dbus-specification.sgml: partial updates
3995 * bus/dbus-daemon-1.1.in: fix the config file docs for the
3996 zillionth time; hopefully I edited the right file this time.
3998 * bus/config-parser.c (append_rule_from_element): support
3999 send_type, send_path, receive_type, receive_path
4001 * bus/policy.c: add message type and path to the list of things
4002 that can be "firewalled"
4004 2003-09-06 Havoc Pennington <hp@pobox.com>
4006 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
4007 (dbus_connection_register_object_path): make this not handle
4008 messages to paths below the given path
4010 2003-09-03 Havoc Pennington <hp@pobox.com>
4012 * test/glib/Makefile.am: add this with random glib-linked test
4015 * glib/Makefile.am: remove the random test programs from here,
4016 leave only the unit tests
4018 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
4019 uscore/javacaps conversion, and fix
4020 (get_object_property, set_object_property): change to .NET
4021 convention for mapping props to methods, set_FooBar/get_FooBar,
4022 since one language has such a convention we may as well copy it.
4023 Plus real methods in either getFooBar or get_foo_bar style won't
4024 collide with this convention.
4026 2003-09-01 Havoc Pennington <hp@pobox.com>
4028 * glib/dbus-gparser.c: implement
4030 * glib/dbus-gobject.c: start implementing skeletons support
4032 * configure.in: when disabling checks/assert, also define
4033 G_DISABLE_ASSERT and G_DISABLE_CHECKS
4035 2003-09-01 Havoc Pennington <hp@pobox.com>
4037 * glib/Makefile.am: rearrange a bunch of files and get "make
4038 check" framework set up
4040 2003-08-31 Havoc Pennington <hp@pobox.com>
4042 * fix build with --disable-tests
4044 2003-08-30 Havoc Pennington <hp@pobox.com>
4046 * dbus/dbus-connection.c: purge DBusMessageHandler
4048 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
4049 use callbacks everywhere
4051 2003-08-30 Havoc Pennington <hp@pobox.com>
4053 * test/data/valid-config-files/system.d/test.conf: change to
4054 root for the user so warnings don't get printed
4056 * dbus/dbus-message.c: add dbus_message_get_path,
4057 dbus_message_set_path
4059 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
4060 dispatching to a path
4062 * dbus/dbus-string.c (_dbus_string_validate_path): add
4064 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
4065 (_dbus_marshal_object_path): implement
4067 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
4068 to contain the path to the target object
4069 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
4070 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
4072 2003-08-30 Havoc Pennington <hp@pobox.com>
4074 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
4076 2003-08-29 Havoc Pennington <hp@pobox.com>
4078 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
4080 (struct DBusObjectSubtree): shrink this
4081 a lot, since we may have a lot of them
4082 (_dbus_object_tree_free_all_unlocked): implement
4083 (_dbus_object_tree_dispatch_and_unlock): implement
4085 2003-08-29 Havoc Pennington <hp@pobox.com>
4087 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
4089 2003-08-28 Havoc Pennington <hp@pobox.com>
4093 * dbus/dbus-connection.c: port to no ObjectID, create a
4094 DBusObjectTree, rename ObjectTree to ObjectPath in public API
4096 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
4097 everything except UnregisterFunction and MessageFunction
4099 * dbus/dbus-marshal.c: port away from DBusObjectID,
4100 add DBUS_TYPE_OBJECT_PATH
4102 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
4103 dbus/dbus-objectid.[hc]: remove these, we are moving to
4104 path-based object IDs
4106 2003-08-25 Havoc Pennington <hp@pobox.com>
4108 Just noticed that dbus_message_test is hosed, I wonder when I
4109 broke that. I thought make check was passing earlier...
4111 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
4112 container tree, will replace most of dbus-object-registry
4114 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
4117 2003-08-19 Havoc Pennington <hp@pobox.com>
4119 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
4120 (dbus_message_is_error): fix this function
4122 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
4125 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
4126 reflect clarified man page
4127 (bus_client_policy_check_can_send): ditto
4129 * bus/session.conf.in: fixup
4131 * bus/system.conf.in: fixup
4133 2003-08-18 Havoc Pennington <hp@redhat.com>
4135 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
4137 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4138 dumb bug created earlier (wrong order of args to
4139 decode_header_data())
4141 * tools/dbus-send.c: port
4143 * tools/dbus-print-message.c (print_message): port
4145 * test/data/*messages: port all messages over
4147 * dbus/dbus-message-builder.c: support including
4150 * bus/driver.c: port over
4152 * bus/dispatch.c: port over to new stuff
4154 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4155 rename disconnect signal to "Disconnected"
4157 2003-08-17 Havoc Pennington <hp@pobox.com>
4159 This doesn't compile yet, but syncing up so I can hack on it from
4160 work. What are branches for if not broken code? ;-)
4162 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
4163 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
4164 DBUS_HEADER_FIELD_ERROR_NAME
4166 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
4167 for the interface+member pairs
4168 (string_hash): change to use g_str_hash algorithm
4169 (find_direct_function, find_string_function): refactor these to
4172 * dbus/dbus-message.c: port all of this over to support
4173 interface/member fields instead of name field
4175 * dbus/dbus-object-registry.c: port over
4177 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
4178 from _dbus_string_validate_name
4180 * bus/dbus-daemon-1.1: change file format for the
4181 <deny>/<allow> stuff to match new message naming scheme
4183 * bus/policy.c: port over
4185 * bus/config-parser.c: parse new format
4187 2003-08-16 Havoc Pennington <hp@pobox.com>
4189 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
4192 * glib/dbus-gproxy.c: some hacking
4194 2003-08-15 Havoc Pennington <hp@redhat.com>
4196 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
4198 * dbus/dbus-connection.c
4199 (dbus_connection_send_with_reply_and_block): factor out internals;
4200 change to convert any error replies to DBusError instead of
4201 returning them as a message
4203 2003-08-15 Havoc Pennington <hp@pobox.com>
4205 * dbus/dbus-connection.c,
4206 dbus/dbus-pending-call.c: Finish the pending call stuff
4208 2003-08-14 Havoc Pennington <hp@redhat.com>
4210 * dbus/dbus-pending-call.c: start on new object that will replace
4211 DBusMessageHandler and ReplyHandlerData for tracking outstanding
4214 * dbus/dbus-gproxy.c: start on proxy object used to communicate
4215 with remote interfaces
4217 * dbus/dbus-gidl.c: do the boring boilerplate in here
4219 2003-08-12 Havoc Pennington <hp@pobox.com>
4221 * bus/dispatch.c (bus_dispatch): make this return proper
4222 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
4224 * dbus/dbus-errors.c (dbus_set_error): use
4225 _dbus_string_append_printf_valist
4227 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
4228 (_dbus_string_append_printf): new
4230 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
4233 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
4234 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
4235 message is unhandled.
4237 2003-08-11 Havoc Pennington <hp@pobox.com>
4239 * bus/test.c (client_disconnect_handler): change to return
4240 HANDLED (would have been REMOVE_MESSAGE)
4242 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
4243 HANDLED/NOT_YET_HANDLED instead of
4244 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
4247 2003-08-10 Havoc Pennington <hp@pobox.com>
4249 * tools/dbus-send.c (main): add --type argument, for now
4250 supporting only method_call and signal types.
4252 * tools/dbus-print-message.c: print message type
4254 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4255 init connection->objects
4257 * doc/dbus-specification.sgml: fix sgml
4259 * bus/*.c: port over to object-instance API changes
4261 * test/test-service.c: ditto
4263 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
4264 name, we will have to fix up the rest of the code to also handle
4266 (dbus_message_new): generic message-creation call
4267 (set_string_field): allow appending name field
4269 2003-08-06 Havoc Pennington <hp@pobox.com>
4271 * dbus/dbus-object-registry.c: implement signal connection
4274 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
4276 * dbus/dbus-internals.c (_dbus_memdup): new function
4278 2003-08-02 Havoc Pennington <hp@pobox.com>
4280 * dbus/dbus-message.c (dbus_message_get_no_reply)
4281 (dbus_message_set_no_reply): add these and remove
4282 set_is_error/get_is_error
4284 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
4285 remove the ERROR flag, since there's now an ERROR type
4287 2003-08-01 Havoc Pennington <hp@pobox.com>
4289 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
4292 * dbus/dbus-message.c (dbus_message_get_type): new function
4294 * doc/dbus-specification.sgml: add "type" byte to messages
4296 2003-08-01 Havoc Pennington <hp@pobox.com>
4298 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
4299 a message type enum to distinguish kinds of message
4300 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
4301 that need not be replied to
4303 2003-08-01 Havoc Pennington <hp@pobox.com>
4305 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
4306 (unpack_8_octets): fix no-64-bit-int bug
4308 * dbus/dbus-object-registry.c (validate_id): validate the
4309 connection ID bits, not just the instance ID.
4311 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
4312 the connection-global 33 bits of the object ID
4314 * dbus/dbus-object-registry.c (info_from_entry): fill in
4315 object ID in the new way
4317 * dbus/dbus-objectid.h: rather than high/low bits, specifically
4318 define server/client/instance bits.
4320 2003-07-30 Havoc Pennington <hp@pobox.com>
4322 * dbus/dbus-connection.c (dbus_connection_register_object): fix
4325 2003-07-13 Havoc Pennington <hp@pobox.com>
4327 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
4328 fields to DBusObjectVTable and DBusObjectInfo
4330 2003-07-12 Havoc Pennington <hp@pobox.com>
4332 * dbus/dbus-object-registry.c: implement unit test,
4333 fix bugs discovered in process
4335 * dbus/dbus-connection.c: remove handler_table and
4336 register_handler(), add DBusObjectRegistry usage
4338 * dbus/dbus-objectid.c (dbus_object_id_is_null)
4339 (dbus_object_id_set_null): new functions
4341 2003-07-08 Havoc Pennington <hp@pobox.com>
4343 * dbus/dbus-object.c: implement some of this
4345 * dbus/dbus-object-registry.c
4346 (_dbus_object_registry_add_and_unlock): fill in the object_id out
4348 (_dbus_object_registry_new): handle OOM
4350 2003-07-08 Havoc Pennington <hp@pobox.com>
4352 * dbus/dbus-object.h: sketch out an API for registering objects
4353 with a connection, that allows us to use as little as 24 bytes
4354 per object and lets application code represent an object in
4355 any conceivable way.
4357 * dbus/dbus-object-registry.c: implement the hard bits of the
4358 DBusConnection aspect of object API. Not yet wired up.
4360 2003-07-06 Havoc Pennington <hp@pobox.com>
4362 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
4363 (_dbus_marshal_object_id): new
4364 (_dbus_demarshal_object_id): new
4365 (_dbus_marshal_get_arg_end_pos): support object ID type, and
4366 consolidate identical switch cases. Don't conditionalize handling
4367 of DBUS_TYPE_UINT64, need to handle the type always.
4368 (_dbus_marshal_validate_arg): consolidate identical cases, and
4369 handle DBUS_TYPE_OBJECT_ID
4371 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
4373 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
4375 2003-09-28 Havoc Pennington <hp@pobox.com>
4379 2003-09-28 Havoc Pennington <hp@pobox.com>
4381 * doc/Makefile.am (dbus-specification.html): testing a funky hack
4382 to work with Debian db2html
4384 2003-09-28 Havoc Pennington <hp@pobox.com>
4386 * configure.in: 0.13
4388 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
4389 stylesheet-images for benefit of Debian
4391 Change back to using filesystem-linked sockets for the system
4392 bus, so only root can create the default system bus address.
4394 * bus/system.conf.in: change to use
4395 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4397 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
4400 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4401 here, and AC_DEFINE DBUS_SYSTEM_PATH
4403 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4406 * doc/busconfig.dtd:
4409 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4411 * doc/dbus-specification.sgml:
4412 Add activation reply values.
4414 2003-08-05 Havoc Pennington <hp@redhat.com>
4416 * configure.in: 0.12
4418 2003-08-05 Anders Carlsson <andersca@codefactory.se>
4420 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
4421 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
4422 (add_watch), (remove_watch), (create_source):
4423 Refcount fds, fixes some reentrancy issues.
4425 2003-07-30 Havoc Pennington <hp@redhat.com>
4427 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
4428 bus address to be abstract if we have abstract sockets
4432 2003-07-28 Havoc Pennington <hp@redhat.com>
4434 * bus/messagebus.in: fix to avoid processname/servicename
4435 confusion, from Michael Kearey
4436 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
4438 2003-07-23 Havoc Pennington <hp@pobox.com>
4440 * dbus/dbus-message.c (dbus_message_iter_get_named):
4441 fix from Andy Hanton to remove broken "+1"
4443 2003-07-16 Havoc Pennington <hp@pobox.com>
4445 * tools/dbus-launch.c (babysit): close stdout/stderr in the
4446 babysitter process, as suggested by Thomas Leonard, so
4447 an "eval `dbus-launch --exit-with-session`" will actually
4450 2003-07-16 Havoc Pennington <hp@pobox.com>
4452 * configure.in: print out EXPANDED_* variables in the summary at
4453 the end; clean up the code that computes EXPANDED_ variables and
4454 get the ones using exec_prefix right. Should make things work
4455 when you build without --prefix
4457 2003-06-29 Havoc Pennington <hp@pobox.com>
4459 * mono/Test.cs (class Test): fire up a main loop and run it
4461 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
4462 done once, the app has to do it
4464 2003-06-26 Havoc Pennington <hp@pobox.com>
4466 * mono/Connection.cs: set up connection with the glib main loop
4468 2003-07-01 Havoc Pennington <hp@redhat.com>
4470 * doc/dbus-specification.sgml: clarify the format of a type code,
4471 change suggested by Jim Blandy
4473 2003-06-29 Miloslav Trmac <mitr@volny.cz>
4476 * tools/Makefile.am: Don't assume srcdir == builddir.
4478 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
4479 the allocated block.
4480 (_dbus_memory_test): New function.
4481 * dbus/dbus-test.h: Add _dbus_memory_test ().
4482 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
4484 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
4486 (dbus_message_new): Remove obsolete @todo.
4488 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
4489 (_dbus_marshal_set_uint64): Fix comment.
4491 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
4492 hardcode FIELD_REPLY_SERIAL.
4494 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
4495 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
4497 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
4498 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
4500 2003-06-24 Havoc Pennington <hp@pobox.com>
4502 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
4504 2003-06-23 Anders Carlsson <andersca@codefactory.se>
4510 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
4511 * gcj/org/.cvsignore:
4512 * gcj/org/Makefile.am:
4513 * gcj/org/freedesktop/.cvsignore:
4514 * gcj/org/freedesktop/Makefile.am:
4515 * gcj/org/freedesktop/dbus/.cvsignore:
4516 * gcj/org/freedesktop/dbus/Makefile.am:
4517 * gcj/org/freedesktop/dbus/Message.java: (Message),
4519 * gcj/org/freedesktop/dbus/natMessage.cc:
4520 Fix the build system.
4522 2003-06-22 Havoc Pennington <hp@pobox.com>
4524 * mono/Connection.cs: add more bindings
4526 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
4529 2003-06-22 Havoc Pennington <hp@pobox.com>
4531 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
4532 Start wrapping more stuff.
4534 2003-06-22 Havoc Pennington <hp@pobox.com>
4536 * mono/Message.cs: implement Message.Wrap() that ensures we only
4537 have a single C# wrapper per DBusMessage, assuming it works which
4538 it probably doesn't.
4540 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
4541 (dbus_message_free_data_slot): new
4542 (dbus_message_set_data): new
4543 (dbus_message_get_data): new
4545 2003-06-22 Havoc Pennington <hp@pobox.com>
4547 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
4548 (_dbus_data_slot_allocator_alloc): rework these to keep a
4549 reference count on each slot and automatically manage a global
4550 slot ID variable passed in by address
4552 * bus/bus.c: convert to new dataslot API
4554 * dbus/dbus-bus.c: convert to new dataslot API
4556 * dbus/dbus-connection.c: convert to new dataslot API
4558 * dbus/dbus-server.c: convert to new dataslot API
4560 * glib/dbus-gmain.c: ditto
4564 * bus/connection.c: ditto
4566 2003-06-22 Anders Carlsson <andersca@codefactory.se>
4568 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
4569 after the gcj checks so that the correct configuration tags
4570 will be added to libtool.
4572 * dbus-glib-1.pc.in: No need to specify any includes since
4573 dbus-1.pc.in has those.
4575 2003-06-22 Havoc Pennington <hp@pobox.com>
4577 * mono/*, gcj/*, configure.in, Makefile.am:
4578 Check in makefiles and subdirs for mono and gcj bindings.
4579 Neither binding actually exists, just trying to get through
4580 all the build and other boring bits.
4582 2003-06-21 Philip Blundell <philb@gnu.org>
4584 * tools/dbus-monitor.1: Updated.
4586 * tools/dbus-send.1: Likewise.
4588 2003-06-20 Anders Carlsson <andersca@codefactory.se>
4590 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
4591 for hangup and error after checking read so we won't discard
4592 pending data if both hangup and read are set.
4594 2003-06-19 Philip Blundell <philb@gnu.org>
4596 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
4598 * tools/dbus-send.c: Accept both --system and --session.
4600 * tools/dbus-monitor.c: Same here.
4602 2003-06-19 Anders Carlsson <andersca@codefactory.se>
4604 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
4605 from C++ (Patch by Miloslav Trmac).
4607 2003-06-15 Joe Shaw <joe@assbarn.com>
4609 * configure.in: Check for socklen_t.
4611 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
4613 * test/test-segfault.c: Add #include <sys/time.h>
4615 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
4616 dbus-launch needs it.
4618 2003-06-09 Havoc Pennington <hp@redhat.com>
4620 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
4621 SUN_LEN, it breaks abstract socket usage
4623 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
4626 2003-06-04 Havoc Pennington <hp@pobox.com>
4628 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
4629 using unix:abstract=/foo, and when listening in a tmpdir
4630 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
4632 * dbus/dbus-transport.c (_dbus_transport_open): support
4635 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4636 support abstract sockets
4638 * dbus/dbus-transport-unix.c
4639 (_dbus_transport_new_for_domain_socket): support abstract sockets
4641 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
4642 toggle as an argument, implement abstract namespace support
4643 (_dbus_listen_unix_socket): ditto
4645 * configure.in: add --enable-abstract-sockets and implement
4646 a configure check for autodetection of the right value.
4648 2003-06-01 Havoc Pennington <hp@pobox.com>
4650 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
4651 in /tmp (though on Linux this will end up being useless,
4652 when we add abstract namespace support)
4654 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
4657 2003-05-28 Colin Walters <walters@verbum.org>
4659 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
4661 2003-05-18 Anders Carlsson <andersca@codefactory.se>
4663 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
4665 2003-05-17 Colin Walters <walters@gnu.org>
4667 * tools/dbus-send.c: Don't exit with an error code if --help was
4668 passed. Default to using the session bus instead of the system
4671 * tools/dbus-launch.c: Ditto.
4673 * tools/dbus-monitor.c: Ditto.
4675 * tools/dbus-send.1: Update with new arguments.
4677 * tools/dbus-launch.c: Emit code to export variables. New
4678 arguments -s and -c to specify shell syntax, and a bit of code to
4679 autodetect syntax. Also, allow specifying a program to run.
4681 * tools/dbus-launch.1: Update with new arguments.
4683 * tools/dbus-send.1: Ditto.
4685 * tools/dbus-monitor.1: Ditto.
4687 2003-05-17 Havoc Pennington <hp@pobox.com>
4689 * bus/config-parser.c (merge_included): merge in policies from
4690 child configuration file.
4692 * bus/policy.c (bus_policy_merge): function to merge two policies
4695 2003-05-16 Havoc Pennington <hp@redhat.com>
4697 * dbus/dbus-connection.c: disable verbose lock spew
4699 * tools/dbus-send.c: add --print-reply command line option
4701 * tools/dbus-print-message.h (print_message): new util function
4702 shared by dbus-send and dbus-monitor
4704 * tools/dbus-monitor.c (handler_func): exit on disconnect
4706 * dbus/dbus-transport-unix.c (do_reading): if the transport is
4707 disconnected, don't try to use the read_watch
4709 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
4710 so we can find this bug more easily
4712 2003-05-16 Havoc Pennington <hp@redhat.com>
4714 * bus/policy.c (free_rule_list_func): avoid a crash when passed
4715 NULL as DBusHashTable is annoyingly likely to do.
4717 2003-05-16 Colin Walters <walters@verbum.org>
4719 * tools/dbus-monitor.c: Add --session argument and usage()
4722 * tools/dbus-monitor.1: Update with new --session arg.
4724 * bus/Makefile.am (install-data-hook): Create
4725 $(libdir)/dbus-1.0/services so that the session bus is happy.
4727 2003-05-15 Havoc Pennington <hp@redhat.com>
4729 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
4730 on non-x86. ifdef's are evil.
4732 2003-05-15 Havoc Pennington <hp@redhat.com>
4734 * configure.in: 0.11
4738 * bus/Makefile.am (initddir): apparently we are supposed to put
4739 init scripts in /etc/rc.d/init.d not /etc/init.d
4741 * bus/Makefile.am: remove the "you must --enable-tests to make
4742 check" as it broke distcheck
4744 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
4746 2003-05-13 James Willcox <jwillcox@gnome.org>
4749 * bus/activation.c: (bus_activation_service_created),
4750 (bus_activation_activate_service):
4751 * bus/driver.c: (bus_driver_send_service_deleted),
4752 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4753 (bus_driver_send_service_acquired),
4754 (bus_driver_send_welcome_message),
4755 (bus_driver_handle_list_services):
4756 * bus/session.conf.in:
4757 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
4758 (dbus_bus_service_exists), (dbus_bus_activate_service):
4761 Add some convenience API which lets you activate a service, and did a
4762 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
4763 and dbus_message_get_args()
4765 2003-05-11 Havoc Pennington <hp@pobox.com>
4767 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
4768 calling _dbus_marshal_validate_arg() for every byte in a byte
4771 * dbus/dbus-message-handler.c: use atomic reference counting to
4772 reduce number of locks slightly; the global lock in here sucks
4774 * dbus/dbus-connection.c
4775 (_dbus_connection_update_dispatch_status_and_unlock): variant of
4776 update_dispatch_status that can be called with lock held; then use
4777 in a couple places to reduce locking/unlocking
4778 (dbus_connection_send): hold the lock over the whole function
4779 instead of acquiring it twice.
4781 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
4783 * bus/connection.c (bus_connections_setup_connection): fix access
4784 to already-freed memory.
4786 * dbus/dbus-connection.c: keep a little cache of linked list
4787 nodes, to avoid using the global linked list alloc lock in the
4788 normal send-message case. Instead we just use the connection lock
4789 that we already have to take.
4791 * dbus/dbus-list.c (_dbus_list_find_last): new function
4793 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
4794 change to use a struct for the atomic type; fix docs,
4795 they return value before increment, not after increment.
4797 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
4798 (_dbus_string_append_8_aligned): new functions to try to
4799 microoptimize this operation.
4800 (reallocate_for_length): break this out of set_length(), to
4801 improve profile info, and also so we can consider inlining the
4804 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
4805 strings with some preallocation, cuts down on our calls to realloc
4806 a fair bit. Though if we can get the "move entire string to empty
4807 string" optimization below to kick in here, it would be better.
4809 * dbus/dbus-string.c (_dbus_string_move): just call
4810 _dbus_string_move_len
4811 (_dbus_string_move_len): add a special case for moving
4812 an entire string into an empty string; we can just
4813 swap the string data instead of doing any reallocs.
4814 (_dbus_string_init_preallocated): new function
4816 2003-05-11 Havoc Pennington <hp@pobox.com>
4818 Write a "test-profile" that does echo client-server with threads;
4819 profile reveals lock contention, memcpy/realloc of buffers, and
4820 UTF-8 validation as hot spots. 20% of lock contention eliminated
4821 with dbus_atomic_inc/dec implementation on x86. Much remaining
4822 contention is global mempool locks for GList and DBusList.
4824 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
4827 * dbus/dbus-connection.c (struct DBusConnection): use
4828 dbus_atomic_t for the reference count
4830 * dbus/dbus-message.c (struct DBusMessage): declare
4831 dbus_atomic_t values as volatile
4833 * configure.in: code to detect ability to use atomic integer
4834 operations in assembly, from GLib patch
4836 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
4837 time, tired of it being wrong in threads and forked processes
4839 * glib/test-profile.c: a little program to bounce messages back
4840 and forth between threads and eat CPU
4842 * dbus/dbus-connection.c: add debug spew macros for debugging
4843 thread locks; include config.h at top; fix deadlock in
4844 dbus_connection_flush()
4846 2003-05-08 Havoc Pennington <hp@pobox.com>
4848 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
4849 data from getting written, and there wasn't a good reason to
4852 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
4853 dbus_verbose lines in test coverage
4854 (main): add list of functions sorted by # of untested blocks
4855 to the coverage report
4857 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
4859 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
4861 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
4862 extend test coverage
4864 * test/data/auth/cancel.auth-script: test canceling an
4867 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
4868 aren't used. in CVS history if we end up needing them.
4870 2003-05-04 Havoc Pennington <hp@pobox.com>
4872 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
4875 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
4876 function, which assumed length was in # of strings, not bytes
4878 * dbus/dbus-message.c (_dbus_message_test): add tests for some
4881 * dbus/dbus-connection.c
4882 (_dbus_connection_queue_received_message): disable function for
4883 now, we are only using it in test mode
4885 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4886 remove a mistaken FIXME
4888 2003-05-04 Havoc Pennington <hp@pobox.com>
4890 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
4891 unlock mutex on successful return, patch from Anders Gustafsson
4893 2003-05-04 Havoc Pennington <hp@pobox.com>
4895 * dbus-glib-1.pc.in (Requires): fix dependencies, from
4898 2003-05-04 Havoc Pennington <hp@pobox.com>
4900 * tools/dbus-launch.c: implement
4902 * bus/main.c (main), bus/bus.c (bus_context_new):
4903 implement --print-pid and --fork
4905 2003-05-03 Havoc Pennington <hp@redhat.com>
4907 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
4908 the address had no value, and add to test suite. Fix and
4909 regression test from Miloslav Trmac
4911 2003-05-03 Havoc Pennington <hp@pobox.com>
4913 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
4914 watch is invalid when handled
4916 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
4917 dbus-launch utility to launch the bus from a shell script. Didn't
4918 actually implement dbus-launch yet, it's just a placeholder still.
4920 2003-05-03 Havoc Pennington <hp@pobox.com>
4922 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
4923 daemon; also documents daemon config file, so replaces
4924 doc/config-file.txt. Corrected some stuff from config-file.txt in
4925 the process of moving it.
4927 2003-05-03 Havoc Pennington <hp@pobox.com>
4929 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
4932 2003-05-03 Colin Walters <walters@verbum.org>
4934 * dbus/dbus-sysdeps.c (fill_user_info): Test against
4935 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
4937 * Makefile.am: Update to use new .pc versioning scheme.
4939 2003-05-02 Havoc Pennington <hp@redhat.com>
4941 * bus/system.conf.in: allow send/receive to/from message bus
4944 2003-04-30 Havoc Pennington <hp@redhat.com>
4946 * configure.in: print a note when building with unit tests and
4949 2003-04-30 Havoc Pennington <hp@redhat.com>
4951 * Makefile.am: add a check-local that complains if you didn't
4952 configure with --enable-tests
4954 2003-04-29 Havoc Pennington <hp@redhat.com>
4956 * glib/dbus-gmain.c: docs cleanups
4958 * dbus/dbus-types.h: add docs on int64 types
4960 * dbus/dbus-memory.c: fix docs to avoid putting private API in
4961 public API docs section
4963 2003-04-29 Havoc Pennington <hp@redhat.com>
4965 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
4966 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
4967 parallel install API version, not with the D-BUS package version.
4969 * HACKING: move some of README over here
4971 * README: updates, and document API/ABI policy
4973 * configure.in: reindentation
4975 2003-04-29 Havoc Pennington <hp@redhat.com>
4977 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
4978 to use this library" to be sure people have the right
4981 2003-04-28 Havoc Pennington <hp@redhat.com>
4983 * configure.in: add --enable-docs which by default is auto yes if
4984 doxygen and db2html found, no otherwise; but can be forced on/off
4986 * doc/Makefile.am: conditionalize whether to build docs on
4989 2003-04-28 Havoc Pennington <hp@redhat.com>
4991 * configure.in: 0.10
4995 * bus/system.conf.in: add <includedir>system.d</includedir>
4997 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
4998 username was provided but not uid
5000 * bus/config-parser.c (struct BusConfigParser): keep track of
5001 whether the parser is toplevel or was included; change some
5002 of the error handling if it's included.
5004 2003-04-27 Havoc Pennington <hp@pobox.com>
5008 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5009 report correct status if we finish processing authentication
5010 inside this function.
5012 * bus/activation.c (try_send_activation_failure): use
5013 bus_transaction_send_error_reply
5015 * bus/connection.c (bus_connection_get_groups): return an error
5016 explaining the problem
5018 * bus/bus.c (bus_context_check_security_policy): implement
5019 restriction here that inactive connections can only send the
5020 hello message. Also, allow bus driver to send anything to
5023 * bus/connection.c (bus_connection_complete): create the
5024 BusClientPolicy here instead of on-demand.
5025 (bus_connection_get_policy): don't return an error
5027 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
5028 sender field in message being replied to
5030 * bus/bus.c (bus_context_check_security_policy): fix silly typo
5031 causing it to return FALSE always
5033 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
5034 we checked sender rather than destination
5036 2003-04-25 Havoc Pennington <hp@redhat.com>
5038 test suite is slightly hosed at the moment, will fix soon
5040 * bus/connection.c (bus_connections_expire_incomplete): fix to
5041 properly disable the timeout when required
5042 (bus_connection_set_name): check whether we can remove incomplete
5043 connections timeout after we complete each connection.
5045 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
5046 probably still broken.
5048 * bus/services.c (bus_registry_acquire_service): implement max
5049 number of services owned, and honor allow/deny rules on which
5050 services a connection can own.
5052 * bus/connection.c (bus_connection_get_policy): report errors here
5054 * bus/activation.c: implement limit on number of pending
5057 2003-04-25 Havoc Pennington <hp@redhat.com>
5059 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
5060 where we used >= 0 instead of != DBUS_UID_UNSET.
5062 2003-04-25 Havoc Pennington <hp@redhat.com>
5064 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
5065 were toggled without add/remove, fix from Anders Gustafsson
5067 2003-04-24 Havoc Pennington <hp@redhat.com>
5069 * test/data/valid-config-files/basic.conf: add <limit> tags to
5072 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
5073 <limit> tag in configuration file.
5075 2003-04-24 Havoc Pennington <hp@redhat.com>
5077 * bus/dispatch.c: somehow missed some name_is
5079 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
5080 (_dbus_timeout_set_interval): new
5082 * bus/connection.c (bus_connections_setup_connection): record time
5083 when each connection is first set up, and expire them after the
5084 auth timeout passes.
5086 2003-04-24 Havoc Pennington <hp@redhat.com>
5088 * dbus/dbus-message.c (dbus_message_name_is): rename
5089 (dbus_message_service_is): rename
5090 (dbus_message_sender_is): rename
5091 (dbus_message_get_service): rename
5093 2003-04-24 Havoc Pennington <hp@redhat.com>
5095 * configure.in: add --enable-checks
5097 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
5099 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
5100 to use thread locks.
5101 (_dbus_connection_handler_destroyed_locked): move some private
5102 functions into proper docs group
5104 * dbus/dbus-internals.h: add _dbus_return_if_fail,
5105 _dbus_return_val_if_fail
5107 Throughout: use dbus_return_if_fail
5109 2003-04-23 James Willcox <jwillcox@gnome.org>
5112 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
5113 (dbus_connection_setup_with_g_main),
5114 (dbus_server_setup_with_g_main):
5115 * glib/test-dbus-glib.c: (main):
5116 * glib/test-thread-client.c: (main):
5117 * glib/test-thread-server.c: (new_connection_callback), (main):
5118 * tools/dbus-monitor.c: (main):
5120 Added a GMainContext argument to dbus_connection_setup_with_g_main()
5121 and dbus_server_setup_with_g_main().
5123 2003-04-20 Havoc Pennington <hp@pobox.com>
5125 * doc/dbus-specification.sgml: document the restrictions on
5126 message and service names
5128 2003-04-22 Havoc Pennington <hp@redhat.com>
5130 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
5131 support, and do some code cleanups to share more code and
5132 speed up array marshal/demarshal.
5134 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
5136 * configure.in: generate dbus-arch-deps.h
5138 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
5141 2003-04-22 Havoc Pennington <hp@redhat.com>
5143 * test/data/valid-messages/opposite-endian.message: fix test
5144 to use proper type for rply field
5146 * test/data/invalid-messages: add tests for below validation
5148 * dbus/dbus-message.c (decode_header_data): validate field types,
5149 and validate that named fields are valid names
5150 (decode_name_field): consider messages in the
5151 org.freedesktop.Local. namespace to be invalid.
5153 * dbus/dbus-string.c (_dbus_string_validate_name): new
5155 2003-04-19 Havoc Pennington <hp@pobox.com>
5157 * bus/driver.c (bus_driver_handle_hello): check limits and
5158 return an error if they are exceeded.
5160 * bus/connection.c: maintain separate lists of active and inactive
5161 connections, and a count of each. Maintain count of completed
5162 connections per user. Implement code to check connection limits.
5164 * dbus/dbus-list.c (_dbus_list_unlink): export
5166 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
5167 number of bytes in the message queue for a connection
5169 2003-04-18 Havoc Pennington <hp@pobox.com>
5171 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
5173 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
5176 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
5177 on realloc be sure to update the pointer in the keyring
5179 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
5180 offset to avoid writing to unallocated memory
5182 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
5183 try the next mechanism, so we properly handle OOM
5185 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
5187 (_dbus_keyring_new): fix OOM bug
5188 (_dbus_keyring_new_homedir): always set error; impose a maximum
5189 number of keys we'll load from the file, mostly to speed up the
5190 test suite and make its OOM checks more useful, but also for
5193 * dbus/dbus-auth.c (process_error_server): reject authentication
5194 if we get an error from the client
5195 (process_cancel): on cancel, send REJECTED, per the spec
5196 (process_error_client): send CANCEL if we get an error from the
5199 2003-04-18 Havoc Pennington <hp@pobox.com>
5201 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
5204 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
5207 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
5208 about DBUS_TEST_HOMEDIR once
5210 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
5213 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
5214 config file so we test the right thing
5216 Throughout: assorted docs improvements
5218 2003-04-18 Havoc Pennington <hp@pobox.com>
5220 * glib/dbus-gmain.c: adapt to watch changes
5222 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
5224 * dbus/dbus-server.h: remove dbus_server_handle_watch
5226 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
5228 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
5229 like DBusTimeout, so we don't need dbus_connection_handle_watch
5232 2003-04-17 Havoc Pennington <hp@redhat.com>
5234 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
5235 database usage so it all goes via the DBusUserDatabase cache.
5237 2003-04-17 Havoc Pennington <hp@redhat.com>
5239 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
5240 there was an OOM watch we skipped, we always return TRUE so we
5241 iterate again to have a look at it again. Fixes test suite hang.
5242 Code rearrangement also lets us lose some memset and only iterate
5243 over callbacks once.
5245 * bus/driver.c (bus_driver_handle_message): sense of test for
5248 2003-04-16 Havoc Pennington <hp@pobox.com>
5250 * doc/dbus-specification.sgml: make spec say serials are unsigned
5252 * dbus/dbus-message.h: change message serials to unsigned
5254 * dbus/dbus-connection.c: adapt to message serials being unsigned
5256 2003-04-15 Havoc Pennington <hp@pobox.com>
5258 * bus/bus.c: create and keep around a shared DBusUserDatabase
5261 * bus/connection.c (bus_connection_get_groups): don't cache
5262 groups for user in the connection object, since user database
5263 object now does that.
5265 2003-04-16 Havoc Pennington <hp@redhat.com>
5267 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
5268 list of size counters
5269 (_dbus_message_loader_putback_message_link): put back a popped link
5271 * dbus/dbus-connection.c
5272 (dbus_connection_set_max_live_messages_size): rename
5274 (dbus_connection_get_outgoing_size): get size of outgoing
5276 (_dbus_connection_set_connection_counter): remove this cruft
5278 2003-04-14 Havoc Pennington <hp@redhat.com>
5280 * dbus/dbus-userdb.c: user database abstraction, mostly to get
5281 caching, but at some point we might want to be able to use a
5284 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
5285 SHA1 conf file to test the sha1 auth mechanism, since the regular
5286 test always uses EXTERNAL when available.
5289 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
5290 add conf file that requires use of sha1 auth
5292 2003-04-13 Havoc Pennington <hp@pobox.com>
5294 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
5295 from Philip Blundell to send messages and monitor them.
5297 2003-04-13 Havoc Pennington <hp@pobox.com>
5299 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
5302 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
5305 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5306 fix to only recover unused bytes if we're already authenticated
5307 (_dbus_transport_get_is_authenticated): fix to still mark us
5308 authenticated if there are unused bytes.
5310 * bus/dispatch.c: implement security policy checking
5312 * bus/connection.c (bus_transaction_send_from_driver): new
5314 * bus/bus.c (bus_context_check_security_policy): new
5316 * bus/dispatch.c (send_service_nonexistent_error): delete this,
5317 now we just set the DBusError and it gets converted to an error
5320 * bus/connection.c (allow_user_function): enable code using actual
5321 data from the config file
5323 * bus/policy.c (list_allows_user): handle wildcard rules for
5324 user/group connection perms
5326 2003-04-13 Havoc Pennington <hp@pobox.com>
5328 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
5330 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
5332 * bus/policy.c (bus_policy_append_mandatory_rule)
5333 (bus_policy_append_default_rule, bus_policy_append_user_rule)
5334 (bus_policy_append_group_rule): new functions
5336 2003-04-12 Havoc Pennington <hp@pobox.com>
5338 * bus/config-parser.c (bus_config_parser_new): fix a memleak
5340 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
5341 the pid/gid/uid, just for paranoia.
5343 * test/break-loader.c (randomly_do_n_things): find a byte
5344 containing a type code, and randomly change it to a different
5347 2003-04-12 Havoc Pennington <hp@pobox.com>
5349 * bus/policy.h: change BusPolicy to be the thing from the config
5350 file, and rename old BusPolicy to BusClientPolicy
5352 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
5353 match change in how policy works
5355 * dbus/dbus-internals.h: mark assert_not_reached as
5356 __attribute((noreturn))__
5358 2003-04-11 Havoc Pennington <hp@redhat.com>
5360 * doc/dbus-specification.sgml: fix a spot with the wrong name for
5361 the broadcast service. Use boolean return for ServiceExists.
5363 2003-04-11 Havoc Pennington <hp@redhat.com>
5365 * configure.in: add another directory to look for qt in.
5367 2003-04-11 Havoc Pennington <hp@redhat.com>
5369 * AUTHORS: add Colin Walters
5371 2003-04-11 Havoc Pennington <hp@redhat.com>
5377 2003-04-11 Havoc Pennington <hp@redhat.com>
5379 * bus/messagebus.in: remove pid file when stopping the
5380 message bus, since the bus won't have privileges to remove it
5383 2003-04-11 Havoc Pennington <hp@redhat.com>
5385 * bus/bus.c (bus_context_new): move credentials change after
5388 2003-04-11 Havoc Pennington <hp@pobox.com>
5390 * test/decode-gcov.c: add "below average functions" to the
5391 coverage report, and change how some of the code works.
5393 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
5394 not in the coverage stats.
5396 * test/test-service.c (main): use _dbus_verbose not fprintf in a
5397 couple places so running the test suite doesn't result in megaspam.
5399 2003-04-11 Havoc Pennington <hp@pobox.com>
5401 * bus/dispatch.c (check_existent_service_activation): accept a no
5402 memory error in a place we didn't before
5404 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
5405 in case the first one failed," since the test suite is less
5408 2003-04-10 Havoc Pennington <hp@pobox.com>
5410 * bus/dispatch.c (check_segfault_service_activation): add test
5411 for launching an executable that just crashes.
5413 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
5414 don't leave a million cores. We'll see how portable this is.
5416 2003-04-10 Havoc Pennington <hp@pobox.com>
5418 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
5419 the possible parent failures before we fork, so that we don't
5420 fail to create a babysitter after creating the child.
5422 * bus/activation.c (bus_activation_activate_service): kill child
5423 if we don't successfully complete the activation.
5425 2003-04-10 Havoc Pennington <hp@redhat.com>
5427 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
5428 the connection if it's disconnected
5430 * bus/activation.c (bus_activation_service_created): use new
5431 transaction features to roll back removal of pending activation if
5432 we don't successfully create the service after all. Don't remove
5433 pending activation if the function fails.
5435 * dbus/dbus-list.c (_dbus_list_insert_before_link)
5436 (_dbus_list_insert_after_link): new code to facilitate
5439 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
5440 new functionality, so we can preallocate the ability to insert
5443 * bus/connection.c (bus_transaction_add_cancel_hook): new function
5444 allowing us to put custom hooks in a transaction to be used for
5445 cancelling said transaction
5447 * doc/dbus-specification.sgml: add some discussion of secondary
5448 service owners, and disallow zero-length service names
5450 * bus/services.c (bus_registry_acquire_service): new function,
5451 splits out part of bus_driver_handle_acquire_service() and fixes
5452 a bug where we didn't remove the service doing the acquiring
5453 from the secondary queue if we failed to remove the current owner
5454 from the front of the queue.
5456 2003-04-10 Alexander Larsson <alexl@redhat.com>
5458 * doc/dbus-specification.sgml:
5459 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
5461 2003-04-10 Alexander Larsson <alexl@redhat.com>
5466 Added files to cvsignore
5468 * dbus/dbus-message.h:
5469 * dbus/dbus-message.c: (dbus_message_iter_get_named):
5470 Make get_named() take two out argument and return a boolean.
5471 (dbus_message_iter_get_args_valist):
5472 Update usage of get_named().
5473 (dbus_message_iter_append_byte):
5475 (dbus_message_iter_append_named)
5477 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
5480 2003-04-10 Alexander Larsson <alexl@redhat.com>
5482 * dbus/dbus-marshal.[ch]:
5483 Add array_type_pos argument to _dbus_marshal_validate_arg.
5484 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
5486 * dbus/dbus-message.[ch]:
5487 Multi-dimensional arrays have full type specification in the
5488 outermost array. Iter code re-arranged to handle this.
5489 Added some more iter tests.
5491 * doc/dbus-specification.sgml:
5494 Update new array encoding description.
5495 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
5497 * test/data/invalid-messages/array-with-mixed-types.message:
5498 * test/data/valid-messages/array-of-array-of-uint32.message:
5499 Change to the new array format.
5501 * test/data/invalid-messages/too-short-dict.message:
5504 * test/data/valid-messages/recursive-types.message:
5505 Fix up and extend test.
5507 2003-04-10 Havoc Pennington <hp@pobox.com>
5509 * bus/dispatch.c: lots of fixes
5511 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
5512 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
5513 that was crack, broke the test service.
5515 * dbus/dbus-transport.c (_dbus_transport_open): fix error
5516 handling to avoid piling up errors if we get a failure on the
5519 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
5520 pid in assertion failures.
5522 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
5523 to some fixed size of file descriptor array. Don't return TRUE
5524 anytime a timeout exists, that led to lots of busy loop silliness
5527 2003-04-09 Havoc Pennington <hp@redhat.com>
5529 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
5530 I'd checked this in earlier but hadn't.
5532 2003-04-09 Havoc Pennington <hp@redhat.com>
5534 * bus/dispatch.c (bus_dispatch_test): get a bit further through
5535 the activation test (man this is getting old!)
5537 2003-04-09 Havoc Pennington <hp@redhat.com>
5539 * test/test-utils.c: use dispatch status function to fix this up
5541 * bus/connection.c (connection_watch_callback): don't dispatch
5543 (connection_timeout_callback): don't dispatch from here
5544 (bus_connections_setup_connection): set the dispatch status function
5545 (bus_connection_disconnected): unset it
5547 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
5548 used to add a connection to be dispatched
5549 (_dbus_loop_iterate): do the dispatching at the end of each
5552 * dbus/dbus-connection.c
5553 (dbus_connection_set_dispatch_status_function): new function
5554 allowing us to fix up main loop usage
5555 (_dbus_connection_last_unref): free all the various function
5557 (dbus_connection_dispatch): call the DispatchStatusFunction
5558 whenever this function returns
5559 (dbus_connection_handle_watch): call DispatchStatusFunction
5560 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
5561 (reply_handler_timeout): call DispatchStatusFunction
5562 (dbus_connection_flush): call DispatchStatusFunction
5564 2003-04-09 Havoc Pennington <hp@redhat.com>
5566 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
5569 * bus/dispatch.c (check_service_activated): fix bug in test
5571 * dbus/dbus-mainloop.c (check_timeout): fix this up
5573 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
5574 verbose output so we can sort out output from different processes,
5575 e.g. in the activation case.
5577 2003-04-08 Colin Walters <walters@gnu.org>
5579 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
5581 (bus_context_new): Set it.
5582 (bus_context_unref): Use it to delete the pid file.
5584 2003-04-08 Havoc Pennington <hp@redhat.com>
5586 * test/data/invalid-messages/array-with-mixed-types.message:
5587 regression test that fails for the moment
5589 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
5590 tests for convenience
5592 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
5593 array of nil, it broke things.
5595 * test/data/invalid-messages/array-of-nil.message: regression test
5597 * test/data/valid-messages/array-of-array-of-uint32.message:
5598 happened to write this so added it to suite
5600 2003-04-08 Havoc Pennington <hp@redhat.com>
5602 * bus/driver.c (bus_driver_handle_acquire_service): init
5603 retval/reply before checking name
5605 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
5606 recursion depth argument
5608 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
5609 in the public struct for future extension
5611 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
5614 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
5617 * doc/dbus-specification.sgml: fix typo
5619 2003-04-08 Alexander Larsson <alexl@redhat.com>
5621 Implemented recursive types, named types and new-style iters
5624 * glib/test-thread-client.c: (thread_func):
5625 * glib/test-thread-server.c: (handle_test_message):
5626 * test/test-service.c: (handle_echo):
5635 * dbus/dbus-internals.c: (_dbus_type_to_string):
5636 Update for new types.
5638 * dbus/dbus-marshal.[ch]:
5639 Implement recursive types and the new marshalling format.
5640 Remove hardcoded dict marshalling.
5641 Marshal named types.
5643 * dbus/dbus-message-builder.c:
5645 Remove references to old types
5647 * dbus/dbus-message.[ch]:
5648 New non-refcounted iter API that supports recursive iters.
5649 Use iters for appending, including support for recursive
5651 Add byte and named type support.
5652 Update everything to new marshalling formats.
5653 Add tests for new API.
5655 * dbus/dbus-protocol.h:
5656 Remove old array types.
5657 Add types: BYTE, ARRAY, DICT, NAMED
5659 * dbus/dbus-string.c:
5660 * dbus/dbus-sysdeps.c:
5661 Make parse_double locale safe.
5663 * dbus/dbus-test-main.c:
5669 * doc/dbus-specification.sgml:
5672 * test/data/incomplete-messages/missing-body.message:
5673 * test/data/invalid-messages/bad-boolean.message:
5674 * test/data/invalid-messages/bad-boolean-array.message:
5675 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
5676 * test/data/invalid-messages/boolean-has-no-value.message-raw:
5677 * test/data/invalid-messages/too-short-dict.message:
5678 * test/data/valid-messages/dict-simple.message:
5679 * test/data/valid-messages/dict.message:
5680 * test/data/valid-messages/emptiness.message:
5681 * test/data/valid-messages/lots-of-arguments.message:
5682 * test/data/valid-messages/no-padding.message:
5683 * test/data/valid-messages/recursive-types.message:
5684 Add missing NAME fields
5685 Fix up dicts & arrays
5687 * test/data/invalid-messages/dict-with-nil-value.message:
5688 Removed, this is not invalid anymore.
5690 * test/data/valid-messages/recursive-types.message:
5691 Add new test for deeply recursive types.
5693 2003-04-07 Havoc Pennington <hp@pobox.com>
5695 * bus/driver.c (bus_driver_handle_acquire_service): return an
5696 error if you try to acquire a service that starts with ':'
5698 2003-04-07 Havoc Pennington <hp@redhat.com>
5700 * doc/dbus-specification.sgml: require that base service names
5701 start with ':' and that the base service is created/deleted
5702 as first and last things a connection does on the bus
5704 * bus/dispatch.c (check_existent_service_activation): lots more
5705 work on the activation test; it doesn't fully pass yet...
5707 * test/test-service.c (main): fix so we don't memleak the
5708 connection to the message bus
5709 (filter_func): accept a message asking us to exit
5711 2003-04-06 Havoc Pennington <hp@pobox.com>
5713 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
5716 * configure.in: fixes to Qt detection from Colin Walters
5718 * doc/Makefile.am: Only remove generated docbook dirs if they
5719 exist, from Colin Walters
5721 * dbus/dbus-bus.c: change how we set well-known connections to
5722 NULL, so that it works if a single connection is stored in
5723 two well-known array slots.
5725 * test/Makefile.am: remove a lot of stuff that isn't immediately
5726 useful, it's in CVS history if we want it.
5728 * test/test-service.c: use dbus-mainloop instead of that
5731 2003-04-06 Havoc Pennington <hp@pobox.com>
5733 * dbus/Makefile.am: split lists of sources into stuff that goes in
5734 the library, util functions that go in the lib and are also used
5735 elsewhere, and util functions that are used in tests/daemon but
5736 don't go in the lib.
5738 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
5739 here so it can be used in test binaries also
5741 2003-04-06 Havoc Pennington <hp@pobox.com>
5743 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
5744 here in the parent process, so we can return an error if it
5745 fails. Also, move some of the code into the child so the parent
5746 is less hosed if we fail midway through.
5748 * bus/bus.c (bus_context_new): move pidfile detection further up
5749 in the function, before we start overwriting sockets and such.
5751 * bus/messagebus.in: adjust this a bit, not sure if it will work.
5753 * configure.in: add --with-system-pid-file and --with-system-socket
5755 2003-04-06 Colin Walters <walters@verbum.org>
5757 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
5759 * bus/system.conf.in: Declare a pidfile.
5761 * bus/bus.c (bus_context_new): Test for an existing pid file, and
5762 create one (if appropriate).
5764 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
5765 (struct BusConfigParser) [pidfile]: New.
5766 (element_type_to_name, merge_included, start_busconfig_child)
5767 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
5768 (bus_config_parser_unref): Free it.
5769 (bus_config_parser_get_pidfile): New function.
5771 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
5773 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
5775 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
5777 * dbus/dbus-sysdeps.h: Prototype it.
5779 2003-04-06 Havoc Pennington <hp@pobox.com>
5781 * bus/bus.c (bus_context_new): print the address in here, rather
5782 than in main(), because we need to do it before forking the daemon
5784 * bus/dispatch.c (send_service_nonexistent_error): set the sender
5785 on the service nonexistent error
5787 * bus/driver.c (bus_driver_handle_acquire_service): set the
5788 sender on the AcquireService reply
5790 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
5791 server also listen on a UNIX socket so services can connect to it.
5793 2003-04-06 Havoc Pennington <hp@pobox.com>
5795 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
5796 so it detects deadlocks and also we actually init threads when
5799 2003-04-06 Havoc Pennington <hp@pobox.com>
5801 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
5802 save the domain socket name, and unlink it when we disconnect the
5803 server. Means that at least when we exit normally, we won't leave
5804 a bunch of junk in /tmp
5806 * dbus/dbus-transport-unix.c
5807 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
5808 memory management). (I was making a real change here but then
5811 2003-04-06 Havoc Pennington <hp@pobox.com>
5813 * bus/bus.c (bus_context_new): fix wrong handling of
5814 server_data_slot_unref() in the error case.
5816 * dbus/dbus-internals.h (_dbus_assert): change so it passes
5817 "(condition) != 0" to _dbus_real_assert so that
5818 "_dbus_assert (pointer)" doesn't cause a warning
5820 * bus/main.c (main): accept --print-address option to print out
5821 the message bus address
5823 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
5825 * dbus/dbus-transport.c (_dbus_transport_open): special error for
5826 "tmpdir" option to unix: address on client side
5828 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
5831 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
5832 we can use to create sockets in the test suite.
5834 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
5835 cleanly. To be used for testing.
5837 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
5839 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
5841 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
5842 handle trying to call this when there's no servers active
5844 2003-04-05 Havoc Pennington <hp@pobox.com>
5850 2003-04-05 Havoc Pennington <hp@pobox.com>
5852 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
5853 crash on startup. Need to get "try starting the daemon"
5854 in the test suite I guess. ;-)
5856 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
5857 tracked the number of open connections; it's better done in
5858 application-specific code as you want it to span all servers etc.
5860 2003-04-05 Havoc Pennington <hp@pobox.com>
5862 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
5863 patch from Colin Walters
5865 2003-04-05 Havoc Pennington <hp@pobox.com>
5867 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
5868 reality; in fact multiple mechanisms are allowed.
5870 * dbus/dbus-internals.c (_dbus_real_assert)
5871 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
5872 _dbus_assert_not_reached() into functions, so that they don't show
5873 up in basic block counts for test coverage, and don't use up as
5874 much disk space. Does mean slower execution speed though, so
5875 assumes --disable-asserts is the normal production case.
5877 2003-04-05 Havoc Pennington <hp@pobox.com>
5879 * test/Makefile.am (dist-hook): also dist *.in files
5885 2003-04-05 Havoc Pennington <hp@pobox.com>
5887 * dbus/dbus-string.c: docs warning
5889 * dbus/dbus-spawn.c: missing docs
5891 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
5893 2003-04-05 Havoc Pennington <hp@pobox.com>
5895 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
5898 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
5899 to -1 once we've reaped the babysitter
5900 (_dbus_babysitter_handle_watch): do as much work as we can, not
5903 * bus/activation.c: add code using DBusBabysitter so that we
5904 handle it when a service fails to start up properly.
5905 (bus_activation_service_created): don't remove the activation
5906 entries as we go, just let them get removed when we free the pending
5907 activation. Unref reply messages after sending them.
5909 2003-04-05 Havoc Pennington <hp@pobox.com>
5911 * test/decode-gcov.c (main): print per-directory stats in the report
5913 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
5915 2003-04-05 Havoc Pennington <hp@pobox.com>
5917 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
5919 * test/decode-gcov.c: hack up a little program to suck data
5920 out of gcov files. Yes this is sort of silly.
5922 * configure.in: define something in config.h and do an
5923 AM_CONDITIONAL when gcov is enabled
5925 2003-04-04 Havoc Pennington <hp@redhat.com>
5927 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
5928 return a "babysitter" object that is used to monitor the status of
5929 the spawned process and reap it when required.
5931 * test/test-segfault.c, test/test-exit.c,
5932 test/test-sleep-forever.c: binaries that do various lame things,
5933 used in the test suite.
5935 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
5937 2003-04-03 Havoc Pennington <hp@pobox.com>
5939 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
5940 in preparation for modifying it, dbus-sysdeps is getting
5943 2003-04-03 Havoc Pennington <hp@redhat.com>
5945 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
5948 * bus/*.[hc]: adapt to mainloop change
5950 2003-04-03 Havoc Pennington <hp@redhat.com>
5952 * bus/activation.c (load_directory): fix up memleaks
5953 (bus_activation_entry_free): free the entry
5955 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
5956 we get one from the message bus; fix memleaks.
5958 * dbus/dbus-message.c (dbus_set_error_from_message): new function
5960 2003-04-03 Havoc Pennington <hp@pobox.com>
5962 * bus/config-parser.c (bus_config_parser_unref): free
5963 list of mechanisms, bug discovered by test suite enhancements
5964 (putting system.conf and session.conf into suite)
5966 * test/Makefile.am, test/test-service.c: add placeholder for a
5967 test service that we'll activate as part of test suite. Doesn't
5970 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
5971 setting NULL value, and use system malloc not dbus_malloc()
5972 when we have unavoidable memleakage.
5974 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
5975 didn't work, and support DBUS_BUS_ACTIVATION.
5977 * bus/activation.c (child_setup): pass our well-known bus type to
5980 * bus/config-parser.c: support <type> to specify well-known type
5982 * doc/dbus-specification.sgml: document the env variables to
5983 locate well-known buses and find service activator
5985 2003-04-02 Havoc Pennington <hp@redhat.com>
5987 * test/Makefile.am (all-local): add a rule to copy tests to
5988 builddir, so we can have generated tests. Use this to remove the
5989 silly hack for testing system.conf and session.conf. Will use this
5990 shortly to generate .service files pointing to test binaries.
5992 2003-04-02 Havoc Pennington <hp@redhat.com>
5994 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
5995 current alloc and needed new length, not max of the doubled
5996 allocation and needed new length. Also, when building tests,
5997 don't do the double-allocation stuff, just realloc every time.
5999 2003-04-02 Havoc Pennington <hp@redhat.com>
6001 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
6003 (_dbus_string_get_dirname): new
6004 (_dbus_sysdeps_test): new
6005 (_dbus_directory_open): include dirnames in error messages
6007 * bus/config-parser.c: interpret <include> and <includedir> and
6008 <servicedir> relative to config file location if the given
6009 filename is not absolute.
6011 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
6013 2003-04-02 Havoc Pennington <hp@redhat.com>
6015 * bus/connection.c (bus_transaction_send_error_reply): set sender
6016 service for the error, and unref the reply on success
6018 * bus/activation.c: convert to use BusTransaction so OOM can be
6020 (bus_activation_service_created): set sender of the message
6022 2003-04-01 Havoc Pennington <hp@redhat.com>
6024 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
6025 <includedir> (at least mostly)
6027 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
6028 first, then the user ID
6030 2003-04-01 Havoc Pennington <hp@pobox.com>
6032 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
6035 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
6037 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
6039 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
6040 socket 0777, and unlink any existing socket.
6042 * bus/bus.c (bus_context_new): change our UID/GID and fork if
6043 the configuration file so specifies; set up auth mechanism
6046 * bus/config-parser.c (bus_config_parser_content): add support
6047 for <fork> option and fill in code for <auth>
6049 * bus/system.conf.in: add <fork/> to default configuration,
6050 and limit auth mechanisms to EXTERNAL
6052 * doc/config-file.txt (Elements): add <fork>
6054 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
6055 (_dbus_change_identity): new function
6057 2003-03-31 Havoc Pennington <hp@redhat.com>
6059 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
6060 (_dbus_listen_unix_socket): fix off-by-one error in null
6061 termination spotted by Nalin
6063 2003-03-31 Havoc Pennington <hp@redhat.com>
6065 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
6066 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
6067 having a real home directory available.
6069 2003-03-31 Havoc Pennington <hp@redhat.com>
6071 * bus/Makefile.am (install-data-hook): create /var/run/dbus
6073 * bus/messagebus.in: add init script for Red Hat /etc/init.d
6075 * configure.in: add support for specifying a style of init script
6078 2003-03-31 Havoc Pennington <hp@redhat.com>
6080 Fix some annoying DBusString API and fix all affected code.
6082 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
6084 (_dbus_string_get_data): change to return string instead of using
6086 (_dbus_string_get_const_data): ditto
6087 (_dbus_string_get_data_len): ditto
6088 (_dbus_string_get_const_data_len): ditto
6090 2003-03-31 Havoc Pennington <hp@redhat.com>
6092 * bus/main.c (main): fix up the command line arguments to be nicer
6094 2003-03-31 Havoc Pennington <hp@redhat.com>
6096 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
6097 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
6098 final location that lands in the config file
6100 * bus/config-loader-expat.c (bus_config_load): fix type of
6103 * doc/TODO: remove TODO item for dbus_bus_get()
6105 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
6107 2003-03-31 Havoc Pennington <hp@pobox.com>
6109 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
6110 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
6111 argument since they are always client side
6113 * dbus/dbus-server.c (dbus_server_get_address): new function
6115 * bus/main.c (main): take the configuration file as an argument.
6117 * test/data/valid-config-files/debug-allow-all.conf: new file to
6118 use with dispatch.c tests for example
6120 * bus/test-main.c (main): require test data dir
6122 * bus/bus.c (bus_context_new): change this to take a
6123 configuration file name as argument
6125 * doc/config-file.txt (Elements): add <servicedir>
6127 * bus/system.conf, bus/session.conf: new files
6129 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
6130 well-known socket if none set
6132 * configure.in: create system.conf and session.conf
6134 2003-03-30 Havoc Pennington <hp@pobox.com>
6136 * bus/config-parser.c: hacking
6138 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
6139 to shut down, since it could cause weirdness with the DBusList
6142 * dbus/dbus-list.c (_dbus_list_test): add tests for the
6143 link-oriented stack routines
6144 (alloc_link): free the mempool if the first alloc from it fails
6146 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
6148 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
6150 (_dbus_string_skip_white): new
6152 * doc/config-file.txt (Elements): add <includedir>
6154 2003-03-28 Havoc Pennington <hp@pobox.com>
6156 * dbus/dbus-string.c (_dbus_string_copy_data_len)
6157 (_dbus_string_copy_data): new functions
6159 2003-03-28 Anders Carlsson <andersca@codefactory.se>
6161 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
6165 * dbus/dbus-memory.c:
6168 2003-03-28 Havoc Pennington <hp@pobox.com>
6170 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
6171 I think it may have just been superstition. Not sure.
6173 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
6174 failures that were not being handled.
6176 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
6178 * dbus/dbus-memory.c: add ability to set number of mallocs in a
6179 row that will fail on out-of-memory.
6181 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
6182 function for testing out-of-memory handling.
6184 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
6185 allocation functions, they do map exactly to the expat ones.
6187 2003-03-27 Havoc Pennington <hp@redhat.com>
6189 * bus/config-loader-libxml.c (bus_config_load): add another error
6192 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6195 Add note about automatic service activation.
6197 * doc/dbus-specification.sgml:
6198 Rename the specification and clarify a few things.
6200 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6203 * dbus/dbus-address.c:
6205 * dbus/dbus-marshal.c:
6206 * dbus/dbus-server-debug-pipe.c:
6207 * dbus/dbus-transport-unix.c:
6208 Fix documentation warnings.
6210 2003-03-26 Havoc Pennington <hp@pobox.com>
6212 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
6213 after every test so it's quick and easy to see which leaked, and
6214 so we test multiple dbus_shutdown() calls
6216 * configure.in: change configure.in XML stuff to also support
6219 * config-loader-libxml.c: some hacking
6221 * config-loader-expat.c: some hacking
6223 * config-parser.c: some hacking, plus tests
6225 2003-03-25 Havoc Pennington <hp@redhat.com>
6227 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
6229 * configure.in: add --with-xml option to specify XML library,
6230 right now only libxml is supported.
6232 * bus/config-loader-libxml.c, config-parser.c: sync some minor
6233 nonworking code between home and work, still just stubs
6235 2003-03-24 Havoc Pennington <hp@redhat.com>
6237 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
6240 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
6241 NULL argument for "message" if the error is a well-known one,
6242 fill in a generic message in this case.
6244 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
6247 * bus/test.c (bus_test_flush_bus): add
6249 * bus/policy.c (bus_policy_test): test code stub
6251 2003-03-24 Havoc Pennington <hp@pobox.com>
6253 * bus/connection.c (bus_connections_setup_connection): set up
6254 the "can this user connect" function, but it always returns
6255 TRUE until we have a config file parser so we can have a config
6256 file that allows connections.
6258 2003-03-23 Havoc Pennington <hp@pobox.com>
6260 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
6261 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
6262 the mutex, so we can check for proper memory management
6265 * dbus/dbus-dataslot.c: remove the mutex from
6266 DBusDataSlotAllocator and lock it manually when using it,
6267 to simplify fitting it into the global slots framework.
6269 * dbus/dbus-threads.c (init_static_locks): rework how we're
6270 handling global locks so they are easily shut down.
6272 * bus/policy.c (bus_policy_append_rule): fix
6274 * bus/test-main.c (main): check for memleaks
6276 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
6277 test suite check for memleaks
6279 * dbus/dbus-memory.c: add support in test mode for tracking
6280 number of outstanding blocks
6282 2003-03-23 Havoc Pennington <hp@pobox.com>
6284 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
6287 * dbus/dbus-hash.h: add ULONG hash keys
6289 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
6290 (_dbus_get_group_id): new function
6292 2003-03-20 Havoc Pennington <hp@redhat.com>
6294 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
6296 (dbus_connection_get_unix_user): new function
6298 2003-03-20 Havoc Pennington <hp@pobox.com>
6300 * bus/connection.c (bus_connection_send_oom_error): assert that
6301 message has a sender
6302 (connection_execute_transaction): ditto
6303 (bus_connection_preallocate_oom_error): fix to set the sender, and
6304 set recipient to the destination service, not the bus driver
6306 * bus/policy.c: hacking
6308 * dbus/dbus-message.c (dbus_message_service_is): new function
6309 (dbus_message_sender_is): new
6311 2003-03-19 Havoc Pennington <hp@redhat.com>
6313 * bus/policy.c: start sketching code for policy restrictions on
6314 what connections can do.
6316 2003-03-18 Havoc Pennington <hp@redhat.com>
6318 * doc/TODO: some notes on high-level todo items. Little nitpick
6319 stuff is all in @todo, so no need to add it here.
6321 * doc/config-file.txt: some notes on how config file might look
6323 2003-03-18 Anders Carlsson <andersca@codefactory.se>
6329 2003-03-17 Havoc Pennington <hp@redhat.com>
6331 * dbus/dbus-internals.h: add gcc attributes so that
6332 our printf-style functions warn on bad arguments to
6335 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
6338 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
6341 2003-03-17 Havoc Pennington <hp@redhat.com>
6343 * bus/test-main.c (main): make it print something as it runs
6344 so make check doesn't look stuck
6346 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
6347 from CVS, now obsolete
6349 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6351 * bus/dispatch.c: (bus_dispatch):
6352 Refetch the service name since it may have been reallocated
6353 when dbus_message_set_sender was called.
6355 * dbus/dbus-sysdeps.c: (_dbus_accept):
6356 Add address and address length variables and use them to stop
6357 valgrind from complaining.
6359 2003-03-17 Havoc Pennington <hp@pobox.com>
6361 All tests pass, no memleaks, no valgrind complaints.
6363 * bus/test.c: refcount handler_slot
6365 * bus/connection.c (bus_connections_new): refcount
6366 connection_data_slot
6368 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
6369 bytes so that auth scripts pass.
6371 * bus/dispatch.c: init message_handler_slot so it gets allocated
6374 * bus/dispatch.c (message_handler_slot_ref): fix memleak
6376 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
6377 dealloc server_pipe_hash when no longer used for benefit of
6380 * dbus/dbus-auth.c (process_command): memleak fix
6382 * bus/dispatch.c (check_hello_message): memleak fix
6384 2003-03-16 Havoc Pennington <hp@pobox.com>
6386 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
6388 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6390 * bus/activation.c (bus_activation_activate_service): Append
6391 the pending activation entry to the list of pending activations.
6393 2003-03-16 Havoc Pennington <hp@pobox.com>
6395 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
6398 * dbus/dbus-address.c (create_entry): fix OOM handling when
6399 failing to alloc entry->method
6401 2003-03-16 Havoc Pennington <hp@pobox.com>
6403 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
6406 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6407 add some missing dbus_set_result
6409 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
6410 alloc the DBusMessageHandler
6412 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
6413 the transport here, since we call this from the finalizer; it
6414 resulted in a double-finalize.
6416 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
6417 where we tried to use transport->connection that was NULL,
6418 happened when transport was disconnected early on due to OOM
6420 * bus/*.c: adapt to handle OOM for watches/timeouts
6422 * dbus/dbus-transport-unix.c: port to handle OOM during
6425 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
6426 reference to unused bytes instead of a copy
6428 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
6431 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
6434 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
6437 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6439 * doc/dbus-specification.sgml:
6440 Document reply message for ActivateService.
6442 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6444 * bus/activation.c: (bus_pending_activation_entry_free),
6445 (bus_pending_activation_free), (bus_activation_new),
6446 (bus_activation_unref), (bus_activation_service_created),
6447 (bus_activation_activate_service):
6449 * bus/bus.c: (bus_context_new):
6450 * bus/desktop-file.c: (new_section):
6451 * bus/driver.c: (bus_driver_send_service_deleted),
6452 (bus_driver_handle_activate_service):
6453 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
6455 * dbus/dbus-connection.c:
6456 (dbus_connection_send_with_reply_and_block):
6457 * dbus/dbus-message.c: (dbus_message_append_args_valist):
6458 * dbus/dbus-protocol.h:
6459 Make activation work better. Now pending activations will be queued
6460 and the daemon won't try to activate services that are already registered.
6462 2003-03-16 Havoc Pennington <hp@pobox.com>
6464 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
6467 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
6468 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
6470 2003-03-16 Havoc Pennington <hp@pobox.com>
6472 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
6473 this. always run the test suite before commit...
6475 * bus/*: adapt to DBusConnection API changes
6477 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
6478 requires renaming stuff to avoid dbus_connection_dispatch name
6481 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
6484 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6485 separate from _dbus_message_loader_return_buffer()
6487 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
6488 this, because it's now always broken to use; the number of
6489 messages in queue vs. the number still buffered by the message
6490 loader is undefined/meaningless. Should use
6491 dbus_connection_get_dispatch_state().
6492 (dbus_connection_dispatch): rename from
6493 dbus_connection_dispatch_message
6495 2003-03-16 Havoc Pennington <hp@pobox.com>
6497 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
6500 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6502 * dbus/dbus-connection.c:
6503 (dbus_connection_send_with_reply_and_block):
6504 Decrease connection->n_incoming when removing an entry
6506 * dbus/dbus-dict.c: (dbus_dict_entry_free),
6507 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6508 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6509 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
6510 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
6511 (dbus_dict_get_byte_array):
6512 Handle NULL arrays and strings. Also add support for byte arrays.
6514 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
6515 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
6516 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6517 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6518 (_dbus_demarshal_dict), (demarshal_and_validate_len),
6519 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
6520 * dbus/dbus-marshal.h:
6521 Add support for marshalling and demarshalling empty arrays and strings.
6523 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6524 (dbus_message_append_string_array),
6525 (dbus_message_iter_get_boolean),
6526 (dbus_message_iter_get_boolean_array),
6527 (dbus_message_iter_get_int32_array),
6528 (dbus_message_iter_get_uint32_array),
6529 (dbus_message_iter_get_double_array),
6530 (dbus_message_iter_get_byte_array),
6531 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
6532 (check_message_handling):
6533 Add support for getting empty arrays and dicts.
6535 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
6536 Don't do any validation at all for now, that's better than just checking
6539 * test/data/valid-messages/emptiness.message:
6540 New test message with lots of empty arrays.
6542 2003-03-16 Havoc Pennington <hp@pobox.com>
6544 * dbus/dbus-connection.c
6545 (_dbus_connection_queue_received_message_link): new function that
6546 can't fail due to OOM
6548 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
6549 new function pops a message together with a list link
6552 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
6553 message queuing functions to avoid needing to alloc memory
6555 2003-03-16 Havoc Pennington <hp@pobox.com>
6557 Oops - test code was only testing failure of around 30 of the
6558 mallocs in the test path, but it turns out there are 500+
6559 mallocs. I believe this was due to misguided linking setup such
6560 that there was one copy of dbus_malloc etc. in the daemon and one
6561 in the shared lib, and only daemon mallocs were tested. In any
6562 case, the test case now tests all 500+ mallocs, and doesn't pass
6563 yet, though there are lots of fixes in this patch.
6565 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6566 this so that it doesn't need to allocate memory, since it
6567 has no way of indicating failure due to OOM (and would be
6568 annoying if it did).
6570 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
6572 * bus/Makefile.am: rearrange to create two self-contained
6573 libraries, to avoid having libraries with overlapping symbols.
6574 that was resulting in weirdness, e.g. I'm pretty sure there
6575 were two copies of global static variables.
6577 * dbus/dbus-internals.c: move the malloc debug stuff to
6580 * dbus/dbus-list.c (free_link): free list mempool if it becomes
6583 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
6585 * dbus/dbus-address.c (dbus_parse_address): free list nodes
6588 * bus/dispatch.c (bus_dispatch_add_connection): free
6589 message_handler_slot when no longer using it, so
6590 memory leak checkers are happy for the test suite.
6592 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
6594 * bus/bus.c (new_connection_callback): disconnect in here if
6595 bus_connections_setup_connection fails.
6597 * bus/connection.c (bus_connections_unref): fix to free the
6599 (bus_connections_setup_connection): if this fails, don't
6600 disconnect the connection, just be sure there are no side
6603 * dbus/dbus-string.c (undo_alignment): unbreak this
6605 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
6607 (_dbus_auth_new): fix the order in which we free strings
6610 * bus/connection.c (bus_connection_disconnected): fix to
6611 not send ServiceDeleted multiple times in case of memory
6614 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
6615 get the base service name
6616 (dbus_bus_register_client): don't return base service name,
6617 instead store it on the DBusConnection and have an accessor
6619 (dbus_bus_register_client): rename dbus_bus_register()
6621 * bus/dispatch.c (check_hello_message): verify that other
6622 connections on the bus also got the correct results, not
6623 just the one sending hello
6625 2003-03-15 Havoc Pennington <hp@pobox.com>
6627 Make it pass the Hello handling test including all OOM codepaths.
6628 Now to do other messages...
6630 * bus/services.c (bus_service_remove_owner): fix crash when
6631 removing owner from an empty list of owners
6632 (bus_registry_ensure): don't leave service in the list of
6633 a connection's owned services if we fail to put the service
6636 * bus/connection.c (bus_connection_preallocate_oom_error): set
6637 error flag on the OOM error.
6639 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6640 handle _dbus_transport_set_connection failure
6642 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
6643 to create watches up front and simply enable/disable them as
6645 (unix_connection_set): this can now fail on OOM
6647 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
6648 of enabling/disabling a watch or timeout.
6650 * bus/loop.c (bus_loop_iterate): don't touch disabled
6653 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
6655 2003-03-15 Havoc Pennington <hp@pobox.com>
6657 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
6658 write useful test code, after all that futzing around ;-)
6660 Test does not yet pass because we can't handle OOM in
6661 _dbus_transport_messages_pending (basically,
6662 dbus_connection_preallocate_send() does not prealloc the write
6663 watch). To fix this, I think we need to add new stuff to
6664 set_watch_functions, namely a SetEnabled function so we can alloc
6665 the watch earlier, then enable it later.
6667 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
6668 dbus-memory.c to the convenience lib
6670 * bus/test.c: rename some static functions to keep them clearly
6671 distinct from stuff in connection.c. Handle client disconnection.
6673 2003-03-14 Havoc Pennington <hp@pobox.com>
6675 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
6676 transport, tests more of the real codepath. Set up clients
6677 with bus_setup_debug_client.
6679 * bus/test.c (bus_setup_debug_client): function to set up debug
6680 "clients" on the main loop
6682 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
6685 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
6688 * dbus/dbus-server-debug.c: support a debug server based on pipes
6690 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
6691 (_dbus_close): new function
6693 * configure.in: check for socketpair
6695 2003-03-14 Havoc Pennington <hp@redhat.com>
6697 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
6700 * dbus/dbus-transport-debug.c: rework this a good bit to be
6701 less complicated. hopefully still works.
6703 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
6706 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
6709 * dbus/dbus-message.c (dbus_message_copy): rename from
6710 dbus_message_new_from_message, fix it up to copy
6711 all the message fields, add test case
6713 * bus/dispatch.c (bus_dispatch_test): add some more test code,
6714 not quite passing yet
6716 2003-03-14 Havoc Pennington <hp@pobox.com>
6718 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
6719 until no work remains" in test code. (the large diff here
6720 is just code movement, no actual changes)
6722 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
6723 1, no point waiting around for test code.
6724 (_dbus_server_debug_accept_transport): unref the timeout
6725 after adding it (right?)
6727 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
6729 2003-03-13 Havoc Pennington <hp@redhat.com>
6731 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
6734 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
6737 * dbus/dbus-connection.h: Make AddWatchFunction and
6738 AddTimeoutFunction return a bool so they can fail on out-of-memory
6740 * bus/bus.c (bus_context_new): set up timeout handlers
6742 * bus/connection.c (bus_connections_setup_connection): set up
6745 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
6748 * bus/bus.c (bus_context_new): adapt to changes
6750 * bus/connection.c: adapt to changes
6752 * test/watch.c: adapt to DBusWatch changes
6754 * bus/dispatch.c (bus_dispatch_test): started adding this but
6757 2003-03-14 Anders Carlsson <andersca@codefactory.se>
6759 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
6761 2003-03-13 Havoc Pennington <hp@pobox.com>
6763 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
6764 set up a test framework as for the library
6766 2003-03-12 Havoc Pennington <hp@pobox.com>
6768 Throughout: purge global variables, introduce BusActivation,
6769 BusConnections, BusRegistry, etc. objects instead.
6771 * bus/bus.h, bus/bus.c: introduce BusContext as a global
6774 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
6775 going to redo this a bit differently I think
6777 2003-03-12 Havoc Pennington <hp@redhat.com>
6779 Mega-patch that gets the message bus daemon initially handling
6780 out-of-memory. Work still needed. Also lots of random
6781 moving stuff to DBusError instead of ResultCode.
6783 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
6785 * dbus/dbus-connection.c
6786 (dbus_connection_send_with_reply_and_block): use DBusError
6788 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
6791 * dbus/dbus-connection.c (dbus_connection_send): drop the result
6792 code here, as the only failure possible is OOM.
6794 * bus/connection.c (bus_connection_disconnect):
6795 rename bus_connection_disconnected as it's a notification only
6797 * bus/driver.c (bus_driver_handle_acquire_service): don't free
6798 "name" on get_args failure, should be done by get_args;
6799 don't disconnect client for bad args, just return an error.
6800 (bus_driver_handle_service_exists): ditto
6802 * bus/services.c (bus_services_list): NULL-terminate returned array
6804 * bus/driver.c (bus_driver_send_service_lost)
6805 (bus_driver_send_service_acquired): send messages from driver to a
6806 specific client to the client's unique name, not to the broadcast
6809 * dbus/dbus-message.c (decode_header_data): reject messages that
6810 contain no name field
6811 (_dbus_message_get_client_serial): rename to
6812 dbus_message_get_serial and make public
6813 (_dbus_message_set_serial): rename from set_client_serial
6814 (_dbus_message_set_reply_serial): make public
6815 (_dbus_message_get_reply_serial): make public
6817 * bus/connection.c (bus_connection_foreach): allow stopping
6818 iteration by returning FALSE from foreach function.
6820 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
6821 (dbus_connection_free_preallocated_send)
6822 (dbus_connection_preallocate_send): new API for sending a message
6823 without possibility of malloc failure.
6824 (dbus_connection_send_message): rename to just
6825 dbus_connection_send (and same for whole function family)
6827 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
6829 * dbus/dbus-sysdeps.c (_dbus_exit): new function
6831 * bus/activation.c: handle/return errors
6833 * dbus/dbus-errors.h: add more DBUS_ERROR #define
6835 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
6836 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
6837 (_dbus_result_from_errno): move to this file
6839 2003-03-10 Anders Carlsson <andersca@codefactory.se>
6841 * dbus/dbus-marshal.c:
6842 (_dbus_marshal_set_string):
6843 Take a length argument so we can marshal the correct string
6846 (_dbus_marshal_dict), (_dbus_demarshal_dict),
6847 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
6848 (_dbus_marshal_test):
6849 * dbus/dbus-marshal.h:
6850 Add support for marshalling and demarshalling dicts.
6852 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6853 Add support for TYPE DICT.
6855 * dbus/dbus-message.c: (set_string_field):
6856 Adjust header padding.
6858 (dbus_message_append_args_valist), (dbus_message_append_dict),
6859 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
6860 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
6861 (check_message_handling), (check_have_valid_message):
6862 * dbus/dbus-message.h:
6863 Add functions for setting and getting dicts.
6865 * dbus/dbus-protocol.h:
6871 * doc/dbus-specification.sgml:
6872 Add information about how dicts are marshalled.
6874 * test/data/invalid-messages/dict-with-nil-value.message:
6875 * test/data/invalid-messages/too-short-dict.message:
6876 * test/data/valid-messages/dict-simple.message:
6877 * test/data/valid-messages/dict.message:
6878 Add sample messages containing dicts.
6880 2003-03-08 Anders Carlsson <andersca@codefactory.se>
6882 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
6884 2003-03-07 Anders Carlsson <andersca@codefactory.se>
6887 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6888 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
6889 (dbus_dict_set_int32), (dbus_dict_set_uint32),
6890 (dbus_dict_set_double), (dbus_dict_set_string),
6891 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6892 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6893 (dbus_dict_set_string_array), (_dbus_dict_test):
6895 Fix according to comments from Havoc.
6897 2003-03-06 Michael Meeks <michael@server.home>
6899 * configure.in: if we don't have kde-config, disable have_qt.
6901 2003-03-07 Anders Carlsson <andersca@codefactory.se>
6906 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6907 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
6908 (dbus_dict_remove), (dbus_dict_get_value_type),
6909 (dbus_dict_get_keys), (dbus_dict_put_boolean),
6910 (dbus_dict_put_int32), (dbus_dict_put_uint32),
6911 (dbus_dict_put_double), (dbus_dict_put_string),
6912 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
6913 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
6914 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
6915 (dbus_dict_get_int32), (dbus_dict_get_uint32),
6916 (dbus_dict_get_double), (dbus_dict_get_string),
6917 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
6918 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
6919 (dbus_dict_get_string_array), (_dbus_dict_test):
6921 Add DBusDict implementation
6923 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
6927 2003-03-04 Havoc Pennington <hp@pobox.com>
6929 * test/data/auth/*: adapt to changes
6931 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
6932 USERID_BASE64 and change USERNAME_BASE64 to put in username not
6935 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
6936 more stuff from being in a context name, to make the protocol
6937 simpler to deal with
6939 * dbus/dbus-errors.c (dbus_error_has_name): new function
6940 (dbus_error_is_set): new function
6942 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
6943 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
6945 * dbus/dbus-connection.c (dbus_connection_flush): also read
6946 messages during a flush operation
6948 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
6950 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6952 * configure.in: Check for gethostbyname on Solaris.
6954 * dbus/dbus-transport.c: (_dbus_transport_open):
6955 Remove duplicate "tcp" entry.
6957 * doc/dbus-specification.sgml:
6958 Clarify some things.
6960 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6962 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
6963 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
6964 (_dbus_keyring_test):
6965 * dbus/dbus-md5.c: (_dbus_md5_compute):
6966 * dbus/dbus-sha.c: (_dbus_sha_compute):
6969 2003-03-05 Anders Carlsson <andersca@codefactory.se>
6971 * README: Add some things.
6973 2003-03-04 Anders Carlsson <andersca@codefactory.se>
6975 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
6976 after case DBUS_TYPE_BOOELAN.
6978 2003-03-02 Havoc Pennington <hp@pobox.com>
6980 * test/break-loader.c (randomly_set_extreme_ints): add test that
6981 sets really huge and small integers
6983 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
6984 that length of boolean array fits in the string, and that
6985 string has room for boolean value in single-bool case.
6987 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
6988 optional value to "ALIGN" command which is what to fill the
6991 * test/data/valid-messages/no-padding.message: add regression
6992 test for the message padding problem
6994 2003-03-02 Havoc Pennington <hp@pobox.com>
6996 * dbus/dbus-message.c (decode_header_data): fix to always init
6997 message_padding, from Benjamin Dauvergne
6999 2003-03-02 Havoc Pennington <hp@pobox.com>
7005 2003-03-01 Joe Shaw <joe@assbarn.com>
7007 * configure.in: Check for "struct cmsgcred" and try to access its
7008 members for BSD-like unices.
7010 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
7011 _dbus_read_credentials_unix_socket().
7012 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
7013 read() for reading the credential byte off the unix socket. Use
7014 struct cmsgcred on systems that support it.
7016 2003-02-27 Alexander Larsson <alexl@redhat.com>
7020 Make gthreads-2.0 dependency optional. Don't build thread test if
7023 2003-02-27 Havoc Pennington <hp@pobox.com>
7025 * dbus/dbus-connection.c
7026 (dbus_connection_send_message_with_reply_and_block): fix doh!
7027 doh! doh! bug that resulted in never removing a reply from the
7028 queue, no wonder we called get_reply_serial so much ;-)
7030 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
7031 and client serial instead of demarshaling them every time
7033 2003-02-27 Havoc Pennington <hp@pobox.com>
7035 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
7036 more inlined, using dbus-string-private.h, speeds things up
7039 * dbus/dbus-string.c (_dbus_string_free): apply align offset
7040 when freeing the string
7041 (_dbus_string_steal_data): fix for align offset
7042 (undo_alignment): new function
7044 2003-02-26 Havoc Pennington <hp@redhat.com>
7046 All kinds of audit fixes from Owen, plus initial attempt to
7047 handle unaligned memory returned from malloc.
7049 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
7050 leave room for align_offset and nul byte
7051 (fixup_alignment): function to track an align_offset and
7052 ensure real->str is aligned
7053 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
7054 to allow a nul byte plus align offset
7055 (_dbus_string_lock): fix overflow issue
7056 (_dbus_string_init_const_len): add assertions on sanity of len,
7057 assign allocated to be ALLOCATION_PADDING larger than len
7058 (set_length): fixup the overflow handling
7059 (_dbus_string_get_data_len): fix overflow in assertion
7060 (open_gap): detect overflow in size of gap to be opened
7061 (_dbus_string_lengthen): add overflow check
7062 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
7063 (_dbus_string_append): add overflow check
7064 (_dbus_string_append_unichar): overflow
7065 (_dbus_string_delete): fix overflow in assertion
7066 (_dbus_string_copy_len): overflow in assertion
7067 (_dbus_string_replace_len): overflows in assertions
7068 (_dbus_string_find): change to implement in terms of
7069 _dbus_string_find_to
7070 (_dbus_string_find_to): assorted fixage
7071 (_dbus_string_equal_c_str): assert c_str != NULL,
7072 fix logic so the function works
7073 (_dbus_string_ends_with_c_str): fix overflow thingy
7074 (_dbus_string_base64_encode): overflow fix
7075 (_dbus_string_validate_ascii): overflow
7076 (_dbus_string_validate_nul): overflow
7078 2003-02-26 Havoc Pennington <hp@redhat.com>
7080 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
7082 2003-02-26 Alexander Larsson <alexl@redhat.com>
7085 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
7087 * dbus/dbus-connection.c:
7088 * dbus/dbus-connection.h:
7089 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
7090 Add dbus_connection_set_wakeup_main_function and use it when queueing
7091 incoming and outgoing messages.
7094 * dbus/dbus-dataslot.c:
7095 Threadsafe usage of DBusDataSlotAllocator
7097 * dbus/dbus-message.c: (dbus_message_get_args_iter):
7100 * dbus/dbus-server-unix.c:
7103 * glib/dbus-gmain.c:
7104 Implement the new wakeup functions for glib.
7107 * glib/test-thread-client.c:
7108 * glib/test-thread-server.c:
7109 * glib/test-thread.h:
7110 Initial cut at some thread test code. Not really done yet.
7112 2003-02-26 Havoc Pennington <hp@pobox.com>
7114 * dbus/dbus-connection.c
7115 (dbus_connection_send_message_with_reply_and_block): fix crash
7116 where we ref'd the outgoing message instead of the returned reply
7118 * dbus/dbus-transport-unix.c (do_authentication): check read watch
7119 at the end of this function, so if we didn't need to read for
7120 authentication, we reinstall it for receiving messages
7122 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
7123 a NULL sender for peer-to-peer case
7125 * dbus/dbus-transport-unix.c (check_read_watch): handle
7126 !authenticated case correctly
7128 * glib/dbus-gmain.c: add support for DBusServer
7130 * dbus/dbus-server.c: add data slot support
7132 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
7133 return values and handle errors
7135 * dbus/dbus-dataslot.c: factor out the data slot stuff from
7138 * Doxyfile.in (INPUT): add glib subdir
7140 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
7141 setup_with_g_main instead of hookup_with_g_main; write docs
7143 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7145 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
7146 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7147 * dbus/dbus-message.c: (dbus_message_append_boolean),
7148 (dbus_message_append_boolean_array),
7149 (dbus_message_get_args_valist), (_dbus_message_test):
7150 * dbus/dbus-message.h:
7151 * doc/dbus-specification.sgml:
7152 Various fixes as pointed out by Havoc.
7154 * test/data/invalid-messages/bad-boolean-array.message:
7155 * test/data/invalid-messages/bad-boolean.message:
7156 Add invalid boolean value test cases.
7158 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7160 * dbus/dbus-internals.c: (_dbus_type_to_string):
7161 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7162 (_dbus_marshal_validate_arg):
7163 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7164 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7165 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
7166 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
7167 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
7168 (dbus_message_iter_get_double),
7169 (dbus_message_iter_get_boolean_array), (message_iter_test):
7170 * dbus/dbus-message.h:
7171 * dbus/dbus-protocol.h:
7172 * doc/dbus-specification.sgml:
7173 * test/data/valid-messages/lots-of-arguments.message:
7174 Add support for boolean and boolean array types.
7176 2003-02-23 Havoc Pennington <hp@pobox.com>
7178 * dbus/dbus-keyring.c: finish most of this implementation and
7181 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7182 these barf if the error isn't cleared to NULL
7184 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
7185 (_dbus_create_directory): new function
7187 * dbus/dbus-errors.c (dbus_set_error): fix warning
7189 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
7190 (_dbus_string_hex_decode): new function
7191 (test_hex_roundtrip): test code
7193 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
7195 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
7197 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
7198 the save-to-temp/rename trick to atomically write the new file
7199 (_dbus_string_parse_uint): new function
7201 2003-02-22 Havoc Pennington <hp@pobox.com>
7203 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
7205 2003-02-22 Havoc Pennington <hp@pobox.com>
7207 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
7208 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
7210 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7212 * dbus/test/data/sha-1: add US government test suite for SHA-1
7214 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7216 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7217 Make string arrays NULL-terminated.
7219 * dbus/dbus-memory.c: (dbus_free_string_array):
7220 * dbus/dbus-memory.h:
7221 New function for freeing NULL-terminated string arrays.
7223 * dbus/dbus-message-builder.c: (append_quoted_string),
7224 (_dbus_message_data_load):
7225 Add support for array types.
7227 * dbus/dbus-message.c: (check_message_handling):
7228 Add more types as test cases.
7230 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
7231 (_dbus_string_parse_double):
7232 Add the start offset to the end offset.
7234 * test/data/valid-messages/lots-of-arguments.message:
7235 New test message with lots of arguments.
7237 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7239 * dbus/dbus-message.c: (dbus_message_append_nil),
7240 (dbus_message_append_int32), (dbus_message_append_uint32),
7241 (dbus_message_append_double), (dbus_message_append_string),
7242 (dbus_message_append_int32_array),
7243 (dbus_message_append_uint32_array),
7244 (dbus_message_append_double_array),
7245 (dbus_message_append_byte_array),
7246 (dbus_message_append_string_array):
7247 Fix all out-of-memory handling in these functions.
7249 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7251 * dbus/dbus-message.c: (dbus_message_append_nil):
7254 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7256 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7257 (dbus_message_append_nil), (dbus_message_append_int32_array),
7258 (dbus_message_append_uint32_array),
7259 (dbus_message_append_double_array),
7260 (dbus_message_append_byte_array),
7261 (dbus_message_append_string_array), (dbus_message_get_args_valist),
7262 (dbus_message_iter_get_int32_array),
7263 (dbus_message_iter_get_uint32_array),
7264 (dbus_message_iter_get_double_array),
7265 (dbus_message_iter_get_byte_array),
7266 (dbus_message_iter_get_string_array):
7268 * dbus/dbus-message.h:
7269 Add functions for appending and getting arrays.
7271 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7273 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
7274 element size at least 8 bytes, fixes mempool tests on
7277 2003-02-20 Alexander Larsson <alexl@redhat.com>
7279 * dbus/dbus-transport-unix.c (unix_do_iteration):
7280 Unlock the connection mutex during a blocking select call.
7281 Add todo about how we need a way to wake up the select.
7283 * dbus/dbus-connection-internal.h:
7284 * dbus/dbus-connection.c:
7285 Add _dbus_connection_lock and _dbus_connection_unlock.
7287 2003-02-19 Havoc Pennington <hp@pobox.com>
7289 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
7290 Doxyfile.in, not Doxyfile
7292 * dbus/dbus-keyring.c: do some hacking on this
7294 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
7296 * dbus/dbus-errors.c (dbus_set_error_const): do not call
7298 (dbus_set_error): remove dbus_error_init, check for message ==
7299 NULL *before* we sprintf into it, and add @todo about including
7300 system headers in this file
7302 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
7304 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
7306 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
7307 get various bits of user information based on either username
7309 (_dbus_homedir_from_username): new function
7311 2003-02-19 Anders Carlsson <andersca@codefactory.se>
7314 Add check for nonposix getpwnam_r
7316 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
7317 Align the pool element size to a sizeof (void *) boundary.
7319 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
7320 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
7321 General Solaris fixes.
7323 * test/data/valid-messages/simplest-manual.message:
7324 Explicitly state that we want little-endian packing.
7326 2003-02-19 Mikael Hallendal <micke@codefactory.se>
7328 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7330 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
7331 Added to create a transport connecting using a tcp/ip socket.
7333 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
7334 to a tcp socket at given host and port.
7335 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
7338 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7340 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
7341 Added to create a server listening on a TCP/IP socket.
7343 2003-02-19 Havoc Pennington <hp@pobox.com>
7345 Throughout: mop up all the Doxygen warnings and undocumented
7348 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
7349 to search any paths.
7351 * dbus/dbus-threads.c: move global mutex initializers to
7352 dbus-internals.h, multiple prototypes was confusing doxygen
7353 besides being kind of ugly
7355 * Doxyfile (PREDEFINED): have Doxygen define
7356 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
7357 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
7358 (do not abuse the feature! it's for stuff like the autogenerated
7359 macros in dbus-md5.c, not just for things you don't feel like
7362 2003-02-18 Havoc Pennington <hp@pobox.com>
7364 * dbus/dbus-string.c (_dbus_string_zero): new function
7366 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
7367 wrap it in some dbus-friendly API
7369 * dbus/dbus-types.h: add 16-bit types
7371 2003-02-18 Joe Shaw <joe@assbarn.com>
7373 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
7374 credentials from our currently running process.
7375 (get_word): Fix a buglet where we were copying the entire length
7376 instead of relative to our position.
7378 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
7379 keys on the stack... it's 640k of data.
7381 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
7382 read the credentials byte off the socket, even if we don't have
7384 (_dbus_poll): Implement poll() using select() for systems which
7387 * glib/test-dbus-glib.c (main): Print out an error if no
7388 parameters are given.
7390 * test/data/auth/fallback.auth-script: Added. Tests that a client
7391 can fallback to a secondary auth mechanism if the first fails.
7393 2003-02-18 Havoc Pennington <hp@pobox.com>
7397 2003-02-17 Havoc Pennington <hp@pobox.com>
7399 * doc/dbus-specification.sgml: lots of cosmetic
7400 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
7401 env variable to DBUS_BUS_ADDRESS, s/client/application/,
7402 s/server/bus/ (except in authentication section). Add a section
7403 "Message Bus Message Routing"
7405 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
7411 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7413 * doc/dbus-specification.sgml:
7414 Specification updates.
7416 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7418 * bus/activation.c: (bus_activation_init), (child_setup),
7419 (bus_activation_activate_service):
7421 * bus/main.c: (main):
7422 Set DBUS_ADDRESS environment variable.
7424 * dbus/dbus-errors.c: (dbus_set_error):
7425 Don't use va_copy since that's a C99 feature.
7427 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
7428 (_dbus_spawn_async):
7429 * dbus/dbus-sysdeps.h:
7430 Add child_setup_func to _dbus_spawn_async.
7432 * doc/dbus-specification.sgml:
7433 Update specification.
7435 * test/spawn-test.c: (setup_func), (main):
7438 2003-02-17 Alexander Larsson <alexl@redhat.com>
7440 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
7443 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7447 * doc/dbus-test-plan.sgml:
7448 Add test plan document.
7453 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7455 * dbus/dbus-message.c: (decode_header_data),
7456 (_dbus_message_loader_return_buffer):
7457 Set the header padding amount when loading a message.
7459 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7461 * bus/dispatch.c: (send_one_message):
7462 Only send broadcast messages to registered connections.
7464 * dbus/dbus-message.c: (dbus_message_name_is):
7465 * dbus/dbus-message.h:
7466 New convenience function.
7468 * dbus/dbus-transport-debug.c: (do_reading):
7469 Only dispatch one message per run.
7472 * test/bus-test.c: (new_connection_callback), (die),
7473 (test_hello_client1_handler), (test_hello_client2_handler),
7474 (test_hello_replies), (main):
7476 * test/bus-test-loop.[ch]:
7479 2003-02-16 Havoc Pennington <hp@pobox.com>
7481 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7482 backward conditional
7484 2003-02-16 Alexander Larsson <alexl@redhat.com>
7486 * dbus/dbus-connection.c:
7487 Implement sent_message_with_reply. (with_reply_and block is still
7489 Made dispatch_message not lose message if OOM.
7491 * dbus/dbus-errors.h:
7492 Add NoReply error (for reply timeouts).
7494 2003-02-16 Alexander Larsson <alexl@redhat.com>
7496 * dbus/dbus-hash.c (_dbus_hash_table_unref):
7497 Actually free keys and values when destroying hashtable.
7499 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7501 * dbus/dbus-auth.c: (client_try_next_mechanism):
7504 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
7505 Return TRUE if there's no thread implementation around.
7507 * glib/dbus-gmain.c: (free_source),
7508 (dbus_connection_hookup_with_g_main):
7509 Make sure to remove the GSource when the connection is finalized.
7511 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7513 * bus/dispatch.c: (bus_dispatch_message_handler):
7514 * dbus/dbus-errors.h:
7515 Return an error if someone tries to send a message to a service
7518 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7520 * bus/activation.c: (load_directory), (bus_activation_init),
7521 (bus_activation_activate_service):
7524 (bus_driver_handle_activate_service), (bus_driver_handle_message):
7525 More work on the activation handling.
7527 * dbus/dbus-errors.h:
7528 Add some error messages
7530 * dbus/dbus-message.c: (dbus_message_new_error_reply):
7531 * dbus/dbus-message.h:
7532 New function that creates an error message.
7534 * dbus/dbus-protocol.h:
7535 Add ACTIVATE_SERVER message.
7537 * dbus/dbus-server-unix.c: (unix_handle_watch),
7538 (_dbus_server_new_for_domain_socket):
7539 Call _dbus_fd_set_close_on_exec.
7541 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
7542 (_dbus_spawn_async), (_dbus_disable_sigpipe),
7543 (_dbus_fd_set_close_on_exec):
7544 * dbus/dbus-sysdeps.h:
7545 Add _dbus_fd_set_close_on exec function. Also add function that checks
7546 that all open fds are set to close-on-exec and warns otherwise.
7548 * dbus/dbus-transport-unix.c:
7549 (_dbus_transport_new_for_domain_socket):
7550 Call _dbus_fd_set_close_on_exec.
7552 2003-02-16 Havoc Pennington <hp@pobox.com>
7554 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
7555 allow people to avoid setting SIGPIPE to SIG_IGN
7556 (_dbus_connection_new_for_transport): disable SIGPIPE unless
7557 we've been asked not to
7559 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7561 * dbus/dbus-list.c: (_dbus_list_append_link),
7562 (_dbus_list_prepend_link):
7563 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
7567 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7570 * bus/activation.c: (bus_activation_entry_free),
7571 (add_desktop_file_entry), (load_directory), (bus_activation_init):
7573 * bus/main.c: (main):
7574 Add simple activation support, doesn't work yet though.
7576 2003-02-15 Zack Rusin <zack@kde.org>
7578 * qt/dbus-qthread.cpp: small casting fix
7580 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7582 * dbus/dbus-errors.c: (dbus_set_error):
7583 * dbus/dbus-errors.h:
7584 Add a few errors and make dbus_set_error void.
7586 * dbus/dbus-sysdeps.c:
7587 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
7588 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
7589 * dbus/dbus-sysdeps.h:
7590 Add _dbus_spawn_async.
7592 * test/spawn-test.c: (main):
7593 Test for _dbus_spawn_async.
7595 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7597 * dbus/dbus-internals.h:
7598 Fix build without tests.
7600 * dbus/dbus-list.c: (alloc_link):
7601 Fix a segfault when a malloc fails.
7603 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
7604 (dbus_malloc0), (dbus_realloc):
7605 Add support for malloc debugging.
7607 2003-02-15 Alexander Larsson <alexl@redhat.com>
7609 * dbus/dbus-threads.c:
7610 * dbus/dbus-threads.h:
7611 Add condvars. Remove static mutext from API.
7612 Implement static mutexes by initializing them from threads_init.
7614 * glib/dbus-gthread.c:
7615 * qt/dbus-qthread.cpp:
7616 Update with the thread api changes.
7621 Turn StaticMutex into normal mutex + init function.
7622 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
7623 _dbus_list_append_link, _dbus_list_prepend_link
7626 * dbus/dbus-sysdeps.c:
7627 * dbus/dbus-sysdeps.h:
7628 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
7629 _dbus_atomic_dec. Only slow fallback implementation at the moment.
7631 * dbus/dbus-protocol.h:
7632 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
7634 * dbus/dbus-message.c:
7635 Make ref/unref atomic.
7638 * dbus/dbus-connection-internal.h:
7639 * dbus/dbus-connection.c:
7640 * dbus/dbus-connection.h:
7642 Change _peek to _borrow,_return & _steal_borrowed.
7643 Change disconnect callback to event.
7644 Make dbus_connection_dispatch_messages reentrant.
7646 * dbus/dbus-transport.c:
7647 Don't ref the connection on calls to the transport
7650 * dbus/dbus-message-handler.c:
7653 * glib/dbus-gmain.c:
7654 Don't use peek_message anymore
7657 * test/debug-thread.c:
7658 * test/debug-thread.h:
7659 Simple thread implementation that asserts() on deadlocks in
7660 single-threaded code.
7663 (main) Call debug_threads_init.
7666 Use disconnect message instead of disconnect callback.
7670 Don't call dbus_connection_set_disconnect_function. Instead export
7671 bus_connection_disconnect.
7674 Call bus_connection_disconnect when we get a disconnected message.
7676 2003-02-15 Havoc Pennington <hp@pobox.com>
7678 * dbus/dbus-message.c (dbus_message_new): fool around with the
7681 2003-02-14 Havoc Pennington <hp@pobox.com>
7683 * dbus/dbus-mempool.c: fail if the debug functions so indicate
7685 * dbus/dbus-memory.c: fail if the debug functions indicate we
7688 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
7689 (_dbus_decrement_fail_alloc_counter): debug functions to
7690 simulate memory allocation failures
7692 2003-02-14 Havoc Pennington <hp@pobox.com>
7694 * dbus/dbus-errors.h (struct DBusError): add a word of padding
7697 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7699 * bus/driver.c: (bus_driver_handle_hello):
7701 * bus/services.c: (bus_service_lookup):
7702 Reorder message sending so we get a more sane order.
7704 * test/bus-test.c: (message_handler):
7707 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7709 * bus/driver.c: (bus_driver_send_service_deleted),
7710 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7711 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7712 (bus_driver_send_welcome_message),
7713 (bus_driver_handle_list_services),
7714 (bus_driver_handle_acquire_service),
7715 (bus_driver_handle_service_exists):
7716 * dbus/dbus-bus.c: (dbus_bus_register_client),
7717 (dbus_bus_acquire_service), (dbus_bus_service_exists):
7718 * dbus/dbus-errors.c: (dbus_result_to_string):
7719 * dbus/dbus-errors.h:
7720 * dbus/dbus-message.c: (dbus_message_append_args),
7721 (dbus_message_append_args_valist), (dbus_message_get_args),
7722 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
7723 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
7724 (dbus_message_iter_get_byte_array),
7725 (dbus_message_iter_get_string_array), (message_iter_test),
7726 (check_message_handling), (_dbus_message_test):
7727 * dbus/dbus-message.h:
7728 * test/bus-test.c: (main):
7729 Change fields to arguments in messages, so that they won't be
7730 confused with header fields.
7732 * glib/test-dbus-glib.c: (main):
7733 Remove append_fields from hello message.
7735 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7737 * dbus/dbus-errors.c:
7738 * dbus/dbus-message.c:
7739 * dbus/dbus-string.c:
7740 Documentation fixes.
7742 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7744 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
7746 Implement support for timeouts in dbus-glib.
7748 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7750 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7751 * dbus/dbus-message.c: (process_test_subdir):
7752 * test/break-loader.c: (find_breaks_based_on):
7753 Plug some memory leaks.
7755 2003-02-13 Richard Hult <rhult@codefactory.se>
7757 * bus/main.c: Fix build.
7759 * dbus/dbus-errors.h:
7760 * dbus/dbus-errors.c: Fix copyright for Anders.
7762 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7767 * bus/connection.c: (bus_connection_foreach):
7770 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
7771 (unescape_string), (new_section), (parse_section_start),
7772 (parse_key_value), (report_error), (bus_desktop_file_load),
7773 (bus_desktop_file_get_string):
7774 * bus/desktop-file.h:
7775 Use DBusError for error reporting.
7777 * bus/dispatch.c: (send_one_message),
7778 (bus_dispatch_message_handler):
7779 * bus/driver.c: (bus_driver_send_service_deleted),
7780 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7781 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7782 (bus_driver_send_welcome_message),
7783 (bus_driver_handle_list_services),
7784 (bus_driver_handle_acquire_service),
7785 (bus_driver_handle_service_exists):
7786 * bus/loop.c: (bus_loop_run):
7788 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
7790 * bus/utils.c: (bus_wait_for_memory):
7792 New files with general utility functions.
7794 * dbus/dbus-internals.h:
7795 Remove _DBUS_HANDLE_OOM.
7797 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7799 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
7800 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
7801 * dbus/dbus-errors.h:
7802 Add DBusError structure.
7804 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7806 * test/data/valid-messages/standard-acquire-service.message:
7807 * test/data/valid-messages/standard-hello.message:
7808 * test/data/valid-messages/standard-list-services.message:
7809 * test/data/valid-messages/standard-service-exists.message:
7810 Add some standard messages.
7812 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7814 * bus/driver.c: (bus_driver_send_welcome_message),
7815 (bus_driver_handle_list_services),
7816 (bus_driver_handle_acquire_service),
7817 (bus_driver_handle_service_exists), (bus_driver_handle_message):
7818 Update for API changes in libdbus.
7820 * dbus/dbus-message.c: (dbus_message_new_reply):
7821 * dbus/dbus-message.h:
7822 Remove the name argument. The spec states that replies shouldn't
7825 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7827 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
7828 (report_error), (bus_desktop_file_load), (lookup_section),
7829 (lookup_line), (bus_desktop_file_get_raw),
7830 (bus_desktop_file_get_string):
7831 * bus/desktop-file.h:
7832 Some fixes, and new functions for getting a key value from a section.
7834 2003-02-13 Havoc Pennington <hp@pobox.com>
7836 * test/data/auth/fail-after-n-attempts.auth-script: new test
7838 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
7841 2003-02-13 Havoc Pennington <hp@pobox.com>
7843 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
7844 dbus_credentials_match were backward
7846 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
7847 NO_CREDENTIALS and ROOT_CREDENTIALS
7849 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
7850 into here. Never process more commands after we've reached an
7851 end state; store further data as unused bytes.
7853 * test/data/auth/*: add more auth tests
7855 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
7856 command to match exact string and EXPECT_UNUSED to match unused
7859 * test/Makefile.am (dist-hook): fix to dist all the test stuff
7861 2003-02-12 Havoc Pennington <hp@pobox.com>
7863 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
7864 \r off of popped lines
7866 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
7869 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
7872 2003-02-12 Havoc Pennington <hp@pobox.com>
7874 * dbus/Makefile.am: remove break-loader from the build, since it
7877 * configure.in: add --enable-gcov to turn on coverage profiling
7878 flags and disable optimization
7880 2003-02-10 Havoc Pennington <hp@pobox.com>
7882 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
7883 initial cut at test framework for DBusAuth from laptop.
7884 Doesn't quite work yet but it compiles and I need to get
7885 it off the 266mhz laptop. ;-)
7887 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
7888 fix a memleak in error case
7890 2003-02-12 Anders Carlsson <andersca@codefactory.se>
7893 * bus/desktop-file.c:
7894 * bus/desktop-file.h:
7895 Add a desktop file parser.
7897 2003-02-11 Zack Rusin <zack@kde.org>
7899 * qt/message.[h|cpp]: sample implementation
7900 of the KDE wrapper for DBusMessage
7902 2003-02-09 Zack Rusin <zack@kde.org>
7904 * test/bus-test.c: make_it_compile
7905 * doc/dbus-specification.sgml: minimal semantic fix
7907 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7913 2003-02-06 Anders Carlsson <andersca@codefactory.se>
7916 * dbus/dbus-break-loader.c:
7918 * test/break-loader.c:
7919 Move dbus-break-loader to test/ and rename it to break-loader.
7921 2003-02-02 Havoc Pennington <hp@pobox.com>
7923 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
7924 for code to manage cookies in your home directory
7926 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
7928 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
7929 to authenticate, then disconnect the client.
7931 2003-02-03 Alexander Larsson <alexl@redhat.com>
7933 * dbus/dbus-message.c (dbus_message_append_fields):
7936 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7938 * doc/dbus-specification.sgml:
7939 Update address format section.
7941 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7944 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
7945 (message_handler), (new_connection_callback), (loop_quit),
7949 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7951 * bus/driver.c: (bus_driver_handle_service_exists):
7952 Simplify the code a bit.
7954 * dbus/dbus-bus.c: (dbus_bus_service_exists):
7957 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7960 Add libdbus-daemon.la and link to it.
7962 2003-02-01 James Willcox <jwillcox@gnome.org>
7964 * bus/driver.c: (bus_driver_handle_own_service):
7965 Actually include the service reply code in the message.
7967 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7969 * bus/driver.c: (bus_driver_handle_service_exists):
7970 Don't unref the incoming message.
7972 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7974 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
7976 2003-02-02 Anders Carlsson <andersca@codefactory.se>
7978 * dbus/dbus-server.c: (dbus_server_listen):
7979 * dbus/dbus-transport.c: (_dbus_transport_open):
7980 ifdef out the calls to the debug transport and server.
7982 2003-02-02 Alexander Larsson <alexl@redhat.com>
7984 * dbus/dbus-watch.c (dbus_watch_get_flags):
7985 Add note in the docs that ERROR or HANGUP won't be returned
7986 and are assumed always on.
7988 * glib/dbus-gmain.c (add_watch):
7989 Always add IO_ERR | IO_HUP
7991 * dbus/dbus-message.h:
7992 Add semicolon after dbus_message_iter_get_string_array().
7993 Makes qt code build again
7995 2003-02-01 Anders Carlsson <andersca@codefactory.se>
7997 * bus/driver.c: (create_unique_client_name),
7998 (bus_driver_handle_hello):
7999 Don't take a name, just use a numeric id to identify
8003 * dbus/dbus-bus.c: (dbus_bus_register_client),
8004 (dbus_bus_acquire_service), (dbus_bus_service_exists):
8006 Add new convenience functions for communicating with the bus.
8008 * dbus/dbus-message.h:
8010 * dbus/dbus-protocol.h:
8013 2003-02-01 Alexander Larsson <alexl@redhat.com>
8015 * dbus/dbus-message.c (dbus_message_append_fields):
8016 Add some more doc comments.
8018 2003-02-01 Havoc Pennington <hp@pobox.com>
8020 * dbus/dbus-break-loader.c (randomly_modify_length): change
8021 a 4-byte value in the message as if it were a length
8023 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
8024 execute bit on saved files
8026 2003-02-01 Havoc Pennington <hp@pobox.com>
8028 * dbus/dbus-break-loader.c (main): new program to find messages
8029 that break the loader.
8031 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
8032 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
8034 * dbus/dbus-string.c (_dbus_string_set_byte): new
8036 2003-01-31 Havoc Pennington <hp@pobox.com>
8038 * dbus/dbus-message.c: refactor the test code to be more general,
8039 in preparation for writing a "randomly permute test cases to
8040 try to break the loader" program.
8042 2003-01-31 Havoc Pennington <hp@pobox.com>
8044 * doc/dbus-specification.sgml: work on the specification
8046 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
8047 the protocol version of the message.
8049 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
8050 no longer specifies that.
8051 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
8054 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
8055 "break" for DBUS_TYPE_NIL, remove @todo
8057 2003-01-31 Havoc Pennington <hp@pobox.com>
8059 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
8060 just set_is_error/get_is_error as this is a commonly-used
8061 function, and write docs.
8063 2003-01-31 Anders Carlsson <andersca@codefactory.se>
8065 * dbus/dbus-address.c: (dbus_address_entry_free):
8066 Free key and value lists.
8068 * dbus/dbus-internals.c: (_dbus_type_to_string):
8069 Add the types we didn't have.
8071 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
8072 (_dbus_marshal_validate_arg):
8075 * dbus/dbus-message.c: (dbus_message_set_sender):
8076 Remove todo about being able to set sender to NULL.
8078 (dbus_message_set_is_error_reply),
8079 (dbus_message_get_is_error_reply):
8080 * dbus/dbus-message.h:
8083 * dbus/dbus-protocol.h:
8084 Add error reply flag.
8086 * test/data/valid-messages/opposite-endian.message:
8087 Add NIL type to test.
8089 2003-01-31 Havoc Pennington <hp@pobox.com>
8091 * doc/dbus-specification.sgml: fully specify the header. Add
8092 flags and major protocol version, and change header/body len to
8095 * dbus/dbus-message-builder.c (append_saved_length): append length
8098 * dbus/dbus-message.c (dbus_message_create_header): change header
8099 length and body length to unsigned. Add the new fields from the
8101 (_dbus_message_loader_return_buffer): unsigned header/body len
8103 2003-01-30 Havoc Pennington <hp@pobox.com>
8105 * dbus/dbus-auth.c: rework to use only REJECTED, no
8108 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
8109 use REJECTED, suggested by Mark McLoughlin
8111 2003-01-30 Havoc Pennington <hp@pobox.com>
8113 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
8114 a better way to report errors here. e.g. "unix address lacks
8115 path" or something. also "no such file" when the path doesn't
8118 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
8120 (dbus_parse_address): add @todo about documenting address format,
8121 and allowing , and ; to be escaped
8123 2003-01-30 Anders Carlsson <andersca@codefactory.se>
8126 Add dbus-address.[ch]
8128 * dbus/dbus-address.c: (dbus_address_entry_free),
8129 (dbus_address_entries_free), (create_entry),
8130 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
8131 (dbus_parse_address), (_dbus_address_test):
8132 * dbus/dbus-address.h:
8133 New files for dealing with address parsing.
8135 * dbus/dbus-connection.c:
8136 Document timeout functions.
8138 * dbus/dbus-message.c:
8139 Document dbus_message_new_from_message.
8141 * dbus/dbus-server-debug.c:
8144 * dbus/dbus-server.c: (dbus_server_listen):
8145 Parse address and use correct server implementation.
8147 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
8148 * dbus/dbus-string.h:
8149 New function with test.
8151 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
8155 * dbus/dbus-transport-debug.c:
8158 * dbus/dbus-transport.c: (_dbus_transport_open):
8159 Parse address and use correct transport implementation.
8161 2003-01-30 Havoc Pennington <hp@pobox.com>
8163 * dbus/dbus-message.c: use message->byte_order instead of
8164 DBUS_COMPILER_BYTE_ORDER throughout.
8165 (dbus_message_create_header): pad header to align the
8166 start of the body of the message to 8-byte boundary
8168 * dbus/dbus-marshal.h: make all the demarshalers take const
8169 DBusString arguments.
8171 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
8172 validate message args here, so we don't have to do slow validation
8173 later, and so we catch bad messages as they are incoming. Also add
8174 better checks on header_len and body_len. Also fill in
8177 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
8178 implemented properly)
8179 (_dbus_string_validate_nul): new function to check all-nul
8181 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
8182 get_arg_end_pos and remove all validation
8183 (_dbus_marshal_validate_arg): actually do validation here.
8185 2003-01-29 Havoc Pennington <hp@pobox.com>
8187 * dbus/dbus-message.c (check_message_handling): fix assertion
8188 failure on set_client_serial
8190 2003-01-28 Havoc Pennington <hp@pobox.com>
8192 * dbus/dbus-server-debug.c: Add doc section comments
8194 * dbus/dbus-transport-debug.c: add doc section comments
8196 2003-01-28 Havoc Pennington <hp@redhat.com>
8198 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
8199 the reverse order from how I had it
8200 (_dbus_string_base64_encode): reverse encoding order. I was
8201 basically byteswapping everything during encoding.
8203 2003-01-28 Anders Carlsson <andersca@codefactory.se>
8205 * dbus/dbus-connection-internal.h:
8206 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
8207 (_dbus_connection_remove_timeout):
8208 Add functions for adding and removing timeouts.
8210 * dbus/dbus-message.c: (dbus_message_new_from_message):
8211 Add new function that takes a message and creates an exact
8212 copy of it, but with the refcount set to 1.
8213 (check_message_handling):
8216 * dbus/dbus-server-protected.h:
8217 * dbus/dbus-server.c: (_dbus_server_init_base),
8218 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
8219 (dbus_server_set_timeout_functions):
8220 (_dbus_server_remove_timeout):
8221 New functions so that a server can add and remove timeouts.
8223 (dbus_server_listen):
8224 Add commented out call to dbus_server_debug_new.
8226 * dbus/dbus-timeout.c: (_dbus_timeout_new):
8227 Actually set the handler, doh.
8229 * dbus/dbus-transport.c: (_dbus_transport_open):
8230 Add commented out call to dbus_transport_debug_client_new.
8233 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
8235 2003-01-28 Havoc Pennington <hp@pobox.com>
8237 * dbus/dbus-message.c (check_message_handling): function to check
8238 on the loaded message, iterates over it etc.
8240 2003-01-28 Havoc Pennington <hp@pobox.com>
8242 * test/Makefile.am (dist-hook): fix make distdir
8244 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
8246 2003-01-27 Havoc Pennington <hp@pobox.com>
8248 * dbus/dbus-mempool.c (time_for_size): replace printf with
8251 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
8252 empty lines; fix the SAVE_LENGTH stuff to be
8253 START_LENGTH/END_LENGTH so it actually works; couple other
8256 * test/Makefile.am (dist-hook): add dist-hook for .message files
8258 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
8259 can be constant or locked.
8260 (_dbus_string_free): allow freeing a const string as
8263 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
8265 * dbus/dbus-test-main.c (main): take an argument which is the
8266 directory containing test data
8268 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
8269 argument to this and load all the messages in test/data/
8270 checking that they can be loaded or not loaded as appropriate.
8272 2003-01-27 Anders Carlsson <andersca@codefactory.se>
8274 * bus/dispatch.c: (bus_dispatch_message_handler):
8275 Dispatch messages sent to services.
8277 * bus/driver.c: (bus_driver_send_service_deleted),
8278 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8279 (bus_driver_send_service_acquired):
8280 Add helper functions for sending service related messages.
8282 (bus_driver_send_welcome_message):
8283 Send HELLO_REPLY instead of WELCOME.
8285 (bus_driver_handle_list_services):
8286 Send LIST_SERVICES_REPLY instead of SERVICES.
8288 (bus_driver_handle_own_service),
8289 (bus_driver_handle_service_exists):
8290 New message handlers.
8292 (bus_driver_handle_message):
8293 Invoke new message handlers.
8295 (bus_driver_remove_connection):
8296 Don't remove any services here since that's done automatically
8297 by bus_service_remove_owner now.
8300 New function signatures.
8302 * bus/services.c: (bus_service_add_owner):
8303 Send ServiceAcquired message if we're the only primary owner.
8305 (bus_service_remove_owner):
8306 Send ServiceAcquired/ServiceLost messages.
8308 (bus_service_set_prohibit_replacement),
8309 (bus_service_get_prohibit_replacement):
8310 Functions for setting prohibit replacement.
8312 (bus_service_has_owner):
8313 New function that checks if a connection is in the owner queue of
8317 Add new function signatures.
8319 * dbus/dbus-list.c: (_dbus_list_test):
8320 Add tests for _dbus_list_remove_last and traversing the list backwards.
8323 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
8324 go any further, so return NULL then.
8326 * dbus/dbus-protocol.h:
8327 Add new messages, service flags and service replies.
8329 2003-01-26 Havoc Pennington <hp@pobox.com>
8331 * dbus/dbus-message-builder.c: implement, completely untested.
8333 * test/data/*: add data to be used in testing.
8334 ".message" files are our simple loadable text format.
8335 ".message-raw" will be binary dumps of messages.
8337 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
8339 2003-01-26 Havoc Pennington <hp@pobox.com>
8341 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
8343 * dbus/dbus-errors.c (dbus_result_to_string): add
8346 * dbus/dbus-message-builder.c: new file, will contain code to load
8347 up messages from files. Not implemented yet.
8349 2003-01-26 Havoc Pennington <hp@pobox.com>
8351 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
8352 the sender by setting to NULL
8354 2003-01-26 Havoc Pennington <hp@pobox.com>
8356 The unit tests pass, but otherwise untested. If it breaks, the
8357 tests should have been better. ;-)
8359 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
8362 * dbus/dbus-message.c: redo everything so we maintain
8363 message->header as the only copy of the various fields.
8364 This avoids the possibility of out-of-memory in some cases,
8365 for example dbus_message_lock() can't run out of memory anymore,
8366 and avoids extra copying. Figured I may as well go ahead and do
8367 this since it was busted for dbus_message_lock to not return
8368 failure on OOM, and dbus_message_write_header was totally
8369 unchecked for OOM. Also fixed some random other bugs.
8371 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
8372 that strings are nul-terminated. Also, end_pos can be equal
8373 to string length just not greater than, I think.
8374 (_dbus_marshal_set_int32): new function
8375 (_dbus_marshal_set_uint32): new function
8376 (_dbus_marshal_set_string): new function
8378 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
8379 a warning, init timeout_list to NULL
8380 (dbus_connection_send_message): don't use uninitialized variable
8383 * dbus/dbus-string.c (_dbus_string_replace_len): new function
8385 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8387 * bus/driver.c: (bus_driver_handle_hello),
8388 (bus_driver_send_welcome_message):
8391 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8393 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
8394 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8395 (dbus_connection_unref):
8396 * dbus/dbus-marshal.c: (_dbus_marshal_test):
8397 * dbus/dbus-message.c: (dbus_message_unref),
8400 (dbus_message_get_fields):
8401 Remove debugging printout.
8403 (_dbus_message_loader_return_buffer):
8404 Don't store the header string.
8406 (_dbus_message_test):
8409 2003-01-26 Richard Hult <rhult@codefactory.se>
8411 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
8412 the file descriptor list, since it can change under us.
8414 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8416 * glib/dbus-gmain.c: (dbus_connection_prepare),
8417 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
8418 (remove_watch), (dbus_connection_hookup_with_g_main):
8419 Rewrite the glib handling to use its own GSource instead of a
8420 GIOChannel so we can catch messages put in the queue while waiting
8423 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8426 * bus/connection.c: (connection_disconnect_handler),
8427 (connection_watch_callback), (bus_connection_setup):
8428 * bus/dispatch.c: (send_one_message),
8429 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
8430 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
8432 * bus/driver.c: (bus_driver_send_service_deleted),
8433 (bus_driver_send_service_created), (bus_driver_handle_hello),
8434 (bus_driver_send_welcome_message),
8435 (bus_driver_handle_list_services), (bus_driver_remove_connection),
8436 (bus_driver_handle_message):
8438 Refactor code, put the message dispatching in its own file. Use
8439 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
8442 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8444 * dbus/dbus-internals.h:
8445 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
8447 * dbus/dbus-message.c: (dbus_message_get_sender):
8448 * dbus/dbus-message.h:
8449 Implement dbus_message_get_sender.
8451 * dbus/dbus-protocol.h:
8452 Add message and service defines.
8454 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8456 * dbus/dbus-connection.c: (dbus_connection_send_message):
8457 * dbus/dbus-message-internal.h:
8458 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
8459 (dbus_message_write_header):
8460 Remove _dbus_messag_unlock and don't set the client serial on a
8461 message if one already exists.
8463 2003-01-24 Havoc Pennington <hp@pobox.com>
8465 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
8468 * bus/driver.c (bus_driver_handle_list_services): fix a leak
8471 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8473 * dbus/dbus-list.c: (alloc_link), (free_link):
8474 Use a memory pool for the links.
8476 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8478 * bus/connection.c: (bus_connection_foreach):
8480 Add new bus_connection_foreach function.
8482 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
8483 Add function that broadcasts a message to all clients.
8485 (bus_driver_send_service_created), (bus_driver_handle_hello),
8486 (bus_driver_send_welcome_message),
8487 (bus_driver_handle_list_services), (bus_driver_message_handler):
8488 Implement functions that take care of listing services, and notifying
8489 clients when new services are created.
8491 * bus/services.c: (bus_services_list):
8493 Add new function that returns an array of strings with the currently
8494 registered services.
8497 * glib/dbus-gmain.c:
8498 Update copyright year.
8500 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8502 * dbus/dbus-connection.c: (dbus_connection_send_message):
8503 Unlock the message in case it was sent earlier.
8505 (dbus_connection_send_message_with_reply_and_block):
8506 Remove the reply message from the list.
8508 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8509 Set array_len and new_pos correctly.
8511 (_dbus_marshal_test):
8512 Remove debug output.
8514 * dbus/dbus-message-internal.h:
8515 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
8516 New function that returns the reply serial.
8518 (_dbus_message_unlock):
8519 New function that unlocks a message and resets its header.
8521 (dbus_message_append_string_array),
8522 (dbus_message_get_fields_valist),
8523 (dbus_message_iter_get_field_type),
8524 (dbus_message_iter_get_string_array),
8525 (dbus_message_get_fields),
8526 (dbus_message_append_fields_valist):
8527 Handle string arrays.
8529 (dbus_message_set_sender):
8530 Make this function public since the bus daemon needs it.
8532 (decode_header_data):
8533 Set the reply serial to -1 initially.
8535 * dbus/dbus-message.h:
8536 Add dbus_message_set_sender.
8538 2003-01-24 Havoc Pennington <hp@pobox.com>
8540 * doc/dbus-specification.sgml: add some stuff
8542 2003-01-22 Havoc Pennington <hp@pobox.com>
8544 * doc/dbus-specification.sgml: Start to document the protocol.
8546 2003-01-22 Havoc Pennington <hp@pobox.com>
8548 * dbus/dbus-connection.c
8549 (dbus_connection_send_message_with_reply_and_block): add some @todo
8551 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
8553 2003-01-21 Havoc Pennington <hp@pobox.com>
8555 (patch untested because can't compile)
8557 * bus/driver.c (create_unique_client_name): make this function
8558 never recycle client names. Also, caller should initialize
8561 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
8563 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8565 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8566 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8567 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
8568 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
8569 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
8570 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
8571 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
8572 * dbus/dbus-marshal.h:
8573 * dbus/dbus-protocol.h:
8574 Add support for marshalling and demarshalling integer, double
8577 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8582 * bus/connection.c: (connection_disconnect_handler):
8583 Remove the connection from the bus driver's list.
8585 (connection_watch_callback): Dispatch messages.
8587 (free_connection_data): Free connection name.
8589 (bus_connection_setup): Add connection to the bus driver's list.
8590 (bus_connection_remove_owned_service):
8591 (bus_connection_set_name), (bus_connection_get_name):
8592 Add functions for setting and getting the connection's name.
8595 Add function headers.
8597 * bus/driver.c: (create_unique_client_name),
8598 (bus_driver_handle_hello_message),
8599 (bus_driver_send_welcome_message), (bus_driver_message_handler),
8600 (bus_driver_add_connection), (bus_driver_remove_connection):
8603 * bus/services.c: (bus_service_free):
8605 New file that handles communication and registreation with the bus
8608 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8610 * dbus/dbus-connection.c: (dbus_connection_send_message):
8611 Add a new client_serial parameter.
8613 (dbus_connection_send_message_with_reply):
8614 Remove a @todo since we've implemented the blocking function.
8616 (dbus_connection_send_message_with_reply_and_block):
8617 New function that sends a message and waits for a reply and
8618 then returns the reply.
8620 * dbus/dbus-connection.h:
8623 * dbus/dbus-errors.c: (dbus_result_to_string):
8624 * dbus/dbus-errors.h:
8625 Add new DBUS_RESULT.
8627 * dbus/dbus-message-internal.h:
8628 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
8629 (_dbus_message_set_sender), (dbus_message_write_header),
8630 (dbus_message_new_reply), (decode_header_data),
8631 (_dbus_message_loader_return_buffer), (_dbus_message_test):
8632 * dbus/dbus-message.h:
8633 Add new functions that set the reply serial and sender.
8634 Also marshal and demarshal them correctly and add test.
8636 * dbus/dbus-protocol.h:
8637 Add new DBUS_MESSAGE_TYPE_SENDER.
8640 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
8641 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
8642 (dbus_connection_hookup_with_g_main):
8643 * glib/test-dbus-glib.c: (main):
8644 Rewrite to use GIOChannel and remove the GSource crack.
8646 * test/echo-client.c: (main):
8647 * test/watch.c: (check_messages):
8648 Update for changed APIs
8650 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8652 * dbus/Makefile.am: Add dbus-timeout.[cħ]
8654 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
8655 Create a DBusTimeoutList.
8656 (dbus_connection_set_timeout_functions): Add new function to
8657 set timeout callbacks
8659 * dbus/dbus-connection.h: Add public DBusTimeout API.
8661 * dbus/dbus-message.c: (dbus_message_get_service):
8662 * dbus/dbus-message.h: New function.
8664 * dbus/dbus-server.c: Fix small doc typo.
8666 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
8668 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8670 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
8671 of the string, just as long as specified.
8673 2003-01-19 Havoc Pennington <hp@pobox.com>
8675 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
8678 * dbus/dbus-server.c (dbus_server_set_max_connections)
8679 (dbus_server_get_max_connections, dbus_server_get_n_connections):
8680 keep track of current number of connections, and add API for
8681 setting a max (but haven't implemented enforcing the max yet)
8683 2003-01-18 Havoc Pennington <hp@pobox.com>
8685 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
8686 reading/writing if read_watch != NULL or write_watch != NULL.
8688 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
8689 the message loader code to actually load message->header and
8690 message->body into the newly-created message.
8692 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
8695 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
8696 (dbus_connection_get_max_message_size)
8697 (dbus_connection_set_max_live_messages_size)
8698 (dbus_connection_get_max_live_messages_size): implement some
8699 resource limitation functions
8701 * dbus/dbus-resources.c: new file implementing some of the
8702 resource limits stuff
8704 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
8705 missing docs, add @todo to handle OOM etc.
8707 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
8710 2003-01-18 Havoc Pennington <hp@pobox.com>
8712 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
8713 connection if it hasn't been already.
8715 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
8716 replace with DisconnectFunction.
8718 2003-01-18 Havoc Pennington <hp@pobox.com>
8720 Building --disable-verbose-mode --disable-asserts --disable-tests
8721 cuts the library from 112K to 45K or so
8723 * configure.in: check for varargs macro support,
8724 add --enable-verbose-mode, --enable-asserts.
8726 * dbus/dbus-internals.h (_dbus_assert): support
8728 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
8730 2003-01-18 Havoc Pennington <hp@pobox.com>
8732 * dbus/dbus-test.c: include config.h so that tests actually run
8734 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
8735 so the failure mode when that assumption fails will be plenty
8738 2003-01-18 Havoc Pennington <hp@pobox.com>
8740 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
8742 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
8745 * test/Makefile.am: don't use special variable "TESTS" for echo-*
8746 since we don't want to use those in make check
8748 2003-01-15 Havoc Pennington <hp@redhat.com>
8754 2003-01-15 Havoc Pennington <hp@redhat.com>
8756 * test/Makefile.am: fix so that test source code ends up in the
8757 distribution on make distcheck
8759 2003-01-15 Havoc Pennington <hp@redhat.com>
8765 2003-01-15 Havoc Pennington <hp@redhat.com>
8767 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
8768 fix build when --disable-tests
8770 * Makefile.am (EXTRA_DIST): put HACKING in here
8772 * HACKING: document procedure for making a tarball release.
8774 2003-01-14 Anders Carlsson <andersca@codefactory.se>
8776 * bus/connection.c: (connection_error_handler),
8777 (bus_connection_setup):
8778 * bus/main.c: (main):
8779 Make sure that the DBusConnectionData struct is NULLed
8780 out to prevent a segfault.
8782 * dbus/dbus-errors.c: (dbus_result_to_string):
8783 * dbus/dbus-errors.h:
8784 * dbus/dbus-message.c: (dbus_message_get_fields),
8785 (dbus_message_get_fields_valist), (_dbus_message_test):
8786 * dbus/dbus-message.h:
8787 Make dbus_message_get_fields return a result code so we can
8788 track invalid fields as well as oom.
8790 2003-01-11 Havoc Pennington <hp@pobox.com>
8792 * configure.in: change --enable-test/--enable-ansi action-if-given
8793 to enable_foo=$enableval instead of enable_foo=yes
8795 2003-01-08 Havoc Pennington <hp@pobox.com>
8797 * dbus/dbus-string.c (_dbus_string_align_length): new function
8799 * dbus/dbus-test-main.c: move main() for test app here
8801 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
8802 symbol to run tests, because dbus-test isn't in the main
8805 Code review nitpicks.
8807 * dbus/dbus-message.c (dbus_message_write_header): add newlines
8808 for people with narrow emacs ;-). Assert client_serial was filled
8809 in. Assert message->name != NULL.
8810 (dbus_message_append_fields): have "first_field_type" arg separate
8811 from va list, needed for C++ binding that also uses varargs IIRC
8812 and helps with type safety
8813 (dbus_message_new): add @todo about using DBusString to store
8814 service/name internally
8815 (dbus_message_new): don't leak ->service and ->name on OOM later
8817 (dbus_message_unref): free the service name
8818 (dbus_message_get_fields): same change to varargs
8819 i.e. first_field_type
8820 (_dbus_message_loader_return_buffer): assert that the message data
8821 is aligned (if not it's a bug in our code). Put in verbose griping
8822 about why we set corrupted = TRUE.
8823 (decode_header_data): add FIXME that char* is evil. Was going to
8824 add FIXME about evil locale-specific string.h strncmp, but just
8825 switched to wacky string-as-uint32 optimization. Move check for
8826 "no room for field name" above get_const_data_len() to avoid
8827 assertion failure in get_const_data_len if we have trailing 2
8828 bytes or the like. Check for service and name fields being
8829 provided twice. Don't leak service/name on error. Require field
8830 names to be aligned to 4 bytes.
8832 * dbus/dbus-marshal.c: move byte swap stuff to header
8833 (_dbus_pack_int32): uscore-prefix
8834 (_dbus_unpack_int32): uscore-prefix
8835 (_dbus_unpack_uint32): export
8836 (_dbus_demarshal_string): add @todo complaining about use of
8838 (_dbus_marshal_get_field_end_pos): add @todo about bad error
8839 handling allowing corrupt data to go unchecked
8841 2003-01-08 Havoc Pennington <hp@redhat.com>
8843 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
8844 to the select() as needed for authentication. (should be using
8845 _dbus_poll() not select, but for another day)
8847 * dbus/dbus.h: include dbus/dbus-protocol.h
8849 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8851 * dbus/Makefile.am (dbusinclude_HEADERS): Install
8854 2003-01-08 Anders Carlsson <andersca@codefactory.se>
8856 * dbus/dbus-internals.c: (_dbus_type_to_string):
8857 New function that returns a string describing a type.
8859 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
8860 * dbus/dbus-marshal.h:
8861 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
8862 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
8863 (dbus_message_iter_get_byte_array):
8864 * dbus/dbus-message.h:
8865 Add new convenience functions for appending and getting message fields.
8866 Also add demarshalling routines for byte arrays.
8868 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8870 * dbus/dbus-connection-internal.h:
8871 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8872 (_dbus_connection_get_next_client_serial),
8873 (dbus_connection_send_message):
8874 * dbus/dbus-internals.h:
8875 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
8876 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
8877 (_dbus_marshal_uint32), (_dbus_demarshal_double),
8878 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
8879 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
8880 (_dbus_verbose_bytes), (_dbus_marshal_test):
8881 * dbus/dbus-marshal.h:
8882 * dbus/dbus-message-internal.h:
8883 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
8884 (dbus_message_write_header), (_dbus_message_lock),
8885 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
8886 (dbus_message_get_name), (dbus_message_append_int32),
8887 (dbus_message_append_uint32), (dbus_message_append_double),
8888 (dbus_message_append_string), (dbus_message_append_byte_array),
8889 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
8890 (dbus_message_iter_unref), (dbus_message_iter_has_next),
8891 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
8892 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
8893 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
8894 (decode_header_data), (_dbus_message_loader_return_buffer),
8895 (message_iter_test), (_dbus_message_test):
8896 * dbus/dbus-message.h:
8897 * dbus/dbus-protocol.h:
8898 * dbus/dbus-test.c: (main):
8900 * glib/test-dbus-glib.c: (message_handler), (main):
8901 * test/echo-client.c: (main):
8902 * test/watch.c: (check_messages):
8903 Make messages sendable and receivable for real.
8905 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8907 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8908 (_dbus_marshal_string), (_dbus_marshal_byte_array):
8909 * dbus/dbus-message.c: (dbus_message_append_int32),
8910 (dbus_message_append_uint32), (dbus_message_append_double),
8911 (dbus_message_append_string), (dbus_message_append_byte_array):
8912 Handle OOM restoration.
8914 2003-01-07 Anders Carlsson <andersca@codefactory.se>
8916 * dbus/dbus-marshal.c: (_dbus_marshal_string),
8917 (_dbus_demarshal_string), (_dbus_marshal_test):
8918 * dbus/dbus-marshal.h:
8919 * dbus/dbus-message.c: (dbus_message_get_name),
8920 Document these functions.
8922 (dbus_message_append_int32), (dbus_message_append_uint32),
8923 (dbus_message_append_double), (dbus_message_append_string),
8924 (dbus_message_append_byte_array):
8925 * dbus/dbus-message.h:
8926 Add functions for adding message fields of different types.
8928 * dbus/dbus-protocol.h:
8929 Add the different types.
8931 2003-01-05 Havoc Pennington <hp@pobox.com>
8933 * bus/connection.c: implement routines for handling connections,
8934 first thing is keeping a list of owned services on each connection
8935 and setting up watches etc.
8937 * bus/services.c: implement a mapping from service names to lists
8940 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
8942 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
8943 to use static mutexes for global data
8945 * dbus/dbus-connection.c (dbus_connection_set_data): add new
8946 collection of functions to set/get application-specific data
8947 on the DBusConnection.
8949 2003-01-04 Havoc Pennington <hp@pobox.com>
8951 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
8952 (_dbus_poll): new function
8954 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
8957 * bus/loop.c: initial code for the daemon main loop
8959 2003-01-04 Havoc Pennington <hp@pobox.com>
8961 * test/watch.c (error_handler): make it safe if the error handler
8962 is called multiple times (if we s/error handler/disconnect
8963 handler/ we should just guarantee it's called only once)
8965 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
8966 error handler on disconnect (it's quite possible we should
8967 just change the error handler to a "disconnect handler," I'm
8968 not sure we have any other meaningful errors)
8970 * configure.in: check for getpwnam_r
8972 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
8973 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
8974 mechanism as in SASL spec, using socket credentials
8976 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
8977 (_dbus_send_credentials_unix_socket): new function
8979 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
8981 (_dbus_write): only check errno if <0 returned
8982 (_dbus_write_two): ditto
8984 2003-01-02 Anders Carlsson <andersca@codefactory.se>
8986 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
8987 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
8988 (_dbus_marshal_test):
8989 * dbus/dbus-marshal.h:
8990 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
8991 to _dbus_marshal_utf8_string. Also fix some tests.
8993 2002-12-28 Harri Porten <porten@kde.org>
8995 * configure.in: added check for C++ compiler and a very cheesy
8996 check for the Qt integration
8998 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
9000 * qt/Makefile.am: added
9002 * qt/.cvsignore: added
9004 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
9005 latter, added #ifdef QT_THREAD_SUPPORT guard.
9007 * dbus/Makefile.am: added missing headers for make dist
9009 2002-12-28 Kristian Rietveld <kris@gtk.org>
9011 * dbus/Makefile.am: fixup export-symbols-regex.
9013 2002-12-27 Anders Carlsson <andersca@codefactory.se>
9015 * acinclude.m4: Add this file and put the
9016 PKG_CHECK_MODULE macro in it.
9018 2002-12-27 Anders Carlsson <andersca@codefactory.se>
9020 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9021 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9022 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9023 (_dbus_marshal_test):
9024 Make the demarshalling routines align the pos argument.
9025 Add string marshalling tests and fix the obvious bugs
9028 2002-12-26 Havoc Pennington <hp@pobox.com>
9030 * dbus/dbus-auth.c: fixes fixes fixes
9032 * dbus/dbus-transport-unix.c: wire up support for
9033 encoding/decoding data on the wire
9035 * dbus/dbus-auth.c (_dbus_auth_encode_data)
9036 (_dbus_auth_decode_data): append to target string
9037 instead of nuking it.
9039 2002-12-26 Havoc Pennington <hp@pobox.com>
9041 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
9042 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
9045 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
9046 avoid swap_bytes() overhead (ignoring possible assembly stuff for
9047 now). Main point is because I wanted unpack_uint32 to implement
9049 (_dbus_verbose_bytes): new function
9051 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
9053 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
9054 mechanism to handle a corrupt message stream
9055 (_dbus_message_loader_new): fix preallocation to only prealloc,
9058 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
9059 (_dbus_string_test): enhance tests for copy/move and fix the
9062 * dbus/dbus-transport-unix.c: Hold references in more places to
9063 avoid reentrancy problems
9065 * dbus/dbus-transport.c: ditto
9067 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
9068 leak reference count in no-message case
9070 * test/watch.c (do_mainloop): handle adding/removing watches
9071 during iteration over the watches. Also, ref the connection/server
9072 stored on a watch, so we don't try to mangle a destroyed one.
9074 * dbus/dbus-transport-unix.c (do_authentication): perform
9077 * dbus/dbus-auth.c (get_state): add a state
9078 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
9079 (_dbus_auth_get_unused_bytes): append the unused bytes
9080 to the passed in string, rather than prepend
9082 * dbus/dbus-transport.c (_dbus_transport_init_base): create
9083 the auth conversation DBusAuth
9085 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
9086 (_dbus_transport_new_for_domain_socket): when creating a
9087 transport, pass in whether it's a client-side or server-side
9088 transport so we know which DBusAuth to create
9090 2002-12-03 Havoc Pennington <hp@pobox.com>
9092 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
9093 _after_ finalizing the derived members
9094 (unix_connection_set): unref watch if we fail to add it
9096 * dbus/dbus-connection.c (dbus_connection_unref): delete the
9097 transport first, so that the connection owned by the
9098 transport will be valid as the transport finalizes.
9100 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
9101 if necessary, and remove watches from the connection.
9103 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
9105 2002-12-26 Anders Carlsson <andersca@codefactory.se>
9107 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9108 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9109 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9110 (_dbus_marshal_test):
9111 * dbus/dbus-marshal.h:
9112 Add string marshal functions and have the demarshal functions
9113 return the new position.
9115 2002-12-25 Havoc Pennington <hp@pobox.com>
9117 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
9118 it is a simple protocol that just maps directly to SASL.
9120 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
9121 initial implementation, not actually used yet.
9123 * dbus/dbus-string.c (_dbus_string_find): new function
9124 (_dbus_string_equal): new function
9125 (_dbus_string_base64_encode): new function
9126 (_dbus_string_base64_decode): new function
9128 2002-12-25 Anders Carlsson <andersca@codefactory.se>
9131 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
9132 (_dbus_marshal_int32), (_dbus_marshal_uint32),
9133 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9134 (_dbus_demarshal_uint32), (_dbus_marshal_test):
9135 * dbus/dbus-marshal.h:
9136 * dbus/dbus-protocol.h:
9137 * dbus/dbus-test.c: (main):
9139 Add un-optimized marshalling/demarshalling routines.
9141 2002-12-25 Harri Porten <porten@kde.org>
9143 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
9145 2002-12-24 Zack Rusin <zack@kde.org>
9147 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
9148 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
9151 2002-12-24 Havoc Pennington <hp@pobox.com>
9153 * glib/dbus-gthread.c: fix include
9155 * glib/dbus-glib.h: rename DBusMessageHandler for now.
9156 I think glib API needs to change, though, as you don't
9157 want to use DBusMessageFunction, you want to use the
9158 DBusMessageHandler object. Probably
9159 dbus_connection_open_with_g_main_loop()
9160 and dbus_connection_setup_g_main_loop() or something like that
9161 (but think of better names...) that just create a connection
9162 that has watch/timeout functions etc. already set up.
9164 * dbus/dbus-connection.c
9165 (dbus_connection_send_message_with_reply): new function just to
9166 show how the message handler helps us deal with replies.
9168 * dbus/dbus-list.c (_dbus_list_remove_last): new function
9170 * dbus/dbus-string.c (_dbus_string_test): free a string that
9173 * dbus/dbus-hash.c: use memory pools for the hash entries
9174 (rebuild_table): be more paranoid about overflow, and
9175 shrink table when we can
9176 (_dbus_hash_test): reduce number of sprintfs and write
9177 valid C89. Add tests for case where we grow and then
9178 shrink the hash table.
9180 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
9182 * dbus/dbus-connection.c (dbus_connection_register_handler)
9183 (dbus_connection_unregister_handler): new functions
9185 * dbus/dbus-message.c (dbus_message_get_name): new
9187 * dbus/dbus-list.c: fix docs typo
9189 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
9190 an object representing a handler for messages.
9192 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9195 * glib/dbus-gthread.c: (dbus_gthread_init):
9196 Don't use the gdbus prefix for public functions.
9198 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9202 Add GLib checks and fixup .pc files
9206 * glib/dbus-gmain.c: (gdbus_connection_prepare),
9207 (gdbus_connection_check), (gdbus_connection_dispatch),
9208 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
9209 (dbus_connection_gsource_new):
9210 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
9211 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
9212 * glib/test-dbus-glib.c: (message_handler), (main):
9215 2002-12-15 Harri Porten <porten@kde.org>
9217 * autogen.sh: check for libtoolize before attempting to use it
9219 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
9222 * .cvsignore: ignore more stamp files
9224 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
9226 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
9227 without make install.
9229 2002-12-15 Havoc Pennington <hp@pobox.com>
9231 * dbus/dbus-threads.c: add thread stubs that a higher library
9232 layer can fill in. e.g. the GLib wrapper might fill them in with
9233 GThread stuff. We still need to use this thread API to
9234 thread-safe-ize the library.
9236 2002-12-12 Havoc Pennington <hp@pobox.com>
9238 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
9239 below new interfaces and include fewer system headers.
9241 * dbus/dbus-sysdeps.c (_dbus_read): new function
9242 (_dbus_write): new function
9243 (_dbus_write_two): new function
9244 (_dbus_connect_unix_socket): new function
9245 (_dbus_listen_unix_socket): new function
9247 * dbus/dbus-message-internal.h: change interfaces to use
9250 2002-12-11 Havoc Pennington <hp@pobox.com>
9252 * dbus/dbus-types.h: add dbus_unichar
9254 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
9256 * dbus/dbus-connection.c (dbus_connection_send_message): return
9259 * dbus/dbus-transport.c: include dbus-watch.h
9261 * dbus/dbus-connection.c: include dbus-message-internal.h
9263 * HACKING: add file with coding guidelines stuff.
9265 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
9266 handling here, for security purposes (as in vsftpd). Not actually
9267 using this class yet.
9269 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
9270 system/libc usage here, as in vsftpd, for ease of auditing (and
9271 should also simplify portability). Haven't actually moved all the
9272 system/libc usage into here yet.
9274 2002-11-25 Havoc Pennington <hp@pobox.com>
9276 * dbus/dbus-internals.c (_dbus_verbose): fix to not
9277 always print the first verbose message.
9279 2002-11-24 Havoc Pennington <hp@pobox.com>
9281 * test/echo-client.c, test/echo-server.c: cheesy test
9284 * configure.in (AC_CHECK_FUNCS): check for writev
9286 * dbus/dbus-message.c (_dbus_message_get_network_data): new
9289 * dbus/dbus-list.c (_dbus_list_foreach): new function
9291 * dbus/dbus-internals.c (_dbus_verbose): new function
9293 * dbus/dbus-server.c, dbus/dbus-server.h: public object
9294 representing a server that listens for connections.
9296 * dbus/.cvsignore: create
9298 * dbus/dbus-errors.h, dbus/dbus-errors.c:
9299 public API for reporting errors
9301 * dbus/dbus-connection.h, dbus/dbus-connection.c:
9302 public object representing a connection that
9303 sends/receives messages. (Same object used for
9304 both client and server.)
9306 * dbus/dbus-transport.h, dbus/dbus-transport.c:
9307 Basic abstraction for different kinds of stream
9308 that we might read/write messages from.
9310 2002-11-23 Havoc Pennington <hp@pobox.com>
9312 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
9315 * dbus/dbus-test.c (main): add list test, and include
9316 dbus-test.h as intended
9318 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
9319 (_dbus_hash_table_remove_int): return value indicates
9320 whether the entry existed to remove
9322 * dbus/dbus-list.c: add linked list utility class,
9325 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
9328 2002-11-23 Havoc Pennington <hp@pobox.com>
9330 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
9331 DBUS_END_DECLS to nothing, that should fix this once and for all
9333 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
9335 * dbus/dbus-message.c, dbus/dbus-hash.c:
9336 add some missing @brief
9338 2002-11-23 Havoc Pennington <hp@pobox.com>
9340 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
9341 to avoid confusing Doxygen
9343 * dbus/dbus-hash.c: @} not }@
9345 * dbus/dbus-message.c (struct DBusMessage): split out
9348 2002-11-23 Havoc Pennington <hp@pobox.com>
9350 * configure.in: pile on more warning flags if using gcc
9352 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
9353 to document static functions
9355 * configure.in: add summary to end of configure so it
9356 looks nice and attractive
9358 * dbus/dbus-hash.c: finish implementation and write unit
9361 * configure.in: add --enable-tests to enable unit tests
9363 * dbus/dbus-test.c: test program to run unit tests
9364 for all files in dbus/*, initially runs a test for
9367 * dbus/dbus-internals.h: file to hold some internal utility stuff
9369 2002-11-22 Havoc Pennington <hp@redhat.com>
9371 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
9372 "ported" away from Tcl
9374 * dbus/dbus-types.h: header for types such as dbus_bool_t
9376 2002-11-22 Havoc Pennington <hp@redhat.com>
9378 * dbus/dbus.h: fixups for doc warnings
9380 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
9382 (QUIET): make it quiet so we can see warnings
9384 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
9386 2002-11-22 Havoc Pennington <hp@redhat.com>
9388 * Makefile.am: include "Doxyfile" target in all-local
9390 * configure.in: generate the Doxyfile
9392 * Doxyfile.in: move Doxyfile here, so we can use
9393 configure to generate a Doxyfile with the right
9396 2002-11-22 Havoc Pennington <hp@redhat.com>
9398 * dbus/dbus-message.c: move inline docs into .c file
9400 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
9401 so all docs are under doc/
9402 (MAN_EXTENSION): generate man pages. Use extension
9403 ".3dbus" which matches ".3qt" on my system,
9404 I guess this is OK, I don't know really.
9405 (FILE_PATTERNS): look for .c files not .h, makes sense
9408 2002-11-22 Havoc Pennington <hp@pobox.com>
9410 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
9411 because any app can be a server, and any app can be a client,
9412 the bus is a special kind of server.
9414 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
9416 * Doxyfile : adding. Still needs Makefile rules to be generated
9417 automatically (just run "doxygen" in the toplevel dir for now to
9420 * dbus/dbus-message.h : Adding sample docs (javadoc since
9421 resembles gtk-doc a little more)
9423 * dbus/dbus.h : Adding sample docs
9425 2002-11-21 Havoc Pennington <hp@redhat.com>
9427 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
9428 so we can allow ourselves to include files directly,
9429 instead of having to use dbus.h
9431 * dbus/dbus.h: fill in
9433 * dbus/dbus-message.h: sketch out a sample header file.
9434 Include griping if you include it directly instead of
9437 * dbus/dbus-macros.h: new file with macros for extern "C",
9438 TRUE/FALSE, NULL, etc.
9440 * doc/file-boilerplate.c: put include guards in here
9442 2002-11-21 Havoc Pennington <hp@redhat.com>
9444 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
9446 * COPYING: include the GPL as well, and license code
9447 under both AFL and GPL.
9449 2002-11-21 Havoc Pennington <hp@redhat.com>
9451 * acconfig.h: get rid of this
9453 * autogen.sh (run_configure): add --no-configure option
9455 * configure.in: remove AC_ARG_PROGRAM to make
9456 autoconf complain less. add AC_PREREQ.
9457 add AC_DEFINE third arg.
9459 2002-11-21 Anders Carlsson <andersca@codefactory.se>
9462 Fix references so we can distcheck.
9464 2002-11-21 Havoc Pennington <hp@redhat.com>
9466 * Initial module creation