1 2005-03-11 Joe Shaw <joeshaw@novell.com>
3 * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
4 this unref; it doesn't match up evenly in some codepaths.
5 (_dbus_connection_block_pending_call): Unref at every exitpoint;
6 this evenly matches with the ref near the top of this function.
8 2005-03-09 Joe Shaw <joeshaw@novell.com>
10 * dbus/dbus-object-tree.c
11 (_dbus_object_tree_unregister_and_unlock): If checks are enabled
12 and we try to unregister a path that's not registered, still go
13 through the process of unlocking and don't just return.
15 2005-03-09 Colin Walters <walters@verbum.org>
17 * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
18 to this are generated for client-side wrappers. Invokes a
19 D-BUS method and returns reply values.
21 * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
22 function; writes signature string for argument direction.
23 (write_args_for_direction): Change to pass input values directly
24 instead of via address, and fix indentation.
25 (generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
26 make generated wrappers inlineable.
28 * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
29 note about using dbus_type_is_fixed.
31 * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
32 dbus/dbus-signature.c as dbus_type_is_fixed.
36 * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
37 from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
39 * dbus/dbus-signature.h: Prototype.
41 * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
44 * test/glib/test-dbus-glib.c (main): Be sure to clear error as
45 appropriate instead of just freeing it.
46 (main): Free returned strings using g_free.
48 * test/glib/Makefile.am (test-service-glib-glue.h)
49 (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
51 * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
52 simply maps a simple D-BUS type to GType.
53 (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
55 (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
56 initialize the value with it.
57 (dbus_gvalue_binding_type_from_type): Unused, delete.
58 (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
59 various types instead of unmarshalling to value data directly.
60 Remove can_convert boolean.
61 (dbus_gvalue_marshal): Remove duplicate initialization; switch to
62 returning directly instead of using can_convert boolean.
63 (dbus_gvalue_store): New function; not related to D-BUS per-se.
64 Stores a GValue in a pointer to a value of its corresponding C
67 * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
68 add dbus_gvalue_store.
70 2005-03-08 Joe Shaw <joeshaw@novell.com>
72 Fix a bunch of lifecycle and memory management problems
75 * mono/Arguments.cs (Arguments): Implement IDisposable
77 * mono/Bus.cs (Bus): Don't allow public instantiation. This is
78 strictly a static class.
80 * mono/Connection.cs: Move the DBusObjectPathVTable and associated
81 delegates into this file.
82 (Connection): Implement IDisposable.
83 (Dispose): Disconnect the connection and set the raw connection
84 pointer to IntPtr.Zero.
85 (~Connection): Call Dispose().
86 (RegisterObjectPath): Added. Manages the registration of object
87 paths so we can cleanly disconnect them at dispose/finalize time.
88 (UnregisterObjectPath): Ditto.
89 (set_RawConnection): Unregister all of the object paths when
90 changing the underlying DBusConnection. Add them back onto the
91 new connection, if any.
93 * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
94 more unmanaged resources anymore, so it's not necessary. Move all
95 the DBusObjectPathVTable stuff out of here.
96 (Handler): Save references to our delegates so that they don't get
97 finalized. Call Connection.RegisterObjectPath() instead of
98 dbus_connection_register_object_path() directly.
99 (Message_Called): Dispose the message after we're finished with
102 * mono/Message.cs (Message): Implement IDisposable.
103 (Dispose): Dispose the Arguments, and set the RawMessage to
105 (SendWithReplyAndBlock): We own the ref to the reply that comes
106 back from dbus_connection_send_with_reply_and_block() so add a
107 comment about that and unref it after we've constructed a managed
108 MethodReturn class around it. Fixes a big, big leak.
110 * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
112 (BuildSignalHandler): After we've sent the Signal message, dispose
114 (BuildMethod): Dispose of the method call and reply messages after
115 we've sent the message and extracted the data we want from the
118 * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
120 (Service_FilterCalled): Dispose of the message after we're
123 2005-03-08 Joe Shaw <joeshaw@novell.com>
125 * dbus/dbus-connection.c (dbus_connection_send_with_reply):
126 After we attach our pending call to the connection, unref
129 * mono/Connection.cs (set_RawConnection): Disconnect our
130 filter and match callbacks from the old connection and
131 reconnect them to the new connection, if any.
133 * mono/DBusType/Array.cs: "Code" is a static member, so
134 don't use "this" to refer to it. Fix for stricter checking
137 * mono/DBusType/ObjectPath.cs (Append): Don't leak the
138 object path that we pass into unmanaged code.
140 * mono/DBusType/String.cs (Append): Don't leak the string
141 that we pass into unmanged code.
143 2005-03-07 John (J5) Palmieri <johnp@redhat.com>
144 * NEWS: Update for 0.31
146 * configure.in: Release 0.31
147 add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
149 * qt/Makefile.am: fixed build
151 * dbus/Makefile.am: soname bump for libdbus
153 * glib/Makefile.am: soname bump for libdbus-glib
155 2005-03-05 Havoc Pennington <hp@redhat.com>
157 * dbus/dbus-sysdeps.c:
158 (pseudorandom_generate_random_bytes_buffer): fix to have no return
160 (_dbus_generate_random_bytes_buffer): fix return value
162 * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
163 checks actually work, from Tom Parker <fdo@tevp.net>
165 2005-03-01 Colin Walters <walters@verbum.org>
167 * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
168 functions copied from dbus-glib-tool.c.
169 (main): Convert lots of error code to use them.
170 Also add some testing for introspection bits.
172 2005-03-01 Colin Walters <walters@verbum.org>
174 * doc/TODO: Remove introspection signature TODO.
176 2005-02-27 Colin Walters <walters@verbum.org>
178 * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
179 Change return value to const char * instead of int so we can do
181 (struct PropertyInfo, struct ArgInfo): Store char *.
182 (property_info_new, arg_info_new): Update parameters, strdup.
183 (property_info_unref, arg_info_unref): Free.
185 * glib/dbus-gidl.h: Update prototypes.
187 * glib/dbus-gparser.c (basic_type_from_string): Delete.
188 (validate_signature): New function, just validates signature and
190 (parse_property, parse_arg): Invoke validate_signature. Store
191 signature instead of just type code.
193 * glib/dbus-gvalue.c (base_type_from_signature): New utility
194 function to return a primary type for a signature, dropping
195 information about types in container types.
196 (dbus_gvalue_genmarshal_name_from_type)
197 (dbus_gvalue_binding_type_from_type)
198 (dbus_gvalue_ctype_from_type): Update to take full signature
199 instead of type code.
200 (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
202 * glib/dbus-gvalue.h: Update prototypes for above.
204 * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
205 glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
206 (introspect_properties, introspect_signals, write_interface):
207 Update to handle signatures, and remove usage of
208 _dbus_gutils_type_to_string.
209 (handle_introspect): Print out type codes instead of e.g. "string"
210 in hardcoded introspection XML; also use x_AS_STRING constants
211 instead of hardcoding in string.
213 * glib/dbus-glib-tool.c (pretty_print): Handle signature change
214 to string. Remove usage of _dbus_gutils_type_to_string.
216 * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
218 * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
221 * glib/dbus-binding-tool-glib.c (compute_marshaller)
222 (compute_marshaller_name, generate_glue): Handle signature change
224 (write_formal_parameters, write_args_for_direction): Ditto, and
227 * tools/dbus-tree-view.c (type_to_string): Delete.
228 (info_set_func_text): Update to print full signatures.
230 * test/glib/test-service-glib.xml: Change types to new
231 introspection format.
233 2005-02-26 Havoc Pennington <hp@redhat.com>
235 * doc/TODO: remove the "guid" item
237 * test/glib/test-profile.c (no_bus_thread_func): use open_private
238 (with_bus_thread_func): use open_private
240 * dbus/dbus-connection.c (dbus_connection_open_private): new
241 function that works like the old dbus_connection_open()
242 (dbus_connection_open): now returns an existing connection if
245 * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
246 through the GUID to the transport
248 * dbus/dbus-server.c (_dbus_server_init_base): keep around the
249 GUID in hex-encoded form.
251 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
252 pass GUID argument in to the transport
254 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
257 * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
259 * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
261 2005-02-25 Havoc Pennington <hp@redhat.com>
263 * doc/dbus-specification.xml: document the GUID thing
265 * dbus/dbus-server.c (_dbus_server_init_base): initialize a
266 globally unique ID for the server, and put a "guid=hexencoded"
269 * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
271 * dbus/dbus-message.c: ditto
273 * dbus/dbus-dataslot.c: ditto
275 * dbus/dbus-list.c: ditto
277 * dbus/dbus-internals.h: wait, just include
278 dbus-threads-internal.h here
280 * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
283 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
285 2005-02-24 Colin Walters <walters@verbum.org>
287 * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
289 2005-02-24 John (J5) Palmieir <johnp@redhat.com>
291 * glib/Makefile.am: added dbus-gobject.h to sources list
292 so distcheck doesn't fail
294 2005-02-24 Havoc Pennington <hp@redhat.com>
296 * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
297 you must disconnect before unref, since locking and other things
298 are screwed up otherwise. Fix assorted other locking stuff.
300 * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
303 * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
304 into a private header and don't export from the library
306 * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
308 2005-02-24 Colin Walters <walters@verbum.org>
310 * dbus/dbus-signature.c: New file; implements various functions
311 related to type signatures. Includes an interator for parsing,
312 validation functions.
313 (dbus_type_is_basic): Moved here from
314 dbus-marshal-basic.c:_dbus_type_is_basic.
315 (dbus_type_is_container): Moved here from
316 dbus-marshal-basic.c:_dbus_type_is_container.
318 All callers of _dbus_type_is_container and _dbus_type_is_basic
319 updated, and include dbus-signature.h.
321 * dbus/dbus-signature.h: New file; prototypes for the above.
323 * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
326 * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
327 function factored out of _dbus_first_type_in_signature.
328 (_dbus_first_type_in_signature_c_str): New function; returns first
329 type code for a type signature character.
331 * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
332 handle function moves.
334 * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
336 * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
337 function; skips to next complete type in type signature.
338 Implemented using previous skip_one_complete_type. Now
339 skip_one_complete_type just delegates to
340 _dbus_type_signature_next.
342 * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
344 (_dbus_type_is_container): Ditto.
346 * doc/dbus-specification.xml: Update introspection sample to
347 use real type signatures.
349 * dbus/dbus-test.h: Prototype signature test.
351 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
354 * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
356 2005-02-23 John (J5) Palmieri <johnp@redhat.com>
358 * python/dbus_bindings.pyx.in (PendingCall::get_reply):
359 s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
361 2005-02-21 Colin Walters <walters@verbum.org>
363 * dbus/dbus-test-main.c (main): Take optional specific test
366 * dbus/dbus-test.c (run_test): New function, runs a test function
367 with no data directory.
368 (run_data_test): Like above, but takes data directory.
369 (dbus_internal_do_not_use_run_tests): Take
370 specific test argument. Replace lots of cut n' paste code
371 with run_test and run_data_test.
373 * dbus/dbus-test.h: Update prototype for
374 dbus_internal_do_not_use_run_tests.
376 2005-02-20 Havoc Pennington <hp@redhat.com>
378 Fix bugs reported by Daniel P. Berrange
380 * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
381 (protected_change_watch): new function
382 (_dbus_server_toggle_watch, _dbus_server_remove_watch)
383 (_dbus_server_add_watch): change to work like the
384 dbus-connection.c equivalents; like those, probably kind of
385 busted, but should at least mostly work for now
386 (dbus_server_disconnect): drop the lock if we were already
387 disconnected, patch from Daniel P. Berrange
389 * dbus/dbus-server.c (_dbus_server_toggle_timeout)
390 (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
393 * doc/TODO: todo about unscrewing this mess
395 2005-02-19 Colin Walters <walters@verbum.org>
397 * glib/dbus-binding-tool-glib.c
398 (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
400 * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
401 as errno.h and sys/stat.h.
402 (lose): New function, prints error with
404 (lose_gerror): Similar, but takes GError for message.
405 (main): Add --output argument to specify output file to write to,
406 instead of always printing to stdout. In this mode, determine
407 timestamps on source files to see whether any are newer than the
408 target file. If not, exit. Also convert a number of error
409 messages to use lose (since it's shorter), and switch to using
410 g_io_channel_shutdown.
412 2005-02-19 Havoc Pennington <hp@redhat.com>
414 * glib/dbus-gobject.c
415 (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
417 * glib/dbus-glib.c: fix doxygen warnings
419 * glib/dbus-gparser.c (parse_annotation): error if an annotation
422 2005-02-17 Colin Walters <walters@verbum.org>
424 * glib/dbus-gobject.h: Don't export
425 _dbus_glib_marshal_dbus_message_to_gvalue_array.
427 * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
428 (invoke_object_method): Handle it.
430 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
433 2005-02-17 Colin Walters <walters@verbum.org>
435 * bus/.cvsignore, doc/.cvsignore
436 * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
439 2005-02-17 Colin Walters <walters@verbum.org>
441 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
442 Rename to DBUS_SERVICE_DBUS.
443 (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
444 (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
445 Change the value from "org.freedesktop.Local"
446 to "org.freedesktop.DBus.Local".
447 (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
448 (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
449 DBUS_INTERFACE_INTROSPECTABLE.
450 Change the value from "org.freedesktop.Introspectable"
451 to "org.freedesktop.DBus.Introspectable".
452 (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
453 DBUS_INTERFACE_PROPERTIES.
454 Change the value from "org.freedesktop.Properties"
455 to "org.freedesktop.DBus.Properties".
456 (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
458 Change the value from "org.freedesktop.Peer"
459 to "org.freedesktop.DBus.Peer".
460 (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
461 DBUS_INTERFACE_LOCAL.
462 Change the value from "org.freedesktop.Local"
463 to "org.freedesktop.DBus.Local".
465 All other users of those constants have been changed.
467 * bus/driver.c (bus_driver_handle_introspect): Use constants.
469 * glib/dbus-gobject.c (handle_introspect): Use constants.
471 * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
473 2005-02-17 Colin Walters <walters@verbum.org>
475 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
476 (parse_node, parse_interface, parse_method, parse_signal)
477 (parse_property, parse_annotation): Lose if we're currently in an
479 (parse_annotation): New function.
480 (parser_start_element, parser_end_element): Handle annotation.
481 (parse_method, parse_interface): Remove support for c_name attribute,
482 switch to annotations.
484 * glib/dbus-gidl.h (interface_info_get_binding_names)
485 (method_info_get_binding_names)
486 (interface_info_get_binding_name, method_info_get_binding_name)
487 (interface_info_set_binding_name, method_info_set_binding_name):
489 (interface_info_get_annotations, method_info_get_annotations)
490 (interface_info_get_annotation, method_info_get_annotation)
491 (interface_info_add_annotation, method_info_add_annotation):
494 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
496 (struct MethodInfo): Ditto.
497 Straightfoward conversion of binding methods into annotation methods
500 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
502 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
504 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
505 Use new annotation API.
507 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
510 * doc/dbus-specification.xml: Discuss introspection annotations,
511 include list of well-known annotations.
513 * test/glib/test-service-glib.xml: Make validate against new DTD.
515 2005-02-17 Colin Walters <walters@verbum.org>
517 This patch is based on initial work from
518 Paul Kuliniewicz <kuliniew@purdue.edu>.
520 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
521 initialization of GValue from dbus type to here.
522 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
523 for the "glib-genmarshal" program from a DBus type.
524 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
525 into the C name for it we use in the glib bindings.
526 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
527 glib C type (not GValue).
528 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
530 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
533 * glib/dbus-gutils.h: Prototype it.
535 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
536 (marshal_dbus_message_to_g_marshaller): Use new shared function
537 dbus_glib_marshal_dbus_message_to_gvalue_array.
539 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
540 Will be changed once we have annotations.
542 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
543 GStaticRWLock. Callers updated.
544 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
545 (string_table_next): New function for iterating over zero-terminated
547 (string_table_lookup): New function; retrieves specific entry in
549 (get_method_data): New function; look up method data in object data chunk.
550 (object_error_domain_prefix_from_object_info)
551 (object_error_code_from_object_info): New functions, but not implemented yet.
552 (method_interface_from_object_info): New function; retrieve interface name.
553 (method_name_from_object_info): New function; retrieve method name.
554 (method_arg_info_from_object_info): New function; retrieve argument data.
555 (arg_iterate): New function; iterates over serialized argument data.
556 (method_dir_signature_from_object_info): New function; returns a
557 GString holding type signature for arguments for just one
558 direction (input or output).
559 (method_input_signature_from_object_info)
560 (method_output_signature_from_object_info): New functions.
561 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
562 converts dbus message arguments into a GValue array. Used for both
563 signal handling and method invocation.
564 (struct DBusGlibWriteIterfaceData): New utility structure.
565 (write_interface): New function; generate introspection XML for
567 (introspect_interfaces): New function; gathers all interface->methods,
568 generates introspection XML for them.
569 (handle_introspect): Invoke introspect_interfaces.
570 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
571 (lookup_object_and_method): New function; examines an incoming message
572 and attempts to match it up (via interface, method name, and argument
573 signature) with a known object and method.
574 (gerror_domaincode_to_dbus_error_name): New function; converts a
575 GError domain and code into a DBus error name. Needs GError data
576 added to object introspection to work well.
577 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
579 (invoke_object_method): New function to invoke an object method
580 looked up via lookup_object_and_method. Parses the incoming
581 message, turns it into a GValue array, then invokes the marshaller
582 specified in the DBusGMethodInfo. Creates a new message with
583 either return values or error message as appropriate.
584 (gobject_message_function): Invoke lookup_object_and_method and
585 invoke_object_method.
587 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
588 (enum DBusBindingOutputMode): New enum for binding output modes.
589 (pretty_print): Print binding names.
590 (dbus_binding_tool_error_quark): GError bits.
592 (main): Create GIOChannel for output. Parse new --mode argument,
593 possible values are "pretty-print", "glib-server", "glib-client".
594 Use mode to invoke appropriate function.
596 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
598 * glib/dbus-glib-tool.h: New header, just includes GError bits
601 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
602 maps binding style to name.
603 (struct MethodInfo): Ditto.
604 (get_hash_keys, get_hash_key): Utility function, returns keys for
606 (interface_info_new, method_info_new): Initialize bindings.
607 (interface_info_unref, method_info_unref): Destroy bindings.
608 (method_info_get_binding_names, method_info_get_binding_name)
609 (interface_info_get_binding_names, interface_info_get_binding_name):
610 Functions for retrieving binding names.
611 (method_info_set_binding_name, interface_info_set_binding_name):
612 Functions for setting binding names.
614 * glib/dbus-binding-tool-glib.h: New file, has prototypes
615 for glib binding generation.
617 * glib/dbus-binding-tool-glib.c: New file, implements server-side
618 and client-side glib glue generation.
620 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
621 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
624 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
625 of using GClosureMarshal directly.
626 (struct DBusGObjectInfo): Add n_infos member.
628 * test/glib/test-service-glib.xml: New file; contains introspection data
629 for MyTestObject used in test-service-glib.c.
631 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
632 (my_object_do_nothing, my_object_increment, my_object_throw_error)
633 (my_object_uppercase, my_object_many_args): New test methods.
634 (main): Use dbus_g_object_class_install_info to include generated object
637 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
638 as well as client-side bindings.
640 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
641 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
642 using both the dbus_gproxy stuff directly as well as the generated bindings.
644 2005-02-15 Havoc Pennington <hp@redhat.com>
646 * dbus/dbus-connection.c (dbus_connection_dispatch): always
647 complete a pending call, don't run filters first.
649 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
650 dbus_pending_call_steal_reply
652 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
653 _dbus_connection_block_pending_call
654 (dbus_pending_call_get_reply): change to steal_reply and return a
657 * dbus/dbus-connection.c
658 (dbus_connection_send_with_reply_and_block): port to work in terms
660 (_dbus_connection_block_pending_call): replace block_for_reply
663 2005-02-14 Havoc Pennington <hp@redhat.com>
665 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
666 properly handle looking up group information by name; fix
669 2005-02-13 Havoc Pennington <hp@redhat.com>
671 * dbus/dbus-connection.c (dbus_connection_return_message)
672 (dbus_connection_borrow_message): hold dispatch lock while message
674 (_dbus_connection_block_for_reply): hold dispatch lock while we
675 block for the reply, so nobody steals our reply
676 (dbus_connection_pop_message): hold the dispatch lock while we
679 2005-02-13 Havoc Pennington <hp@redhat.com>
681 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
682 (_dbus_connection_release_dispatch)
683 (_dbus_connection_acquire_io_path)
684 (_dbus_connection_release_io_path): make the mutex and condvar
685 control access to the "acquired" flag. Drop the connection lock
686 while waiting on the condvar. Hopefully these are baby steps in
687 roughly the right direction.
689 2005-02-13 Havoc Pennington <hp@redhat.com>
691 * dbus/dbus-connection.c: use separate mutexes for the condition
692 variables; this is some kind of baseline for sanity, but the
693 condition variables still aren't used correctly afaict
695 2005-02-13 Havoc Pennington <hp@redhat.com>
697 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
700 * dbus/dbus-connection.c
701 (_dbus_connection_detach_pending_call_unlocked): add this
703 Initial semi-correct pass through to fix thread locking; there are
704 still some issues with the condition variable paths I'm pretty
707 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
710 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
711 rename to add _unlocked
712 (struct DBusConnection): move "dispatch_acquired" and
713 "io_path_acquired" to use only one bit each.
714 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
715 (dbus_connection_set_watch_functions): hacky fix to reentrancy
716 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
717 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
718 (_dbus_connection_remove_timeout)
719 (_dbus_connection_toggle_timeout): drop lock when calling out to
720 user functions; done in a hacky/bad way.
721 (_dbus_connection_send_and_unlock): add a missing unlock
722 (_dbus_connection_block_for_reply): add a missing unlock
724 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
725 drop lock in a hacky probably unsafe way to call out to user
728 2005-02-12 Havoc Pennington <hp@redhat.com>
730 * tools/dbus-tree-view.c (info_set_func_text): display more
733 * bus/driver.c (bus_driver_handle_list_services): list the bus
736 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
738 * glib/dbus-gidl.c (signal_info_get_n_args): new function
739 (method_info_get_n_args): new function
741 2005-02-12 Havoc Pennington <hp@redhat.com>
743 * bus/driver.c (bus_driver_handle_introspect): add introspection
746 2005-02-12 Havoc Pennington <hp@redhat.com>
748 * bus/driver.c: put the signature of each bus driver method in the
749 table of handlers and check it on incoming calls; this isn't
750 really useful, but going to add introspect support in a minute.
752 2005-02-11 Joe Shaw <joeshaw@novell.com>
754 * mono/Connection.cs: The unpredictability of finalizers in mono
755 prevents us from deterministically disconnecting the filters from
756 the Service class's finalizer, so move tracking of filters and
757 matches here. Add API for that.
759 * mono/Service.cs: Remove the code, add code which calls the
760 methods now on the Connection class.
762 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
764 * python/dbus.py (class Sender): added to support dbus signals better
765 (Bus::add_signal_receiver): added expand_args parameter which defaults
766 to True. When expand args is True the signal handler will pass the
767 message arguments as parameters to the signal handler. If False
768 revert to previous behavior where the signal handler must get the
769 argument list from the message. This is to help port applications
770 like HAL that have a tendancy to send variable length argument lists.
771 self._match_rule_to_receivers is now a dict of dicts.
772 (Bus::remove_signal_receiver): pop handler off the dict intead of
773 removing it from a list
774 (Bus::_signal_func): change signal handlers so that interface,
775 signal_name, service, path and message are packed into a Sender
776 object and that is passed to the handler. If expand_args is True
777 extract the args list from the message and append it to the parameter
780 * python/dbus_bindings.pyx.in (class Signature): added to support
782 (MessageIter::__init__): changed iteration limit to match D-BUS
783 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
784 STRUCT and VARIENT type support
785 (MessageIter::python_value_to_dbus_sig): made recursive to support
787 (MessageIter::append*): added Signature, dict, tuple
790 * python/examples/example-client.py: added examples of getting tuples
793 * python/examples/example-service.py: added examples of sending tuples
796 * python/examples/example-signal-recipient.py: Fixed to handle new
797 signal callback format
799 2005-02-10 Havoc Pennington <hp@redhat.com>
801 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
802 (call dbus_g_proxy_add_signal)
804 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
806 (_dbus_server_new_for_domain_socket): escape the path
808 * dbus/dbus-address.c (dbus_address_escape_value): new
809 (dbus_address_unescape_value): new
810 (dbus_parse_address): unescape values
812 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
814 * doc/dbus-specification.xml: explain how to escape values in
817 2005-02-10 Havoc Pennington <hp@redhat.com>
819 * dbus/dbus-message-factory.c (generate_special): modify test to
820 avoid using a non-basic dict key
822 * dbus/dbus-marshal-validate-util.c: add test for the below
824 * doc/dbus-specification.xml: require that dict keys are a basic
827 * dbus/dbus-marshal-validate.c
828 (_dbus_validate_signature_with_reason): require that dict key is a
831 2005-02-10 Havoc Pennington <hp@redhat.com>
833 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
834 change to be _and_unlock instead of _unlocked
836 * dbus/dbus-connection.c
837 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
838 have no_update so we can find this bug quickly in future
840 2005-02-10 Havoc Pennington <hp@redhat.com>
842 * dbus/dbus-message-util.c (verify_test_message): tests for string
845 * dbus/dbus-message.c (dbus_message_append_args_valist): add
846 support for arrays of string/signature/path
848 2005-02-10 Joe Shaw <joeshaw@novell.com>
850 * dbus/dbus-connection.c
851 (_dbus_connection_queue_received_message_link,
852 _dbus_connection_message_sent): Add the path to
854 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
855 _dbus_connection_send_preallocated_unlocked(), updated the
856 dispatch status, and unlocks. Fixes a bug where certain
857 situations (like a broken pipe) could cause a Disconnect message
858 to not be sent, tricking the bus into thinking a service was still
859 there when the process had quit.
860 (_dbus_connection_send_preallocated): Call
861 _dbus_connection_send_preallocated_and_unlock().
862 (_dbus_connection_send_and_unlock): Added. Calls
863 _dbus_connection_send_preallocated_and_unlock().
864 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
865 (dbus_connection_send_with_reply): Update the dispatch status and
868 * mono/Service.cs (~Service): Added. Removes the filter so that
869 we don't get unmanaged code calling back into a GCed delegate.
870 (RemoveFilter); Added.
872 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
874 * dbus/dbus-message.c (dbus_message_iter_open_container):
875 - Removed check for iterator type being an array because
876 get_arg_type does not work with writer iterators
877 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
879 2005-02-07 Havoc Pennington <hp@redhat.com>
881 * doc/dbus-specification.xml: some more language cleanups; add
882 stuff about how to deal with invalid protocol and extension
883 points; add _ to allowed chars in auth commands; add EXTENSION_
886 2005-02-06 Havoc Pennington <hp@redhat.com>
888 * s/expected/required/ in a couple places for clarity
890 2005-02-07 Colin Walters <walters@verbum.org>
892 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
893 sender or proposed_recipient.
895 2005-02-06 Havoc Pennington <hp@redhat.com>
897 * dbus/dbus-message-factory.c (generate_special): more tests
899 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
900 array length that exceeds the maximum
902 2005-02-05 Havoc Pennington <hp@redhat.com>
904 * dbus/dbus-message-factory.c (generate_special): more test cases,
907 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
908 reason why a signature was invalid
910 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
911 skip the length of the string before we look at it in validation
913 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
916 * dbus/dbus-message.c (_dbus_message_loader_new): default
917 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
919 2005-02-05 Havoc Pennington <hp@redhat.com>
921 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
922 if the signature of a variant was empty
923 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
924 struct with no element type)
926 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
927 mangled messages to break things
929 2005-02-04 Havoc Pennington <hp@redhat.com>
931 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
932 g_quark_try_string() so it actually can return 0
933 (dbus_g_proxy_connect_signal): ditto
935 2005-02-04 Havoc Pennington <hp@redhat.com>
937 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
939 (tristring_from_message): assert cleanly on null path/interface
940 (should not be possible though I decided later)
941 (dbus_g_proxy_dispose): move proxy manager unregistration here
942 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
943 g_return_if_fail() checks
945 2005-02-04 Havoc Pennington <hp@redhat.com>
947 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
949 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
950 (with some minor changes)
952 * doc/dbus-specification.xml: add deprecated attribute to
955 2005-01-31 Havoc Pennington <hp@redhat.com>
957 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
958 think it's sort of right
960 2005-01-30 Havoc Pennington <hp@redhat.com>
962 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
964 2005-01-30 Havoc Pennington <hp@redhat.com>
966 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
968 * autogen.sh: change to autotools 1.9
970 * glib/dbus-gproxy.c: completely change how signals work
971 (dbus_g_proxy_add_signal): new function to specify signature of a
973 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
974 and g_warning if the incoming message has the wrong signature.
976 2005-01-30 Havoc Pennington <hp@redhat.com>
978 * tools/dbus-names-model.c (have_names_notify): fix this
980 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
981 up the string array handling a bit
983 2005-01-30 Havoc Pennington <hp@redhat.com>
985 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
986 (dbus_g_pending_call_cancel): new function
988 * dbus/dbus-glib.h: move GType decls for connection/message here;
989 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
990 here, just kind of rationalizing how we handle all that
992 * tools/dbus-names-model.c: new file for a tree model listing the
995 * tools/dbus-tree-view.c (model_new): use proper typing on the
998 2005-01-30 Havoc Pennington <hp@redhat.com>
1000 * glib/dbus-gmain.c: add a custom GSource back that just checks
1001 whether the message queue has anything in it; otherwise, there are
1002 cases where we won't see messages in the queue since there was no
1003 IO visible to the glib main loop
1005 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
1006 increase default message timeout to 25 seconds
1008 2005-01-30 Havoc Pennington <hp@redhat.com>
1010 * test/glib/test-profile.c (no_bus_stop_server): remove the
1011 warning about the g_warning that I just fixed
1013 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
1014 custom source, seems to be a lot easier to understand and work
1017 2005-01-30 Havoc Pennington <hp@redhat.com>
1019 I think this main loop thing is conceptually broken, but here are
1020 some band aids. I'll maybe rewrite it in a minute.
1022 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
1023 custom GSource, so don't pass it in; confusing
1024 (gsource_server_finalize, gsource_connection_finalize): add
1025 finalize handlers that remove all the watches.
1027 2005-01-30 Havoc Pennington <hp@redhat.com>
1029 * glib/dbus-gobject.c (introspect_properties): fix the XML
1032 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
1033 which effectively detects the use of freed messages
1035 * glib/dbus-gobject.c (handle_introspect): modify and return the
1036 reply message instead of the incoming message
1038 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
1039 gee, maybe it should SEND THE XML instead of just making a string
1040 and freeing it again ;-)
1042 * tools/dbus-print-message.c (print_message): improve printing of
1045 * configure.in: add debug-glib.service to the output
1047 2005-01-30 Havoc Pennington <hp@redhat.com>
1049 dbus-viewer introspected and displayed the bus driver
1051 * dbus/dbus-object-tree.c
1052 (object_tree_test_iteration): add tests for a handler registered on "/"
1054 * dbus/dbus-object-tree.c
1055 (_dbus_decompose_path): fix to handle path "/" properly
1056 (run_decompose_tests): add tests for path decomposition
1058 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
1061 * glib/dbus-gobject.c (handle_introspect): fix quotes
1063 * test/glib/run-test.sh: support launching the bus, then running
1066 * test/glib/test-service-glib.c (main): put in a trivial gobject
1067 subclass and register it on the connection
1069 * bus/driver.c (bus_driver_handle_introspect): implement
1070 introspection of the bus driver service
1072 * dbus/dbus-protocol.h: add #defines for the XML namespace,
1073 identifiers, doctype decl
1075 * bus/driver.c (bus_driver_handle_get_service_owner): handle
1076 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
1077 returning the service unchanged.
1078 (bus_driver_handle_message): remove old check for reply_serial in
1079 method calls, now the message type deals with that
1080 (bus_driver_handle_message): handle NULL interface
1082 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
1084 * glib/dbus-gloader-expat.c (description_load_from_string): allow
1087 * tools/dbus-viewer.c: add support for introspecting a service on
1090 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
1091 (dbus_g_pending_call_unref): add
1093 2005-01-29 Havoc Pennington <hp@redhat.com>
1095 * tools/dbus-tree-view.c: add support for displaying properties.
1096 (run dbus-viewer with an introspect xml file as arg, then resize
1097 the window so the tree elements show up, not sure what that is)
1099 * glib/dbus-gobject.c (handle_introspect): return
1100 org.freedesktop.Properties and org.freedesktop.Introspectable
1101 interfaces when we are introspected.
1103 * doc/dbus-specification.xml: allow empty interface name when
1106 2005-01-29 Havoc Pennington <hp@redhat.com>
1108 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
1109 though it uses glib, it could be extended for any binding in
1112 * glib/dbus-gobject.c (gobject_message_function): change to the
1113 new way properties work
1115 * dbus/dbus-protocol.h: add the new interfaces
1117 * doc/dbus-specification.xml: document the introspection format,
1118 Introspectable interface, and add an org.freedesktop.Properties
1121 * glib/dbus-gparser.c: add support for a <property> element
1123 * glib/dbus-gidl.c: add PropertyInfo
1125 * glib/dbus-gobject.c (handle_introspect): put the outermost
1126 <node> outside the signal and property descriptions.
1127 (introspect_properties): export properties as <property> rather
1128 than as method calls
1130 2005-01-28 Havoc Pennington <hp@redhat.com>
1132 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
1133 related to authentication protocol
1135 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
1137 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
1138 - BUS_ACTIVATION -> BUS_STARTER
1139 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
1140 - class MessageIter (__init__): Added recursion checking
1141 so we throw a nice error instead of just disconnecting from the
1143 (get): Added arg_type parameter for recursion.
1144 Removed the nil type
1145 Added signiture type placeholder (not implemented)
1146 Added struct type placeholder (not implemented)
1147 Added varient type placeholder (not implemented)
1148 Commented out dict type for now
1149 (get_element_type): renamed from get_array_type
1150 (get_*): changed to use the dbus_message_iter_get_basic API
1151 (get_*_array): removed in favor of recursive get_array method
1152 (get_array): new recursive method which calls get to marshal
1153 the elements of the array
1154 (value_to_dbus_sig): New method returns the corrasponding
1155 dbus signiture to a python value
1156 (append): Comment out dict handling for now
1157 Handle lists with the new recursive API
1158 Comment out None handling for now
1159 (append_nil): removed
1160 (append_*): changed to use dbus_message_iter_append_basic API
1161 (append_*_array): removed in favor of recursive append_array
1163 (__str__): Make it easier to print out recursive iterators
1165 - class Message (__str__): moved type inspection to the
1166 MessageIter class' __str__ method
1167 (get_iter): Added an append parameter wich defaults to False
1168 If True use the new API's to create an append iterator
1170 * python/dbus.py: Update to use new bindings API
1171 - TYPE_ACTIVATION -> TYPE_STARTER
1172 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
1173 - class ActivationBus -> class StarterBus
1174 - class RemoteObject (__call__): get an append iterator
1175 - (_dispatch_dbus_method_call): get an append iterator
1176 - class Object (emit_signal): get an append iterator
1178 * python/examples/: Fixed up the examples to work with the new API
1180 2005-01-28 Joe Shaw <joeshaw@novell.com>
1182 * configure.in: Bump version up to 0.30.
1184 * HACKING: Add a release item to bump the version number up after
1187 2005-01-28 Havoc Pennington <hp@redhat.com>
1189 * doc/dbus-specification.xml: update to describe 16-bit types and
1192 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
1195 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
1198 * dbus/dbus-marshal-recursive.c: implement
1200 2005-01-27 Havoc Pennington <hp@redhat.com>
1202 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
1204 * configure.in: find the right type for 16 and 32 bit ints as well
1207 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
1208 the 16-bit types so people don't have to stuff them in 32-bit or
1211 2005-01-27 Havoc Pennington <hp@redhat.com>
1213 * dbus/dbus-message.c: byteswap the message if you init an
1214 iterator to read/write from it
1216 * dbus/dbus-marshal-byteswap.c: new file implementing
1217 _dbus_marshal_byteswap()
1219 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
1221 2005-01-26 Havoc Pennington <hp@redhat.com>
1223 * dbus/dbus-marshal-validate-util.c: break this out (and fix
1224 build, apparently - nobody noticed?)
1226 2005-01-26 Havoc Pennington <hp@redhat.com>
1228 * dbus/dbus-marshal-recursive.h: remove todo comment
1230 2005-01-25 Joe Shaw <joeshaw@novell.com>
1232 * Land the mono binding changes to conform to the new APIs.
1234 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
1235 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
1237 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
1238 type code as a string.
1239 (InitAppending): Rename dbus_message_append_iter_init() to
1240 dbus_message_iter_init_append().
1242 * mono/BusDriver.cs: Rename ServiceEventHandler to
1243 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
1244 Rename ServiceOwnerChanged to NameOwnerChanged.
1246 * mono/Connection.cs: Rename BaseService to UniqueName, and the
1249 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
1251 * mono/Service.cs: Rename Exists to HasOwner, internally rename
1252 dbus_bus_acquire_service() to dbus_bus_request_name().
1254 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
1255 of Type.UnderlyingSystemType to get the correct element type for
1257 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
1258 dbus_message_get_{element|arg}_type() instead of
1259 dbus_message_iter_init_array_iterator().
1260 (Append): Replace dbus_message_iter_append_array() with
1261 dbus_message_iter_open_container() and
1262 dbus_message_iter_close_container().
1264 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
1265 types have been removed.
1267 * mono/DBusType/*.cs: Replace calls of
1268 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
1269 but specify the type in the DllImport extern declaration. Ditto
1270 for dbus_message_iter_append_[type]() ->
1271 dbus_message_iter_append_basic().
1273 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
1274 NameOwnerChangedHandler.
1276 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
1278 * python/dbus_bindings.pyx.in: Rename of methods and bindings
1279 - get_base_service -> get_unique_name
1280 - bus_get_base_service -> bus_get_unique_name
1281 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
1282 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
1283 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
1284 - bus_activate_service -> bus_start_service_by_name
1285 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
1286 - bus_acquire_service -> bus_request_name
1287 - dbus_bus_acquire_service -> dbus_bus_request_name
1288 - bus_service_exists -> bus_name_has_owner
1289 - dbus_bus_service_exists -> dbus_bus_name_has_owner
1291 * python/dbus.py: Rename of methods
1292 - activate_service -> start_service_by_name
1293 - bus_acquire_service -> bus_request_name
1294 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
1295 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
1298 2005-01-24 Joe Shaw <joeshaw@novell.com>
1300 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
1301 signature for the method that can't be found.
1303 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
1304 the message has any arguments, we need to call
1305 _dbus_type_reader_get_current_type(), not
1306 _dbus_type_reader_has_next().
1308 2005-01-24 Havoc Pennington <hp@redhat.com>
1310 * dbus/dbus-message-factory.c: more testing of message validation
1312 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
1315 2005-01-23 Havoc Pennington <hp@redhat.com>
1317 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
1318 get this all working, not many tests in the framework yet though
1320 2005-01-22 Havoc Pennington <hp@redhat.com>
1322 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
1323 tutorial, based on work from David Wheeler.
1325 2005-01-21 Havoc Pennington <hp@redhat.com>
1327 * dbus/dbus-bus.c: add more return_if_fail checks
1329 * dbus/dbus-message.c (load_message): have the "no validation"
1330 mode (have to edit the code to toggle the mode for now though)
1332 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
1333 skips all validation; I want to use this at least for benchmark
1334 baseline, I'm not sure if it should be a publicly-available switch.
1336 2005-01-21 Havoc Pennington <hp@redhat.com>
1338 * glib/dbus-gmain.c: don't put the GLib bindings in the same
1339 toplevel doxygen group as the low-level API stuff
1341 * dbus/dbus.h: note that libdbus is the low-level API
1343 2005-01-20 Havoc Pennington <hp@redhat.com>
1345 * update-dbus-docs.sh: script to update docs on the web site, only
1346 works for me though. neener.
1348 2005-01-20 Havoc Pennington <hp@redhat.com>
1350 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
1351 code can reveal bugs in it
1353 2005-01-20 Havoc Pennington <hp@redhat.com>
1355 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
1356 select() version, patches from Tor Lillqvist
1358 2005-01-20 Havoc Pennington <hp@redhat.com>
1360 * doc/dbus-tutorial.xml: replace > with >
1362 * bus/services.c (bus_registry_acquire_service): validate the name
1363 and return a better error if it's no good.
1365 * doc/dbus-specification.xml: note NO_AUTO_START change
1367 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
1368 from AUTO_START, we're toggling the default
1370 * bus/dispatch.c: adapt the tests to change of auto-start default
1372 2005-01-18 Havoc Pennington <hp@redhat.com>
1374 * rename dbus-daemon-1 to dbus-daemon throughout
1376 2005-01-18 Havoc Pennington <hp@redhat.com>
1378 * Throughout, grand renaming to strip out the use of "service",
1379 just say "name" instead (or "bus name" when ambiguous). Did not
1380 change the internal code of the message bus itself, only the
1381 programmer-facing API and messages.
1383 * doc/dbus-specification.xml: further update the message bus section
1385 * bus/config-parser.c (all_are_equiv): fix bug using freed string
1388 2005-01-17 Havoc Pennington <hp@redhat.com>
1390 * dbus/dbus-types.h: remove 16-bit types since we don't use them
1393 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
1394 "invalid name character" not only non-ASCII
1396 * doc/dbus-specification.xml: further update spec, message bus
1397 parts are still out-of-date but the marshaling etc. stuff is now
1400 2005-01-17 Havoc Pennington <hp@redhat.com>
1402 * doc/dbus-specification.xml: partially update spec
1404 2005-01-17 Havoc Pennington <hp@redhat.com>
1406 * Throughout, align variant bodies according to the contained
1407 type, rather than always to 8. Should save a fair bit of space in
1410 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
1411 fix handling of case where p == end
1413 * doc/TODO: remove the dbus_bool_t item and variant alignment items
1415 2005-01-17 Havoc Pennington <hp@redhat.com>
1417 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
1419 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
1420 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
1421 are marshaling/unmarshaling a boolean.
1423 2005-01-16 Havoc Pennington <hp@redhat.com>
1425 This is about it on what can be disabled/deleted from libdbus
1426 easily, back below 150K anyhow. Deeper cuts are more work than
1427 just turning the code off as I've done here.
1429 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
1430 signed int convenience funcs
1432 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
1435 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
1436 things out of libdbus
1438 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
1440 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
1441 tests-enabled-only, though it should probably be deleted)
1443 * dbus/dbus-message-util.c: same stuff
1445 * dbus/dbus-auth-util.c: same stuff
1447 2005-01-16 Havoc Pennington <hp@redhat.com>
1449 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
1451 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
1452 way for stripping down dbus-userdb.c stuff included in libdbus.
1453 Rename _dbus_parse_uid for consistency.
1455 2005-01-16 Havoc Pennington <hp@redhat.com>
1457 * dbus/dbus-internals.c (_dbus_real_assert): print the function
1458 name the assertion failed in
1460 * dbus/dbus-internals.h (_dbus_return_if_fail)
1461 (_dbus_return_val_if_fail): assert that the name of the function
1462 containing the check doesn't start with '_', since we only want to
1463 use checks on public functions
1465 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
1466 checks to assertions
1468 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
1469 change checks to asserts for private function
1471 * dbus/dbus-message.c (_dbus_message_set_serial): checks
1472 to asserts for private function
1474 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
1475 broken assertion that was breaking make check
1476 (_dbus_type_reader_array_is_empty): remove this rather than fix
1477 it, was only used in assertions
1479 2005-01-16 Havoc Pennington <hp@redhat.com>
1481 * test/unused-code-gc.py: hacky script to find code that's used
1482 only by the bus (not libdbus) or used only by tests or not used at
1483 all. It has some false alarms, but looks like we can clean up a
1484 lot of size from libdbus.
1486 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
1487 dbus/Makefile.am: initially move 10K of binary size out of libdbus
1489 2005-01-16 Havoc Pennington <hp@redhat.com>
1491 * Add and fix docs according to Doxygen warnings throughout
1494 * dbus/dbus-marshal-recursive.c
1495 (_dbus_type_reader_array_is_empty): change this to just call
1496 array_reader_get_array_len() and make it static
1498 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
1500 (dbus_message_iter_init_append): rename from append_iter_init
1502 * dbus/dbus-marshal-recursive.c
1503 (_dbus_type_reader_get_element_type): rename from
1504 _dbus_type_reader_get_array_type
1506 2005-01-15 Havoc Pennington <hp@redhat.com>
1508 * test/glib/test-profile.c (with_bus_server_filter): fix crash
1510 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
1511 when DBUS_DISABLE_ASSERT
1512 (_dbus_marshal_set_basic): be sure we align for the string length
1514 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
1517 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
1518 inline macro version
1519 (_dbus_string_set_byte): provide inline macro version
1521 2005-01-15 Havoc Pennington <hp@redhat.com>
1523 * Land the new message args API and type system.
1525 This patch is huge, but the public API change is not
1526 really large. The set of D-BUS types has changed somewhat,
1527 and the arg "getters" are more geared toward language bindings;
1528 they don't make a copy, etc.
1530 There are also some known issues. See these emails for details
1532 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
1533 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
1535 * dbus/dbus-marshal-*: all the new stuff
1537 * dbus/dbus-message.c: basically rewritten
1539 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
1540 freed blocks to be all non-nul bytes so using freed memory is less
1541 likely to work right
1543 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
1544 DBUS_FAIL_MALLOC=N environment variable, so you can do
1545 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
1546 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
1549 * qt/message.cpp: port to the new message args API
1550 (operator<<): use str.utf8() rather than str.unicode()
1551 (pretty sure this is right from the Qt docs?)
1553 * glib/dbus-gvalue.c: port to the new message args API
1555 * bus/dispatch.c, bus/driver.c: port to the new message args API
1557 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
1558 "locked" flag to TRUE and align_offset to 0; I guess we never
1559 looked at these anyhow, but seems cleaner.
1561 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
1562 move allocation padding macro to this header; use it to implement
1563 (_DBUS_STRING_STATIC): ability to declare a static string.
1565 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
1566 change to return TRUE if the interface is not set.
1568 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
1569 to dbus-marshal-validate.[hc]
1571 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
1574 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
1575 to dbus-marshal-*.[hc]
1577 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
1578 function here from dbus-marshal.c
1580 2005-01-12 Joe Shaw <joeshaw@novell.com>
1582 * NEWS: Update for 0.23.
1584 * configure.in: Release 0.23.
1586 2005-01-12 Joe Shaw <joeshaw@novell.com>
1588 * mono/Makefile.am, mono/example/Makefile.am: Always build the
1589 dbus DLL with --debug. Clean up after the .mdb files this leaves
1592 * mono/doc/Makefile.am: Need to uninstall the docs on "make
1595 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
1596 is an enum, get the enum's underlying type. Another mono
1599 2005-01-11 Joe Shaw <joeshaw@novell.com>
1601 Patch from Sjoerd Simons <sjoerd@luon.net>
1603 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
1604 DESTDIR. It breaks stuff.
1606 2005-01-11 Joe Shaw <joeshaw@novell.com>
1608 Patch from Tambet Ingo <tambet@ximian.com>
1610 * mono/DBusType/Array.cs (Get): Get the underlying element type by
1611 calling type.GetElementType(). The code previously depended on
1612 broken Mono behavior, which was fixed in Mono 1.1.3.
1614 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
1615 Activator.CreateInstance() so that the class's constructor is
1616 called with the right parameters.
1618 2005-01-11 Joe Shaw <joeshaw@novell.com>
1620 Patch from Timo Teräs <ext-timo.teras@nokia.com>
1622 * dbus/dbus-connection.c
1623 (_dbus_connection_queue_received_message_link): Call
1624 _dbus_connection_remove_timeout() instead of the _locked()
1625 variant, since it's always called from
1626 _dbus_connection_handle_watch(), which handles the locking.
1627 Removed the _locked() variant since it's no longer used.
1629 2005-01-03 Havoc Pennington <hp@redhat.com>
1631 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
1634 2004-12-26 Havoc Pennington <hp@redhat.com>
1636 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
1638 2005-01-03 Havoc Pennington <hp@redhat.com>
1640 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
1643 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
1645 2005-01-02 Havoc Pennington <hp@redhat.com>
1647 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
1649 2005-01-01 Havoc Pennington <hp@redhat.com>
1651 * configure.in: add -Wfloat-equal
1653 2005-01-01 Havoc Pennington <hp@redhat.com>
1655 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
1656 for a variety of reasons '==' doesn't do this.
1658 2004-12-31 Havoc Pennington <hp@redhat.com>
1660 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
1661 I keep wishing I had
1663 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1665 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
1667 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1669 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
1670 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
1671 dbus-protocol.h. Because they are defines and not enums they are not
1674 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
1676 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
1677 dbus_bus_activate_service
1679 * python/dbus.py (Bus.activate_service): activate a service on the
1682 2004-12-24 Havoc Pennington <hp@redhat.com>
1684 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
1685 file format has also changed and I haven't adapted to that yet
1687 * Makefile.am: load .gcno files from latest gcc
1689 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
1690 * Patch from Rob Taylor <robtaylor@fastmail.fm>
1692 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
1695 * python/dbus.py (get_unix_user): Added binding to
1696 call dbus_bindings.bus_get_unix_user
1698 * python/extract.py: Modified the proto_pat regex to
1699 handle unsigned long
1701 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1703 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
1704 better POSIX compliance.
1706 2004-12-19 Havoc Pennington <hp@redhat.com>
1708 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
1709 (_dbus_string_insert_8_aligned): new functions
1711 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
1713 2004-12-18 Havoc Pennington <hp@redhat.com>
1715 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
1718 * dbus/dbus-message.c: fix a comment, and add a still-unused
1719 not-implemented function
1721 * dbus/dbus-marshal.h: fix comment
1723 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
1725 2004-12-17 Joe Shaw <joeshaw@novell.com>
1727 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
1728 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
1729 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
1730 Type.UnderlyingSystemType to get the actual system type
1731 underneath. This code previously depended on the broken Mono
1732 behavior, which was fixed in 1.1.3.
1734 2004-11-27 Havoc Pennington <hp@redhat.com>
1736 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
1738 (_dbus_string_get_const_data): inline when asserts are disabled
1740 * dbus/dbus-message.c: record the _dbus_current_generation of
1741 creation so we can complain if dbus_shutdown() is used improperly.
1742 Do this only if checks are enabled.
1744 * dbus/dbus-connection.c: ditto
1746 2004-11-26 Havoc Pennington <hp@redhat.com>
1748 * test/glib/test-profile.c: add with_bus mode to profile echoes
1749 that go through the bus.
1751 * test/glib/run-test.sh: add ability to run test-profile
1753 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
1756 2004-11-26 Havoc Pennington <hp@redhat.com>
1758 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
1759 thing was implemented
1761 2004-11-26 Havoc Pennington <hp@redhat.com>
1763 * test/glib/test-profile.c: tweak a bit, add support for some
1764 made-up minimal malloc overhead with plain sockets, since in
1765 real life some sort of buffers are unavoidable thus we could
1766 count them in the theoretical best case
1768 2004-11-26 Havoc Pennington <hp@redhat.com>
1770 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
1771 where I was trying to cache one too many messages
1773 2004-11-26 Havoc Pennington <hp@redhat.com>
1775 * dbus/dbus-message.c: reimplement message cache as an array which
1776 makes the cache about twice as fast and saves maybe 1.5% overall
1778 2004-11-26 Havoc Pennington <hp@redhat.com>
1780 * dbus/dbus-threads.c (init_global_locks): forgot to put the
1781 message cache lock here
1783 2004-11-26 Havoc Pennington <hp@redhat.com>
1785 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
1786 the "char byte_order" next to each other to save 4 bytes
1787 (dbus_message_new_empty_header): reduce preallocation, since the
1788 message cache should achieve a similar effect
1789 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
1790 message cache that keeps a few DBusMessage around in a pool,
1791 another 8% speedup or so.
1793 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
1795 2004-11-25 Havoc Pennington <hp@redhat.com>
1797 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
1798 to write, without reading or blocking, try it before the poll()
1799 and skip the poll() if nothing remains to write. This is about a
1800 3% speedup in the echo client/server
1802 2004-11-25 Havoc Pennington <hp@redhat.com>
1804 The primary change here is to always write() once before adding
1805 the write watch, which gives us about a 10% performance increase.
1807 * dbus/dbus-transport-unix.c: a number of modifications to cope
1808 with removing messages_pending
1809 (check_write_watch): properly handle
1810 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
1811 messages_pending stuff
1812 (check_read_watch): properly handle WAITING_FOR_MEMORY and
1814 (unix_handle_watch): after writing, see if the write watch can be
1816 (unix_do_iteration): assert that write_watch/read_watch are
1817 non-NULL rather than testing that they aren't, since they
1818 aren't allowed to be NULL. check_write_watch() at the end so
1819 we add the watch if we did not finish writing (e.g. got EAGAIN)
1821 * dbus/dbus-transport-protected.h: remove messages_pending call,
1822 since it resulted in too much inefficient watch adding/removing;
1823 instead we now require that the transport user does an iteration
1824 after queueing outgoing messages, and after trying the first
1825 write() we add a write watch if we got EAGAIN or exceeded our
1826 max bytes to write per iteration setting
1828 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
1831 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
1832 freed and then accessed, valgrind flagged this bug, fix it
1834 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
1835 as the last valid field plus 1, where really it is equal to the
1836 last valid field. Corrects some message corruption issues.
1838 * dbus/dbus-mainloop.c: verbosity changes
1840 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
1841 instead of aborting in one of the test codepaths
1843 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
1844 caused not printing the pid ever again if a verbose was missing
1845 the newline at the end
1846 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
1848 * dbus/dbus-connection.c: verbosity changes;
1849 (dbus_connection_has_messages_to_send): new function
1850 (_dbus_connection_message_sent): no longer call transport->messages_pending
1851 (_dbus_connection_send_preallocated_unlocked): do one iteration to
1852 try to write() immediately, so we can avoid the write watch. This
1853 is the core purpose of this patchset
1854 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
1855 dump the outgoing message queue, so nobody will get confused
1856 trying to send them or thinking stuff is pending to be sent
1858 * bus/test.c: verbosity changes
1860 * bus/driver.c: verbosity/assertion changes
1862 * bus/dispatch.c: a bunch of little tweaks to get it working again
1863 because this patchset changes when/where you need to block.
1865 2004-11-23 Havoc Pennington <hp@redhat.com>
1867 * test/glib/test-profile.c: modify to accept a plain_sockets
1868 argument in which case it will bench plain sockets instead of
1869 libdbus, for comparison purposes.
1871 2004-11-22 Havoc Pennington <hp@redhat.com>
1873 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
1874 threads for more time, so sysprof can get a grip on it.
1876 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
1879 2004-11-13 Havoc Pennington <hp@redhat.com>
1881 * test/glib/test-profile.c: fix this thing up a bit
1883 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
1884 preallocation sizes by a fair bit; not sure if this will be an
1885 overall performance win or not, but it does reduce reallocs.
1887 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
1888 the test hack that forced constant realloc if asserts are
1889 disabled, so we can profile sanely. Sprinkle in some
1890 _DBUS_UNLIKELY() which are probably pointless, but before I
1891 noticed the real performance problem I put them in.
1892 (_dbus_string_validate_utf8): micro-optimize this thing a little
1893 bit, though callgrind says it didn't help; then special-case
1894 ascii, which did help a lot; then be sure we detect nul bytes as
1895 invalid, which is a bugfix.
1896 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
1897 superstition; use memset to nul the padding instead of a manual
1899 (_dbus_string_get_length): inline this as a
1900 macro; it showed up in the profile because it's used for loop
1903 2004-11-10 Colin Walters <walters@verbum.org>
1905 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
1908 2004-11-09 Colin Walters <walters@verbum.org>
1910 * dbus/dbus-string.c (_dbus_string_get_length): New
1911 function, writes DBusString to C buffer.
1913 * dbus/dbus-string.h: Prototype it.
1915 * dbus/dbus-message.c (dbus_message_type_to_string): New
1916 function, converts message type into C string.
1918 * dbus/dbus-message.h: Prototype it.
1920 * bus/selinux.c (bus_selinux_check): Take source pid,
1921 target pid, and audit data. Pass audit data to
1923 (log_audit_callback): New function, appends extra
1925 (bus_selinux_allows_acquire_service): Also take
1926 service name, add it to audit data.
1927 (bus_selinux_allows_send): Also take message
1928 type, interface, method member, error name,
1929 and destination, and add them to audit data.
1930 (log_cb): Initialize func_audit.
1932 * bus/selinux.h (bus_selinux_allows_acquire_service)
1933 (bus_selinux_allows_send): Update prototypes
1935 * bus/services.c (bus_registry_acquire_service): Pass
1936 service name to bus_selinux_allows_acquire_service.
1938 * bus/bus.c (bus_context_check_security_policy): Pass
1939 additional audit data. Move assignment of dest
1942 2004-11-07 Colin Walters <walters@verbum.org>
1944 * dbus/dbus-transport-unix.c (do_authentication): Always
1945 initialize auth_completed.
1947 2004-11-07 Colin Walters <walters@verbum.org>
1949 * bus/bus.c (load_config): Break into three
1950 separate functions: process_config_first_time_only,
1951 process_config_every_time, and process_config_postinit.
1952 (process_config_every_time): Move call of
1953 bus_registry_set_service_context_table into
1954 process_config_postinit.
1955 (process_config_postinit): New function, does
1956 any processing that needs to happen late
1957 in initialization (and also on reload).
1958 (bus_context_new): Instead of calling load_config,
1959 open config parser here and call process_config_first_time_only
1960 and process_config_every_time directly. Later, after
1961 we have forked but before changing UID,
1962 invoke bus_selinux_full_init, and then call
1963 process_config_postinit.
1964 (bus_context_reload_config): As in bus_context_new,
1965 load parse file inside here, and call process_config_every_time
1966 and process_config_postinit.
1968 * bus/services.h, bus/services.c
1969 (bus_registry_set_service_context_table): Rename
1970 from bus_registry_set_sid_table. Take string hash from config
1971 parser, and convert them here into SIDs.
1973 * bus/config-parser.c (struct BusConfigParser): Have
1974 config parser only store a mapping of service->context
1976 (merge_service_context_hash): New function.
1977 (merge_included): Merge context string hashes instead
1978 of using bus_selinux_id_table_union.
1979 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
1980 simply create a new string hash.
1981 (bus_config_parser_unref): Unref it.
1982 (start_selinux_child): Simply insert strings into hash,
1983 don't call bus_selinux_id_table_copy_over.
1985 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
1986 (bus_selinux_id_table_copy_over): Delete.
1988 2004-11-03 Colin Walters <walters@verbum.org>
1990 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
1993 2004-11-03 Colin Walters <walters@verbum.org>
1995 * bus/test-main.c (test_pre_hook): Fix test logic,
1996 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
1998 2004-11-02 Colin Walters <walters@redhat.com>
2000 * bus/selinux.c (bus_selinux_init): Split into two functions,
2001 bus_selinux_pre_init and bus_selinux_post_init.
2002 (bus_selinux_pre_init): Just determine whether SELinux is
2004 (bus_selinux_post_init): Do everything else.
2006 * bus/main.c (main): Call bus_selinux_pre_init before parsing
2007 config file, and bus_selinux_post_init after. This ensures that
2008 we don't lose the policyreload notification thread that
2009 bus_selinux_init created before forking previously.
2011 * bus/test-main.c (test_pre_hook): Update for split.
2013 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
2015 Patch from Johan Fischer <linux@fischaz.com>
2017 * mono/doc/Makefile.am (install-data-local): Added directory
2020 2004-10-29 Colin Walters <walters@redhat.com>
2022 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
2023 parameter for fd to write pid to.
2025 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
2027 * bus/bus.c (bus_context_new): Pass print_pid_fd
2028 to _dbus_become_daemon (bug #1720)
2030 2004-10-29 Colin Walters <walters@redhat.com>
2032 Patch from Ed Catmur <ed@catmur.co.uk>
2034 * mono/doc/Makefile.am (install-data-local): Handle
2037 2004-10-29 Colin Walters <walters@redhat.com>
2039 * bus/.cvsignore, qt/.cvsignore: Update.
2041 2004-10-29 Colin Walters <walters@redhat.com>
2043 Patch from Kristof Vansant <de_lupus@pandora.be>
2045 * configure.in: Detect Slackware.
2046 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
2047 * bus/rc.messagebus.in: New file.
2049 2004-10-29 Colin Walters <walters@redhat.com>
2051 * tools/dbus-monitor.c (filter_func): Return
2052 DBUS_HANDLER_RESULT_HANDLED in filter function
2054 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
2056 2004-10-29 Colin Walters <walters@redhat.com>
2058 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
2060 * bus/services.c (bus_registry_acquire_service):
2061 Correctly retrieve service name from DBusString
2064 2004-10-29 Colin Walters <walters@redhat.com>
2066 * dbus/dbus-glib.h: Update documentation to not
2067 refer to internal APIs.
2069 2004-10-27 Joe Shaw <joeshaw@novell.com>
2071 * mono/Arguments.cs (GetDBusTypeConstructor):
2072 type.UnderlyingSystemType will return "System.Byte" if you do it
2073 on "byte[]", which is not what we want. So check the type.IsArray
2074 property and use System.Array instead.
2076 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
2078 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
2079 the DBusUserInfo structure since this is passed into the function.
2080 This would cause a double free when the function that allocated
2081 the structure would try to free it when an error occured.
2083 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
2084 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
2085 for service activation to avoid 32bit/64bit parallel install issues
2087 2004-10-21 Colin Walters <walters@verbum.org>
2089 * AUTHORS: Fix my email address, the @gnu.org one
2090 has been bouncing for some time. Also add J5.
2092 2004-10-21 Colin Walters <walters@verbum.org>
2094 * dbus/dbus-transport-unix.c (do_authentication): Return
2095 authentication status to callers.
2096 (unix_handle_watch): If we completed authentication this round,
2097 don't do another read. Instead wait until the next iteration,
2098 after we've read any pending data in the auth buffer.
2099 (unix_do_iteration): Ditto.
2100 (unix_handle_watch): Updated for new do_authentication prototype.
2102 2004-10-18 Colin Walters <walters@verbum.org>
2104 * bus/selinux.c (bus_selinux_enabled): Handle
2105 --disable-selinux case.
2107 2004-10-18 Colin Walters <walters@verbum.org>
2109 * bus/selinux.h: Add bus_selinux_enabled.
2111 * bus/selinux.c (bus_selinux_enabled): Implement it.
2113 * bus/config-parser.c (struct include): Add
2114 if_selinux_enabled member.
2115 (start_busconfig_child): Parse if_selinux_enabled
2116 attribute for include.
2117 (bus_config_parser_content): Handle it.
2119 * bus/session.conf.in, bus/system.conf.in: Add
2120 inclusion of context mapping to default config files;
2121 conditional on SELinux being enabled.
2123 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
2125 * test/data/invalid-config-files/badselinux-1.conf,
2126 test/data/invalid-config-files/badselinux-2.conf:
2127 Test files for bad syntax.
2129 2004-10-17 Colin Walters <walters@verbum.org>
2131 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
2132 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
2133 format specifier mismatches.
2135 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
2137 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
2140 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
2141 pointer (bug #1540, Leonardo Boiko).
2143 2004-09-28 Jon Trowbridge <trow@ximian.com>
2145 * mono/BusDriver.cs: Changed BusDriver struct to remove
2146 the ServiceCreated and ServiceDeleted events and replace them
2147 with the new ServiceOwnerChanged event.
2149 * mono/example/BusListener.cs: Added a new example program,
2150 which listens for and reports any ServiceOwnerChanged events
2153 * mono/example/Makefile.am (DESTDIR): Build changes for the
2154 new BusListener.cs example.
2156 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
2158 * bus/signals.c (bus_match_rule_parse): validate the components of
2159 match rules (bug #1439).
2161 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
2163 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
2165 * doc/dbus-specification.xml: document ServiceOwnerChanged
2168 * bus/driver.c, bus/driver.h, bus/services.c: Use
2169 ServiceOwnerChanged signal instead of ServiceCreated and
2172 * bus/dispatch.c: update testcase for the new signal.
2174 2004-09-20 Jon Trowbridge <trow@ximian.com>
2176 Patch from Nat Friedman <nat@novell.com>
2178 * mono/Makefile.am: A number of small build fixes to allow "make
2179 distcheck" to succeed.
2181 * mono/example/Makefile.am: "make distcheck" fixes.
2183 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
2186 * test/Makefile.am: "make distcheck" fixes.
2188 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
2190 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
2192 * doc/busconfig.dtd: update the DTD for the at_console attribute.
2194 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
2195 messages after the first one (bug #1389).
2197 * bus/dispatch.c (check_double_hello_message): add a test case for
2198 the double hello message bug.
2199 (check_existent_service_activation): fix check of spawning error.
2201 2004-09-16 David Zeuthen <david@fubar.dk>
2203 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
2205 2004-09-12 David Zeuthen <david@fubar.dk>
2207 Patch from Kay Sievers <kay.sievers@vrfy.org>
2209 * bus/bus.c (bus_context_new):
2211 * bus/main.c (usage)
2213 Add commandline option --nofork to override configuration file
2216 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
2218 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
2219 compilers don't like it (bug #974).
2221 2004-09-04 Harald Fernengel <harry@kdevelop.org>
2223 * qt/connection.*: Applied patch by Jérôme Lodewyck
2224 <lodewyck@clipper.ens.fr> to integrate an existing
2225 connection into the Qt eventloop
2227 2004-08-30 Jon Trowbridge <trow@ximian.com>
2229 * mono/BusDriver.cs: Added. This is a class for interacting with
2230 the org.freedesktop.DBus service.
2232 * mono/Message.cs: Added a mechanism to expose the message that is
2233 currently being dispatched via the static Message.Current
2234 property. Added Message.Sender and Message.Destination
2237 * mono/Handler.cs: Expose the dispatched message via
2238 Message.Current when handling method calls.
2240 * mono/Service.cs: Expose the dispatched message via
2241 Message.Current when handling signal emissions.
2243 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
2244 Connection.BaseService property.
2246 2004-08-28 Havoc Pennington <hp@redhat.com>
2248 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
2250 More fixes from Steve Grubb
2252 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
2253 (_dbus_listen_tcp_socket): fix fd leak
2255 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
2256 EINTR to a bit lower in the code
2258 2004-08-26 Jon Trowbridge <trow@ximian.com>
2260 * bus/driver.c (bus_driver_handle_service_exists): Respond with
2261 TRUE if we are inquiring about the existence of the built-in
2262 org.freedesktop.DBus service.
2264 2004-08-25 John Palmieri <johnp@redhat.com>
2265 * bus/config-parser.c:
2266 (struct PolicyType): Add POLICY_CONSOLE
2267 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
2268 (start_busconfig_child): Sets up console element when
2269 <policy at_console=""> is encountered in a policy file
2270 (append_rule_from_element): Convert console elements to console
2274 (bus_policy_create_client_policy): Add console rules to the client
2275 policy based on if the client is at the console
2276 (bus_policy_append_console_rule): New function for adding a
2277 console rule to a policy
2278 (bus_policy_merge): Handle console rule merging
2280 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
2281 where we check for console user files
2283 * dbus/dbus-sysdeps.c:
2284 (_dbus_file_exists): New function which checks if the given
2286 (_dbus_user_at_console): New function which does the system
2287 specific process of checking if the user is at the console
2289 * dbus/dbus-userdb.c:
2290 (_dbus_is_console_user): New function converts a UID to user name
2291 and then calls the system specific _dbus_user_at_console to
2292 see if the user is at the console and therefor a console user
2294 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
2296 * bus/config-parser.c (set_limit):
2297 * bus/dbus-daemon-1.1.in:
2298 * test/data/valid-config-files/many-rules.conf: set the
2299 max_match_rules_per_connection limt from the config file.
2301 * doc/busconfig.dtd: update the DTD.
2303 * bus/driver.c: remove some unused variables.
2305 2004-08-24 Mikael Hallendal <micke@imendio.com>
2307 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
2308 it's been replaced by dbus_g_bus_get
2310 2004-08-23 Colin Walters <walters@redhat.com>
2312 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2314 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
2316 * bus/selinux.c: Create a thread for policy reload notification.
2317 (bus_selinux_get_policy_root): Implement.
2319 * bus/config-parser.c (start_busconfig_child)
2320 (bus_config_parser_content): Support SELinux-root relative
2323 * configure.in <HAVE_SELINUX>: Add -lpthread.
2325 * bus/test-main.c (test_pre_hook, test_post_hook): New.
2326 (test_post_hook): Move memory checking into here.
2327 (test_pre_hook, test_post_hook): Move SELinux checks in
2328 here, but conditional on a DBUS_TEST_SELINUX environment
2329 variable. Unfortunately we can't run the SELinux checks
2330 as a normal user, since they won't have any permissions
2331 for /selinux. So this will have to be tested manually
2332 for now, until we have virtualization for most of
2335 2004-08-23 Havoc Pennington <hp@redhat.com>
2337 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
2338 drop supplementary groups, suggested by Steve Grubb
2340 2004-08-20 Colin Walters <walters@redhat.com>
2342 * bus/config-parser.c (start_busconfig_child): Remove some unused
2345 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
2348 2004-08-17 Joe Shaw <joeshaw@novell.com>
2350 * configure.in: If --enable-mono is passed in, if we can't find
2353 * mono/Makefile.am: Use /gacutil to install assemblies into the
2356 2004-08-12 Havoc Pennington <hp@redhat.com>
2358 * NEWS: update for 0.22
2360 * configure.in: release 0.22
2362 2004-08-11 Colin Walters <walters@redhat.com>
2364 * tools/dbus-send.c (main, usage): Add --reply-timeout
2367 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
2369 * bus/bus.c (process_config_first_time_only): get rid of an unused
2370 DBusError that was causing a memoy leak (bug #989).
2372 * dbus/dbus-keyring.c, dbus/dbus-message.c:
2373 fix compilation on Solaris/Forte C (bug #974)
2375 * bus/main.c (main): plug two minuscule memleaks.
2377 2004-08-10 Havoc Pennington <hp@redhat.com>
2379 * doc/dbus-tutorial.xml: add some more info on GLib bindings
2381 2004-08-09 Havoc Pennington <hp@redhat.com>
2383 * COPYING: switch to Academic Free License version 2.1 instead of
2384 2.0, to resolve complaints about patent termination clause.
2386 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
2388 * README: added documentation for the --enable-python
2391 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
2393 * bus/config-parser.c (bus_config_parser_new): fix an invalid
2394 _unref in the SELinux support.
2396 * doc/busconfig.dtd: update DTD for SELinux support.
2398 * bus/config-loader-libxml.c: fix error handler and parser
2399 initialisation/cleanup. OOM test now works with libxml2 HEAD.
2401 * configure.in: remove the warning about libxml2.
2403 * dbus/dbus-bus.c: silence doxygen warning.
2405 2004-07-31 Colin Walters <walters@redhat.com>
2407 * configure.in: Move #error in SELinux check to its own line.
2409 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
2411 * dbus/dbus-internals.h (_DBUS_SET_OOM):
2412 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
2415 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
2416 broken by the change in the _SET_OOM macros.
2418 2004-07-31 Colin Walters <walters@redhat.com>
2420 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
2423 2004-07-31 Colin Walters <walters@redhat.com>
2425 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
2426 to correctly detect DBUS__ACQUIRE_SVC. Also add an
2429 2004-07-24 Havoc Pennington <hp@redhat.com>
2431 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2433 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
2436 * configure.in: add --enable-selinux
2438 * bus/policy.c (bus_policy_merge): add FIXME to a comment
2440 * bus/main.c (main): initialize and shut down selinux
2442 * bus/connection.c: store SELinux ID on each connection, to avoid
2443 repeated getting of the string context and converting it into
2446 * bus/bus.c (bus_context_get_policy): new accessor, though it
2448 (bus_context_check_security_policy): check whether the security
2449 context of sender connection can send to the security context of
2450 recipient connection
2452 * bus/config-parser.c: add parsing for <selinux> and <associate>
2454 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
2455 implement dbus_connection_get_unix_fd()
2457 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
2458 function, used by the selinux stuff
2460 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
2462 * bus/config-loader-libxml.c: complete the implementation of
2463 libxml backend for config file loader. Doesn't work with full OOM
2466 * configure.in: change error when selecting libxml into a warning.
2468 * test/data/invalid-config-files: add two non-well-formed XML
2471 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
2473 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
2474 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
2475 be necessary to read all the buffer. (bug #894)
2477 * bus/activation.c (bus_activation_activate_service): fix a
2478 potential assertion failure (bug #896). Small optimization in the
2479 case of auto-activation messages.
2481 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
2482 add test case for byte-through-vararg bug (#901). patch by Kimmo
2485 2004-07-28 Anders Carlsson <andersca@gnome.org>
2488 * python/dbus_bindings.pyx.in:
2489 Add dbus.init_gthreads (), allow emit_signal to pass
2490 arguments to the signal.
2492 2004-07-24 Havoc Pennington <hp@redhat.com>
2494 * AUTHORS: add some people, not really comprehensively, let me
2495 know if I missed you
2497 2004-07-24 Havoc Pennington <hp@redhat.com>
2499 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
2502 * test/Makefile.am (DIST_SUBDIRS): here also
2504 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2506 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
2507 breaking build on Solaris, reported by Farhad Saberi on the ML.
2509 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
2510 va_arg invocation to account for integer promotion in the case of
2511 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
2513 * bus/services.c (bus_service_remove_owner): fix bug #902, use
2514 _dbus_list_get_first_link, not _dbus_list_get_first.
2516 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
2518 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
2519 handler functions so that the asserts in _dbus_object_subtree_unref
2522 * dbus/dbus-transport-unix.c (do_reading):
2523 _dbus_transport_queue_messages return value is of type
2524 dbus_bool_t, not DBusDispatchStatus.
2526 2004-07-19 David Zeuthen <david@fubar.dk>
2528 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
2531 (check_get_connection_unix_user): Debug says GetProperty; but the
2532 method is called GetConnectionUnixUser
2533 (check_get_connection_unix_process_id): New function
2534 (bus_dispatch_test): Actually call check_get_connection_unix_user();
2535 also call check_get_connection_unix_process_id()
2538 (bus_driver_handle_get_connection_unix_process_id): New function,
2539 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
2543 (handle_server_data_external_mech): Set pid from the credentials
2544 obtained from the socket
2546 * dbus/dbus-connection.c:
2547 (dbus_connection_get_unix_process_id): New function
2549 * dbus/dbus-connection.h:
2550 Add prototype for dbus_connection_get_unix_process_id
2552 * dbus/dbus-transport.c:
2553 (_dbus_transport_get_unix_process_id): New function
2555 * dbus/dbus-transport.h:
2556 Add prototype for _dbus_transport_get_unix_process_id
2558 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
2560 * dbus/dbus-message.c: Message counter fix, patch by Christian
2561 Hammond <chipx86@gnupdate.org>
2563 2004-07-18 Seth Nickell <seth@gnome.org>
2566 * python/dbus_bindings.pyx.in:
2567 * python/tests/test-client.py:
2569 Add dbus.ByteArray and dbus_bindings.ByteArray
2570 types so that byte streams can be passed back.
2572 Give jdahlin the heaps of credit that are so
2575 2004-07-12 Seth Nickell <seth@gnome.org>
2579 Add message argument to the default object_method_handler
2582 * python/dbus_bindings.pyx.in:
2584 Automatically return NIL when passed an empty list
2585 (we can't pass back a list since lists are typed
2586 and we don't have any idea what type the the client
2587 intended the list to be... :-( )
2589 2004-07-10 Seth Nickell <seth@gnome.org>
2591 * python/examples/Makefile.am:
2593 Fix distcheck breakage caused by new examples.
2595 2004-07-10 Seth Nickell <seth@gnome.org>
2599 Add "message" argument to service-side dbus.Object
2600 methods. This will break existing services written
2601 using the python bindings, but will allow extraction
2602 of all the message information (e.g. who its from).
2604 Add improved "object oriented" signal handling/emission.
2606 * python/examples/example-service.py:
2610 * python/examples/example-signal-emitter.py:
2611 * python/examples/example-signal-recipient.py:
2613 Two new examples that show how to emit and receive
2614 signals using the new APIs.
2616 * python/examples/example-signals.py:
2617 * python/examples/gconf-proxy-service.py:
2618 * python/examples/gconf-proxy-service2.py:
2620 Add "message" argument to service methods.
2622 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
2624 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
2625 * dbus/bus.c (dbus_bus_get_unix_user)
2626 * doc/dbus-specification.xml: implement GetConnectionUnixUser
2627 method of org.freedesktop.DBus interface.
2629 * bus/dispatch.c: test case
2631 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
2633 * python/Makefile.am: switched include directory from glib/ to dbus/
2634 since dbus-glib.h moved
2636 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2638 * configure.in: prevent building the gcj stuff and libxml loader
2639 since they are broken.
2641 2004-06-20 Havoc Pennington <hp@redhat.com>
2643 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
2644 codes from the dbus error names
2646 * glib/dbus-glib.h: move to subdir dbus/ since it's included
2647 as dbus/dbus-glib.h and that breakage is now visible due to
2648 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
2650 * glib/dbus-glib.h: s/gproxy/g_proxy/
2652 * dbus/dbus-shared.h: new header to hold stuff shared with
2655 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
2658 * glib/dbus-glib.h (dbus_set_g_error): move to
2659 dbus-glib-lowlevel.h
2661 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
2662 of stuff to enable this
2664 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
2666 * a bunch of other changes with the same basic "separate glib
2667 bindings from dbus.h" theme
2669 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
2671 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
2673 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
2675 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
2677 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
2678 the reply value of the ServiceExists message.
2680 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
2682 * python/dbus_bindings.pyx.in: No longer need to parse path
2683 elements and pass them as arrays of strings. The C API now
2684 accepts plain path strings.
2685 (_build_parsed_path): removed
2687 2004-06-07 Havoc Pennington <hp@redhat.com>
2689 * doc/TODO: remove auto-activation item since it's done; sort
2690 items by importance/milestone
2692 2004-06-07 Havoc Pennington <hp@redhat.com>
2694 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
2695 random signature when using REQUIRED_FIELDS (this hack won't work
2698 * dbus/dbus-message.c: change the signature to be a header field,
2699 instead of message->signature special-case string. Incremental
2700 step forward. Then we can fix up code to send the signature in the
2701 message, then fix up code to validate said signature, then fix up
2702 code to not put the typecodes inline, etc.
2703 (load_one_message): don't make up the signature after the fact
2704 (decode_header_data): require signature field for the known
2707 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
2709 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
2711 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
2713 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
2715 * mono/Handler.cs: Updated to follow new path argument for
2716 (un-)registering objects.
2718 * mono/example/Makefile.am:
2720 * configure.in: Bumped required version for mono and use new -pkg
2723 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
2725 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
2726 registration functions take the path argument as char* instead of
2729 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
2730 split off the path decompostion part of
2731 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
2734 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
2736 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2738 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
2739 machine approach. A state is implemented as a function that
2740 handles incoming events as specified for that state.
2742 * doc/dbus-specification.xml: Update auth protocol state machine
2743 specification to match implementation. Remove some leftover
2746 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2748 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
2749 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
2752 * Doxyfile.in: remove deprecated options.
2754 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
2755 glib/test-thread.h, glib/test-thread-client.c,
2756 glib/test-thread-server.c, glib/test-profile.c,
2757 glib/test-dbus-glib.c: remove these unused files.
2759 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
2761 * dbus/dbus-object-tree.c
2762 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
2763 non-fallback handlers (bug #684).
2764 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
2765 (find_subtree_recurse): report wether the returned subtree is an
2766 exact match or a "fallback" match higher up in the tree.
2767 (object_tree_test_iteration): update test case.
2769 2004-06-01 Seth Nickell <seth@gnome.org>
2771 * python/dbus_bindings.pyx.in:
2772 * python/tests/test-client.py:
2774 Round off basic type support. Add dicts (yay!), and
2775 remaining array types.
2777 Make MessageIter more general so it works for dicts too.
2779 Mark all loop variables as C integers.
2781 2004-05-31 Havoc Pennington <hp@redhat.com>
2783 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
2786 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
2788 * glib/dbus-glib-tool.c (main): set up to have a --self-test
2789 option that runs the tests, and start filling in some code
2790 including for starters just dumping the interfaces to stdout
2792 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
2794 * test/data/valid-introspection-files/lots-of-types.xml: test of
2795 an example introspection file
2797 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
2800 2004-05-31 Seth Nickell <seth@gnome.org>
2802 * python/dbus_bindings.pyx.in:
2803 * python/tests/test-client.py:
2808 Fix string array memory trashing bug... oops...
2810 2004-05-30 Seth Nickell <seth@gnome.org>
2814 Add a nicer-but-less-flexible alternate API for handling
2815 calls to virtual objects in dbus.ObjectTree.
2817 Screw up the argument order to the dbus.Object constructor
2818 for consistency with dbus.ObjectTree (and to make dbus_methods
2819 optional for future extension)
2821 * python/examples/Makefile.am:
2822 * python/examples/gconf-proxy-service.py:
2823 * python/examples/gconf-proxy-service2.py:
2825 Alternate implementation of gconf-proxy-service using the
2826 nicer dbus.ObjectTree API.
2828 * python/examples/example-service.py:
2829 * python/tests/test-server.py
2831 Reverse the argument order to deal with dbus.Object constructor
2834 2004-05-30 Seth Nickell <seth@gnome.org>
2836 * python/examples/example-client.py:
2837 * python/examples/example-service.py:
2839 Take it back. Lists seem to work but they're broken
2840 in the test suite. Make the base examples use
2843 2004-05-30 Seth Nickell <seth@gnome.org>
2845 * python/dbus_bindings.pyx.in:
2846 * python/tests/test-client.py:
2848 Add some more tests and fix errors that crop up.
2849 Unfortunately, currently it seems like marshalling
2850 and unmarshalling of lists is completely broken :-(
2852 2004-05-30 Seth Nickell <seth@gnome.org>
2854 * python/dbus_bindings.pyx.in:
2856 Add support for ObjectPath type.
2860 Refactor message handling code to a common function.
2862 * python/tests/test-client.py:
2863 * python/tests/test-server.py:
2865 Add tests that check to make sure values of all types
2866 can be echoed from a service w/o mangling.
2868 2004-05-29 Seth Nickell <seth@gnome.org>
2872 Add ObjectTree class which allows implementation
2873 of trees of "virtual" objects. Basically the python
2874 wrapper for "register_fallback".
2876 * python/examples/Makefile.am
2877 * python/examples/gconf-proxy-client.py:
2878 * python/examples/gconf-proxy-service.py:
2880 Implement a simple GConf proxy service that supports
2881 get/set on string and int GConf keys using the ObjectTree.
2883 2004-05-29 Seth Nickell <seth@gnome.org>
2886 * python/examples/example-client.py:
2887 * python/examples/example-service.py:
2888 * python/examples/list-system-services.py:
2890 Add SessionBus, SystemBus and ActivationBus classes
2891 so you don't need to know the special little BUS_TYPE
2894 2004-05-29 Havoc Pennington <hp@redhat.com>
2896 * bus/config-parser.c (process_test_valid_subdir): temporarily
2897 stop testing config parser OOM handling, since expat has issues
2898 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
2900 * bus/dbus-daemon-1.1.in: change requested_reply to
2901 send_requested_reply/receive_requested_reply so we can send the
2902 replies, not just receive them.
2904 * bus/config-parser.c: parse the new
2905 send_requested_reply/receive_requested_reply
2907 * bus/policy.c (bus_client_policy_check_can_send): add
2908 requested_reply argument and use it
2910 * bus/bus.c (bus_context_check_security_policy): pass through
2911 requested_reply status to message send check
2913 * bus/system.conf.in: adapt to requested_reply change
2915 2004-05-28 Havoc Pennington <hp@redhat.com>
2917 * test/glib/test-service-glib.c (main): remove unused variable
2919 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
2921 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
2922 from the enum, no longer in use.
2924 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
2927 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
2928 whether error_name passed in is a valid error name.
2930 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
2932 * dbus/dbus-message.c (dbus_message_get_args): Added support for
2933 OBJECT_PATH and OBJECT_PATH_ARRAY
2935 2004-05-28 Seth Nickell <seth@gnome.org>
2937 * python/examples/Makefile.am:
2939 Forget to add Makefile.am. Do not pass go.
2941 2004-05-28 Michael Meeks <michael@ximian.com>
2943 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
2946 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
2948 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
2949 (_dbus_message_iter_get_basic_type_array): impl.
2950 drastically simplify ~all relevant _get methods to use these.
2951 (_dbus_message_iter_append_basic_array),
2952 (dbus_message_iter_append_basic): impl
2953 drastically simplify ~all relevant _append methods to use these.
2955 * dbus/dbus-message-builder.c (parse_basic_type)
2956 (parse_basic_array, lookup_basic_type): impl.
2957 (_dbus_message_data_load): prune scads of duplicate /
2960 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
2961 (_dbus_demarshal_basic_type): implement,
2962 (demarshal_and_validate_len/arg): beef up debug.
2963 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
2965 2004-05-27 Seth Nickell <seth@gnome.org>
2968 * python/Makefile.am:
2970 Include the example python apps in the tarball.
2972 * python/examples/list-system-services.py
2974 Add a python new example that fetches the list of services
2975 from the system bus.
2977 2004-05-27 Seth Nickell <seth@gnome.org>
2980 * python/dbus_bindings.pyx.in:
2982 Fix failure to notify that a signal was not handled,
2983 resulted in hung functions.
2985 2004-05-25 Colin Walters <walters@redhat.com>
2987 * tools/dbus-monitor.c (main): Monitor all types of messages.
2989 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
2991 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
2992 which unregisters the object path and disposes the handler.
2994 2004-05-23 Kristian Høgsberg <krh@redhat.com>
2996 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
2998 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
2999 operands to && so we call dbus_message_iter_next () for the last
3002 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3004 * dbus/dbus-object-tree.c
3005 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
3006 children even if the requested path isn't registered.
3007 (object_tree_test_iteration): test object_tree_list_registered.
3009 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
3012 2004-05-20 Kristian Høgsberg <krh@redhat.com>
3014 * doc/TODO: Remove resolved items.
3016 * bus/expirelist.h (struct BusExpireList): remove unused n_items
3019 * bus/connection.c (bus_connections_expect_reply): Enforce the
3020 per-connection limit on pending replies.
3022 Patch from Jon Trowbridge <trow@ximian.com>:
3024 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
3025 up a watch that triggers a config reload when one end of the pipe
3027 (signal_handler): Instead of doing the config reload in our SIGHUP
3028 handler, just write to the reload pipe and let the associated
3029 watch handle the reload when control returns to the main loop.
3031 * bus/driver.c (bus_driver_handle_reload_config): Added.
3032 Implements a ReloadConfig method for requesting a configuration
3033 file reload via the bus driver.
3035 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
3037 * HACKING: Updated release instructions concerning the wiki page.
3039 2004-05-18 Kristian Høgsberg <krh@redhat.com>
3041 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
3042 filter against auth->allowed_mechs; we only add allowed mechs in
3043 record_mechanisms().
3045 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
3046 ALLOWED_MECHS to auth-script format so we can set the list of
3049 * data/auth/client-out-of-mechanisms.auth-script: New test to
3050 check client disconnects when it is out of mechanisms to try.
3052 * dbus/dbus-auth.c (process_command): Remove check for lines
3053 longer that 1 MB; we only buffer up maximum 16 kB.
3055 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3056 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
3057 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
3058 assume there might be unused bytes.
3060 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
3061 client-out-of-mechs, it is handled in process_reject(). Move check
3062 for max failures to send_rejected(), as it's a server-only thing.
3064 * dbus/dbus-auth.c: Factor out protocol reply code into functions
3065 send_auth(), send_data(), send_rejected(), send_error(),
3066 send_ok(), send_begin() and send_cancel().
3068 2004-05-17 Kristian Høgsberg <krh@redhat.com>
3070 Remove base64 encoding, replace with hex encoding. Original patch
3071 from trow@ximian.com, added error handling.
3073 * dbus/dbus-string.c (_dbus_string_base64_encode)
3074 (_dbus_string_base64_decode): Remove.
3075 (_dbus_string_hex_decode): Add end_return argument so we can
3076 distinguish between OOM and invalid hex encoding.
3077 (_dbus_string_test): Remove base64 tests and add test case for
3080 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
3081 Replace base64 with hex.
3083 * test/data/auth/invalid-hex-encoding.auth-script: New test case
3084 for invalid hex encoded data in auth protocol.
3086 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
3088 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
3091 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
3093 * mono/dbus-sharp.dll.config.in: Added for GAC
3094 * mono/dbus-sharp.snk: Added for GAC
3095 * mono/Assembly.cs.in: Added for GAC
3096 * mono/Makefile.am: Changes for GAC installation
3097 * configure.in: Added refs for dbus-sharp.dll.config.in and
3098 Assembly.cs.in. More fixes for mono testing
3099 * mono/example/Makefile.am: Changed var to CSC
3100 * Makefile.am: Changed flag name to DBUS_USE_CSC
3102 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
3104 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
3105 * mono/doc/*: Added documentation framework
3106 * configure.in: Added monodoc check
3107 * README: Added description of mono configure flags
3109 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
3111 * doc/dbus-specification.xml: Added a "Required" column to the
3112 header fields table and changed the "zero or more" verbage in
3113 the above paragraph to read "The header must contain the required
3114 named header fields and zero or more of the optional named header
3116 * test/data/invalid-messages/*.message: Added the required PATH
3117 named header field to the tests so that they don't fail on
3118 'Missing path field'
3120 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
3122 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
3123 the stack by implicitly defining variable and parameter types and
3124 removing the hack of defining C pointers as python objects and later
3127 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
3129 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
3131 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
3133 * mono/DBusType/Dict.cs: Handle empty dicts
3134 * mono/DBusType/Array.cs: Handle empty arrays
3135 * mono/Arguments.cs: Handle empty arguments
3137 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
3139 * dbus-sharp.pc.in: Modified to include include Libs and Requires
3142 2004-04-25 Kristian Høgsberg <krh@redhat.com>
3144 * test/data/valid-messages/standard-*.message: Update message
3145 test scripts to new header field names.
3147 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
3149 * test/break-loader.c (randomly_do_n_things): tracked down buffer
3150 overflow to times_we_did_each_thing array which would chop off the
3151 first character of the failure_dir string. Increased the size of
3152 the array to 7 to reflect the number of random mutation functions
3155 2004-04-21 Kristian Høgsberg <krh@redhat.com>
3157 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
3158 unix_server->watch here, it is unreffed in disconnect.
3159 (_dbus_server_new_for_tcp_socket): convert NULL host to
3160 "localhost" here so we don't append NULL to address.
3162 * dbus/dbus-server.c (_dbus_server_test): Add test case for
3163 various addresses, including tcp with no explicit host.
3165 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3167 * dbus/dbus-message.c (decode_header_data, decode_string_field):
3168 fix incorrect setting of .name_offset in the HeaderField (it was
3169 off by two bytes, positioned right after the name and typecode)
3171 * bus/bus.c (bus_context_new, bus_context_unref): test before
3172 calling dbus_server_free_data_slot and _dbus_user_database_unref
3173 in case of an error.
3175 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
3178 2004-04-19 Kristian Høgsberg <krh@redhat.com>
3180 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
3181 _dbus_poll() instead of select().
3183 2004-04-15 Jon Trowbridge <trow@ximian.com>
3185 * bus/main.c (signal_handler): Reload the configuration files
3187 (main): Set up our SIGHUP handler.
3189 * bus/bus.c (struct BusContext): Store the config file, user and
3190 fork flag in the BusContext.
3191 (process_config_first_time_only): Added. Contains the code
3192 (previously in bus_context_new) for setting up the BusContext from
3193 the BusConfigParser that should only be run the first time the
3194 config files are read.
3195 (process_config_every_time): Added. Contains the code (previously
3196 in bus_context_new) for setting up the BusContext from the
3197 BusConfigParser that should be run every time the config files are
3199 (load_config): Added. Builds a BusConfigParser from the config
3200 files and passes the resulting structure off to
3201 process_config_first_time_only (assuming this is the first time)
3202 and process_config_every_time.
3203 (bus_context_new): All of the config-related code has been moved
3204 to process_config_first_time_only and process_config_every_time.
3205 Now this function just does the non-config-related initializations
3206 and calls load_config.
3207 (bus_context_reload_config): Added.
3209 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
3211 * bus/driver.c (bus_driver_handle_get_service_owner):
3212 implement a GetServiceOwner method.
3213 * doc/dbus-specification.xml: document it.
3214 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
3216 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
3217 implement, using the bus GetServiceOwner method.
3219 * test/glib/test-dbus-glib.c:
3220 use dbus_gproxy_new_for_service_owner so that we can receive the
3223 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
3225 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
3226 dbus/dbus-message.c, dbus/dbus-protocol.h
3227 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
3229 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
3230 dbus/dbus-message.c, dbus/dbus-protocol.h
3231 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
3233 * dbus/dbus-internals.c (_dbus_header_field_to_string):
3234 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
3235 DBUS_HEADER_FIELD_SENDER resolves to "sender"
3237 * doc/dbus-specification.xml (Header Fields Table):
3238 s/SERVICE/DESTINATION
3239 s/SENDER_SERVICE/SENDER
3242 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
3244 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
3247 2004-04-13 Michael Meeks <michael@ximian.com>
3249 * glib/dbus-gobject.c (handle_introspect): split out
3250 (introspect_properties): this.
3251 (handle_introspect): implement this.
3253 * test/glib/Makefile.am: use the absolute path so the bus
3254 daemon's chdir ("/") doesn't kill us dead.
3256 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
3258 2004-04-12 Jon Trowbridge <trow@ximian.com>
3260 * bus/config-parser.c (struct BusConfigParser): Added
3261 included_files field.
3262 (seen_include): Added. Checks whether or not a file has already
3263 been included by any parent BusConfigParser.
3264 (bus_config_parser_new): Copy the parent's included_files.
3265 (include_file): Track which files have been included, and fail on
3266 circular inclusions.
3267 (process_test_valid_subdir): Changed printf to report if we are
3268 testing valid or invalid conf files.
3269 (all_are_equiv): Changed printf to be a bit clearer about
3270 what we are actually doing.
3271 (bus_config_parser_test): Test invalid configuration files.
3273 2004-04-09 Jon Trowbridge <trow@ximian.com>
3275 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
3276 argument. If non-null, the newly-constructed BusConfigParser will
3277 be initialized with the parent's BusLimits instead of the default
3279 (include_file): When including a config file, pass in
3280 the current parser as the parent and then copy the BusLimits
3281 from the included BusConfigParser pack to the current parser.
3282 (process_test_valid_subdir): Renamed from process_test_subdir.
3283 (process_test_equiv_subdir): Added. Walks through a directory,
3284 descending into each subdirectory and loading the config files
3285 it finds there. If any subdirectory contains two config files
3286 that don't produce identical BusConfigParser structs, fail.
3287 For now, the BusConfigParser's BusPolicies are not compared.
3288 (bus_config_parser_test): Call both process_test_valid_subdir and
3289 process_test_equiv_subdir.
3291 * bus/config-loader-libxml.c (bus_config_load): Take a parent
3292 argument and pass it along to the call to bus_config_parser_new.
3293 Also made a few small changes to allow this code to compile.
3295 * bus/config-loader-expat.c (bus_config_load): Take a parent
3296 argument and pass it along to the call to bus_config_parser_new.
3298 * bus/bus.c (bus_context_new): Load the config file
3299 with a NULL parent argument.
3301 2004-03-29 Michael Meeks <michael@ximian.com>
3303 * glib/dbus-gobject.c (introspect_properties): split
3304 out, fix mangled 'while' flow control.
3305 (introspect_signals): implement.
3306 (handle_introspect): update.
3308 2004-03-29 Michael Meeks <michael@ximian.com>
3310 * glib/dbus-gobject.c (set_object_property): split out /
3311 re-work, use the property type, and not the message type(!)
3312 (get_object_property): ditto.
3314 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
3315 (dbus_gvalue_marshal): make this code re-usable, needed
3316 for signals too, also on both proxy and server side.
3317 Re-write for more efficiency / readability.
3319 2004-03-29 Michael Meeks <michael@ximian.com>
3321 * dbus/dbus-message.c
3322 (dbus_message_new_error_printf): impl.
3324 * dbus/dbus-connection.c
3325 (dbus_connection_unregister_object_path): fix warning.
3327 * configure.in: fix no-mono-installed situation.
3329 2004-03-27 Havoc Pennington <hp@redhat.com>
3331 Patch from Timo Teräs:
3333 * tools/dbus-send.c (main): if --print-reply, assume type is
3334 method call; support boolean type args
3336 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
3337 bunch of memleak and logic bugs
3339 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
3341 * mono/Arguments.cs:
3342 * mono/Introspector.cs:
3344 * mono/InterfaceProxy.cs:
3346 * mono/ProxyBuilder.cs:
3348 Added InterfaceProxy class to avoid building proxies for every
3352 * dbus-message.c (dbus_message_append_args_valist)
3353 (dbus_message_iter_get_object_path)
3354 (dbus_message_iter_get_object_path_array)
3355 (dbus_message_iter_append_object_path)
3356 (dbus_message_iter_append_object_path_array):
3357 Added object_path iter functions to handle OBJECT_PATH arguments
3359 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
3361 First checkin of mono bindings.
3364 Build stuff for the bindings
3365 * dbus-sharp.pc.in: Added for pkgconfig
3367 2004-03-21 Havoc Pennington <hp@redhat.com>
3369 * test/test-service.c (main): remove debug spew
3371 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3373 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
3376 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
3377 (dbus_message_iter_init_array_iterator)
3378 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
3379 indicate whether the iterator is empty
3381 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
3384 2004-03-19 Havoc Pennington <hp@redhat.com>
3386 * NEWS: 0.21 updates
3388 * configure.in: 0.21
3390 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
3392 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
3393 you don't need pyrex to make dist
3395 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
3398 2004-03-18 Richard Hult <richard@imendio.com>
3400 * dbus/dbus-message.c (dbus_message_get_auto_activation)
3401 (dbus_message_set_auto_activation): Add doxygen docs.
3403 2004-03-16 Richard Hult <richard@imendio.com>
3405 * bus/activation.c: (bus_activation_service_created),
3406 (bus_activation_send_pending_auto_activation_messages),
3407 (bus_activation_activate_service):
3409 * bus/dispatch.c: (bus_dispatch),
3410 (check_nonexistent_service_auto_activation),
3411 (check_service_auto_activated),
3412 (check_segfault_service_auto_activation),
3413 (check_existent_service_auto_activation), (bus_dispatch_test):
3414 * bus/driver.c: (bus_driver_handle_activate_service):
3415 * bus/services.c: (bus_registry_acquire_service):
3416 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
3417 (dbus_message_get_auto_activation):
3418 * dbus/dbus-message.h:
3419 * dbus/dbus-protocol.h: Implement auto-activation.
3421 * doc/dbus-specification.xml: Add auto-activation to the spec.
3423 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
3425 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
3426 fix a bug with CUSTOM types.
3428 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
3429 a unit test for this bug (used to fail).
3431 2004-03-12 Mikael Hallendal <micke@imendio.com>
3434 (babysitter_watch_callback): notify all pending activations waiting for
3435 the same exec that the activation failed.
3436 (bus_activation_activate_service): shortcut the activation if we
3437 already waiting for the same executable to start up.
3439 2004-03-12 Mikael Hallendal <micke@imendio.com>
3442 - Added service file reloading.
3443 Each service files directory is kept in an hash table in
3444 BusActivation and each BusActivationEntry knows what .service-file it
3445 was read from. So when you try to activate a service the bus will
3446 check if it's been updated, removed or if new .service-files has
3448 - Test code at the bottom for the service file reloading.
3449 * bus/test-main.c: (main):
3451 - added service reloading test.
3452 * dbus/dbus-sysdeps.c:
3453 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
3455 2004-03-08 Michael Meeks <michael@ximian.com>
3457 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
3458 bail immediately if disconnected, to avoid busy loop.
3460 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
3461 cleanup cut/paste/inefficiency.
3463 2004-03-01 David Zeuthen <david@fubar.dk>
3465 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
3466 bug where args were used twice. This bug resulted in a segfault
3467 on a Debian/PPC system when starting the messagebus daemon. Include
3468 dbus-sysdeps.h for DBUS_VA_COPY
3470 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
3472 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
3473 appropriate va_copy implementation. From GLib
3475 2004-02-24 Joe Shaw <joe@ximian.com>
3477 * bus/services.c (bus_registry_acquire_service): We need to pass
3478 in the service name to dbus_set_error() to prevent a crash.
3480 2003-12-26 Anders Carlsson <andersca@gnome.org>
3482 * AUTHORS: Reveal my True identity.
3484 2003-12-17 Mikael Hallendal <micke@imendio.com>
3486 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3487 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
3489 2003-12-13 Mikael Hallendal <micke@imendio.com>
3491 * doc/TODO: Added not about better error check of configuration files.
3493 2003-12-02 Richard Hult <richard@imendio.com>
3495 * Update AFL version to 2.0 throughout the source files to reflect
3496 the update that was done a while ago.
3498 2003-12-02 Richard Hult <richard@imendio.com>
3500 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
3501 wrote_dict_key to FALSE on the iter that the dict is appended to,
3502 just like when appending other types. Fixes a bug where a dict
3503 couldn't be put inside a dict.
3504 (dbus_message_iter_append_dict_key): Fix typo in warning message.
3505 (message_iter_test, _dbus_message_test): Add test case for dict
3508 2003-12-01 David Zeuthen <david@fubar.dk>
3510 * python/dbus.py: Add the actual message when calling the reciever
3511 of a signal such that parameters can be inspected. Add the method
3512 remove_signal_receiver
3514 2003-11-26 Mikael Hallendal <micke@imendio.com>
3518 * glib/*.[ch]: Made ref functions return the pointer
3520 2003-11-25 Zack Rusin <zack@kde.org>
3522 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
3524 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
3527 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
3528 the Integrator and to better fit with the server,
3530 2003-11-24 Zack Rusin <zack@kde.org>
3532 * qt/connection.h, qt/connection.cpp: removing initDbus method since
3533 the integrator handles it now
3535 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
3536 since QTimer wasn't really meant to be used the way DBusTimeout is
3538 2003-11-24 Zack Rusin <zack@kde.org>
3540 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
3541 Integrator class which integrates D-BUS with the Qt event loop,
3543 * qt/connection.h, qt/connection.cpp: Move all the code which
3544 was dealing with D-BUS integration to the Integrator class,
3545 and start using Integrator,
3547 2003-11-23 Zack Rusin <zack@kde.org>
3549 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
3552 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
3553 switching namespaces to DBusQt, reworking the class,
3555 * Makefile.cvs: switching dependencies so that it matches KDE
3558 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
3561 2003-11-19 Havoc Pennington <hp@redhat.com>
3565 * configure.in: bump version to 0.20
3567 * configure.in (have_qt): add yet another place to look for qt
3568 (someone hand trolltech a .pc file...)
3570 2003-11-01 Havoc Pennington <hp@redhat.com>
3572 * doc/dbus-specification.xml: add state machine docs on the auth
3573 protocol; just a first draft, I'm sure it's wrong.
3575 2003-10-28 David Zeuthen <david@fubar.dk>
3577 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
3578 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
3580 2003-10-28 Havoc Pennington <hp@redhat.com>
3582 * dbus/dbus-message.c (get_next_field): delete unused function
3584 2003-10-28 Havoc Pennington <hp@redhat.com>
3586 * bus/expirelist.c (do_expiration_with_current_time): detect
3587 failure of the expire_func due to OOM
3589 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
3591 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
3592 NoReply error that's now created by the bus when the service exits
3594 2003-10-28 Havoc Pennington <hp@redhat.com>
3596 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
3597 tests for set_path, set_interface, set_member, etc.
3599 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
3601 * dbus/dbus-message.c (set_string_field): always just delete and
3602 re-append the field; accept NULL for deletion
3603 (re_align_fields_recurse): reimplement
3605 2003-10-26 Havoc Pennington <hp@redhat.com>
3607 * dbus/dbus-connection.c: fix docs to properly describe the
3608 disconnected message
3609 (_dbus_connection_notify_disconnected): remove this function;
3610 we can't synchronously add the disconnected message, we have to
3611 do it after we've queued any remaining real messages
3612 (_dbus_connection_get_dispatch_status_unlocked): queue the
3613 disconnect message only if the transport has finished queueing all
3614 its real messages and is disconnected.
3615 (dbus_connection_disconnect): update the dispatch status here
3617 2003-10-22 Havoc Pennington <hp@redhat.com>
3619 * bus/bus.c (bus_context_check_security_policy): fix up assertion
3621 * bus/connection.c (bus_transaction_send_from_driver): set the
3622 destination to the connection's base service
3624 2003-10-20 Havoc Pennington <hp@redhat.com>
3626 hmm, make check is currently not passing.
3628 * doc/dbus-specification.xml: add requirement that custom type
3629 names follow the same rules as interface names.
3631 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
3632 duplication and allow 'c' to be 'custom'; dict is now 'm' for
3635 * doc/dbus-specification.xml: update type codes to match
3636 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
3637 CUSTOM. Add type OBJECT_PATH to the spec.
3639 2003-10-17 Havoc Pennington <hp@redhat.com>
3641 * bus/driver.c (create_unique_client_name): use "." as separator
3642 in base service names instead of '-'
3644 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
3645 byte at the end of the string
3647 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
3648 optimization macros since string validation seems to be a slow
3651 * doc/dbus-specification.xml: restrict valid
3652 service/interface/member/error names. Add test suite code for the
3655 * dbus/dbus-string.c: limit service/interface/member/error names
3658 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
3659 format arg to verbose spew
3661 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
3662 memory, return instead of g_error
3664 * test/test-service.c (path_message_func): support emitting a
3667 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
3668 activation bus type if DBUS_BUS_ACTIVATION was set; default to
3669 assuming the activation bus was the session bus so that services
3670 started manually will still register.
3671 (init_connections_unlocked): fix so that in OOM situation we get
3672 the same semantics when retrying the function
3674 * test/test-service.c (main): change to use path registration, to
3675 test those codepaths; register with DBUS_BUS_ACTIVATION rather
3676 than DBUS_BUS_SESSION
3678 2003-10-16 Havoc Pennington <hp@redhat.com>
3680 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
3682 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
3683 coverage of the tests
3684 (coverage-report.txt): don't move the .da and .bbg files around
3686 2003-10-16 Havoc Pennington <hp@redhat.com>
3688 * bus/bus.c (struct BusContext): remove struct field I didn't mean
3691 2003-10-16 Havoc Pennington <hp@redhat.com>
3693 * bus/connection.c (bus_pending_reply_expired): either cancel or
3695 (bus_connections_check_reply): use unlink, not remove_link, as we
3696 don't want to free the link; fixes double free mess
3698 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
3699 where no reply was received
3701 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
3704 * bus/signals.c (match_rule_matches): add special cases for the
3705 bus driver, so you can match on sender/destination for it.
3707 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
3708 DBUS_PRINT_BACKTRACE is set
3710 * dbus/dbus-internals.c: add pid to assertion failure messages
3712 * dbus/dbus-connection.c: add message type code to the debug spew
3714 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
3715 sender=foo not service=foo
3717 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
3718 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
3719 DBUS_ACTIVATION_ADDRESS instead
3721 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
3722 DBUS_SYSTEM_BUS_ADDRESS if appropriate
3724 * bus/bus.c (bus_context_new): handle OOM copying bus type into
3727 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
3728 (dbus_message_iter_get_object_path_array): new function (half
3729 finished, disabled for the moment)
3731 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
3732 DBUS_MESSAGE_TYPE_ERROR
3734 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
3735 avoid redirecting stderr to /dev/null
3736 (babysit): close stdin if not doing the "exit_with_session" thing
3738 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
3739 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
3740 stdout/stdin, so things don't get confused
3742 * bus/system.conf.in: fix to allow replies, I modified .conf
3743 instead of .conf.in again.
3745 2003-10-14 David Zeuthen <david@fubar.dk>
3747 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
3748 argtype to arg_type when raising unknown arg type exception.
3749 Changed type list to reflect the changes in dbus-protocol.h so
3750 the bindings actually work.
3752 2003-10-14 Havoc Pennington <hp@redhat.com>
3754 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
3755 to have a bug keeping it from outputting the .da files sometimes
3756 (string_get_string): don't append garbage nul bytes to the string.
3758 2003-10-15 Seth Nickell <seth@gnome.org>
3760 * python/Makefile.am:
3762 Include dbus_h_wrapper.h in the dist tarball.
3764 2003-10-14 Havoc Pennington <hp@redhat.com>
3766 * bus/bus.c (bus_context_check_security_policy): revamp this to
3767 work more sanely with new policy-based requested reply setup
3769 * bus/connection.c (bus_transaction_send_from_driver): set bus
3770 driver messages as no reply
3772 * bus/policy.c (bus_client_policy_check_can_receive): handle a
3773 requested_reply attribute on allow/deny rules
3775 * bus/system.conf: add <allow requested_reply="true"/>
3777 * bus/driver.c (bus_driver_handle_message): fix check for replies
3778 sent to the bus driver, which was backward. How did this ever work
3779 at all though? I think I'm missing something.
3781 * dbus/dbus-message.c (decode_header_data): require error and
3782 method return messages to have a reply serial field to be valid
3783 (_dbus_message_loader_queue_messages): break up this function;
3784 validate that reply serial and plain serial are nonzero;
3785 clean up the OOM/error handling.
3786 (get_uint_field): don't return -1 from this
3787 (dbus_message_create_header): fix signed/unsigned bug
3789 * bus/connection.c (bus_connections_expect_reply): save serial of
3790 the incoming message, not reply serial
3792 2003-10-14 Havoc Pennington <hp@redhat.com>
3794 * bus/connection.c: implement pending reply tracking using
3797 * bus/bus.c (bus_context_check_security_policy): verify that a
3798 reply is pending in order to allow a reply to be sent. Deny
3799 messages of unknown type.
3801 * bus/dbus-daemon-1.1.in: update to mention new resource limits
3803 * bus/bus.c (bus_context_get_max_replies_per_connection): new
3804 (bus_context_get_reply_timeout): new
3806 2003-10-13 Seth Nickell <seth@gnome.org>
3808 * python/Makefile.am:
3810 Pass "make distcheck": remove a couple files from DIST_FILES
3811 that weren't included in the final version.
3813 2003-10-12 Havoc Pennington <hp@pobox.com>
3815 Added test code that 1) starts an actual bus daemon and 2) uses
3816 DBusGProxy; fixed bugs that were revealed by the test. Lots
3817 more testing possible, but this is the basic framework.
3819 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
3820 empty proxy lists from the proxy list hash
3822 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
3823 couple of return_if_fail checks
3825 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
3826 to allocate, so everything is cleared to NULL as it should be.
3828 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
3829 source as data to dbus_connection_set_timeout_functions() as the
3830 timeout functions expected
3832 * test/glib/run-test.sh: add a little script to start up a message
3833 bus and run tests using it
3835 * tools/dbus-launch.1: updates
3837 * tools/dbus-launch.c (main): add --config-file option
3839 * tools/dbus-launch.c (main): remove confusing else if (runprog)
3840 that could never be reached.
3842 * dbus/dbus-message.c (dbus_message_new_method_return)
3843 (dbus_message_new_error, dbus_message_new_signal): set the
3844 no-reply-expected flag on all these. Redundant, but may
3845 as well be consistent.
3847 2003-10-11 Havoc Pennington <hp@pobox.com>
3849 * test/decode-gcov.c (function_solve_graph): make broken block
3850 graph a nonfatal error since it seems to be broken. Need to debug
3853 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
3854 can't just check type > INVALID < LAST anymore
3856 * dbus/dbus-message.c (dbus_message_get_signature): new function
3857 (dbus_message_has_signature): new function
3858 (struct DBusMessage): add signature field (right now it isn't sent
3859 over the wire, just generated on the fly)
3860 (dbus_message_copy): copy the signature, and init strings to
3861 proper length to avoid some reallocs
3862 (dbus_message_iter_init_array_iterator): return void, since it
3864 (dbus_message_iter_init_dict_iterator): return void since it can't fail
3865 (_dbus_message_loader_queue_messages): add silly temporary hack to
3866 fill in message->signature on load
3868 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
3869 characters, so they are relatively human-readable.
3871 2003-10-11 Havoc Pennington <hp@pobox.com>
3873 * dbus/dbus-message.c (_dbus_message_test): add more test
3874 coverage, but #if 0 for now since they uncover a bug
3875 not fixed yet; I think in re_align_field_recurse()
3876 (re_align_field_recurse): add FIXME about broken assertion
3878 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
3880 * bus/connection.c: share a couple code bits with expirelist.c
3882 * bus/expirelist.h, bus/expirelist.c: implement a generic
3883 expire-items-after-N-seconds facility, was going to share between
3884 expiring connections and replies, decided not to use for expiring
3885 connections for now.
3887 * COPYING: include AFL 2.0 (still need to change all the file headers)
3889 2003-10-09 Havoc Pennington <hp@redhat.com>
3891 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
3892 gcc 3.3. Not that we do anything about it yet.
3894 * bus/signals.c (bus_match_rule_parse): impose max length on the
3897 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
3899 2003-10-09 Havoc Pennington <hp@redhat.com>
3901 Make matching rules theoretically work (add parser).
3903 * bus/bus.c (bus_context_check_security_policy): fix up to handle
3904 the case where destination is explicitly specified as bus driver
3905 and someone else is eavesdropping.
3907 * bus/policy.c (bus_client_policy_check_can_receive): fix up
3908 definition of eavesdropping and assertion
3910 * tools/dbus-send.c (main): use dbus_message_type_from_string
3912 * bus/signals.c (bus_match_rule_parse): implement
3914 * dbus/dbus-message.c (dbus_message_type_from_string): new
3916 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
3918 2003-10-02 Havoc Pennington <hp@pobox.com>
3920 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
3921 dbus_gproxy_oneway_call
3923 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
3924 (dbus_server_setup_with_g_main): fix to allow calling them more
3925 than once on the same args
3926 (dbus_bus_get_with_g_main): new function
3928 2003-10-02 Havoc Pennington <hp@redhat.com>
3930 * doc/dbus-tutorial.xml: write some stuff
3932 2003-09-29 Havoc Pennington <hp@pobox.com>
3934 * configure.in: split checks for Doxygen from XML docs, check for
3937 * doc/Makefile.am: XML-ify all the docs, and add a blank
3940 2003-09-29 Havoc Pennington <hp@pobox.com>
3942 * Merge dbus-object-names branch. To see the entire patch
3943 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
3944 it's huuuuge though.
3945 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
3947 2003-09-28 Havoc Pennington <hp@pobox.com>
3949 * HACKING: update to reflect new server
3951 2003-09-26 Seth Nickell <seth@gnome.org>
3954 * python/examples/example-signals.py:
3956 Start implementing some notions of signals. The API
3957 is really terrible, but they sort of work (with the
3958 exception of being able to filter by service, and to
3959 transmit signals *as* a particular service). Need to
3960 figure out how to make messages come from the service
3963 * python/dbus_bindings.pyx.in:
3965 Removed duplicate message_handler callbacks.
3967 2003-09-25 Havoc Pennington <hp@redhat.com>
3969 * bus/session.conf.in: fix my mess
3971 2003-09-25 Havoc Pennington <hp@pobox.com>
3973 * bus/session.conf.in: fix security policy, reported by Seth Nickell
3975 2003-09-25 Seth Nickell <seth@gnome.org>
3977 * python/examples/example-service.py:
3979 Johan notices complete wrong code in example-service, but
3980 completely wrong in a way that works exactly the same (!).
3981 Johan is confused, how could this possibly work? Example
3982 code fails to serve purpose of making things clear.
3985 2003-09-25 Mark McLoughlin <mark@skynet.ie>
3987 * doc/dbus-specification.sgml: don't require header fields
3988 to be 4-byte aligned and specify that fields should be
3989 distinguished from padding by the fact that zero is not
3992 * doc/TODO: remove re-alignment item and add item to doc
3993 the OBJECT_PATH type.
3995 * dbus/dbus-message.c:
3996 (HeaderField): rename the original member to value_offset
3997 and introduce a name_offset member to keep track of where
3998 the field actually begins.
3999 (adjust_field_offsets): remove.
4000 (append_int_field), (append_uint_field),
4001 (append_string_field): don't align the start of the header
4002 field to a 4-byte boundary.
4003 (get_next_field): impl finding the next marhsalled field
4004 after a given field.
4005 (re_align_field_recurse): impl re-aligning a number of
4006 already marshalled fields.
4007 (delete_field): impl deleting a field of any type and
4008 re-aligning any following fields.
4009 (delete_int_or_uint_field), (delete_string_field): remove.
4010 (set_int_field), (set_uint_field): no need to re-check
4011 that we have the correct type for the field.
4012 (set_string_field): ditto and impl re-aligning any
4014 (decode_header_data): update to take into account that
4015 the fields aren't 4-byte aligned any more and the new
4016 way to distinguish padding from header fields. Also,
4017 don't exit when there is too much header padding.
4018 (process_test_subdir): print the directory.
4019 (_dbus_message_test): add test to make sure a following
4020 field is re-aligned correctly after field deletion.
4022 * dbus/dbus-string.[ch]:
4023 (_dbus_string_insert_bytes): rename from insert_byte and
4024 allow the insert of multiple bytes.
4025 (_dbus_string_test): test inserting multiple bytes.
4027 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
4028 warning note to docs about having to re-align any
4029 marshalled values following the string.
4031 * dbus/dbus-message-builder.c:
4032 (append_string_field), (_dbus_message_data_load):
4033 don't align the header field.
4035 * dbus/dbus-auth.c: (process_test_subdir): print the
4038 * test/break-loader.c: (randomly_add_one_byte): upd. for
4041 * test/data/invalid-messages/bad-header-field-alignment.message:
4044 * test/data/valid-messages/unknown-header-field.message: shove
4045 a dict in the unknown field.
4047 2003-09-25 Seth Nickell <seth@gnome.org>
4050 * python/dbus_bindings.pyx.in:
4052 Handle return values.
4054 * python/examples/example-client.py:
4055 * python/examples/example-service.py:
4057 Pass back return values from the service to the client.
4059 2003-09-24 Seth Nickell <seth@gnome.org>
4063 Connect Object methods (when you are sharing an object) up... pass
4064 in a list of methods to be shared. Sharing all the methods just
4065 worked out too weird. You can now create nice Services over the
4068 * python/dbus_bindings.pyx.in:
4070 Keep references to user_data tuples passed into C functions so
4071 Python doesn't garbage collect on us.
4073 Implement MethodReturn and Error subclasses of Message for creating
4074 DBusMessage's of those types.
4076 * python/examples/example-client.py:
4077 * python/examples/example-service.py:
4079 Simple example code showing both how create DBus services and objects,
4080 and how to use them.
4082 2003-09-23 Havoc Pennington <hp@pobox.com>
4084 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
4086 2003-09-23 Havoc Pennington <hp@redhat.com>
4088 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
4089 (dbus_gproxy_disconnect_signal): implement
4090 (dbus_gproxy_manager_remove_signal_match): implement
4091 (dbus_gproxy_manager_add_signal_match): implement
4092 (dbus_gproxy_oneway_call): implement
4094 2003-09-23 Havoc Pennington <hp@pobox.com>
4096 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
4097 subclass. This means dropping the transparent thread safety of the
4098 proxy; you now need a separate proxy per-thread, or your own
4099 locking on the proxy. Probably right anyway.
4100 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
4102 2003-09-22 Havoc Pennington <hp@redhat.com>
4104 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
4106 2003-09-21 Seth Nickell <seth@gnome.org>
4108 First checkin of the Python bindings.
4110 * python/.cvsignore:
4111 * python/Makefile.am:
4112 * python/dbus_bindings.pyx.in:
4113 * python/dbus_h_wrapper.h:
4115 Pieces for Pyrex to operate on, building a dbus_bindings.so
4116 python module for low-level access to the DBus APIs.
4120 High-level Python module for accessing DBus objects.
4125 Build stuff for the python bindings.
4129 Extra macro needed for finding the Python C header files.
4131 2003-09-21 Havoc Pennington <hp@pobox.com>
4133 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
4134 implementing the proxy manager, didn't get very far.
4136 * dbus/dbus-bus.c (dbus_bus_add_match): new
4137 (dbus_bus_remove_match): new
4139 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
4140 path_name argument; adjust the other not-yet-implemented
4141 gproxy constructors to be what I think they should be.
4143 2003-09-21 Havoc Pennington <hp@pobox.com>
4145 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
4146 by default for message bus connections.
4148 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
4149 exit_on_disconnect flag is set and we process the disconnected
4151 (dbus_connection_set_exit_on_disconnect): new function
4153 2003-09-21 Havoc Pennington <hp@pobox.com>
4155 Get matching rules mostly working in the bus; only actually
4156 parsing the rule text remains. However, the client side of
4157 "signal connections" hasn't been started, this patch is only the
4160 * dbus/dispatch.c: fix for the matching rules changes
4162 * bus/driver.c (bus_driver_handle_remove_match)
4163 (bus_driver_handle_add_match): send an ack reply from these
4166 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
4167 arguments, reported by Seth Nickell
4169 * bus/config-parser.c (append_rule_from_element): support
4170 eavesdrop=true|false attribute on policies so match rules
4171 can be prevented from snooping on the system bus.
4173 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
4174 and "destination" in attribute names; fix some docs bugs;
4175 add eavesdrop=true|false attribute
4177 * bus/driver.c (bus_driver_handle_add_match)
4178 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
4181 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
4182 rid of broadcast service concept, signals are just always broadcast
4184 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
4185 mostly implement matching rules stuff (currently only exposed as signal
4188 2003-09-21 Mark McLoughlin <mark@skynet.ie>
4190 * doc/dbus-specification.sgml: Change the header field name
4191 to be an enum and update the rest of the spec to reference
4192 the fields using the conventinal name.
4194 * dbus/dbus-protocol.h: update to reflect the spec.
4196 * doc/TODO: add item to remove the 4 byte alignment requirement.
4198 * dbus/dbus-message.c: Remove the code to generalise the
4199 header/body length and serial number header fields as named
4200 header fields so we can reference field names using the
4202 (append_int_field), (append_uint_field), (append_string_field):
4203 Append the field name as a byte rather than four chars.
4204 (delete_int_or_uint_field), (delete_string_field): reflect the
4205 fact that the field name and typecode now occupy 4 bytes instead
4207 (decode_string_field), (decode_header_data): update to reflect
4208 protocol changes and move the field specific encoding from
4209 decode_string_field() back into decode_header_data().
4211 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
4212 Add utility to aid debugging.
4214 * dbus/dbus-message-builder.c:
4215 (append_string_field), (_dbus_message_data_load): Update to
4216 reflect protocol changes; Change the FIELD_NAME directive
4217 to HEADER_FIELD and allow it to take the field's conventional
4218 name rather than the actual value.
4220 * test/data/*/*.message: Update to use HEADER_FIELD instead
4221 of FIELD_NAME; Always align the header on an 8 byte boundary
4222 *before* updating the header length.
4224 2003-09-15 Havoc Pennington <hp@pobox.com>
4226 * dbus/dbus-pending-call.c: add the get/set object data
4227 boilerplate as for DBusConnection, etc. Use generic object data
4228 for the notify callback.
4230 * glib/dbus-gparser.c (parse_node): parse child nodes
4232 * tools/dbus-viewer.c: more hacking on the dbus-viewer
4234 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
4235 contain functions shared between the convenience lib and the
4238 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
4239 -export-symbols-regex to the GLib library
4241 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
4242 fix the locking in here, and add a default handler for
4243 Introspect() that just returns sub-nodes.
4245 2003-09-14 Havoc Pennington <hp@pobox.com>
4247 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
4248 rather than gfoo consistent
4250 * glib/dbus-gproxy.h: delete for now, move contents to
4251 dbus-glib.h, because the include files don't work right since we
4252 aren't in the dbus/ subdir.
4254 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
4255 (dbus_gproxy_end_call): finish
4256 (dbus_gproxy_begin_call): finish
4258 * glib/dbus-gmain.c (dbus_set_g_error): new
4260 * glib/dbus-gobject.c (handle_introspect): include information
4261 about child nodes in the introspection
4263 * dbus/dbus-connection.c (dbus_connection_list_registered): new
4264 function to help in implementation of introspection
4266 * dbus/dbus-object-tree.c
4267 (_dbus_object_tree_list_registered_and_unlock): new function
4269 2003-09-12 Havoc Pennington <hp@pobox.com>
4271 * glib/dbus-gidl.h: add common base class for all the foo_info
4274 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
4277 * test/Makefile.am: try test srcdir -ef . in addition to test
4278 srcdir = ., one of them should work (yeah lame)
4280 * glib/Makefile.am: build the "idl" parser stuff as a convenience
4283 * glib/dbus-gparser.h: make description_load routines return
4284 NodeInfo* not Parser*
4286 * Makefile.am (SUBDIRS): build test dir after all library dirs
4288 * configure.in: add GTK+ detection
4290 2003-09-07 Havoc Pennington <hp@pobox.com>
4292 * Make Doxygen contented.
4294 2003-09-07 Havoc Pennington <hp@pobox.com>
4296 * doc/dbus-specification.sgml: more updates
4298 2003-09-06 Havoc Pennington <hp@pobox.com>
4300 * doc/dbus-specification.sgml: partial updates
4302 * bus/dbus-daemon-1.1.in: fix the config file docs for the
4303 zillionth time; hopefully I edited the right file this time.
4305 * bus/config-parser.c (append_rule_from_element): support
4306 send_type, send_path, receive_type, receive_path
4308 * bus/policy.c: add message type and path to the list of things
4309 that can be "firewalled"
4311 2003-09-06 Havoc Pennington <hp@pobox.com>
4313 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
4314 (dbus_connection_register_object_path): make this not handle
4315 messages to paths below the given path
4317 2003-09-03 Havoc Pennington <hp@pobox.com>
4319 * test/glib/Makefile.am: add this with random glib-linked test
4322 * glib/Makefile.am: remove the random test programs from here,
4323 leave only the unit tests
4325 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
4326 uscore/javacaps conversion, and fix
4327 (get_object_property, set_object_property): change to .NET
4328 convention for mapping props to methods, set_FooBar/get_FooBar,
4329 since one language has such a convention we may as well copy it.
4330 Plus real methods in either getFooBar or get_foo_bar style won't
4331 collide with this convention.
4333 2003-09-01 Havoc Pennington <hp@pobox.com>
4335 * glib/dbus-gparser.c: implement
4337 * glib/dbus-gobject.c: start implementing skeletons support
4339 * configure.in: when disabling checks/assert, also define
4340 G_DISABLE_ASSERT and G_DISABLE_CHECKS
4342 2003-09-01 Havoc Pennington <hp@pobox.com>
4344 * glib/Makefile.am: rearrange a bunch of files and get "make
4345 check" framework set up
4347 2003-08-31 Havoc Pennington <hp@pobox.com>
4349 * fix build with --disable-tests
4351 2003-08-30 Havoc Pennington <hp@pobox.com>
4353 * dbus/dbus-connection.c: purge DBusMessageHandler
4355 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
4356 use callbacks everywhere
4358 2003-08-30 Havoc Pennington <hp@pobox.com>
4360 * test/data/valid-config-files/system.d/test.conf: change to
4361 root for the user so warnings don't get printed
4363 * dbus/dbus-message.c: add dbus_message_get_path,
4364 dbus_message_set_path
4366 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
4367 dispatching to a path
4369 * dbus/dbus-string.c (_dbus_string_validate_path): add
4371 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
4372 (_dbus_marshal_object_path): implement
4374 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
4375 to contain the path to the target object
4376 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
4377 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
4379 2003-08-30 Havoc Pennington <hp@pobox.com>
4381 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
4383 2003-08-29 Havoc Pennington <hp@pobox.com>
4385 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
4387 (struct DBusObjectSubtree): shrink this
4388 a lot, since we may have a lot of them
4389 (_dbus_object_tree_free_all_unlocked): implement
4390 (_dbus_object_tree_dispatch_and_unlock): implement
4392 2003-08-29 Havoc Pennington <hp@pobox.com>
4394 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
4396 2003-08-28 Havoc Pennington <hp@pobox.com>
4400 * dbus/dbus-connection.c: port to no ObjectID, create a
4401 DBusObjectTree, rename ObjectTree to ObjectPath in public API
4403 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
4404 everything except UnregisterFunction and MessageFunction
4406 * dbus/dbus-marshal.c: port away from DBusObjectID,
4407 add DBUS_TYPE_OBJECT_PATH
4409 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
4410 dbus/dbus-objectid.[hc]: remove these, we are moving to
4411 path-based object IDs
4413 2003-08-25 Havoc Pennington <hp@pobox.com>
4415 Just noticed that dbus_message_test is hosed, I wonder when I
4416 broke that. I thought make check was passing earlier...
4418 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
4419 container tree, will replace most of dbus-object-registry
4421 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
4424 2003-08-19 Havoc Pennington <hp@pobox.com>
4426 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
4427 (dbus_message_is_error): fix this function
4429 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
4432 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
4433 reflect clarified man page
4434 (bus_client_policy_check_can_send): ditto
4436 * bus/session.conf.in: fixup
4438 * bus/system.conf.in: fixup
4440 2003-08-18 Havoc Pennington <hp@redhat.com>
4442 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
4444 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4445 dumb bug created earlier (wrong order of args to
4446 decode_header_data())
4448 * tools/dbus-send.c: port
4450 * tools/dbus-print-message.c (print_message): port
4452 * test/data/*messages: port all messages over
4454 * dbus/dbus-message-builder.c: support including
4457 * bus/driver.c: port over
4459 * bus/dispatch.c: port over to new stuff
4461 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4462 rename disconnect signal to "Disconnected"
4464 2003-08-17 Havoc Pennington <hp@pobox.com>
4466 This doesn't compile yet, but syncing up so I can hack on it from
4467 work. What are branches for if not broken code? ;-)
4469 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
4470 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
4471 DBUS_HEADER_FIELD_ERROR_NAME
4473 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
4474 for the interface+member pairs
4475 (string_hash): change to use g_str_hash algorithm
4476 (find_direct_function, find_string_function): refactor these to
4479 * dbus/dbus-message.c: port all of this over to support
4480 interface/member fields instead of name field
4482 * dbus/dbus-object-registry.c: port over
4484 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
4485 from _dbus_string_validate_name
4487 * bus/dbus-daemon-1.1: change file format for the
4488 <deny>/<allow> stuff to match new message naming scheme
4490 * bus/policy.c: port over
4492 * bus/config-parser.c: parse new format
4494 2003-08-16 Havoc Pennington <hp@pobox.com>
4496 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
4499 * glib/dbus-gproxy.c: some hacking
4501 2003-08-15 Havoc Pennington <hp@redhat.com>
4503 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
4505 * dbus/dbus-connection.c
4506 (dbus_connection_send_with_reply_and_block): factor out internals;
4507 change to convert any error replies to DBusError instead of
4508 returning them as a message
4510 2003-08-15 Havoc Pennington <hp@pobox.com>
4512 * dbus/dbus-connection.c,
4513 dbus/dbus-pending-call.c: Finish the pending call stuff
4515 2003-08-14 Havoc Pennington <hp@redhat.com>
4517 * dbus/dbus-pending-call.c: start on new object that will replace
4518 DBusMessageHandler and ReplyHandlerData for tracking outstanding
4521 * dbus/dbus-gproxy.c: start on proxy object used to communicate
4522 with remote interfaces
4524 * dbus/dbus-gidl.c: do the boring boilerplate in here
4526 2003-08-12 Havoc Pennington <hp@pobox.com>
4528 * bus/dispatch.c (bus_dispatch): make this return proper
4529 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
4531 * dbus/dbus-errors.c (dbus_set_error): use
4532 _dbus_string_append_printf_valist
4534 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
4535 (_dbus_string_append_printf): new
4537 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
4540 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
4541 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
4542 message is unhandled.
4544 2003-08-11 Havoc Pennington <hp@pobox.com>
4546 * bus/test.c (client_disconnect_handler): change to return
4547 HANDLED (would have been REMOVE_MESSAGE)
4549 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
4550 HANDLED/NOT_YET_HANDLED instead of
4551 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
4554 2003-08-10 Havoc Pennington <hp@pobox.com>
4556 * tools/dbus-send.c (main): add --type argument, for now
4557 supporting only method_call and signal types.
4559 * tools/dbus-print-message.c: print message type
4561 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4562 init connection->objects
4564 * doc/dbus-specification.sgml: fix sgml
4566 * bus/*.c: port over to object-instance API changes
4568 * test/test-service.c: ditto
4570 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
4571 name, we will have to fix up the rest of the code to also handle
4573 (dbus_message_new): generic message-creation call
4574 (set_string_field): allow appending name field
4576 2003-08-06 Havoc Pennington <hp@pobox.com>
4578 * dbus/dbus-object-registry.c: implement signal connection
4581 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
4583 * dbus/dbus-internals.c (_dbus_memdup): new function
4585 2003-08-02 Havoc Pennington <hp@pobox.com>
4587 * dbus/dbus-message.c (dbus_message_get_no_reply)
4588 (dbus_message_set_no_reply): add these and remove
4589 set_is_error/get_is_error
4591 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
4592 remove the ERROR flag, since there's now an ERROR type
4594 2003-08-01 Havoc Pennington <hp@pobox.com>
4596 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
4599 * dbus/dbus-message.c (dbus_message_get_type): new function
4601 * doc/dbus-specification.sgml: add "type" byte to messages
4603 2003-08-01 Havoc Pennington <hp@pobox.com>
4605 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
4606 a message type enum to distinguish kinds of message
4607 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
4608 that need not be replied to
4610 2003-08-01 Havoc Pennington <hp@pobox.com>
4612 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
4613 (unpack_8_octets): fix no-64-bit-int bug
4615 * dbus/dbus-object-registry.c (validate_id): validate the
4616 connection ID bits, not just the instance ID.
4618 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
4619 the connection-global 33 bits of the object ID
4621 * dbus/dbus-object-registry.c (info_from_entry): fill in
4622 object ID in the new way
4624 * dbus/dbus-objectid.h: rather than high/low bits, specifically
4625 define server/client/instance bits.
4627 2003-07-30 Havoc Pennington <hp@pobox.com>
4629 * dbus/dbus-connection.c (dbus_connection_register_object): fix
4632 2003-07-13 Havoc Pennington <hp@pobox.com>
4634 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
4635 fields to DBusObjectVTable and DBusObjectInfo
4637 2003-07-12 Havoc Pennington <hp@pobox.com>
4639 * dbus/dbus-object-registry.c: implement unit test,
4640 fix bugs discovered in process
4642 * dbus/dbus-connection.c: remove handler_table and
4643 register_handler(), add DBusObjectRegistry usage
4645 * dbus/dbus-objectid.c (dbus_object_id_is_null)
4646 (dbus_object_id_set_null): new functions
4648 2003-07-08 Havoc Pennington <hp@pobox.com>
4650 * dbus/dbus-object.c: implement some of this
4652 * dbus/dbus-object-registry.c
4653 (_dbus_object_registry_add_and_unlock): fill in the object_id out
4655 (_dbus_object_registry_new): handle OOM
4657 2003-07-08 Havoc Pennington <hp@pobox.com>
4659 * dbus/dbus-object.h: sketch out an API for registering objects
4660 with a connection, that allows us to use as little as 24 bytes
4661 per object and lets application code represent an object in
4662 any conceivable way.
4664 * dbus/dbus-object-registry.c: implement the hard bits of the
4665 DBusConnection aspect of object API. Not yet wired up.
4667 2003-07-06 Havoc Pennington <hp@pobox.com>
4669 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
4670 (_dbus_marshal_object_id): new
4671 (_dbus_demarshal_object_id): new
4672 (_dbus_marshal_get_arg_end_pos): support object ID type, and
4673 consolidate identical switch cases. Don't conditionalize handling
4674 of DBUS_TYPE_UINT64, need to handle the type always.
4675 (_dbus_marshal_validate_arg): consolidate identical cases, and
4676 handle DBUS_TYPE_OBJECT_ID
4678 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
4680 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
4682 2003-09-28 Havoc Pennington <hp@pobox.com>
4686 2003-09-28 Havoc Pennington <hp@pobox.com>
4688 * doc/Makefile.am (dbus-specification.html): testing a funky hack
4689 to work with Debian db2html
4691 2003-09-28 Havoc Pennington <hp@pobox.com>
4693 * configure.in: 0.13
4695 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
4696 stylesheet-images for benefit of Debian
4698 Change back to using filesystem-linked sockets for the system
4699 bus, so only root can create the default system bus address.
4701 * bus/system.conf.in: change to use
4702 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4704 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
4707 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4708 here, and AC_DEFINE DBUS_SYSTEM_PATH
4710 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4713 * doc/busconfig.dtd:
4716 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4718 * doc/dbus-specification.sgml:
4719 Add activation reply values.
4721 2003-08-05 Havoc Pennington <hp@redhat.com>
4723 * configure.in: 0.12
4725 2003-08-05 Anders Carlsson <andersca@codefactory.se>
4727 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
4728 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
4729 (add_watch), (remove_watch), (create_source):
4730 Refcount fds, fixes some reentrancy issues.
4732 2003-07-30 Havoc Pennington <hp@redhat.com>
4734 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
4735 bus address to be abstract if we have abstract sockets
4739 2003-07-28 Havoc Pennington <hp@redhat.com>
4741 * bus/messagebus.in: fix to avoid processname/servicename
4742 confusion, from Michael Kearey
4743 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
4745 2003-07-23 Havoc Pennington <hp@pobox.com>
4747 * dbus/dbus-message.c (dbus_message_iter_get_named):
4748 fix from Andy Hanton to remove broken "+1"
4750 2003-07-16 Havoc Pennington <hp@pobox.com>
4752 * tools/dbus-launch.c (babysit): close stdout/stderr in the
4753 babysitter process, as suggested by Thomas Leonard, so
4754 an "eval `dbus-launch --exit-with-session`" will actually
4757 2003-07-16 Havoc Pennington <hp@pobox.com>
4759 * configure.in: print out EXPANDED_* variables in the summary at
4760 the end; clean up the code that computes EXPANDED_ variables and
4761 get the ones using exec_prefix right. Should make things work
4762 when you build without --prefix
4764 2003-06-29 Havoc Pennington <hp@pobox.com>
4766 * mono/Test.cs (class Test): fire up a main loop and run it
4768 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
4769 done once, the app has to do it
4771 2003-06-26 Havoc Pennington <hp@pobox.com>
4773 * mono/Connection.cs: set up connection with the glib main loop
4775 2003-07-01 Havoc Pennington <hp@redhat.com>
4777 * doc/dbus-specification.sgml: clarify the format of a type code,
4778 change suggested by Jim Blandy
4780 2003-06-29 Miloslav Trmac <mitr@volny.cz>
4783 * tools/Makefile.am: Don't assume srcdir == builddir.
4785 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
4786 the allocated block.
4787 (_dbus_memory_test): New function.
4788 * dbus/dbus-test.h: Add _dbus_memory_test ().
4789 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
4791 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
4793 (dbus_message_new): Remove obsolete @todo.
4795 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
4796 (_dbus_marshal_set_uint64): Fix comment.
4798 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
4799 hardcode FIELD_REPLY_SERIAL.
4801 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
4802 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
4804 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
4805 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
4807 2003-06-24 Havoc Pennington <hp@pobox.com>
4809 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
4811 2003-06-23 Anders Carlsson <andersca@codefactory.se>
4817 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
4818 * gcj/org/.cvsignore:
4819 * gcj/org/Makefile.am:
4820 * gcj/org/freedesktop/.cvsignore:
4821 * gcj/org/freedesktop/Makefile.am:
4822 * gcj/org/freedesktop/dbus/.cvsignore:
4823 * gcj/org/freedesktop/dbus/Makefile.am:
4824 * gcj/org/freedesktop/dbus/Message.java: (Message),
4826 * gcj/org/freedesktop/dbus/natMessage.cc:
4827 Fix the build system.
4829 2003-06-22 Havoc Pennington <hp@pobox.com>
4831 * mono/Connection.cs: add more bindings
4833 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
4836 2003-06-22 Havoc Pennington <hp@pobox.com>
4838 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
4839 Start wrapping more stuff.
4841 2003-06-22 Havoc Pennington <hp@pobox.com>
4843 * mono/Message.cs: implement Message.Wrap() that ensures we only
4844 have a single C# wrapper per DBusMessage, assuming it works which
4845 it probably doesn't.
4847 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
4848 (dbus_message_free_data_slot): new
4849 (dbus_message_set_data): new
4850 (dbus_message_get_data): new
4852 2003-06-22 Havoc Pennington <hp@pobox.com>
4854 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
4855 (_dbus_data_slot_allocator_alloc): rework these to keep a
4856 reference count on each slot and automatically manage a global
4857 slot ID variable passed in by address
4859 * bus/bus.c: convert to new dataslot API
4861 * dbus/dbus-bus.c: convert to new dataslot API
4863 * dbus/dbus-connection.c: convert to new dataslot API
4865 * dbus/dbus-server.c: convert to new dataslot API
4867 * glib/dbus-gmain.c: ditto
4871 * bus/connection.c: ditto
4873 2003-06-22 Anders Carlsson <andersca@codefactory.se>
4875 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
4876 after the gcj checks so that the correct configuration tags
4877 will be added to libtool.
4879 * dbus-glib-1.pc.in: No need to specify any includes since
4880 dbus-1.pc.in has those.
4882 2003-06-22 Havoc Pennington <hp@pobox.com>
4884 * mono/*, gcj/*, configure.in, Makefile.am:
4885 Check in makefiles and subdirs for mono and gcj bindings.
4886 Neither binding actually exists, just trying to get through
4887 all the build and other boring bits.
4889 2003-06-21 Philip Blundell <philb@gnu.org>
4891 * tools/dbus-monitor.1: Updated.
4893 * tools/dbus-send.1: Likewise.
4895 2003-06-20 Anders Carlsson <andersca@codefactory.se>
4897 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
4898 for hangup and error after checking read so we won't discard
4899 pending data if both hangup and read are set.
4901 2003-06-19 Philip Blundell <philb@gnu.org>
4903 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
4905 * tools/dbus-send.c: Accept both --system and --session.
4907 * tools/dbus-monitor.c: Same here.
4909 2003-06-19 Anders Carlsson <andersca@codefactory.se>
4911 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
4912 from C++ (Patch by Miloslav Trmac).
4914 2003-06-15 Joe Shaw <joe@assbarn.com>
4916 * configure.in: Check for socklen_t.
4918 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
4920 * test/test-segfault.c: Add #include <sys/time.h>
4922 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
4923 dbus-launch needs it.
4925 2003-06-09 Havoc Pennington <hp@redhat.com>
4927 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
4928 SUN_LEN, it breaks abstract socket usage
4930 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
4933 2003-06-04 Havoc Pennington <hp@pobox.com>
4935 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
4936 using unix:abstract=/foo, and when listening in a tmpdir
4937 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
4939 * dbus/dbus-transport.c (_dbus_transport_open): support
4942 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4943 support abstract sockets
4945 * dbus/dbus-transport-unix.c
4946 (_dbus_transport_new_for_domain_socket): support abstract sockets
4948 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
4949 toggle as an argument, implement abstract namespace support
4950 (_dbus_listen_unix_socket): ditto
4952 * configure.in: add --enable-abstract-sockets and implement
4953 a configure check for autodetection of the right value.
4955 2003-06-01 Havoc Pennington <hp@pobox.com>
4957 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
4958 in /tmp (though on Linux this will end up being useless,
4959 when we add abstract namespace support)
4961 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
4964 2003-05-28 Colin Walters <walters@verbum.org>
4966 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
4968 2003-05-18 Anders Carlsson <andersca@codefactory.se>
4970 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
4972 2003-05-17 Colin Walters <walters@gnu.org>
4974 * tools/dbus-send.c: Don't exit with an error code if --help was
4975 passed. Default to using the session bus instead of the system
4978 * tools/dbus-launch.c: Ditto.
4980 * tools/dbus-monitor.c: Ditto.
4982 * tools/dbus-send.1: Update with new arguments.
4984 * tools/dbus-launch.c: Emit code to export variables. New
4985 arguments -s and -c to specify shell syntax, and a bit of code to
4986 autodetect syntax. Also, allow specifying a program to run.
4988 * tools/dbus-launch.1: Update with new arguments.
4990 * tools/dbus-send.1: Ditto.
4992 * tools/dbus-monitor.1: Ditto.
4994 2003-05-17 Havoc Pennington <hp@pobox.com>
4996 * bus/config-parser.c (merge_included): merge in policies from
4997 child configuration file.
4999 * bus/policy.c (bus_policy_merge): function to merge two policies
5002 2003-05-16 Havoc Pennington <hp@redhat.com>
5004 * dbus/dbus-connection.c: disable verbose lock spew
5006 * tools/dbus-send.c: add --print-reply command line option
5008 * tools/dbus-print-message.h (print_message): new util function
5009 shared by dbus-send and dbus-monitor
5011 * tools/dbus-monitor.c (handler_func): exit on disconnect
5013 * dbus/dbus-transport-unix.c (do_reading): if the transport is
5014 disconnected, don't try to use the read_watch
5016 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
5017 so we can find this bug more easily
5019 2003-05-16 Havoc Pennington <hp@redhat.com>
5021 * bus/policy.c (free_rule_list_func): avoid a crash when passed
5022 NULL as DBusHashTable is annoyingly likely to do.
5024 2003-05-16 Colin Walters <walters@verbum.org>
5026 * tools/dbus-monitor.c: Add --session argument and usage()
5029 * tools/dbus-monitor.1: Update with new --session arg.
5031 * bus/Makefile.am (install-data-hook): Create
5032 $(libdir)/dbus-1.0/services so that the session bus is happy.
5034 2003-05-15 Havoc Pennington <hp@redhat.com>
5036 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
5037 on non-x86. ifdef's are evil.
5039 2003-05-15 Havoc Pennington <hp@redhat.com>
5041 * configure.in: 0.11
5045 * bus/Makefile.am (initddir): apparently we are supposed to put
5046 init scripts in /etc/rc.d/init.d not /etc/init.d
5048 * bus/Makefile.am: remove the "you must --enable-tests to make
5049 check" as it broke distcheck
5051 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
5053 2003-05-13 James Willcox <jwillcox@gnome.org>
5056 * bus/activation.c: (bus_activation_service_created),
5057 (bus_activation_activate_service):
5058 * bus/driver.c: (bus_driver_send_service_deleted),
5059 (bus_driver_send_service_created), (bus_driver_send_service_lost),
5060 (bus_driver_send_service_acquired),
5061 (bus_driver_send_welcome_message),
5062 (bus_driver_handle_list_services):
5063 * bus/session.conf.in:
5064 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
5065 (dbus_bus_service_exists), (dbus_bus_activate_service):
5068 Add some convenience API which lets you activate a service, and did a
5069 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
5070 and dbus_message_get_args()
5072 2003-05-11 Havoc Pennington <hp@pobox.com>
5074 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
5075 calling _dbus_marshal_validate_arg() for every byte in a byte
5078 * dbus/dbus-message-handler.c: use atomic reference counting to
5079 reduce number of locks slightly; the global lock in here sucks
5081 * dbus/dbus-connection.c
5082 (_dbus_connection_update_dispatch_status_and_unlock): variant of
5083 update_dispatch_status that can be called with lock held; then use
5084 in a couple places to reduce locking/unlocking
5085 (dbus_connection_send): hold the lock over the whole function
5086 instead of acquiring it twice.
5088 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
5090 * bus/connection.c (bus_connections_setup_connection): fix access
5091 to already-freed memory.
5093 * dbus/dbus-connection.c: keep a little cache of linked list
5094 nodes, to avoid using the global linked list alloc lock in the
5095 normal send-message case. Instead we just use the connection lock
5096 that we already have to take.
5098 * dbus/dbus-list.c (_dbus_list_find_last): new function
5100 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
5101 change to use a struct for the atomic type; fix docs,
5102 they return value before increment, not after increment.
5104 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
5105 (_dbus_string_append_8_aligned): new functions to try to
5106 microoptimize this operation.
5107 (reallocate_for_length): break this out of set_length(), to
5108 improve profile info, and also so we can consider inlining the
5111 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
5112 strings with some preallocation, cuts down on our calls to realloc
5113 a fair bit. Though if we can get the "move entire string to empty
5114 string" optimization below to kick in here, it would be better.
5116 * dbus/dbus-string.c (_dbus_string_move): just call
5117 _dbus_string_move_len
5118 (_dbus_string_move_len): add a special case for moving
5119 an entire string into an empty string; we can just
5120 swap the string data instead of doing any reallocs.
5121 (_dbus_string_init_preallocated): new function
5123 2003-05-11 Havoc Pennington <hp@pobox.com>
5125 Write a "test-profile" that does echo client-server with threads;
5126 profile reveals lock contention, memcpy/realloc of buffers, and
5127 UTF-8 validation as hot spots. 20% of lock contention eliminated
5128 with dbus_atomic_inc/dec implementation on x86. Much remaining
5129 contention is global mempool locks for GList and DBusList.
5131 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
5134 * dbus/dbus-connection.c (struct DBusConnection): use
5135 dbus_atomic_t for the reference count
5137 * dbus/dbus-message.c (struct DBusMessage): declare
5138 dbus_atomic_t values as volatile
5140 * configure.in: code to detect ability to use atomic integer
5141 operations in assembly, from GLib patch
5143 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
5144 time, tired of it being wrong in threads and forked processes
5146 * glib/test-profile.c: a little program to bounce messages back
5147 and forth between threads and eat CPU
5149 * dbus/dbus-connection.c: add debug spew macros for debugging
5150 thread locks; include config.h at top; fix deadlock in
5151 dbus_connection_flush()
5153 2003-05-08 Havoc Pennington <hp@pobox.com>
5155 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
5156 data from getting written, and there wasn't a good reason to
5159 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
5160 dbus_verbose lines in test coverage
5161 (main): add list of functions sorted by # of untested blocks
5162 to the coverage report
5164 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
5166 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
5168 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
5169 extend test coverage
5171 * test/data/auth/cancel.auth-script: test canceling an
5174 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
5175 aren't used. in CVS history if we end up needing them.
5177 2003-05-04 Havoc Pennington <hp@pobox.com>
5179 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
5182 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
5183 function, which assumed length was in # of strings, not bytes
5185 * dbus/dbus-message.c (_dbus_message_test): add tests for some
5188 * dbus/dbus-connection.c
5189 (_dbus_connection_queue_received_message): disable function for
5190 now, we are only using it in test mode
5192 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
5193 remove a mistaken FIXME
5195 2003-05-04 Havoc Pennington <hp@pobox.com>
5197 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
5198 unlock mutex on successful return, patch from Anders Gustafsson
5200 2003-05-04 Havoc Pennington <hp@pobox.com>
5202 * dbus-glib-1.pc.in (Requires): fix dependencies, from
5205 2003-05-04 Havoc Pennington <hp@pobox.com>
5207 * tools/dbus-launch.c: implement
5209 * bus/main.c (main), bus/bus.c (bus_context_new):
5210 implement --print-pid and --fork
5212 2003-05-03 Havoc Pennington <hp@redhat.com>
5214 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
5215 the address had no value, and add to test suite. Fix and
5216 regression test from Miloslav Trmac
5218 2003-05-03 Havoc Pennington <hp@pobox.com>
5220 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
5221 watch is invalid when handled
5223 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
5224 dbus-launch utility to launch the bus from a shell script. Didn't
5225 actually implement dbus-launch yet, it's just a placeholder still.
5227 2003-05-03 Havoc Pennington <hp@pobox.com>
5229 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
5230 daemon; also documents daemon config file, so replaces
5231 doc/config-file.txt. Corrected some stuff from config-file.txt in
5232 the process of moving it.
5234 2003-05-03 Havoc Pennington <hp@pobox.com>
5236 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
5239 2003-05-03 Colin Walters <walters@verbum.org>
5241 * dbus/dbus-sysdeps.c (fill_user_info): Test against
5242 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
5244 * Makefile.am: Update to use new .pc versioning scheme.
5246 2003-05-02 Havoc Pennington <hp@redhat.com>
5248 * bus/system.conf.in: allow send/receive to/from message bus
5251 2003-04-30 Havoc Pennington <hp@redhat.com>
5253 * configure.in: print a note when building with unit tests and
5256 2003-04-30 Havoc Pennington <hp@redhat.com>
5258 * Makefile.am: add a check-local that complains if you didn't
5259 configure with --enable-tests
5261 2003-04-29 Havoc Pennington <hp@redhat.com>
5263 * glib/dbus-gmain.c: docs cleanups
5265 * dbus/dbus-types.h: add docs on int64 types
5267 * dbus/dbus-memory.c: fix docs to avoid putting private API in
5268 public API docs section
5270 2003-04-29 Havoc Pennington <hp@redhat.com>
5272 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
5273 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
5274 parallel install API version, not with the D-BUS package version.
5276 * HACKING: move some of README over here
5278 * README: updates, and document API/ABI policy
5280 * configure.in: reindentation
5282 2003-04-29 Havoc Pennington <hp@redhat.com>
5284 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
5285 to use this library" to be sure people have the right
5288 2003-04-28 Havoc Pennington <hp@redhat.com>
5290 * configure.in: add --enable-docs which by default is auto yes if
5291 doxygen and db2html found, no otherwise; but can be forced on/off
5293 * doc/Makefile.am: conditionalize whether to build docs on
5296 2003-04-28 Havoc Pennington <hp@redhat.com>
5298 * configure.in: 0.10
5302 * bus/system.conf.in: add <includedir>system.d</includedir>
5304 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
5305 username was provided but not uid
5307 * bus/config-parser.c (struct BusConfigParser): keep track of
5308 whether the parser is toplevel or was included; change some
5309 of the error handling if it's included.
5311 2003-04-27 Havoc Pennington <hp@pobox.com>
5315 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5316 report correct status if we finish processing authentication
5317 inside this function.
5319 * bus/activation.c (try_send_activation_failure): use
5320 bus_transaction_send_error_reply
5322 * bus/connection.c (bus_connection_get_groups): return an error
5323 explaining the problem
5325 * bus/bus.c (bus_context_check_security_policy): implement
5326 restriction here that inactive connections can only send the
5327 hello message. Also, allow bus driver to send anything to
5330 * bus/connection.c (bus_connection_complete): create the
5331 BusClientPolicy here instead of on-demand.
5332 (bus_connection_get_policy): don't return an error
5334 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
5335 sender field in message being replied to
5337 * bus/bus.c (bus_context_check_security_policy): fix silly typo
5338 causing it to return FALSE always
5340 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
5341 we checked sender rather than destination
5343 2003-04-25 Havoc Pennington <hp@redhat.com>
5345 test suite is slightly hosed at the moment, will fix soon
5347 * bus/connection.c (bus_connections_expire_incomplete): fix to
5348 properly disable the timeout when required
5349 (bus_connection_set_name): check whether we can remove incomplete
5350 connections timeout after we complete each connection.
5352 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
5353 probably still broken.
5355 * bus/services.c (bus_registry_acquire_service): implement max
5356 number of services owned, and honor allow/deny rules on which
5357 services a connection can own.
5359 * bus/connection.c (bus_connection_get_policy): report errors here
5361 * bus/activation.c: implement limit on number of pending
5364 2003-04-25 Havoc Pennington <hp@redhat.com>
5366 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
5367 where we used >= 0 instead of != DBUS_UID_UNSET.
5369 2003-04-25 Havoc Pennington <hp@redhat.com>
5371 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
5372 were toggled without add/remove, fix from Anders Gustafsson
5374 2003-04-24 Havoc Pennington <hp@redhat.com>
5376 * test/data/valid-config-files/basic.conf: add <limit> tags to
5379 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
5380 <limit> tag in configuration file.
5382 2003-04-24 Havoc Pennington <hp@redhat.com>
5384 * bus/dispatch.c: somehow missed some name_is
5386 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
5387 (_dbus_timeout_set_interval): new
5389 * bus/connection.c (bus_connections_setup_connection): record time
5390 when each connection is first set up, and expire them after the
5391 auth timeout passes.
5393 2003-04-24 Havoc Pennington <hp@redhat.com>
5395 * dbus/dbus-message.c (dbus_message_name_is): rename
5396 (dbus_message_service_is): rename
5397 (dbus_message_sender_is): rename
5398 (dbus_message_get_service): rename
5400 2003-04-24 Havoc Pennington <hp@redhat.com>
5402 * configure.in: add --enable-checks
5404 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
5406 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
5407 to use thread locks.
5408 (_dbus_connection_handler_destroyed_locked): move some private
5409 functions into proper docs group
5411 * dbus/dbus-internals.h: add _dbus_return_if_fail,
5412 _dbus_return_val_if_fail
5414 Throughout: use dbus_return_if_fail
5416 2003-04-23 James Willcox <jwillcox@gnome.org>
5419 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
5420 (dbus_connection_setup_with_g_main),
5421 (dbus_server_setup_with_g_main):
5422 * glib/test-dbus-glib.c: (main):
5423 * glib/test-thread-client.c: (main):
5424 * glib/test-thread-server.c: (new_connection_callback), (main):
5425 * tools/dbus-monitor.c: (main):
5427 Added a GMainContext argument to dbus_connection_setup_with_g_main()
5428 and dbus_server_setup_with_g_main().
5430 2003-04-20 Havoc Pennington <hp@pobox.com>
5432 * doc/dbus-specification.sgml: document the restrictions on
5433 message and service names
5435 2003-04-22 Havoc Pennington <hp@redhat.com>
5437 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
5438 support, and do some code cleanups to share more code and
5439 speed up array marshal/demarshal.
5441 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
5443 * configure.in: generate dbus-arch-deps.h
5445 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
5448 2003-04-22 Havoc Pennington <hp@redhat.com>
5450 * test/data/valid-messages/opposite-endian.message: fix test
5451 to use proper type for rply field
5453 * test/data/invalid-messages: add tests for below validation
5455 * dbus/dbus-message.c (decode_header_data): validate field types,
5456 and validate that named fields are valid names
5457 (decode_name_field): consider messages in the
5458 org.freedesktop.Local. namespace to be invalid.
5460 * dbus/dbus-string.c (_dbus_string_validate_name): new
5462 2003-04-19 Havoc Pennington <hp@pobox.com>
5464 * bus/driver.c (bus_driver_handle_hello): check limits and
5465 return an error if they are exceeded.
5467 * bus/connection.c: maintain separate lists of active and inactive
5468 connections, and a count of each. Maintain count of completed
5469 connections per user. Implement code to check connection limits.
5471 * dbus/dbus-list.c (_dbus_list_unlink): export
5473 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
5474 number of bytes in the message queue for a connection
5476 2003-04-18 Havoc Pennington <hp@pobox.com>
5478 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
5480 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
5483 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
5484 on realloc be sure to update the pointer in the keyring
5486 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
5487 offset to avoid writing to unallocated memory
5489 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
5490 try the next mechanism, so we properly handle OOM
5492 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
5494 (_dbus_keyring_new): fix OOM bug
5495 (_dbus_keyring_new_homedir): always set error; impose a maximum
5496 number of keys we'll load from the file, mostly to speed up the
5497 test suite and make its OOM checks more useful, but also for
5500 * dbus/dbus-auth.c (process_error_server): reject authentication
5501 if we get an error from the client
5502 (process_cancel): on cancel, send REJECTED, per the spec
5503 (process_error_client): send CANCEL if we get an error from the
5506 2003-04-18 Havoc Pennington <hp@pobox.com>
5508 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
5511 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
5514 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
5515 about DBUS_TEST_HOMEDIR once
5517 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
5520 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
5521 config file so we test the right thing
5523 Throughout: assorted docs improvements
5525 2003-04-18 Havoc Pennington <hp@pobox.com>
5527 * glib/dbus-gmain.c: adapt to watch changes
5529 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
5531 * dbus/dbus-server.h: remove dbus_server_handle_watch
5533 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
5535 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
5536 like DBusTimeout, so we don't need dbus_connection_handle_watch
5539 2003-04-17 Havoc Pennington <hp@redhat.com>
5541 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
5542 database usage so it all goes via the DBusUserDatabase cache.
5544 2003-04-17 Havoc Pennington <hp@redhat.com>
5546 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
5547 there was an OOM watch we skipped, we always return TRUE so we
5548 iterate again to have a look at it again. Fixes test suite hang.
5549 Code rearrangement also lets us lose some memset and only iterate
5550 over callbacks once.
5552 * bus/driver.c (bus_driver_handle_message): sense of test for
5555 2003-04-16 Havoc Pennington <hp@pobox.com>
5557 * doc/dbus-specification.sgml: make spec say serials are unsigned
5559 * dbus/dbus-message.h: change message serials to unsigned
5561 * dbus/dbus-connection.c: adapt to message serials being unsigned
5563 2003-04-15 Havoc Pennington <hp@pobox.com>
5565 * bus/bus.c: create and keep around a shared DBusUserDatabase
5568 * bus/connection.c (bus_connection_get_groups): don't cache
5569 groups for user in the connection object, since user database
5570 object now does that.
5572 2003-04-16 Havoc Pennington <hp@redhat.com>
5574 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
5575 list of size counters
5576 (_dbus_message_loader_putback_message_link): put back a popped link
5578 * dbus/dbus-connection.c
5579 (dbus_connection_set_max_live_messages_size): rename
5581 (dbus_connection_get_outgoing_size): get size of outgoing
5583 (_dbus_connection_set_connection_counter): remove this cruft
5585 2003-04-14 Havoc Pennington <hp@redhat.com>
5587 * dbus/dbus-userdb.c: user database abstraction, mostly to get
5588 caching, but at some point we might want to be able to use a
5591 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
5592 SHA1 conf file to test the sha1 auth mechanism, since the regular
5593 test always uses EXTERNAL when available.
5596 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
5597 add conf file that requires use of sha1 auth
5599 2003-04-13 Havoc Pennington <hp@pobox.com>
5601 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
5602 from Philip Blundell to send messages and monitor them.
5604 2003-04-13 Havoc Pennington <hp@pobox.com>
5606 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
5609 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
5612 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5613 fix to only recover unused bytes if we're already authenticated
5614 (_dbus_transport_get_is_authenticated): fix to still mark us
5615 authenticated if there are unused bytes.
5617 * bus/dispatch.c: implement security policy checking
5619 * bus/connection.c (bus_transaction_send_from_driver): new
5621 * bus/bus.c (bus_context_check_security_policy): new
5623 * bus/dispatch.c (send_service_nonexistent_error): delete this,
5624 now we just set the DBusError and it gets converted to an error
5627 * bus/connection.c (allow_user_function): enable code using actual
5628 data from the config file
5630 * bus/policy.c (list_allows_user): handle wildcard rules for
5631 user/group connection perms
5633 2003-04-13 Havoc Pennington <hp@pobox.com>
5635 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
5637 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
5639 * bus/policy.c (bus_policy_append_mandatory_rule)
5640 (bus_policy_append_default_rule, bus_policy_append_user_rule)
5641 (bus_policy_append_group_rule): new functions
5643 2003-04-12 Havoc Pennington <hp@pobox.com>
5645 * bus/config-parser.c (bus_config_parser_new): fix a memleak
5647 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
5648 the pid/gid/uid, just for paranoia.
5650 * test/break-loader.c (randomly_do_n_things): find a byte
5651 containing a type code, and randomly change it to a different
5654 2003-04-12 Havoc Pennington <hp@pobox.com>
5656 * bus/policy.h: change BusPolicy to be the thing from the config
5657 file, and rename old BusPolicy to BusClientPolicy
5659 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
5660 match change in how policy works
5662 * dbus/dbus-internals.h: mark assert_not_reached as
5663 __attribute((noreturn))__
5665 2003-04-11 Havoc Pennington <hp@redhat.com>
5667 * doc/dbus-specification.sgml: fix a spot with the wrong name for
5668 the broadcast service. Use boolean return for ServiceExists.
5670 2003-04-11 Havoc Pennington <hp@redhat.com>
5672 * configure.in: add another directory to look for qt in.
5674 2003-04-11 Havoc Pennington <hp@redhat.com>
5676 * AUTHORS: add Colin Walters
5678 2003-04-11 Havoc Pennington <hp@redhat.com>
5684 2003-04-11 Havoc Pennington <hp@redhat.com>
5686 * bus/messagebus.in: remove pid file when stopping the
5687 message bus, since the bus won't have privileges to remove it
5690 2003-04-11 Havoc Pennington <hp@redhat.com>
5692 * bus/bus.c (bus_context_new): move credentials change after
5695 2003-04-11 Havoc Pennington <hp@pobox.com>
5697 * test/decode-gcov.c: add "below average functions" to the
5698 coverage report, and change how some of the code works.
5700 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
5701 not in the coverage stats.
5703 * test/test-service.c (main): use _dbus_verbose not fprintf in a
5704 couple places so running the test suite doesn't result in megaspam.
5706 2003-04-11 Havoc Pennington <hp@pobox.com>
5708 * bus/dispatch.c (check_existent_service_activation): accept a no
5709 memory error in a place we didn't before
5711 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
5712 in case the first one failed," since the test suite is less
5715 2003-04-10 Havoc Pennington <hp@pobox.com>
5717 * bus/dispatch.c (check_segfault_service_activation): add test
5718 for launching an executable that just crashes.
5720 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
5721 don't leave a million cores. We'll see how portable this is.
5723 2003-04-10 Havoc Pennington <hp@pobox.com>
5725 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
5726 the possible parent failures before we fork, so that we don't
5727 fail to create a babysitter after creating the child.
5729 * bus/activation.c (bus_activation_activate_service): kill child
5730 if we don't successfully complete the activation.
5732 2003-04-10 Havoc Pennington <hp@redhat.com>
5734 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
5735 the connection if it's disconnected
5737 * bus/activation.c (bus_activation_service_created): use new
5738 transaction features to roll back removal of pending activation if
5739 we don't successfully create the service after all. Don't remove
5740 pending activation if the function fails.
5742 * dbus/dbus-list.c (_dbus_list_insert_before_link)
5743 (_dbus_list_insert_after_link): new code to facilitate
5746 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
5747 new functionality, so we can preallocate the ability to insert
5750 * bus/connection.c (bus_transaction_add_cancel_hook): new function
5751 allowing us to put custom hooks in a transaction to be used for
5752 cancelling said transaction
5754 * doc/dbus-specification.sgml: add some discussion of secondary
5755 service owners, and disallow zero-length service names
5757 * bus/services.c (bus_registry_acquire_service): new function,
5758 splits out part of bus_driver_handle_acquire_service() and fixes
5759 a bug where we didn't remove the service doing the acquiring
5760 from the secondary queue if we failed to remove the current owner
5761 from the front of the queue.
5763 2003-04-10 Alexander Larsson <alexl@redhat.com>
5765 * doc/dbus-specification.sgml:
5766 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
5768 2003-04-10 Alexander Larsson <alexl@redhat.com>
5773 Added files to cvsignore
5775 * dbus/dbus-message.h:
5776 * dbus/dbus-message.c: (dbus_message_iter_get_named):
5777 Make get_named() take two out argument and return a boolean.
5778 (dbus_message_iter_get_args_valist):
5779 Update usage of get_named().
5780 (dbus_message_iter_append_byte):
5782 (dbus_message_iter_append_named)
5784 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
5787 2003-04-10 Alexander Larsson <alexl@redhat.com>
5789 * dbus/dbus-marshal.[ch]:
5790 Add array_type_pos argument to _dbus_marshal_validate_arg.
5791 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
5793 * dbus/dbus-message.[ch]:
5794 Multi-dimensional arrays have full type specification in the
5795 outermost array. Iter code re-arranged to handle this.
5796 Added some more iter tests.
5798 * doc/dbus-specification.sgml:
5801 Update new array encoding description.
5802 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
5804 * test/data/invalid-messages/array-with-mixed-types.message:
5805 * test/data/valid-messages/array-of-array-of-uint32.message:
5806 Change to the new array format.
5808 * test/data/invalid-messages/too-short-dict.message:
5811 * test/data/valid-messages/recursive-types.message:
5812 Fix up and extend test.
5814 2003-04-10 Havoc Pennington <hp@pobox.com>
5816 * bus/dispatch.c: lots of fixes
5818 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
5819 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
5820 that was crack, broke the test service.
5822 * dbus/dbus-transport.c (_dbus_transport_open): fix error
5823 handling to avoid piling up errors if we get a failure on the
5826 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
5827 pid in assertion failures.
5829 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
5830 to some fixed size of file descriptor array. Don't return TRUE
5831 anytime a timeout exists, that led to lots of busy loop silliness
5834 2003-04-09 Havoc Pennington <hp@redhat.com>
5836 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
5837 I'd checked this in earlier but hadn't.
5839 2003-04-09 Havoc Pennington <hp@redhat.com>
5841 * bus/dispatch.c (bus_dispatch_test): get a bit further through
5842 the activation test (man this is getting old!)
5844 2003-04-09 Havoc Pennington <hp@redhat.com>
5846 * test/test-utils.c: use dispatch status function to fix this up
5848 * bus/connection.c (connection_watch_callback): don't dispatch
5850 (connection_timeout_callback): don't dispatch from here
5851 (bus_connections_setup_connection): set the dispatch status function
5852 (bus_connection_disconnected): unset it
5854 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
5855 used to add a connection to be dispatched
5856 (_dbus_loop_iterate): do the dispatching at the end of each
5859 * dbus/dbus-connection.c
5860 (dbus_connection_set_dispatch_status_function): new function
5861 allowing us to fix up main loop usage
5862 (_dbus_connection_last_unref): free all the various function
5864 (dbus_connection_dispatch): call the DispatchStatusFunction
5865 whenever this function returns
5866 (dbus_connection_handle_watch): call DispatchStatusFunction
5867 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
5868 (reply_handler_timeout): call DispatchStatusFunction
5869 (dbus_connection_flush): call DispatchStatusFunction
5871 2003-04-09 Havoc Pennington <hp@redhat.com>
5873 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
5876 * bus/dispatch.c (check_service_activated): fix bug in test
5878 * dbus/dbus-mainloop.c (check_timeout): fix this up
5880 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
5881 verbose output so we can sort out output from different processes,
5882 e.g. in the activation case.
5884 2003-04-08 Colin Walters <walters@gnu.org>
5886 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
5888 (bus_context_new): Set it.
5889 (bus_context_unref): Use it to delete the pid file.
5891 2003-04-08 Havoc Pennington <hp@redhat.com>
5893 * test/data/invalid-messages/array-with-mixed-types.message:
5894 regression test that fails for the moment
5896 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
5897 tests for convenience
5899 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
5900 array of nil, it broke things.
5902 * test/data/invalid-messages/array-of-nil.message: regression test
5904 * test/data/valid-messages/array-of-array-of-uint32.message:
5905 happened to write this so added it to suite
5907 2003-04-08 Havoc Pennington <hp@redhat.com>
5909 * bus/driver.c (bus_driver_handle_acquire_service): init
5910 retval/reply before checking name
5912 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
5913 recursion depth argument
5915 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
5916 in the public struct for future extension
5918 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
5921 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
5924 * doc/dbus-specification.sgml: fix typo
5926 2003-04-08 Alexander Larsson <alexl@redhat.com>
5928 Implemented recursive types, named types and new-style iters
5931 * glib/test-thread-client.c: (thread_func):
5932 * glib/test-thread-server.c: (handle_test_message):
5933 * test/test-service.c: (handle_echo):
5942 * dbus/dbus-internals.c: (_dbus_type_to_string):
5943 Update for new types.
5945 * dbus/dbus-marshal.[ch]:
5946 Implement recursive types and the new marshalling format.
5947 Remove hardcoded dict marshalling.
5948 Marshal named types.
5950 * dbus/dbus-message-builder.c:
5952 Remove references to old types
5954 * dbus/dbus-message.[ch]:
5955 New non-refcounted iter API that supports recursive iters.
5956 Use iters for appending, including support for recursive
5958 Add byte and named type support.
5959 Update everything to new marshalling formats.
5960 Add tests for new API.
5962 * dbus/dbus-protocol.h:
5963 Remove old array types.
5964 Add types: BYTE, ARRAY, DICT, NAMED
5966 * dbus/dbus-string.c:
5967 * dbus/dbus-sysdeps.c:
5968 Make parse_double locale safe.
5970 * dbus/dbus-test-main.c:
5976 * doc/dbus-specification.sgml:
5979 * test/data/incomplete-messages/missing-body.message:
5980 * test/data/invalid-messages/bad-boolean.message:
5981 * test/data/invalid-messages/bad-boolean-array.message:
5982 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
5983 * test/data/invalid-messages/boolean-has-no-value.message-raw:
5984 * test/data/invalid-messages/too-short-dict.message:
5985 * test/data/valid-messages/dict-simple.message:
5986 * test/data/valid-messages/dict.message:
5987 * test/data/valid-messages/emptiness.message:
5988 * test/data/valid-messages/lots-of-arguments.message:
5989 * test/data/valid-messages/no-padding.message:
5990 * test/data/valid-messages/recursive-types.message:
5991 Add missing NAME fields
5992 Fix up dicts & arrays
5994 * test/data/invalid-messages/dict-with-nil-value.message:
5995 Removed, this is not invalid anymore.
5997 * test/data/valid-messages/recursive-types.message:
5998 Add new test for deeply recursive types.
6000 2003-04-07 Havoc Pennington <hp@pobox.com>
6002 * bus/driver.c (bus_driver_handle_acquire_service): return an
6003 error if you try to acquire a service that starts with ':'
6005 2003-04-07 Havoc Pennington <hp@redhat.com>
6007 * doc/dbus-specification.sgml: require that base service names
6008 start with ':' and that the base service is created/deleted
6009 as first and last things a connection does on the bus
6011 * bus/dispatch.c (check_existent_service_activation): lots more
6012 work on the activation test; it doesn't fully pass yet...
6014 * test/test-service.c (main): fix so we don't memleak the
6015 connection to the message bus
6016 (filter_func): accept a message asking us to exit
6018 2003-04-06 Havoc Pennington <hp@pobox.com>
6020 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
6023 * configure.in: fixes to Qt detection from Colin Walters
6025 * doc/Makefile.am: Only remove generated docbook dirs if they
6026 exist, from Colin Walters
6028 * dbus/dbus-bus.c: change how we set well-known connections to
6029 NULL, so that it works if a single connection is stored in
6030 two well-known array slots.
6032 * test/Makefile.am: remove a lot of stuff that isn't immediately
6033 useful, it's in CVS history if we want it.
6035 * test/test-service.c: use dbus-mainloop instead of that
6038 2003-04-06 Havoc Pennington <hp@pobox.com>
6040 * dbus/Makefile.am: split lists of sources into stuff that goes in
6041 the library, util functions that go in the lib and are also used
6042 elsewhere, and util functions that are used in tests/daemon but
6043 don't go in the lib.
6045 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
6046 here so it can be used in test binaries also
6048 2003-04-06 Havoc Pennington <hp@pobox.com>
6050 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
6051 here in the parent process, so we can return an error if it
6052 fails. Also, move some of the code into the child so the parent
6053 is less hosed if we fail midway through.
6055 * bus/bus.c (bus_context_new): move pidfile detection further up
6056 in the function, before we start overwriting sockets and such.
6058 * bus/messagebus.in: adjust this a bit, not sure if it will work.
6060 * configure.in: add --with-system-pid-file and --with-system-socket
6062 2003-04-06 Colin Walters <walters@verbum.org>
6064 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
6066 * bus/system.conf.in: Declare a pidfile.
6068 * bus/bus.c (bus_context_new): Test for an existing pid file, and
6069 create one (if appropriate).
6071 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
6072 (struct BusConfigParser) [pidfile]: New.
6073 (element_type_to_name, merge_included, start_busconfig_child)
6074 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
6075 (bus_config_parser_unref): Free it.
6076 (bus_config_parser_get_pidfile): New function.
6078 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
6080 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
6082 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
6084 * dbus/dbus-sysdeps.h: Prototype it.
6086 2003-04-06 Havoc Pennington <hp@pobox.com>
6088 * bus/bus.c (bus_context_new): print the address in here, rather
6089 than in main(), because we need to do it before forking the daemon
6091 * bus/dispatch.c (send_service_nonexistent_error): set the sender
6092 on the service nonexistent error
6094 * bus/driver.c (bus_driver_handle_acquire_service): set the
6095 sender on the AcquireService reply
6097 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
6098 server also listen on a UNIX socket so services can connect to it.
6100 2003-04-06 Havoc Pennington <hp@pobox.com>
6102 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
6103 so it detects deadlocks and also we actually init threads when
6106 2003-04-06 Havoc Pennington <hp@pobox.com>
6108 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
6109 save the domain socket name, and unlink it when we disconnect the
6110 server. Means that at least when we exit normally, we won't leave
6111 a bunch of junk in /tmp
6113 * dbus/dbus-transport-unix.c
6114 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
6115 memory management). (I was making a real change here but then
6118 2003-04-06 Havoc Pennington <hp@pobox.com>
6120 * bus/bus.c (bus_context_new): fix wrong handling of
6121 server_data_slot_unref() in the error case.
6123 * dbus/dbus-internals.h (_dbus_assert): change so it passes
6124 "(condition) != 0" to _dbus_real_assert so that
6125 "_dbus_assert (pointer)" doesn't cause a warning
6127 * bus/main.c (main): accept --print-address option to print out
6128 the message bus address
6130 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
6132 * dbus/dbus-transport.c (_dbus_transport_open): special error for
6133 "tmpdir" option to unix: address on client side
6135 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
6138 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
6139 we can use to create sockets in the test suite.
6141 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
6142 cleanly. To be used for testing.
6144 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
6146 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
6148 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6149 handle trying to call this when there's no servers active
6151 2003-04-05 Havoc Pennington <hp@pobox.com>
6157 2003-04-05 Havoc Pennington <hp@pobox.com>
6159 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
6160 crash on startup. Need to get "try starting the daemon"
6161 in the test suite I guess. ;-)
6163 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
6164 tracked the number of open connections; it's better done in
6165 application-specific code as you want it to span all servers etc.
6167 2003-04-05 Havoc Pennington <hp@pobox.com>
6169 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
6170 patch from Colin Walters
6172 2003-04-05 Havoc Pennington <hp@pobox.com>
6174 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
6175 reality; in fact multiple mechanisms are allowed.
6177 * dbus/dbus-internals.c (_dbus_real_assert)
6178 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
6179 _dbus_assert_not_reached() into functions, so that they don't show
6180 up in basic block counts for test coverage, and don't use up as
6181 much disk space. Does mean slower execution speed though, so
6182 assumes --disable-asserts is the normal production case.
6184 2003-04-05 Havoc Pennington <hp@pobox.com>
6186 * test/Makefile.am (dist-hook): also dist *.in files
6192 2003-04-05 Havoc Pennington <hp@pobox.com>
6194 * dbus/dbus-string.c: docs warning
6196 * dbus/dbus-spawn.c: missing docs
6198 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
6200 2003-04-05 Havoc Pennington <hp@pobox.com>
6202 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
6205 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
6206 to -1 once we've reaped the babysitter
6207 (_dbus_babysitter_handle_watch): do as much work as we can, not
6210 * bus/activation.c: add code using DBusBabysitter so that we
6211 handle it when a service fails to start up properly.
6212 (bus_activation_service_created): don't remove the activation
6213 entries as we go, just let them get removed when we free the pending
6214 activation. Unref reply messages after sending them.
6216 2003-04-05 Havoc Pennington <hp@pobox.com>
6218 * test/decode-gcov.c (main): print per-directory stats in the report
6220 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
6222 2003-04-05 Havoc Pennington <hp@pobox.com>
6224 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
6226 * test/decode-gcov.c: hack up a little program to suck data
6227 out of gcov files. Yes this is sort of silly.
6229 * configure.in: define something in config.h and do an
6230 AM_CONDITIONAL when gcov is enabled
6232 2003-04-04 Havoc Pennington <hp@redhat.com>
6234 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
6235 return a "babysitter" object that is used to monitor the status of
6236 the spawned process and reap it when required.
6238 * test/test-segfault.c, test/test-exit.c,
6239 test/test-sleep-forever.c: binaries that do various lame things,
6240 used in the test suite.
6242 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
6244 2003-04-03 Havoc Pennington <hp@pobox.com>
6246 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
6247 in preparation for modifying it, dbus-sysdeps is getting
6250 2003-04-03 Havoc Pennington <hp@redhat.com>
6252 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
6255 * bus/*.[hc]: adapt to mainloop change
6257 2003-04-03 Havoc Pennington <hp@redhat.com>
6259 * bus/activation.c (load_directory): fix up memleaks
6260 (bus_activation_entry_free): free the entry
6262 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
6263 we get one from the message bus; fix memleaks.
6265 * dbus/dbus-message.c (dbus_set_error_from_message): new function
6267 2003-04-03 Havoc Pennington <hp@pobox.com>
6269 * bus/config-parser.c (bus_config_parser_unref): free
6270 list of mechanisms, bug discovered by test suite enhancements
6271 (putting system.conf and session.conf into suite)
6273 * test/Makefile.am, test/test-service.c: add placeholder for a
6274 test service that we'll activate as part of test suite. Doesn't
6277 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
6278 setting NULL value, and use system malloc not dbus_malloc()
6279 when we have unavoidable memleakage.
6281 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
6282 didn't work, and support DBUS_BUS_ACTIVATION.
6284 * bus/activation.c (child_setup): pass our well-known bus type to
6287 * bus/config-parser.c: support <type> to specify well-known type
6289 * doc/dbus-specification.sgml: document the env variables to
6290 locate well-known buses and find service activator
6292 2003-04-02 Havoc Pennington <hp@redhat.com>
6294 * test/Makefile.am (all-local): add a rule to copy tests to
6295 builddir, so we can have generated tests. Use this to remove the
6296 silly hack for testing system.conf and session.conf. Will use this
6297 shortly to generate .service files pointing to test binaries.
6299 2003-04-02 Havoc Pennington <hp@redhat.com>
6301 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
6302 current alloc and needed new length, not max of the doubled
6303 allocation and needed new length. Also, when building tests,
6304 don't do the double-allocation stuff, just realloc every time.
6306 2003-04-02 Havoc Pennington <hp@redhat.com>
6308 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
6310 (_dbus_string_get_dirname): new
6311 (_dbus_sysdeps_test): new
6312 (_dbus_directory_open): include dirnames in error messages
6314 * bus/config-parser.c: interpret <include> and <includedir> and
6315 <servicedir> relative to config file location if the given
6316 filename is not absolute.
6318 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
6320 2003-04-02 Havoc Pennington <hp@redhat.com>
6322 * bus/connection.c (bus_transaction_send_error_reply): set sender
6323 service for the error, and unref the reply on success
6325 * bus/activation.c: convert to use BusTransaction so OOM can be
6327 (bus_activation_service_created): set sender of the message
6329 2003-04-01 Havoc Pennington <hp@redhat.com>
6331 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
6332 <includedir> (at least mostly)
6334 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
6335 first, then the user ID
6337 2003-04-01 Havoc Pennington <hp@pobox.com>
6339 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
6342 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
6344 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
6346 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
6347 socket 0777, and unlink any existing socket.
6349 * bus/bus.c (bus_context_new): change our UID/GID and fork if
6350 the configuration file so specifies; set up auth mechanism
6353 * bus/config-parser.c (bus_config_parser_content): add support
6354 for <fork> option and fill in code for <auth>
6356 * bus/system.conf.in: add <fork/> to default configuration,
6357 and limit auth mechanisms to EXTERNAL
6359 * doc/config-file.txt (Elements): add <fork>
6361 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
6362 (_dbus_change_identity): new function
6364 2003-03-31 Havoc Pennington <hp@redhat.com>
6366 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
6367 (_dbus_listen_unix_socket): fix off-by-one error in null
6368 termination spotted by Nalin
6370 2003-03-31 Havoc Pennington <hp@redhat.com>
6372 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
6373 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
6374 having a real home directory available.
6376 2003-03-31 Havoc Pennington <hp@redhat.com>
6378 * bus/Makefile.am (install-data-hook): create /var/run/dbus
6380 * bus/messagebus.in: add init script for Red Hat /etc/init.d
6382 * configure.in: add support for specifying a style of init script
6385 2003-03-31 Havoc Pennington <hp@redhat.com>
6387 Fix some annoying DBusString API and fix all affected code.
6389 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
6391 (_dbus_string_get_data): change to return string instead of using
6393 (_dbus_string_get_const_data): ditto
6394 (_dbus_string_get_data_len): ditto
6395 (_dbus_string_get_const_data_len): ditto
6397 2003-03-31 Havoc Pennington <hp@redhat.com>
6399 * bus/main.c (main): fix up the command line arguments to be nicer
6401 2003-03-31 Havoc Pennington <hp@redhat.com>
6403 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
6404 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
6405 final location that lands in the config file
6407 * bus/config-loader-expat.c (bus_config_load): fix type of
6410 * doc/TODO: remove TODO item for dbus_bus_get()
6412 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
6414 2003-03-31 Havoc Pennington <hp@pobox.com>
6416 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
6417 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
6418 argument since they are always client side
6420 * dbus/dbus-server.c (dbus_server_get_address): new function
6422 * bus/main.c (main): take the configuration file as an argument.
6424 * test/data/valid-config-files/debug-allow-all.conf: new file to
6425 use with dispatch.c tests for example
6427 * bus/test-main.c (main): require test data dir
6429 * bus/bus.c (bus_context_new): change this to take a
6430 configuration file name as argument
6432 * doc/config-file.txt (Elements): add <servicedir>
6434 * bus/system.conf, bus/session.conf: new files
6436 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
6437 well-known socket if none set
6439 * configure.in: create system.conf and session.conf
6441 2003-03-30 Havoc Pennington <hp@pobox.com>
6443 * bus/config-parser.c: hacking
6445 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
6446 to shut down, since it could cause weirdness with the DBusList
6449 * dbus/dbus-list.c (_dbus_list_test): add tests for the
6450 link-oriented stack routines
6451 (alloc_link): free the mempool if the first alloc from it fails
6453 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
6455 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
6457 (_dbus_string_skip_white): new
6459 * doc/config-file.txt (Elements): add <includedir>
6461 2003-03-28 Havoc Pennington <hp@pobox.com>
6463 * dbus/dbus-string.c (_dbus_string_copy_data_len)
6464 (_dbus_string_copy_data): new functions
6466 2003-03-28 Anders Carlsson <andersca@codefactory.se>
6468 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
6472 * dbus/dbus-memory.c:
6475 2003-03-28 Havoc Pennington <hp@pobox.com>
6477 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
6478 I think it may have just been superstition. Not sure.
6480 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
6481 failures that were not being handled.
6483 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
6485 * dbus/dbus-memory.c: add ability to set number of mallocs in a
6486 row that will fail on out-of-memory.
6488 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
6489 function for testing out-of-memory handling.
6491 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
6492 allocation functions, they do map exactly to the expat ones.
6494 2003-03-27 Havoc Pennington <hp@redhat.com>
6496 * bus/config-loader-libxml.c (bus_config_load): add another error
6499 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6502 Add note about automatic service activation.
6504 * doc/dbus-specification.sgml:
6505 Rename the specification and clarify a few things.
6507 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6510 * dbus/dbus-address.c:
6512 * dbus/dbus-marshal.c:
6513 * dbus/dbus-server-debug-pipe.c:
6514 * dbus/dbus-transport-unix.c:
6515 Fix documentation warnings.
6517 2003-03-26 Havoc Pennington <hp@pobox.com>
6519 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
6520 after every test so it's quick and easy to see which leaked, and
6521 so we test multiple dbus_shutdown() calls
6523 * configure.in: change configure.in XML stuff to also support
6526 * config-loader-libxml.c: some hacking
6528 * config-loader-expat.c: some hacking
6530 * config-parser.c: some hacking, plus tests
6532 2003-03-25 Havoc Pennington <hp@redhat.com>
6534 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
6536 * configure.in: add --with-xml option to specify XML library,
6537 right now only libxml is supported.
6539 * bus/config-loader-libxml.c, config-parser.c: sync some minor
6540 nonworking code between home and work, still just stubs
6542 2003-03-24 Havoc Pennington <hp@redhat.com>
6544 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
6547 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
6548 NULL argument for "message" if the error is a well-known one,
6549 fill in a generic message in this case.
6551 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
6554 * bus/test.c (bus_test_flush_bus): add
6556 * bus/policy.c (bus_policy_test): test code stub
6558 2003-03-24 Havoc Pennington <hp@pobox.com>
6560 * bus/connection.c (bus_connections_setup_connection): set up
6561 the "can this user connect" function, but it always returns
6562 TRUE until we have a config file parser so we can have a config
6563 file that allows connections.
6565 2003-03-23 Havoc Pennington <hp@pobox.com>
6567 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
6568 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
6569 the mutex, so we can check for proper memory management
6572 * dbus/dbus-dataslot.c: remove the mutex from
6573 DBusDataSlotAllocator and lock it manually when using it,
6574 to simplify fitting it into the global slots framework.
6576 * dbus/dbus-threads.c (init_static_locks): rework how we're
6577 handling global locks so they are easily shut down.
6579 * bus/policy.c (bus_policy_append_rule): fix
6581 * bus/test-main.c (main): check for memleaks
6583 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
6584 test suite check for memleaks
6586 * dbus/dbus-memory.c: add support in test mode for tracking
6587 number of outstanding blocks
6589 2003-03-23 Havoc Pennington <hp@pobox.com>
6591 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
6594 * dbus/dbus-hash.h: add ULONG hash keys
6596 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
6597 (_dbus_get_group_id): new function
6599 2003-03-20 Havoc Pennington <hp@redhat.com>
6601 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
6603 (dbus_connection_get_unix_user): new function
6605 2003-03-20 Havoc Pennington <hp@pobox.com>
6607 * bus/connection.c (bus_connection_send_oom_error): assert that
6608 message has a sender
6609 (connection_execute_transaction): ditto
6610 (bus_connection_preallocate_oom_error): fix to set the sender, and
6611 set recipient to the destination service, not the bus driver
6613 * bus/policy.c: hacking
6615 * dbus/dbus-message.c (dbus_message_service_is): new function
6616 (dbus_message_sender_is): new
6618 2003-03-19 Havoc Pennington <hp@redhat.com>
6620 * bus/policy.c: start sketching code for policy restrictions on
6621 what connections can do.
6623 2003-03-18 Havoc Pennington <hp@redhat.com>
6625 * doc/TODO: some notes on high-level todo items. Little nitpick
6626 stuff is all in @todo, so no need to add it here.
6628 * doc/config-file.txt: some notes on how config file might look
6630 2003-03-18 Anders Carlsson <andersca@codefactory.se>
6636 2003-03-17 Havoc Pennington <hp@redhat.com>
6638 * dbus/dbus-internals.h: add gcc attributes so that
6639 our printf-style functions warn on bad arguments to
6642 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
6645 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
6648 2003-03-17 Havoc Pennington <hp@redhat.com>
6650 * bus/test-main.c (main): make it print something as it runs
6651 so make check doesn't look stuck
6653 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
6654 from CVS, now obsolete
6656 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6658 * bus/dispatch.c: (bus_dispatch):
6659 Refetch the service name since it may have been reallocated
6660 when dbus_message_set_sender was called.
6662 * dbus/dbus-sysdeps.c: (_dbus_accept):
6663 Add address and address length variables and use them to stop
6664 valgrind from complaining.
6666 2003-03-17 Havoc Pennington <hp@pobox.com>
6668 All tests pass, no memleaks, no valgrind complaints.
6670 * bus/test.c: refcount handler_slot
6672 * bus/connection.c (bus_connections_new): refcount
6673 connection_data_slot
6675 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
6676 bytes so that auth scripts pass.
6678 * bus/dispatch.c: init message_handler_slot so it gets allocated
6681 * bus/dispatch.c (message_handler_slot_ref): fix memleak
6683 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
6684 dealloc server_pipe_hash when no longer used for benefit of
6687 * dbus/dbus-auth.c (process_command): memleak fix
6689 * bus/dispatch.c (check_hello_message): memleak fix
6691 2003-03-16 Havoc Pennington <hp@pobox.com>
6693 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
6695 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6697 * bus/activation.c (bus_activation_activate_service): Append
6698 the pending activation entry to the list of pending activations.
6700 2003-03-16 Havoc Pennington <hp@pobox.com>
6702 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
6705 * dbus/dbus-address.c (create_entry): fix OOM handling when
6706 failing to alloc entry->method
6708 2003-03-16 Havoc Pennington <hp@pobox.com>
6710 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
6713 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6714 add some missing dbus_set_result
6716 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
6717 alloc the DBusMessageHandler
6719 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
6720 the transport here, since we call this from the finalizer; it
6721 resulted in a double-finalize.
6723 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
6724 where we tried to use transport->connection that was NULL,
6725 happened when transport was disconnected early on due to OOM
6727 * bus/*.c: adapt to handle OOM for watches/timeouts
6729 * dbus/dbus-transport-unix.c: port to handle OOM during
6732 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
6733 reference to unused bytes instead of a copy
6735 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
6738 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
6741 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
6744 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6746 * doc/dbus-specification.sgml:
6747 Document reply message for ActivateService.
6749 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6751 * bus/activation.c: (bus_pending_activation_entry_free),
6752 (bus_pending_activation_free), (bus_activation_new),
6753 (bus_activation_unref), (bus_activation_service_created),
6754 (bus_activation_activate_service):
6756 * bus/bus.c: (bus_context_new):
6757 * bus/desktop-file.c: (new_section):
6758 * bus/driver.c: (bus_driver_send_service_deleted),
6759 (bus_driver_handle_activate_service):
6760 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
6762 * dbus/dbus-connection.c:
6763 (dbus_connection_send_with_reply_and_block):
6764 * dbus/dbus-message.c: (dbus_message_append_args_valist):
6765 * dbus/dbus-protocol.h:
6766 Make activation work better. Now pending activations will be queued
6767 and the daemon won't try to activate services that are already registered.
6769 2003-03-16 Havoc Pennington <hp@pobox.com>
6771 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
6774 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
6775 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
6777 2003-03-16 Havoc Pennington <hp@pobox.com>
6779 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
6780 this. always run the test suite before commit...
6782 * bus/*: adapt to DBusConnection API changes
6784 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
6785 requires renaming stuff to avoid dbus_connection_dispatch name
6788 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
6791 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6792 separate from _dbus_message_loader_return_buffer()
6794 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
6795 this, because it's now always broken to use; the number of
6796 messages in queue vs. the number still buffered by the message
6797 loader is undefined/meaningless. Should use
6798 dbus_connection_get_dispatch_state().
6799 (dbus_connection_dispatch): rename from
6800 dbus_connection_dispatch_message
6802 2003-03-16 Havoc Pennington <hp@pobox.com>
6804 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
6807 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6809 * dbus/dbus-connection.c:
6810 (dbus_connection_send_with_reply_and_block):
6811 Decrease connection->n_incoming when removing an entry
6813 * dbus/dbus-dict.c: (dbus_dict_entry_free),
6814 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6815 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6816 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
6817 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
6818 (dbus_dict_get_byte_array):
6819 Handle NULL arrays and strings. Also add support for byte arrays.
6821 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
6822 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
6823 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6824 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6825 (_dbus_demarshal_dict), (demarshal_and_validate_len),
6826 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
6827 * dbus/dbus-marshal.h:
6828 Add support for marshalling and demarshalling empty arrays and strings.
6830 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6831 (dbus_message_append_string_array),
6832 (dbus_message_iter_get_boolean),
6833 (dbus_message_iter_get_boolean_array),
6834 (dbus_message_iter_get_int32_array),
6835 (dbus_message_iter_get_uint32_array),
6836 (dbus_message_iter_get_double_array),
6837 (dbus_message_iter_get_byte_array),
6838 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
6839 (check_message_handling):
6840 Add support for getting empty arrays and dicts.
6842 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
6843 Don't do any validation at all for now, that's better than just checking
6846 * test/data/valid-messages/emptiness.message:
6847 New test message with lots of empty arrays.
6849 2003-03-16 Havoc Pennington <hp@pobox.com>
6851 * dbus/dbus-connection.c
6852 (_dbus_connection_queue_received_message_link): new function that
6853 can't fail due to OOM
6855 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
6856 new function pops a message together with a list link
6859 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
6860 message queuing functions to avoid needing to alloc memory
6862 2003-03-16 Havoc Pennington <hp@pobox.com>
6864 Oops - test code was only testing failure of around 30 of the
6865 mallocs in the test path, but it turns out there are 500+
6866 mallocs. I believe this was due to misguided linking setup such
6867 that there was one copy of dbus_malloc etc. in the daemon and one
6868 in the shared lib, and only daemon mallocs were tested. In any
6869 case, the test case now tests all 500+ mallocs, and doesn't pass
6870 yet, though there are lots of fixes in this patch.
6872 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6873 this so that it doesn't need to allocate memory, since it
6874 has no way of indicating failure due to OOM (and would be
6875 annoying if it did).
6877 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
6879 * bus/Makefile.am: rearrange to create two self-contained
6880 libraries, to avoid having libraries with overlapping symbols.
6881 that was resulting in weirdness, e.g. I'm pretty sure there
6882 were two copies of global static variables.
6884 * dbus/dbus-internals.c: move the malloc debug stuff to
6887 * dbus/dbus-list.c (free_link): free list mempool if it becomes
6890 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
6892 * dbus/dbus-address.c (dbus_parse_address): free list nodes
6895 * bus/dispatch.c (bus_dispatch_add_connection): free
6896 message_handler_slot when no longer using it, so
6897 memory leak checkers are happy for the test suite.
6899 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
6901 * bus/bus.c (new_connection_callback): disconnect in here if
6902 bus_connections_setup_connection fails.
6904 * bus/connection.c (bus_connections_unref): fix to free the
6906 (bus_connections_setup_connection): if this fails, don't
6907 disconnect the connection, just be sure there are no side
6910 * dbus/dbus-string.c (undo_alignment): unbreak this
6912 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
6914 (_dbus_auth_new): fix the order in which we free strings
6917 * bus/connection.c (bus_connection_disconnected): fix to
6918 not send ServiceDeleted multiple times in case of memory
6921 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
6922 get the base service name
6923 (dbus_bus_register_client): don't return base service name,
6924 instead store it on the DBusConnection and have an accessor
6926 (dbus_bus_register_client): rename dbus_bus_register()
6928 * bus/dispatch.c (check_hello_message): verify that other
6929 connections on the bus also got the correct results, not
6930 just the one sending hello
6932 2003-03-15 Havoc Pennington <hp@pobox.com>
6934 Make it pass the Hello handling test including all OOM codepaths.
6935 Now to do other messages...
6937 * bus/services.c (bus_service_remove_owner): fix crash when
6938 removing owner from an empty list of owners
6939 (bus_registry_ensure): don't leave service in the list of
6940 a connection's owned services if we fail to put the service
6943 * bus/connection.c (bus_connection_preallocate_oom_error): set
6944 error flag on the OOM error.
6946 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6947 handle _dbus_transport_set_connection failure
6949 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
6950 to create watches up front and simply enable/disable them as
6952 (unix_connection_set): this can now fail on OOM
6954 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
6955 of enabling/disabling a watch or timeout.
6957 * bus/loop.c (bus_loop_iterate): don't touch disabled
6960 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
6962 2003-03-15 Havoc Pennington <hp@pobox.com>
6964 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
6965 write useful test code, after all that futzing around ;-)
6967 Test does not yet pass because we can't handle OOM in
6968 _dbus_transport_messages_pending (basically,
6969 dbus_connection_preallocate_send() does not prealloc the write
6970 watch). To fix this, I think we need to add new stuff to
6971 set_watch_functions, namely a SetEnabled function so we can alloc
6972 the watch earlier, then enable it later.
6974 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
6975 dbus-memory.c to the convenience lib
6977 * bus/test.c: rename some static functions to keep them clearly
6978 distinct from stuff in connection.c. Handle client disconnection.
6980 2003-03-14 Havoc Pennington <hp@pobox.com>
6982 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
6983 transport, tests more of the real codepath. Set up clients
6984 with bus_setup_debug_client.
6986 * bus/test.c (bus_setup_debug_client): function to set up debug
6987 "clients" on the main loop
6989 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
6992 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
6995 * dbus/dbus-server-debug.c: support a debug server based on pipes
6997 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
6998 (_dbus_close): new function
7000 * configure.in: check for socketpair
7002 2003-03-14 Havoc Pennington <hp@redhat.com>
7004 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
7007 * dbus/dbus-transport-debug.c: rework this a good bit to be
7008 less complicated. hopefully still works.
7010 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
7013 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
7016 * dbus/dbus-message.c (dbus_message_copy): rename from
7017 dbus_message_new_from_message, fix it up to copy
7018 all the message fields, add test case
7020 * bus/dispatch.c (bus_dispatch_test): add some more test code,
7021 not quite passing yet
7023 2003-03-14 Havoc Pennington <hp@pobox.com>
7025 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
7026 until no work remains" in test code. (the large diff here
7027 is just code movement, no actual changes)
7029 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
7030 1, no point waiting around for test code.
7031 (_dbus_server_debug_accept_transport): unref the timeout
7032 after adding it (right?)
7034 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
7036 2003-03-13 Havoc Pennington <hp@redhat.com>
7038 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
7041 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
7044 * dbus/dbus-connection.h: Make AddWatchFunction and
7045 AddTimeoutFunction return a bool so they can fail on out-of-memory
7047 * bus/bus.c (bus_context_new): set up timeout handlers
7049 * bus/connection.c (bus_connections_setup_connection): set up
7052 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
7055 * bus/bus.c (bus_context_new): adapt to changes
7057 * bus/connection.c: adapt to changes
7059 * test/watch.c: adapt to DBusWatch changes
7061 * bus/dispatch.c (bus_dispatch_test): started adding this but
7064 2003-03-14 Anders Carlsson <andersca@codefactory.se>
7066 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
7068 2003-03-13 Havoc Pennington <hp@pobox.com>
7070 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
7071 set up a test framework as for the library
7073 2003-03-12 Havoc Pennington <hp@pobox.com>
7075 Throughout: purge global variables, introduce BusActivation,
7076 BusConnections, BusRegistry, etc. objects instead.
7078 * bus/bus.h, bus/bus.c: introduce BusContext as a global
7081 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
7082 going to redo this a bit differently I think
7084 2003-03-12 Havoc Pennington <hp@redhat.com>
7086 Mega-patch that gets the message bus daemon initially handling
7087 out-of-memory. Work still needed. Also lots of random
7088 moving stuff to DBusError instead of ResultCode.
7090 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
7092 * dbus/dbus-connection.c
7093 (dbus_connection_send_with_reply_and_block): use DBusError
7095 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
7098 * dbus/dbus-connection.c (dbus_connection_send): drop the result
7099 code here, as the only failure possible is OOM.
7101 * bus/connection.c (bus_connection_disconnect):
7102 rename bus_connection_disconnected as it's a notification only
7104 * bus/driver.c (bus_driver_handle_acquire_service): don't free
7105 "name" on get_args failure, should be done by get_args;
7106 don't disconnect client for bad args, just return an error.
7107 (bus_driver_handle_service_exists): ditto
7109 * bus/services.c (bus_services_list): NULL-terminate returned array
7111 * bus/driver.c (bus_driver_send_service_lost)
7112 (bus_driver_send_service_acquired): send messages from driver to a
7113 specific client to the client's unique name, not to the broadcast
7116 * dbus/dbus-message.c (decode_header_data): reject messages that
7117 contain no name field
7118 (_dbus_message_get_client_serial): rename to
7119 dbus_message_get_serial and make public
7120 (_dbus_message_set_serial): rename from set_client_serial
7121 (_dbus_message_set_reply_serial): make public
7122 (_dbus_message_get_reply_serial): make public
7124 * bus/connection.c (bus_connection_foreach): allow stopping
7125 iteration by returning FALSE from foreach function.
7127 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
7128 (dbus_connection_free_preallocated_send)
7129 (dbus_connection_preallocate_send): new API for sending a message
7130 without possibility of malloc failure.
7131 (dbus_connection_send_message): rename to just
7132 dbus_connection_send (and same for whole function family)
7134 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
7136 * dbus/dbus-sysdeps.c (_dbus_exit): new function
7138 * bus/activation.c: handle/return errors
7140 * dbus/dbus-errors.h: add more DBUS_ERROR #define
7142 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
7143 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
7144 (_dbus_result_from_errno): move to this file
7146 2003-03-10 Anders Carlsson <andersca@codefactory.se>
7148 * dbus/dbus-marshal.c:
7149 (_dbus_marshal_set_string):
7150 Take a length argument so we can marshal the correct string
7153 (_dbus_marshal_dict), (_dbus_demarshal_dict),
7154 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
7155 (_dbus_marshal_test):
7156 * dbus/dbus-marshal.h:
7157 Add support for marshalling and demarshalling dicts.
7159 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7160 Add support for TYPE DICT.
7162 * dbus/dbus-message.c: (set_string_field):
7163 Adjust header padding.
7165 (dbus_message_append_args_valist), (dbus_message_append_dict),
7166 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
7167 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
7168 (check_message_handling), (check_have_valid_message):
7169 * dbus/dbus-message.h:
7170 Add functions for setting and getting dicts.
7172 * dbus/dbus-protocol.h:
7178 * doc/dbus-specification.sgml:
7179 Add information about how dicts are marshalled.
7181 * test/data/invalid-messages/dict-with-nil-value.message:
7182 * test/data/invalid-messages/too-short-dict.message:
7183 * test/data/valid-messages/dict-simple.message:
7184 * test/data/valid-messages/dict.message:
7185 Add sample messages containing dicts.
7187 2003-03-08 Anders Carlsson <andersca@codefactory.se>
7189 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
7191 2003-03-07 Anders Carlsson <andersca@codefactory.se>
7194 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
7195 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
7196 (dbus_dict_set_int32), (dbus_dict_set_uint32),
7197 (dbus_dict_set_double), (dbus_dict_set_string),
7198 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
7199 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
7200 (dbus_dict_set_string_array), (_dbus_dict_test):
7202 Fix according to comments from Havoc.
7204 2003-03-06 Michael Meeks <michael@server.home>
7206 * configure.in: if we don't have kde-config, disable have_qt.
7208 2003-03-07 Anders Carlsson <andersca@codefactory.se>
7213 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
7214 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
7215 (dbus_dict_remove), (dbus_dict_get_value_type),
7216 (dbus_dict_get_keys), (dbus_dict_put_boolean),
7217 (dbus_dict_put_int32), (dbus_dict_put_uint32),
7218 (dbus_dict_put_double), (dbus_dict_put_string),
7219 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
7220 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
7221 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
7222 (dbus_dict_get_int32), (dbus_dict_get_uint32),
7223 (dbus_dict_get_double), (dbus_dict_get_string),
7224 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
7225 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
7226 (dbus_dict_get_string_array), (_dbus_dict_test):
7228 Add DBusDict implementation
7230 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
7234 2003-03-04 Havoc Pennington <hp@pobox.com>
7236 * test/data/auth/*: adapt to changes
7238 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
7239 USERID_BASE64 and change USERNAME_BASE64 to put in username not
7242 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
7243 more stuff from being in a context name, to make the protocol
7244 simpler to deal with
7246 * dbus/dbus-errors.c (dbus_error_has_name): new function
7247 (dbus_error_is_set): new function
7249 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
7250 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
7252 * dbus/dbus-connection.c (dbus_connection_flush): also read
7253 messages during a flush operation
7255 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
7257 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7259 * configure.in: Check for gethostbyname on Solaris.
7261 * dbus/dbus-transport.c: (_dbus_transport_open):
7262 Remove duplicate "tcp" entry.
7264 * doc/dbus-specification.sgml:
7265 Clarify some things.
7267 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7269 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
7270 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
7271 (_dbus_keyring_test):
7272 * dbus/dbus-md5.c: (_dbus_md5_compute):
7273 * dbus/dbus-sha.c: (_dbus_sha_compute):
7276 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7278 * README: Add some things.
7280 2003-03-04 Anders Carlsson <andersca@codefactory.se>
7282 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
7283 after case DBUS_TYPE_BOOELAN.
7285 2003-03-02 Havoc Pennington <hp@pobox.com>
7287 * test/break-loader.c (randomly_set_extreme_ints): add test that
7288 sets really huge and small integers
7290 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
7291 that length of boolean array fits in the string, and that
7292 string has room for boolean value in single-bool case.
7294 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
7295 optional value to "ALIGN" command which is what to fill the
7298 * test/data/valid-messages/no-padding.message: add regression
7299 test for the message padding problem
7301 2003-03-02 Havoc Pennington <hp@pobox.com>
7303 * dbus/dbus-message.c (decode_header_data): fix to always init
7304 message_padding, from Benjamin Dauvergne
7306 2003-03-02 Havoc Pennington <hp@pobox.com>
7312 2003-03-01 Joe Shaw <joe@assbarn.com>
7314 * configure.in: Check for "struct cmsgcred" and try to access its
7315 members for BSD-like unices.
7317 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
7318 _dbus_read_credentials_unix_socket().
7319 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
7320 read() for reading the credential byte off the unix socket. Use
7321 struct cmsgcred on systems that support it.
7323 2003-02-27 Alexander Larsson <alexl@redhat.com>
7327 Make gthreads-2.0 dependency optional. Don't build thread test if
7330 2003-02-27 Havoc Pennington <hp@pobox.com>
7332 * dbus/dbus-connection.c
7333 (dbus_connection_send_message_with_reply_and_block): fix doh!
7334 doh! doh! bug that resulted in never removing a reply from the
7335 queue, no wonder we called get_reply_serial so much ;-)
7337 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
7338 and client serial instead of demarshaling them every time
7340 2003-02-27 Havoc Pennington <hp@pobox.com>
7342 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
7343 more inlined, using dbus-string-private.h, speeds things up
7346 * dbus/dbus-string.c (_dbus_string_free): apply align offset
7347 when freeing the string
7348 (_dbus_string_steal_data): fix for align offset
7349 (undo_alignment): new function
7351 2003-02-26 Havoc Pennington <hp@redhat.com>
7353 All kinds of audit fixes from Owen, plus initial attempt to
7354 handle unaligned memory returned from malloc.
7356 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
7357 leave room for align_offset and nul byte
7358 (fixup_alignment): function to track an align_offset and
7359 ensure real->str is aligned
7360 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
7361 to allow a nul byte plus align offset
7362 (_dbus_string_lock): fix overflow issue
7363 (_dbus_string_init_const_len): add assertions on sanity of len,
7364 assign allocated to be ALLOCATION_PADDING larger than len
7365 (set_length): fixup the overflow handling
7366 (_dbus_string_get_data_len): fix overflow in assertion
7367 (open_gap): detect overflow in size of gap to be opened
7368 (_dbus_string_lengthen): add overflow check
7369 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
7370 (_dbus_string_append): add overflow check
7371 (_dbus_string_append_unichar): overflow
7372 (_dbus_string_delete): fix overflow in assertion
7373 (_dbus_string_copy_len): overflow in assertion
7374 (_dbus_string_replace_len): overflows in assertions
7375 (_dbus_string_find): change to implement in terms of
7376 _dbus_string_find_to
7377 (_dbus_string_find_to): assorted fixage
7378 (_dbus_string_equal_c_str): assert c_str != NULL,
7379 fix logic so the function works
7380 (_dbus_string_ends_with_c_str): fix overflow thingy
7381 (_dbus_string_base64_encode): overflow fix
7382 (_dbus_string_validate_ascii): overflow
7383 (_dbus_string_validate_nul): overflow
7385 2003-02-26 Havoc Pennington <hp@redhat.com>
7387 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
7389 2003-02-26 Alexander Larsson <alexl@redhat.com>
7392 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
7394 * dbus/dbus-connection.c:
7395 * dbus/dbus-connection.h:
7396 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
7397 Add dbus_connection_set_wakeup_main_function and use it when queueing
7398 incoming and outgoing messages.
7401 * dbus/dbus-dataslot.c:
7402 Threadsafe usage of DBusDataSlotAllocator
7404 * dbus/dbus-message.c: (dbus_message_get_args_iter):
7407 * dbus/dbus-server-unix.c:
7410 * glib/dbus-gmain.c:
7411 Implement the new wakeup functions for glib.
7414 * glib/test-thread-client.c:
7415 * glib/test-thread-server.c:
7416 * glib/test-thread.h:
7417 Initial cut at some thread test code. Not really done yet.
7419 2003-02-26 Havoc Pennington <hp@pobox.com>
7421 * dbus/dbus-connection.c
7422 (dbus_connection_send_message_with_reply_and_block): fix crash
7423 where we ref'd the outgoing message instead of the returned reply
7425 * dbus/dbus-transport-unix.c (do_authentication): check read watch
7426 at the end of this function, so if we didn't need to read for
7427 authentication, we reinstall it for receiving messages
7429 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
7430 a NULL sender for peer-to-peer case
7432 * dbus/dbus-transport-unix.c (check_read_watch): handle
7433 !authenticated case correctly
7435 * glib/dbus-gmain.c: add support for DBusServer
7437 * dbus/dbus-server.c: add data slot support
7439 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
7440 return values and handle errors
7442 * dbus/dbus-dataslot.c: factor out the data slot stuff from
7445 * Doxyfile.in (INPUT): add glib subdir
7447 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
7448 setup_with_g_main instead of hookup_with_g_main; write docs
7450 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7452 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
7453 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7454 * dbus/dbus-message.c: (dbus_message_append_boolean),
7455 (dbus_message_append_boolean_array),
7456 (dbus_message_get_args_valist), (_dbus_message_test):
7457 * dbus/dbus-message.h:
7458 * doc/dbus-specification.sgml:
7459 Various fixes as pointed out by Havoc.
7461 * test/data/invalid-messages/bad-boolean-array.message:
7462 * test/data/invalid-messages/bad-boolean.message:
7463 Add invalid boolean value test cases.
7465 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7467 * dbus/dbus-internals.c: (_dbus_type_to_string):
7468 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7469 (_dbus_marshal_validate_arg):
7470 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7471 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7472 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
7473 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
7474 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
7475 (dbus_message_iter_get_double),
7476 (dbus_message_iter_get_boolean_array), (message_iter_test):
7477 * dbus/dbus-message.h:
7478 * dbus/dbus-protocol.h:
7479 * doc/dbus-specification.sgml:
7480 * test/data/valid-messages/lots-of-arguments.message:
7481 Add support for boolean and boolean array types.
7483 2003-02-23 Havoc Pennington <hp@pobox.com>
7485 * dbus/dbus-keyring.c: finish most of this implementation and
7488 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7489 these barf if the error isn't cleared to NULL
7491 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
7492 (_dbus_create_directory): new function
7494 * dbus/dbus-errors.c (dbus_set_error): fix warning
7496 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
7497 (_dbus_string_hex_decode): new function
7498 (test_hex_roundtrip): test code
7500 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
7502 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
7504 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
7505 the save-to-temp/rename trick to atomically write the new file
7506 (_dbus_string_parse_uint): new function
7508 2003-02-22 Havoc Pennington <hp@pobox.com>
7510 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
7512 2003-02-22 Havoc Pennington <hp@pobox.com>
7514 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
7515 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
7517 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7519 * dbus/test/data/sha-1: add US government test suite for SHA-1
7521 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7523 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7524 Make string arrays NULL-terminated.
7526 * dbus/dbus-memory.c: (dbus_free_string_array):
7527 * dbus/dbus-memory.h:
7528 New function for freeing NULL-terminated string arrays.
7530 * dbus/dbus-message-builder.c: (append_quoted_string),
7531 (_dbus_message_data_load):
7532 Add support for array types.
7534 * dbus/dbus-message.c: (check_message_handling):
7535 Add more types as test cases.
7537 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
7538 (_dbus_string_parse_double):
7539 Add the start offset to the end offset.
7541 * test/data/valid-messages/lots-of-arguments.message:
7542 New test message with lots of arguments.
7544 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7546 * dbus/dbus-message.c: (dbus_message_append_nil),
7547 (dbus_message_append_int32), (dbus_message_append_uint32),
7548 (dbus_message_append_double), (dbus_message_append_string),
7549 (dbus_message_append_int32_array),
7550 (dbus_message_append_uint32_array),
7551 (dbus_message_append_double_array),
7552 (dbus_message_append_byte_array),
7553 (dbus_message_append_string_array):
7554 Fix all out-of-memory handling in these functions.
7556 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7558 * dbus/dbus-message.c: (dbus_message_append_nil):
7561 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7563 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7564 (dbus_message_append_nil), (dbus_message_append_int32_array),
7565 (dbus_message_append_uint32_array),
7566 (dbus_message_append_double_array),
7567 (dbus_message_append_byte_array),
7568 (dbus_message_append_string_array), (dbus_message_get_args_valist),
7569 (dbus_message_iter_get_int32_array),
7570 (dbus_message_iter_get_uint32_array),
7571 (dbus_message_iter_get_double_array),
7572 (dbus_message_iter_get_byte_array),
7573 (dbus_message_iter_get_string_array):
7575 * dbus/dbus-message.h:
7576 Add functions for appending and getting arrays.
7578 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7580 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
7581 element size at least 8 bytes, fixes mempool tests on
7584 2003-02-20 Alexander Larsson <alexl@redhat.com>
7586 * dbus/dbus-transport-unix.c (unix_do_iteration):
7587 Unlock the connection mutex during a blocking select call.
7588 Add todo about how we need a way to wake up the select.
7590 * dbus/dbus-connection-internal.h:
7591 * dbus/dbus-connection.c:
7592 Add _dbus_connection_lock and _dbus_connection_unlock.
7594 2003-02-19 Havoc Pennington <hp@pobox.com>
7596 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
7597 Doxyfile.in, not Doxyfile
7599 * dbus/dbus-keyring.c: do some hacking on this
7601 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
7603 * dbus/dbus-errors.c (dbus_set_error_const): do not call
7605 (dbus_set_error): remove dbus_error_init, check for message ==
7606 NULL *before* we sprintf into it, and add @todo about including
7607 system headers in this file
7609 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
7611 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
7613 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
7614 get various bits of user information based on either username
7616 (_dbus_homedir_from_username): new function
7618 2003-02-19 Anders Carlsson <andersca@codefactory.se>
7621 Add check for nonposix getpwnam_r
7623 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
7624 Align the pool element size to a sizeof (void *) boundary.
7626 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
7627 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
7628 General Solaris fixes.
7630 * test/data/valid-messages/simplest-manual.message:
7631 Explicitly state that we want little-endian packing.
7633 2003-02-19 Mikael Hallendal <micke@codefactory.se>
7635 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7637 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
7638 Added to create a transport connecting using a tcp/ip socket.
7640 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
7641 to a tcp socket at given host and port.
7642 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
7645 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7647 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
7648 Added to create a server listening on a TCP/IP socket.
7650 2003-02-19 Havoc Pennington <hp@pobox.com>
7652 Throughout: mop up all the Doxygen warnings and undocumented
7655 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
7656 to search any paths.
7658 * dbus/dbus-threads.c: move global mutex initializers to
7659 dbus-internals.h, multiple prototypes was confusing doxygen
7660 besides being kind of ugly
7662 * Doxyfile (PREDEFINED): have Doxygen define
7663 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
7664 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
7665 (do not abuse the feature! it's for stuff like the autogenerated
7666 macros in dbus-md5.c, not just for things you don't feel like
7669 2003-02-18 Havoc Pennington <hp@pobox.com>
7671 * dbus/dbus-string.c (_dbus_string_zero): new function
7673 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
7674 wrap it in some dbus-friendly API
7676 * dbus/dbus-types.h: add 16-bit types
7678 2003-02-18 Joe Shaw <joe@assbarn.com>
7680 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
7681 credentials from our currently running process.
7682 (get_word): Fix a buglet where we were copying the entire length
7683 instead of relative to our position.
7685 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
7686 keys on the stack... it's 640k of data.
7688 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
7689 read the credentials byte off the socket, even if we don't have
7691 (_dbus_poll): Implement poll() using select() for systems which
7694 * glib/test-dbus-glib.c (main): Print out an error if no
7695 parameters are given.
7697 * test/data/auth/fallback.auth-script: Added. Tests that a client
7698 can fallback to a secondary auth mechanism if the first fails.
7700 2003-02-18 Havoc Pennington <hp@pobox.com>
7704 2003-02-17 Havoc Pennington <hp@pobox.com>
7706 * doc/dbus-specification.sgml: lots of cosmetic
7707 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
7708 env variable to DBUS_BUS_ADDRESS, s/client/application/,
7709 s/server/bus/ (except in authentication section). Add a section
7710 "Message Bus Message Routing"
7712 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
7718 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7720 * doc/dbus-specification.sgml:
7721 Specification updates.
7723 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7725 * bus/activation.c: (bus_activation_init), (child_setup),
7726 (bus_activation_activate_service):
7728 * bus/main.c: (main):
7729 Set DBUS_ADDRESS environment variable.
7731 * dbus/dbus-errors.c: (dbus_set_error):
7732 Don't use va_copy since that's a C99 feature.
7734 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
7735 (_dbus_spawn_async):
7736 * dbus/dbus-sysdeps.h:
7737 Add child_setup_func to _dbus_spawn_async.
7739 * doc/dbus-specification.sgml:
7740 Update specification.
7742 * test/spawn-test.c: (setup_func), (main):
7745 2003-02-17 Alexander Larsson <alexl@redhat.com>
7747 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
7750 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7754 * doc/dbus-test-plan.sgml:
7755 Add test plan document.
7760 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7762 * dbus/dbus-message.c: (decode_header_data),
7763 (_dbus_message_loader_return_buffer):
7764 Set the header padding amount when loading a message.
7766 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7768 * bus/dispatch.c: (send_one_message):
7769 Only send broadcast messages to registered connections.
7771 * dbus/dbus-message.c: (dbus_message_name_is):
7772 * dbus/dbus-message.h:
7773 New convenience function.
7775 * dbus/dbus-transport-debug.c: (do_reading):
7776 Only dispatch one message per run.
7779 * test/bus-test.c: (new_connection_callback), (die),
7780 (test_hello_client1_handler), (test_hello_client2_handler),
7781 (test_hello_replies), (main):
7783 * test/bus-test-loop.[ch]:
7786 2003-02-16 Havoc Pennington <hp@pobox.com>
7788 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7789 backward conditional
7791 2003-02-16 Alexander Larsson <alexl@redhat.com>
7793 * dbus/dbus-connection.c:
7794 Implement sent_message_with_reply. (with_reply_and block is still
7796 Made dispatch_message not lose message if OOM.
7798 * dbus/dbus-errors.h:
7799 Add NoReply error (for reply timeouts).
7801 2003-02-16 Alexander Larsson <alexl@redhat.com>
7803 * dbus/dbus-hash.c (_dbus_hash_table_unref):
7804 Actually free keys and values when destroying hashtable.
7806 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7808 * dbus/dbus-auth.c: (client_try_next_mechanism):
7811 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
7812 Return TRUE if there's no thread implementation around.
7814 * glib/dbus-gmain.c: (free_source),
7815 (dbus_connection_hookup_with_g_main):
7816 Make sure to remove the GSource when the connection is finalized.
7818 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7820 * bus/dispatch.c: (bus_dispatch_message_handler):
7821 * dbus/dbus-errors.h:
7822 Return an error if someone tries to send a message to a service
7825 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7827 * bus/activation.c: (load_directory), (bus_activation_init),
7828 (bus_activation_activate_service):
7831 (bus_driver_handle_activate_service), (bus_driver_handle_message):
7832 More work on the activation handling.
7834 * dbus/dbus-errors.h:
7835 Add some error messages
7837 * dbus/dbus-message.c: (dbus_message_new_error_reply):
7838 * dbus/dbus-message.h:
7839 New function that creates an error message.
7841 * dbus/dbus-protocol.h:
7842 Add ACTIVATE_SERVER message.
7844 * dbus/dbus-server-unix.c: (unix_handle_watch),
7845 (_dbus_server_new_for_domain_socket):
7846 Call _dbus_fd_set_close_on_exec.
7848 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
7849 (_dbus_spawn_async), (_dbus_disable_sigpipe),
7850 (_dbus_fd_set_close_on_exec):
7851 * dbus/dbus-sysdeps.h:
7852 Add _dbus_fd_set_close_on exec function. Also add function that checks
7853 that all open fds are set to close-on-exec and warns otherwise.
7855 * dbus/dbus-transport-unix.c:
7856 (_dbus_transport_new_for_domain_socket):
7857 Call _dbus_fd_set_close_on_exec.
7859 2003-02-16 Havoc Pennington <hp@pobox.com>
7861 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
7862 allow people to avoid setting SIGPIPE to SIG_IGN
7863 (_dbus_connection_new_for_transport): disable SIGPIPE unless
7864 we've been asked not to
7866 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7868 * dbus/dbus-list.c: (_dbus_list_append_link),
7869 (_dbus_list_prepend_link):
7870 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
7874 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7877 * bus/activation.c: (bus_activation_entry_free),
7878 (add_desktop_file_entry), (load_directory), (bus_activation_init):
7880 * bus/main.c: (main):
7881 Add simple activation support, doesn't work yet though.
7883 2003-02-15 Zack Rusin <zack@kde.org>
7885 * qt/dbus-qthread.cpp: small casting fix
7887 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7889 * dbus/dbus-errors.c: (dbus_set_error):
7890 * dbus/dbus-errors.h:
7891 Add a few errors and make dbus_set_error void.
7893 * dbus/dbus-sysdeps.c:
7894 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
7895 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
7896 * dbus/dbus-sysdeps.h:
7897 Add _dbus_spawn_async.
7899 * test/spawn-test.c: (main):
7900 Test for _dbus_spawn_async.
7902 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7904 * dbus/dbus-internals.h:
7905 Fix build without tests.
7907 * dbus/dbus-list.c: (alloc_link):
7908 Fix a segfault when a malloc fails.
7910 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
7911 (dbus_malloc0), (dbus_realloc):
7912 Add support for malloc debugging.
7914 2003-02-15 Alexander Larsson <alexl@redhat.com>
7916 * dbus/dbus-threads.c:
7917 * dbus/dbus-threads.h:
7918 Add condvars. Remove static mutext from API.
7919 Implement static mutexes by initializing them from threads_init.
7921 * glib/dbus-gthread.c:
7922 * qt/dbus-qthread.cpp:
7923 Update with the thread api changes.
7928 Turn StaticMutex into normal mutex + init function.
7929 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
7930 _dbus_list_append_link, _dbus_list_prepend_link
7933 * dbus/dbus-sysdeps.c:
7934 * dbus/dbus-sysdeps.h:
7935 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
7936 _dbus_atomic_dec. Only slow fallback implementation at the moment.
7938 * dbus/dbus-protocol.h:
7939 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
7941 * dbus/dbus-message.c:
7942 Make ref/unref atomic.
7945 * dbus/dbus-connection-internal.h:
7946 * dbus/dbus-connection.c:
7947 * dbus/dbus-connection.h:
7949 Change _peek to _borrow,_return & _steal_borrowed.
7950 Change disconnect callback to event.
7951 Make dbus_connection_dispatch_messages reentrant.
7953 * dbus/dbus-transport.c:
7954 Don't ref the connection on calls to the transport
7957 * dbus/dbus-message-handler.c:
7960 * glib/dbus-gmain.c:
7961 Don't use peek_message anymore
7964 * test/debug-thread.c:
7965 * test/debug-thread.h:
7966 Simple thread implementation that asserts() on deadlocks in
7967 single-threaded code.
7970 (main) Call debug_threads_init.
7973 Use disconnect message instead of disconnect callback.
7977 Don't call dbus_connection_set_disconnect_function. Instead export
7978 bus_connection_disconnect.
7981 Call bus_connection_disconnect when we get a disconnected message.
7983 2003-02-15 Havoc Pennington <hp@pobox.com>
7985 * dbus/dbus-message.c (dbus_message_new): fool around with the
7988 2003-02-14 Havoc Pennington <hp@pobox.com>
7990 * dbus/dbus-mempool.c: fail if the debug functions so indicate
7992 * dbus/dbus-memory.c: fail if the debug functions indicate we
7995 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
7996 (_dbus_decrement_fail_alloc_counter): debug functions to
7997 simulate memory allocation failures
7999 2003-02-14 Havoc Pennington <hp@pobox.com>
8001 * dbus/dbus-errors.h (struct DBusError): add a word of padding
8004 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8006 * bus/driver.c: (bus_driver_handle_hello):
8008 * bus/services.c: (bus_service_lookup):
8009 Reorder message sending so we get a more sane order.
8011 * test/bus-test.c: (message_handler):
8014 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8016 * bus/driver.c: (bus_driver_send_service_deleted),
8017 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8018 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
8019 (bus_driver_send_welcome_message),
8020 (bus_driver_handle_list_services),
8021 (bus_driver_handle_acquire_service),
8022 (bus_driver_handle_service_exists):
8023 * dbus/dbus-bus.c: (dbus_bus_register_client),
8024 (dbus_bus_acquire_service), (dbus_bus_service_exists):
8025 * dbus/dbus-errors.c: (dbus_result_to_string):
8026 * dbus/dbus-errors.h:
8027 * dbus/dbus-message.c: (dbus_message_append_args),
8028 (dbus_message_append_args_valist), (dbus_message_get_args),
8029 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
8030 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
8031 (dbus_message_iter_get_byte_array),
8032 (dbus_message_iter_get_string_array), (message_iter_test),
8033 (check_message_handling), (_dbus_message_test):
8034 * dbus/dbus-message.h:
8035 * test/bus-test.c: (main):
8036 Change fields to arguments in messages, so that they won't be
8037 confused with header fields.
8039 * glib/test-dbus-glib.c: (main):
8040 Remove append_fields from hello message.
8042 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8044 * dbus/dbus-errors.c:
8045 * dbus/dbus-message.c:
8046 * dbus/dbus-string.c:
8047 Documentation fixes.
8049 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8051 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
8053 Implement support for timeouts in dbus-glib.
8055 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8057 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8058 * dbus/dbus-message.c: (process_test_subdir):
8059 * test/break-loader.c: (find_breaks_based_on):
8060 Plug some memory leaks.
8062 2003-02-13 Richard Hult <rhult@codefactory.se>
8064 * bus/main.c: Fix build.
8066 * dbus/dbus-errors.h:
8067 * dbus/dbus-errors.c: Fix copyright for Anders.
8069 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8074 * bus/connection.c: (bus_connection_foreach):
8077 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
8078 (unescape_string), (new_section), (parse_section_start),
8079 (parse_key_value), (report_error), (bus_desktop_file_load),
8080 (bus_desktop_file_get_string):
8081 * bus/desktop-file.h:
8082 Use DBusError for error reporting.
8084 * bus/dispatch.c: (send_one_message),
8085 (bus_dispatch_message_handler):
8086 * bus/driver.c: (bus_driver_send_service_deleted),
8087 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8088 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
8089 (bus_driver_send_welcome_message),
8090 (bus_driver_handle_list_services),
8091 (bus_driver_handle_acquire_service),
8092 (bus_driver_handle_service_exists):
8093 * bus/loop.c: (bus_loop_run):
8095 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
8097 * bus/utils.c: (bus_wait_for_memory):
8099 New files with general utility functions.
8101 * dbus/dbus-internals.h:
8102 Remove _DBUS_HANDLE_OOM.
8104 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8106 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
8107 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
8108 * dbus/dbus-errors.h:
8109 Add DBusError structure.
8111 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8113 * test/data/valid-messages/standard-acquire-service.message:
8114 * test/data/valid-messages/standard-hello.message:
8115 * test/data/valid-messages/standard-list-services.message:
8116 * test/data/valid-messages/standard-service-exists.message:
8117 Add some standard messages.
8119 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8121 * bus/driver.c: (bus_driver_send_welcome_message),
8122 (bus_driver_handle_list_services),
8123 (bus_driver_handle_acquire_service),
8124 (bus_driver_handle_service_exists), (bus_driver_handle_message):
8125 Update for API changes in libdbus.
8127 * dbus/dbus-message.c: (dbus_message_new_reply):
8128 * dbus/dbus-message.h:
8129 Remove the name argument. The spec states that replies shouldn't
8132 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8134 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
8135 (report_error), (bus_desktop_file_load), (lookup_section),
8136 (lookup_line), (bus_desktop_file_get_raw),
8137 (bus_desktop_file_get_string):
8138 * bus/desktop-file.h:
8139 Some fixes, and new functions for getting a key value from a section.
8141 2003-02-13 Havoc Pennington <hp@pobox.com>
8143 * test/data/auth/fail-after-n-attempts.auth-script: new test
8145 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
8148 2003-02-13 Havoc Pennington <hp@pobox.com>
8150 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
8151 dbus_credentials_match were backward
8153 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
8154 NO_CREDENTIALS and ROOT_CREDENTIALS
8156 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
8157 into here. Never process more commands after we've reached an
8158 end state; store further data as unused bytes.
8160 * test/data/auth/*: add more auth tests
8162 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
8163 command to match exact string and EXPECT_UNUSED to match unused
8166 * test/Makefile.am (dist-hook): fix to dist all the test stuff
8168 2003-02-12 Havoc Pennington <hp@pobox.com>
8170 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
8171 \r off of popped lines
8173 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
8176 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
8179 2003-02-12 Havoc Pennington <hp@pobox.com>
8181 * dbus/Makefile.am: remove break-loader from the build, since it
8184 * configure.in: add --enable-gcov to turn on coverage profiling
8185 flags and disable optimization
8187 2003-02-10 Havoc Pennington <hp@pobox.com>
8189 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
8190 initial cut at test framework for DBusAuth from laptop.
8191 Doesn't quite work yet but it compiles and I need to get
8192 it off the 266mhz laptop. ;-)
8194 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
8195 fix a memleak in error case
8197 2003-02-12 Anders Carlsson <andersca@codefactory.se>
8200 * bus/desktop-file.c:
8201 * bus/desktop-file.h:
8202 Add a desktop file parser.
8204 2003-02-11 Zack Rusin <zack@kde.org>
8206 * qt/message.[h|cpp]: sample implementation
8207 of the KDE wrapper for DBusMessage
8209 2003-02-09 Zack Rusin <zack@kde.org>
8211 * test/bus-test.c: make_it_compile
8212 * doc/dbus-specification.sgml: minimal semantic fix
8214 2003-02-06 Anders Carlsson <andersca@codefactory.se>
8220 2003-02-06 Anders Carlsson <andersca@codefactory.se>
8223 * dbus/dbus-break-loader.c:
8225 * test/break-loader.c:
8226 Move dbus-break-loader to test/ and rename it to break-loader.
8228 2003-02-02 Havoc Pennington <hp@pobox.com>
8230 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
8231 for code to manage cookies in your home directory
8233 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
8235 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
8236 to authenticate, then disconnect the client.
8238 2003-02-03 Alexander Larsson <alexl@redhat.com>
8240 * dbus/dbus-message.c (dbus_message_append_fields):
8243 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8245 * doc/dbus-specification.sgml:
8246 Update address format section.
8248 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8251 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
8252 (message_handler), (new_connection_callback), (loop_quit),
8256 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8258 * bus/driver.c: (bus_driver_handle_service_exists):
8259 Simplify the code a bit.
8261 * dbus/dbus-bus.c: (dbus_bus_service_exists):
8264 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8267 Add libdbus-daemon.la and link to it.
8269 2003-02-01 James Willcox <jwillcox@gnome.org>
8271 * bus/driver.c: (bus_driver_handle_own_service):
8272 Actually include the service reply code in the message.
8274 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8276 * bus/driver.c: (bus_driver_handle_service_exists):
8277 Don't unref the incoming message.
8279 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8281 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
8283 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8285 * dbus/dbus-server.c: (dbus_server_listen):
8286 * dbus/dbus-transport.c: (_dbus_transport_open):
8287 ifdef out the calls to the debug transport and server.
8289 2003-02-02 Alexander Larsson <alexl@redhat.com>
8291 * dbus/dbus-watch.c (dbus_watch_get_flags):
8292 Add note in the docs that ERROR or HANGUP won't be returned
8293 and are assumed always on.
8295 * glib/dbus-gmain.c (add_watch):
8296 Always add IO_ERR | IO_HUP
8298 * dbus/dbus-message.h:
8299 Add semicolon after dbus_message_iter_get_string_array().
8300 Makes qt code build again
8302 2003-02-01 Anders Carlsson <andersca@codefactory.se>
8304 * bus/driver.c: (create_unique_client_name),
8305 (bus_driver_handle_hello):
8306 Don't take a name, just use a numeric id to identify
8310 * dbus/dbus-bus.c: (dbus_bus_register_client),
8311 (dbus_bus_acquire_service), (dbus_bus_service_exists):
8313 Add new convenience functions for communicating with the bus.
8315 * dbus/dbus-message.h:
8317 * dbus/dbus-protocol.h:
8320 2003-02-01 Alexander Larsson <alexl@redhat.com>
8322 * dbus/dbus-message.c (dbus_message_append_fields):
8323 Add some more doc comments.
8325 2003-02-01 Havoc Pennington <hp@pobox.com>
8327 * dbus/dbus-break-loader.c (randomly_modify_length): change
8328 a 4-byte value in the message as if it were a length
8330 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
8331 execute bit on saved files
8333 2003-02-01 Havoc Pennington <hp@pobox.com>
8335 * dbus/dbus-break-loader.c (main): new program to find messages
8336 that break the loader.
8338 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
8339 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
8341 * dbus/dbus-string.c (_dbus_string_set_byte): new
8343 2003-01-31 Havoc Pennington <hp@pobox.com>
8345 * dbus/dbus-message.c: refactor the test code to be more general,
8346 in preparation for writing a "randomly permute test cases to
8347 try to break the loader" program.
8349 2003-01-31 Havoc Pennington <hp@pobox.com>
8351 * doc/dbus-specification.sgml: work on the specification
8353 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
8354 the protocol version of the message.
8356 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
8357 no longer specifies that.
8358 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
8361 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
8362 "break" for DBUS_TYPE_NIL, remove @todo
8364 2003-01-31 Havoc Pennington <hp@pobox.com>
8366 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
8367 just set_is_error/get_is_error as this is a commonly-used
8368 function, and write docs.
8370 2003-01-31 Anders Carlsson <andersca@codefactory.se>
8372 * dbus/dbus-address.c: (dbus_address_entry_free):
8373 Free key and value lists.
8375 * dbus/dbus-internals.c: (_dbus_type_to_string):
8376 Add the types we didn't have.
8378 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
8379 (_dbus_marshal_validate_arg):
8382 * dbus/dbus-message.c: (dbus_message_set_sender):
8383 Remove todo about being able to set sender to NULL.
8385 (dbus_message_set_is_error_reply),
8386 (dbus_message_get_is_error_reply):
8387 * dbus/dbus-message.h:
8390 * dbus/dbus-protocol.h:
8391 Add error reply flag.
8393 * test/data/valid-messages/opposite-endian.message:
8394 Add NIL type to test.
8396 2003-01-31 Havoc Pennington <hp@pobox.com>
8398 * doc/dbus-specification.sgml: fully specify the header. Add
8399 flags and major protocol version, and change header/body len to
8402 * dbus/dbus-message-builder.c (append_saved_length): append length
8405 * dbus/dbus-message.c (dbus_message_create_header): change header
8406 length and body length to unsigned. Add the new fields from the
8408 (_dbus_message_loader_return_buffer): unsigned header/body len
8410 2003-01-30 Havoc Pennington <hp@pobox.com>
8412 * dbus/dbus-auth.c: rework to use only REJECTED, no
8415 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
8416 use REJECTED, suggested by Mark McLoughlin
8418 2003-01-30 Havoc Pennington <hp@pobox.com>
8420 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
8421 a better way to report errors here. e.g. "unix address lacks
8422 path" or something. also "no such file" when the path doesn't
8425 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
8427 (dbus_parse_address): add @todo about documenting address format,
8428 and allowing , and ; to be escaped
8430 2003-01-30 Anders Carlsson <andersca@codefactory.se>
8433 Add dbus-address.[ch]
8435 * dbus/dbus-address.c: (dbus_address_entry_free),
8436 (dbus_address_entries_free), (create_entry),
8437 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
8438 (dbus_parse_address), (_dbus_address_test):
8439 * dbus/dbus-address.h:
8440 New files for dealing with address parsing.
8442 * dbus/dbus-connection.c:
8443 Document timeout functions.
8445 * dbus/dbus-message.c:
8446 Document dbus_message_new_from_message.
8448 * dbus/dbus-server-debug.c:
8451 * dbus/dbus-server.c: (dbus_server_listen):
8452 Parse address and use correct server implementation.
8454 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
8455 * dbus/dbus-string.h:
8456 New function with test.
8458 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
8462 * dbus/dbus-transport-debug.c:
8465 * dbus/dbus-transport.c: (_dbus_transport_open):
8466 Parse address and use correct transport implementation.
8468 2003-01-30 Havoc Pennington <hp@pobox.com>
8470 * dbus/dbus-message.c: use message->byte_order instead of
8471 DBUS_COMPILER_BYTE_ORDER throughout.
8472 (dbus_message_create_header): pad header to align the
8473 start of the body of the message to 8-byte boundary
8475 * dbus/dbus-marshal.h: make all the demarshalers take const
8476 DBusString arguments.
8478 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
8479 validate message args here, so we don't have to do slow validation
8480 later, and so we catch bad messages as they are incoming. Also add
8481 better checks on header_len and body_len. Also fill in
8484 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
8485 implemented properly)
8486 (_dbus_string_validate_nul): new function to check all-nul
8488 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
8489 get_arg_end_pos and remove all validation
8490 (_dbus_marshal_validate_arg): actually do validation here.
8492 2003-01-29 Havoc Pennington <hp@pobox.com>
8494 * dbus/dbus-message.c (check_message_handling): fix assertion
8495 failure on set_client_serial
8497 2003-01-28 Havoc Pennington <hp@pobox.com>
8499 * dbus/dbus-server-debug.c: Add doc section comments
8501 * dbus/dbus-transport-debug.c: add doc section comments
8503 2003-01-28 Havoc Pennington <hp@redhat.com>
8505 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
8506 the reverse order from how I had it
8507 (_dbus_string_base64_encode): reverse encoding order. I was
8508 basically byteswapping everything during encoding.
8510 2003-01-28 Anders Carlsson <andersca@codefactory.se>
8512 * dbus/dbus-connection-internal.h:
8513 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
8514 (_dbus_connection_remove_timeout):
8515 Add functions for adding and removing timeouts.
8517 * dbus/dbus-message.c: (dbus_message_new_from_message):
8518 Add new function that takes a message and creates an exact
8519 copy of it, but with the refcount set to 1.
8520 (check_message_handling):
8523 * dbus/dbus-server-protected.h:
8524 * dbus/dbus-server.c: (_dbus_server_init_base),
8525 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
8526 (dbus_server_set_timeout_functions):
8527 (_dbus_server_remove_timeout):
8528 New functions so that a server can add and remove timeouts.
8530 (dbus_server_listen):
8531 Add commented out call to dbus_server_debug_new.
8533 * dbus/dbus-timeout.c: (_dbus_timeout_new):
8534 Actually set the handler, doh.
8536 * dbus/dbus-transport.c: (_dbus_transport_open):
8537 Add commented out call to dbus_transport_debug_client_new.
8540 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
8542 2003-01-28 Havoc Pennington <hp@pobox.com>
8544 * dbus/dbus-message.c (check_message_handling): function to check
8545 on the loaded message, iterates over it etc.
8547 2003-01-28 Havoc Pennington <hp@pobox.com>
8549 * test/Makefile.am (dist-hook): fix make distdir
8551 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
8553 2003-01-27 Havoc Pennington <hp@pobox.com>
8555 * dbus/dbus-mempool.c (time_for_size): replace printf with
8558 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
8559 empty lines; fix the SAVE_LENGTH stuff to be
8560 START_LENGTH/END_LENGTH so it actually works; couple other
8563 * test/Makefile.am (dist-hook): add dist-hook for .message files
8565 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
8566 can be constant or locked.
8567 (_dbus_string_free): allow freeing a const string as
8570 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
8572 * dbus/dbus-test-main.c (main): take an argument which is the
8573 directory containing test data
8575 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
8576 argument to this and load all the messages in test/data/
8577 checking that they can be loaded or not loaded as appropriate.
8579 2003-01-27 Anders Carlsson <andersca@codefactory.se>
8581 * bus/dispatch.c: (bus_dispatch_message_handler):
8582 Dispatch messages sent to services.
8584 * bus/driver.c: (bus_driver_send_service_deleted),
8585 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8586 (bus_driver_send_service_acquired):
8587 Add helper functions for sending service related messages.
8589 (bus_driver_send_welcome_message):
8590 Send HELLO_REPLY instead of WELCOME.
8592 (bus_driver_handle_list_services):
8593 Send LIST_SERVICES_REPLY instead of SERVICES.
8595 (bus_driver_handle_own_service),
8596 (bus_driver_handle_service_exists):
8597 New message handlers.
8599 (bus_driver_handle_message):
8600 Invoke new message handlers.
8602 (bus_driver_remove_connection):
8603 Don't remove any services here since that's done automatically
8604 by bus_service_remove_owner now.
8607 New function signatures.
8609 * bus/services.c: (bus_service_add_owner):
8610 Send ServiceAcquired message if we're the only primary owner.
8612 (bus_service_remove_owner):
8613 Send ServiceAcquired/ServiceLost messages.
8615 (bus_service_set_prohibit_replacement),
8616 (bus_service_get_prohibit_replacement):
8617 Functions for setting prohibit replacement.
8619 (bus_service_has_owner):
8620 New function that checks if a connection is in the owner queue of
8624 Add new function signatures.
8626 * dbus/dbus-list.c: (_dbus_list_test):
8627 Add tests for _dbus_list_remove_last and traversing the list backwards.
8630 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
8631 go any further, so return NULL then.
8633 * dbus/dbus-protocol.h:
8634 Add new messages, service flags and service replies.
8636 2003-01-26 Havoc Pennington <hp@pobox.com>
8638 * dbus/dbus-message-builder.c: implement, completely untested.
8640 * test/data/*: add data to be used in testing.
8641 ".message" files are our simple loadable text format.
8642 ".message-raw" will be binary dumps of messages.
8644 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
8646 2003-01-26 Havoc Pennington <hp@pobox.com>
8648 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
8650 * dbus/dbus-errors.c (dbus_result_to_string): add
8653 * dbus/dbus-message-builder.c: new file, will contain code to load
8654 up messages from files. Not implemented yet.
8656 2003-01-26 Havoc Pennington <hp@pobox.com>
8658 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
8659 the sender by setting to NULL
8661 2003-01-26 Havoc Pennington <hp@pobox.com>
8663 The unit tests pass, but otherwise untested. If it breaks, the
8664 tests should have been better. ;-)
8666 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
8669 * dbus/dbus-message.c: redo everything so we maintain
8670 message->header as the only copy of the various fields.
8671 This avoids the possibility of out-of-memory in some cases,
8672 for example dbus_message_lock() can't run out of memory anymore,
8673 and avoids extra copying. Figured I may as well go ahead and do
8674 this since it was busted for dbus_message_lock to not return
8675 failure on OOM, and dbus_message_write_header was totally
8676 unchecked for OOM. Also fixed some random other bugs.
8678 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
8679 that strings are nul-terminated. Also, end_pos can be equal
8680 to string length just not greater than, I think.
8681 (_dbus_marshal_set_int32): new function
8682 (_dbus_marshal_set_uint32): new function
8683 (_dbus_marshal_set_string): new function
8685 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
8686 a warning, init timeout_list to NULL
8687 (dbus_connection_send_message): don't use uninitialized variable
8690 * dbus/dbus-string.c (_dbus_string_replace_len): new function
8692 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8694 * bus/driver.c: (bus_driver_handle_hello),
8695 (bus_driver_send_welcome_message):
8698 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8700 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
8701 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8702 (dbus_connection_unref):
8703 * dbus/dbus-marshal.c: (_dbus_marshal_test):
8704 * dbus/dbus-message.c: (dbus_message_unref),
8707 (dbus_message_get_fields):
8708 Remove debugging printout.
8710 (_dbus_message_loader_return_buffer):
8711 Don't store the header string.
8713 (_dbus_message_test):
8716 2003-01-26 Richard Hult <rhult@codefactory.se>
8718 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
8719 the file descriptor list, since it can change under us.
8721 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8723 * glib/dbus-gmain.c: (dbus_connection_prepare),
8724 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
8725 (remove_watch), (dbus_connection_hookup_with_g_main):
8726 Rewrite the glib handling to use its own GSource instead of a
8727 GIOChannel so we can catch messages put in the queue while waiting
8730 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8733 * bus/connection.c: (connection_disconnect_handler),
8734 (connection_watch_callback), (bus_connection_setup):
8735 * bus/dispatch.c: (send_one_message),
8736 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
8737 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
8739 * bus/driver.c: (bus_driver_send_service_deleted),
8740 (bus_driver_send_service_created), (bus_driver_handle_hello),
8741 (bus_driver_send_welcome_message),
8742 (bus_driver_handle_list_services), (bus_driver_remove_connection),
8743 (bus_driver_handle_message):
8745 Refactor code, put the message dispatching in its own file. Use
8746 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
8749 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8751 * dbus/dbus-internals.h:
8752 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
8754 * dbus/dbus-message.c: (dbus_message_get_sender):
8755 * dbus/dbus-message.h:
8756 Implement dbus_message_get_sender.
8758 * dbus/dbus-protocol.h:
8759 Add message and service defines.
8761 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8763 * dbus/dbus-connection.c: (dbus_connection_send_message):
8764 * dbus/dbus-message-internal.h:
8765 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
8766 (dbus_message_write_header):
8767 Remove _dbus_messag_unlock and don't set the client serial on a
8768 message if one already exists.
8770 2003-01-24 Havoc Pennington <hp@pobox.com>
8772 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
8775 * bus/driver.c (bus_driver_handle_list_services): fix a leak
8778 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8780 * dbus/dbus-list.c: (alloc_link), (free_link):
8781 Use a memory pool for the links.
8783 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8785 * bus/connection.c: (bus_connection_foreach):
8787 Add new bus_connection_foreach function.
8789 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
8790 Add function that broadcasts a message to all clients.
8792 (bus_driver_send_service_created), (bus_driver_handle_hello),
8793 (bus_driver_send_welcome_message),
8794 (bus_driver_handle_list_services), (bus_driver_message_handler):
8795 Implement functions that take care of listing services, and notifying
8796 clients when new services are created.
8798 * bus/services.c: (bus_services_list):
8800 Add new function that returns an array of strings with the currently
8801 registered services.
8804 * glib/dbus-gmain.c:
8805 Update copyright year.
8807 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8809 * dbus/dbus-connection.c: (dbus_connection_send_message):
8810 Unlock the message in case it was sent earlier.
8812 (dbus_connection_send_message_with_reply_and_block):
8813 Remove the reply message from the list.
8815 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8816 Set array_len and new_pos correctly.
8818 (_dbus_marshal_test):
8819 Remove debug output.
8821 * dbus/dbus-message-internal.h:
8822 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
8823 New function that returns the reply serial.
8825 (_dbus_message_unlock):
8826 New function that unlocks a message and resets its header.
8828 (dbus_message_append_string_array),
8829 (dbus_message_get_fields_valist),
8830 (dbus_message_iter_get_field_type),
8831 (dbus_message_iter_get_string_array),
8832 (dbus_message_get_fields),
8833 (dbus_message_append_fields_valist):
8834 Handle string arrays.
8836 (dbus_message_set_sender):
8837 Make this function public since the bus daemon needs it.
8839 (decode_header_data):
8840 Set the reply serial to -1 initially.
8842 * dbus/dbus-message.h:
8843 Add dbus_message_set_sender.
8845 2003-01-24 Havoc Pennington <hp@pobox.com>
8847 * doc/dbus-specification.sgml: add some stuff
8849 2003-01-22 Havoc Pennington <hp@pobox.com>
8851 * doc/dbus-specification.sgml: Start to document the protocol.
8853 2003-01-22 Havoc Pennington <hp@pobox.com>
8855 * dbus/dbus-connection.c
8856 (dbus_connection_send_message_with_reply_and_block): add some @todo
8858 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
8860 2003-01-21 Havoc Pennington <hp@pobox.com>
8862 (patch untested because can't compile)
8864 * bus/driver.c (create_unique_client_name): make this function
8865 never recycle client names. Also, caller should initialize
8868 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
8870 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8872 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8873 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8874 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
8875 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
8876 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
8877 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
8878 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
8879 * dbus/dbus-marshal.h:
8880 * dbus/dbus-protocol.h:
8881 Add support for marshalling and demarshalling integer, double
8884 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8889 * bus/connection.c: (connection_disconnect_handler):
8890 Remove the connection from the bus driver's list.
8892 (connection_watch_callback): Dispatch messages.
8894 (free_connection_data): Free connection name.
8896 (bus_connection_setup): Add connection to the bus driver's list.
8897 (bus_connection_remove_owned_service):
8898 (bus_connection_set_name), (bus_connection_get_name):
8899 Add functions for setting and getting the connection's name.
8902 Add function headers.
8904 * bus/driver.c: (create_unique_client_name),
8905 (bus_driver_handle_hello_message),
8906 (bus_driver_send_welcome_message), (bus_driver_message_handler),
8907 (bus_driver_add_connection), (bus_driver_remove_connection):
8910 * bus/services.c: (bus_service_free):
8912 New file that handles communication and registreation with the bus
8915 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8917 * dbus/dbus-connection.c: (dbus_connection_send_message):
8918 Add a new client_serial parameter.
8920 (dbus_connection_send_message_with_reply):
8921 Remove a @todo since we've implemented the blocking function.
8923 (dbus_connection_send_message_with_reply_and_block):
8924 New function that sends a message and waits for a reply and
8925 then returns the reply.
8927 * dbus/dbus-connection.h:
8930 * dbus/dbus-errors.c: (dbus_result_to_string):
8931 * dbus/dbus-errors.h:
8932 Add new DBUS_RESULT.
8934 * dbus/dbus-message-internal.h:
8935 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
8936 (_dbus_message_set_sender), (dbus_message_write_header),
8937 (dbus_message_new_reply), (decode_header_data),
8938 (_dbus_message_loader_return_buffer), (_dbus_message_test):
8939 * dbus/dbus-message.h:
8940 Add new functions that set the reply serial and sender.
8941 Also marshal and demarshal them correctly and add test.
8943 * dbus/dbus-protocol.h:
8944 Add new DBUS_MESSAGE_TYPE_SENDER.
8947 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
8948 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
8949 (dbus_connection_hookup_with_g_main):
8950 * glib/test-dbus-glib.c: (main):
8951 Rewrite to use GIOChannel and remove the GSource crack.
8953 * test/echo-client.c: (main):
8954 * test/watch.c: (check_messages):
8955 Update for changed APIs
8957 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8959 * dbus/Makefile.am: Add dbus-timeout.[cħ]
8961 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
8962 Create a DBusTimeoutList.
8963 (dbus_connection_set_timeout_functions): Add new function to
8964 set timeout callbacks
8966 * dbus/dbus-connection.h: Add public DBusTimeout API.
8968 * dbus/dbus-message.c: (dbus_message_get_service):
8969 * dbus/dbus-message.h: New function.
8971 * dbus/dbus-server.c: Fix small doc typo.
8973 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
8975 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8977 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
8978 of the string, just as long as specified.
8980 2003-01-19 Havoc Pennington <hp@pobox.com>
8982 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
8985 * dbus/dbus-server.c (dbus_server_set_max_connections)
8986 (dbus_server_get_max_connections, dbus_server_get_n_connections):
8987 keep track of current number of connections, and add API for
8988 setting a max (but haven't implemented enforcing the max yet)
8990 2003-01-18 Havoc Pennington <hp@pobox.com>
8992 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
8993 reading/writing if read_watch != NULL or write_watch != NULL.
8995 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
8996 the message loader code to actually load message->header and
8997 message->body into the newly-created message.
8999 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
9002 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
9003 (dbus_connection_get_max_message_size)
9004 (dbus_connection_set_max_live_messages_size)
9005 (dbus_connection_get_max_live_messages_size): implement some
9006 resource limitation functions
9008 * dbus/dbus-resources.c: new file implementing some of the
9009 resource limits stuff
9011 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
9012 missing docs, add @todo to handle OOM etc.
9014 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
9017 2003-01-18 Havoc Pennington <hp@pobox.com>
9019 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
9020 connection if it hasn't been already.
9022 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
9023 replace with DisconnectFunction.
9025 2003-01-18 Havoc Pennington <hp@pobox.com>
9027 Building --disable-verbose-mode --disable-asserts --disable-tests
9028 cuts the library from 112K to 45K or so
9030 * configure.in: check for varargs macro support,
9031 add --enable-verbose-mode, --enable-asserts.
9033 * dbus/dbus-internals.h (_dbus_assert): support
9035 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
9037 2003-01-18 Havoc Pennington <hp@pobox.com>
9039 * dbus/dbus-test.c: include config.h so that tests actually run
9041 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
9042 so the failure mode when that assumption fails will be plenty
9045 2003-01-18 Havoc Pennington <hp@pobox.com>
9047 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
9049 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
9052 * test/Makefile.am: don't use special variable "TESTS" for echo-*
9053 since we don't want to use those in make check
9055 2003-01-15 Havoc Pennington <hp@redhat.com>
9061 2003-01-15 Havoc Pennington <hp@redhat.com>
9063 * test/Makefile.am: fix so that test source code ends up in the
9064 distribution on make distcheck
9066 2003-01-15 Havoc Pennington <hp@redhat.com>
9072 2003-01-15 Havoc Pennington <hp@redhat.com>
9074 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
9075 fix build when --disable-tests
9077 * Makefile.am (EXTRA_DIST): put HACKING in here
9079 * HACKING: document procedure for making a tarball release.
9081 2003-01-14 Anders Carlsson <andersca@codefactory.se>
9083 * bus/connection.c: (connection_error_handler),
9084 (bus_connection_setup):
9085 * bus/main.c: (main):
9086 Make sure that the DBusConnectionData struct is NULLed
9087 out to prevent a segfault.
9089 * dbus/dbus-errors.c: (dbus_result_to_string):
9090 * dbus/dbus-errors.h:
9091 * dbus/dbus-message.c: (dbus_message_get_fields),
9092 (dbus_message_get_fields_valist), (_dbus_message_test):
9093 * dbus/dbus-message.h:
9094 Make dbus_message_get_fields return a result code so we can
9095 track invalid fields as well as oom.
9097 2003-01-11 Havoc Pennington <hp@pobox.com>
9099 * configure.in: change --enable-test/--enable-ansi action-if-given
9100 to enable_foo=$enableval instead of enable_foo=yes
9102 2003-01-08 Havoc Pennington <hp@pobox.com>
9104 * dbus/dbus-string.c (_dbus_string_align_length): new function
9106 * dbus/dbus-test-main.c: move main() for test app here
9108 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
9109 symbol to run tests, because dbus-test isn't in the main
9112 Code review nitpicks.
9114 * dbus/dbus-message.c (dbus_message_write_header): add newlines
9115 for people with narrow emacs ;-). Assert client_serial was filled
9116 in. Assert message->name != NULL.
9117 (dbus_message_append_fields): have "first_field_type" arg separate
9118 from va list, needed for C++ binding that also uses varargs IIRC
9119 and helps with type safety
9120 (dbus_message_new): add @todo about using DBusString to store
9121 service/name internally
9122 (dbus_message_new): don't leak ->service and ->name on OOM later
9124 (dbus_message_unref): free the service name
9125 (dbus_message_get_fields): same change to varargs
9126 i.e. first_field_type
9127 (_dbus_message_loader_return_buffer): assert that the message data
9128 is aligned (if not it's a bug in our code). Put in verbose griping
9129 about why we set corrupted = TRUE.
9130 (decode_header_data): add FIXME that char* is evil. Was going to
9131 add FIXME about evil locale-specific string.h strncmp, but just
9132 switched to wacky string-as-uint32 optimization. Move check for
9133 "no room for field name" above get_const_data_len() to avoid
9134 assertion failure in get_const_data_len if we have trailing 2
9135 bytes or the like. Check for service and name fields being
9136 provided twice. Don't leak service/name on error. Require field
9137 names to be aligned to 4 bytes.
9139 * dbus/dbus-marshal.c: move byte swap stuff to header
9140 (_dbus_pack_int32): uscore-prefix
9141 (_dbus_unpack_int32): uscore-prefix
9142 (_dbus_unpack_uint32): export
9143 (_dbus_demarshal_string): add @todo complaining about use of
9145 (_dbus_marshal_get_field_end_pos): add @todo about bad error
9146 handling allowing corrupt data to go unchecked
9148 2003-01-08 Havoc Pennington <hp@redhat.com>
9150 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
9151 to the select() as needed for authentication. (should be using
9152 _dbus_poll() not select, but for another day)
9154 * dbus/dbus.h: include dbus/dbus-protocol.h
9156 2003-01-08 Anders Carlsson <andersca@codefactory.se>
9158 * dbus/Makefile.am (dbusinclude_HEADERS): Install
9161 2003-01-08 Anders Carlsson <andersca@codefactory.se>
9163 * dbus/dbus-internals.c: (_dbus_type_to_string):
9164 New function that returns a string describing a type.
9166 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
9167 * dbus/dbus-marshal.h:
9168 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
9169 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
9170 (dbus_message_iter_get_byte_array):
9171 * dbus/dbus-message.h:
9172 Add new convenience functions for appending and getting message fields.
9173 Also add demarshalling routines for byte arrays.
9175 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9177 * dbus/dbus-connection-internal.h:
9178 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
9179 (_dbus_connection_get_next_client_serial),
9180 (dbus_connection_send_message):
9181 * dbus/dbus-internals.h:
9182 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
9183 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
9184 (_dbus_marshal_uint32), (_dbus_demarshal_double),
9185 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
9186 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
9187 (_dbus_verbose_bytes), (_dbus_marshal_test):
9188 * dbus/dbus-marshal.h:
9189 * dbus/dbus-message-internal.h:
9190 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
9191 (dbus_message_write_header), (_dbus_message_lock),
9192 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
9193 (dbus_message_get_name), (dbus_message_append_int32),
9194 (dbus_message_append_uint32), (dbus_message_append_double),
9195 (dbus_message_append_string), (dbus_message_append_byte_array),
9196 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
9197 (dbus_message_iter_unref), (dbus_message_iter_has_next),
9198 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
9199 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
9200 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
9201 (decode_header_data), (_dbus_message_loader_return_buffer),
9202 (message_iter_test), (_dbus_message_test):
9203 * dbus/dbus-message.h:
9204 * dbus/dbus-protocol.h:
9205 * dbus/dbus-test.c: (main):
9207 * glib/test-dbus-glib.c: (message_handler), (main):
9208 * test/echo-client.c: (main):
9209 * test/watch.c: (check_messages):
9210 Make messages sendable and receivable for real.
9212 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9214 * dbus/dbus-marshal.c: (_dbus_marshal_double),
9215 (_dbus_marshal_string), (_dbus_marshal_byte_array):
9216 * dbus/dbus-message.c: (dbus_message_append_int32),
9217 (dbus_message_append_uint32), (dbus_message_append_double),
9218 (dbus_message_append_string), (dbus_message_append_byte_array):
9219 Handle OOM restoration.
9221 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9223 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9224 (_dbus_demarshal_string), (_dbus_marshal_test):
9225 * dbus/dbus-marshal.h:
9226 * dbus/dbus-message.c: (dbus_message_get_name),
9227 Document these functions.
9229 (dbus_message_append_int32), (dbus_message_append_uint32),
9230 (dbus_message_append_double), (dbus_message_append_string),
9231 (dbus_message_append_byte_array):
9232 * dbus/dbus-message.h:
9233 Add functions for adding message fields of different types.
9235 * dbus/dbus-protocol.h:
9236 Add the different types.
9238 2003-01-05 Havoc Pennington <hp@pobox.com>
9240 * bus/connection.c: implement routines for handling connections,
9241 first thing is keeping a list of owned services on each connection
9242 and setting up watches etc.
9244 * bus/services.c: implement a mapping from service names to lists
9247 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
9249 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
9250 to use static mutexes for global data
9252 * dbus/dbus-connection.c (dbus_connection_set_data): add new
9253 collection of functions to set/get application-specific data
9254 on the DBusConnection.
9256 2003-01-04 Havoc Pennington <hp@pobox.com>
9258 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
9259 (_dbus_poll): new function
9261 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
9264 * bus/loop.c: initial code for the daemon main loop
9266 2003-01-04 Havoc Pennington <hp@pobox.com>
9268 * test/watch.c (error_handler): make it safe if the error handler
9269 is called multiple times (if we s/error handler/disconnect
9270 handler/ we should just guarantee it's called only once)
9272 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
9273 error handler on disconnect (it's quite possible we should
9274 just change the error handler to a "disconnect handler," I'm
9275 not sure we have any other meaningful errors)
9277 * configure.in: check for getpwnam_r
9279 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
9280 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
9281 mechanism as in SASL spec, using socket credentials
9283 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
9284 (_dbus_send_credentials_unix_socket): new function
9286 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
9288 (_dbus_write): only check errno if <0 returned
9289 (_dbus_write_two): ditto
9291 2003-01-02 Anders Carlsson <andersca@codefactory.se>
9293 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
9294 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
9295 (_dbus_marshal_test):
9296 * dbus/dbus-marshal.h:
9297 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
9298 to _dbus_marshal_utf8_string. Also fix some tests.
9300 2002-12-28 Harri Porten <porten@kde.org>
9302 * configure.in: added check for C++ compiler and a very cheesy
9303 check for the Qt integration
9305 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
9307 * qt/Makefile.am: added
9309 * qt/.cvsignore: added
9311 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
9312 latter, added #ifdef QT_THREAD_SUPPORT guard.
9314 * dbus/Makefile.am: added missing headers for make dist
9316 2002-12-28 Kristian Rietveld <kris@gtk.org>
9318 * dbus/Makefile.am: fixup export-symbols-regex.
9320 2002-12-27 Anders Carlsson <andersca@codefactory.se>
9322 * acinclude.m4: Add this file and put the
9323 PKG_CHECK_MODULE macro in it.
9325 2002-12-27 Anders Carlsson <andersca@codefactory.se>
9327 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9328 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9329 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9330 (_dbus_marshal_test):
9331 Make the demarshalling routines align the pos argument.
9332 Add string marshalling tests and fix the obvious bugs
9335 2002-12-26 Havoc Pennington <hp@pobox.com>
9337 * dbus/dbus-auth.c: fixes fixes fixes
9339 * dbus/dbus-transport-unix.c: wire up support for
9340 encoding/decoding data on the wire
9342 * dbus/dbus-auth.c (_dbus_auth_encode_data)
9343 (_dbus_auth_decode_data): append to target string
9344 instead of nuking it.
9346 2002-12-26 Havoc Pennington <hp@pobox.com>
9348 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
9349 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
9352 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
9353 avoid swap_bytes() overhead (ignoring possible assembly stuff for
9354 now). Main point is because I wanted unpack_uint32 to implement
9356 (_dbus_verbose_bytes): new function
9358 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
9360 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
9361 mechanism to handle a corrupt message stream
9362 (_dbus_message_loader_new): fix preallocation to only prealloc,
9365 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
9366 (_dbus_string_test): enhance tests for copy/move and fix the
9369 * dbus/dbus-transport-unix.c: Hold references in more places to
9370 avoid reentrancy problems
9372 * dbus/dbus-transport.c: ditto
9374 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
9375 leak reference count in no-message case
9377 * test/watch.c (do_mainloop): handle adding/removing watches
9378 during iteration over the watches. Also, ref the connection/server
9379 stored on a watch, so we don't try to mangle a destroyed one.
9381 * dbus/dbus-transport-unix.c (do_authentication): perform
9384 * dbus/dbus-auth.c (get_state): add a state
9385 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
9386 (_dbus_auth_get_unused_bytes): append the unused bytes
9387 to the passed in string, rather than prepend
9389 * dbus/dbus-transport.c (_dbus_transport_init_base): create
9390 the auth conversation DBusAuth
9392 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
9393 (_dbus_transport_new_for_domain_socket): when creating a
9394 transport, pass in whether it's a client-side or server-side
9395 transport so we know which DBusAuth to create
9397 2002-12-03 Havoc Pennington <hp@pobox.com>
9399 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
9400 _after_ finalizing the derived members
9401 (unix_connection_set): unref watch if we fail to add it
9403 * dbus/dbus-connection.c (dbus_connection_unref): delete the
9404 transport first, so that the connection owned by the
9405 transport will be valid as the transport finalizes.
9407 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
9408 if necessary, and remove watches from the connection.
9410 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
9412 2002-12-26 Anders Carlsson <andersca@codefactory.se>
9414 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9415 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9416 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9417 (_dbus_marshal_test):
9418 * dbus/dbus-marshal.h:
9419 Add string marshal functions and have the demarshal functions
9420 return the new position.
9422 2002-12-25 Havoc Pennington <hp@pobox.com>
9424 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
9425 it is a simple protocol that just maps directly to SASL.
9427 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
9428 initial implementation, not actually used yet.
9430 * dbus/dbus-string.c (_dbus_string_find): new function
9431 (_dbus_string_equal): new function
9432 (_dbus_string_base64_encode): new function
9433 (_dbus_string_base64_decode): new function
9435 2002-12-25 Anders Carlsson <andersca@codefactory.se>
9438 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
9439 (_dbus_marshal_int32), (_dbus_marshal_uint32),
9440 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9441 (_dbus_demarshal_uint32), (_dbus_marshal_test):
9442 * dbus/dbus-marshal.h:
9443 * dbus/dbus-protocol.h:
9444 * dbus/dbus-test.c: (main):
9446 Add un-optimized marshalling/demarshalling routines.
9448 2002-12-25 Harri Porten <porten@kde.org>
9450 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
9452 2002-12-24 Zack Rusin <zack@kde.org>
9454 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
9455 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
9458 2002-12-24 Havoc Pennington <hp@pobox.com>
9460 * glib/dbus-gthread.c: fix include
9462 * glib/dbus-glib.h: rename DBusMessageHandler for now.
9463 I think glib API needs to change, though, as you don't
9464 want to use DBusMessageFunction, you want to use the
9465 DBusMessageHandler object. Probably
9466 dbus_connection_open_with_g_main_loop()
9467 and dbus_connection_setup_g_main_loop() or something like that
9468 (but think of better names...) that just create a connection
9469 that has watch/timeout functions etc. already set up.
9471 * dbus/dbus-connection.c
9472 (dbus_connection_send_message_with_reply): new function just to
9473 show how the message handler helps us deal with replies.
9475 * dbus/dbus-list.c (_dbus_list_remove_last): new function
9477 * dbus/dbus-string.c (_dbus_string_test): free a string that
9480 * dbus/dbus-hash.c: use memory pools for the hash entries
9481 (rebuild_table): be more paranoid about overflow, and
9482 shrink table when we can
9483 (_dbus_hash_test): reduce number of sprintfs and write
9484 valid C89. Add tests for case where we grow and then
9485 shrink the hash table.
9487 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
9489 * dbus/dbus-connection.c (dbus_connection_register_handler)
9490 (dbus_connection_unregister_handler): new functions
9492 * dbus/dbus-message.c (dbus_message_get_name): new
9494 * dbus/dbus-list.c: fix docs typo
9496 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
9497 an object representing a handler for messages.
9499 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9502 * glib/dbus-gthread.c: (dbus_gthread_init):
9503 Don't use the gdbus prefix for public functions.
9505 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9509 Add GLib checks and fixup .pc files
9513 * glib/dbus-gmain.c: (gdbus_connection_prepare),
9514 (gdbus_connection_check), (gdbus_connection_dispatch),
9515 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
9516 (dbus_connection_gsource_new):
9517 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
9518 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
9519 * glib/test-dbus-glib.c: (message_handler), (main):
9522 2002-12-15 Harri Porten <porten@kde.org>
9524 * autogen.sh: check for libtoolize before attempting to use it
9526 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
9529 * .cvsignore: ignore more stamp files
9531 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
9533 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
9534 without make install.
9536 2002-12-15 Havoc Pennington <hp@pobox.com>
9538 * dbus/dbus-threads.c: add thread stubs that a higher library
9539 layer can fill in. e.g. the GLib wrapper might fill them in with
9540 GThread stuff. We still need to use this thread API to
9541 thread-safe-ize the library.
9543 2002-12-12 Havoc Pennington <hp@pobox.com>
9545 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
9546 below new interfaces and include fewer system headers.
9548 * dbus/dbus-sysdeps.c (_dbus_read): new function
9549 (_dbus_write): new function
9550 (_dbus_write_two): new function
9551 (_dbus_connect_unix_socket): new function
9552 (_dbus_listen_unix_socket): new function
9554 * dbus/dbus-message-internal.h: change interfaces to use
9557 2002-12-11 Havoc Pennington <hp@pobox.com>
9559 * dbus/dbus-types.h: add dbus_unichar
9561 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
9563 * dbus/dbus-connection.c (dbus_connection_send_message): return
9566 * dbus/dbus-transport.c: include dbus-watch.h
9568 * dbus/dbus-connection.c: include dbus-message-internal.h
9570 * HACKING: add file with coding guidelines stuff.
9572 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
9573 handling here, for security purposes (as in vsftpd). Not actually
9574 using this class yet.
9576 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
9577 system/libc usage here, as in vsftpd, for ease of auditing (and
9578 should also simplify portability). Haven't actually moved all the
9579 system/libc usage into here yet.
9581 2002-11-25 Havoc Pennington <hp@pobox.com>
9583 * dbus/dbus-internals.c (_dbus_verbose): fix to not
9584 always print the first verbose message.
9586 2002-11-24 Havoc Pennington <hp@pobox.com>
9588 * test/echo-client.c, test/echo-server.c: cheesy test
9591 * configure.in (AC_CHECK_FUNCS): check for writev
9593 * dbus/dbus-message.c (_dbus_message_get_network_data): new
9596 * dbus/dbus-list.c (_dbus_list_foreach): new function
9598 * dbus/dbus-internals.c (_dbus_verbose): new function
9600 * dbus/dbus-server.c, dbus/dbus-server.h: public object
9601 representing a server that listens for connections.
9603 * dbus/.cvsignore: create
9605 * dbus/dbus-errors.h, dbus/dbus-errors.c:
9606 public API for reporting errors
9608 * dbus/dbus-connection.h, dbus/dbus-connection.c:
9609 public object representing a connection that
9610 sends/receives messages. (Same object used for
9611 both client and server.)
9613 * dbus/dbus-transport.h, dbus/dbus-transport.c:
9614 Basic abstraction for different kinds of stream
9615 that we might read/write messages from.
9617 2002-11-23 Havoc Pennington <hp@pobox.com>
9619 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
9622 * dbus/dbus-test.c (main): add list test, and include
9623 dbus-test.h as intended
9625 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
9626 (_dbus_hash_table_remove_int): return value indicates
9627 whether the entry existed to remove
9629 * dbus/dbus-list.c: add linked list utility class,
9632 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
9635 2002-11-23 Havoc Pennington <hp@pobox.com>
9637 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
9638 DBUS_END_DECLS to nothing, that should fix this once and for all
9640 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
9642 * dbus/dbus-message.c, dbus/dbus-hash.c:
9643 add some missing @brief
9645 2002-11-23 Havoc Pennington <hp@pobox.com>
9647 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
9648 to avoid confusing Doxygen
9650 * dbus/dbus-hash.c: @} not }@
9652 * dbus/dbus-message.c (struct DBusMessage): split out
9655 2002-11-23 Havoc Pennington <hp@pobox.com>
9657 * configure.in: pile on more warning flags if using gcc
9659 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
9660 to document static functions
9662 * configure.in: add summary to end of configure so it
9663 looks nice and attractive
9665 * dbus/dbus-hash.c: finish implementation and write unit
9668 * configure.in: add --enable-tests to enable unit tests
9670 * dbus/dbus-test.c: test program to run unit tests
9671 for all files in dbus/*, initially runs a test for
9674 * dbus/dbus-internals.h: file to hold some internal utility stuff
9676 2002-11-22 Havoc Pennington <hp@redhat.com>
9678 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
9679 "ported" away from Tcl
9681 * dbus/dbus-types.h: header for types such as dbus_bool_t
9683 2002-11-22 Havoc Pennington <hp@redhat.com>
9685 * dbus/dbus.h: fixups for doc warnings
9687 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
9689 (QUIET): make it quiet so we can see warnings
9691 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
9693 2002-11-22 Havoc Pennington <hp@redhat.com>
9695 * Makefile.am: include "Doxyfile" target in all-local
9697 * configure.in: generate the Doxyfile
9699 * Doxyfile.in: move Doxyfile here, so we can use
9700 configure to generate a Doxyfile with the right
9703 2002-11-22 Havoc Pennington <hp@redhat.com>
9705 * dbus/dbus-message.c: move inline docs into .c file
9707 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
9708 so all docs are under doc/
9709 (MAN_EXTENSION): generate man pages. Use extension
9710 ".3dbus" which matches ".3qt" on my system,
9711 I guess this is OK, I don't know really.
9712 (FILE_PATTERNS): look for .c files not .h, makes sense
9715 2002-11-22 Havoc Pennington <hp@pobox.com>
9717 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
9718 because any app can be a server, and any app can be a client,
9719 the bus is a special kind of server.
9721 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
9723 * Doxyfile : adding. Still needs Makefile rules to be generated
9724 automatically (just run "doxygen" in the toplevel dir for now to
9727 * dbus/dbus-message.h : Adding sample docs (javadoc since
9728 resembles gtk-doc a little more)
9730 * dbus/dbus.h : Adding sample docs
9732 2002-11-21 Havoc Pennington <hp@redhat.com>
9734 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
9735 so we can allow ourselves to include files directly,
9736 instead of having to use dbus.h
9738 * dbus/dbus.h: fill in
9740 * dbus/dbus-message.h: sketch out a sample header file.
9741 Include griping if you include it directly instead of
9744 * dbus/dbus-macros.h: new file with macros for extern "C",
9745 TRUE/FALSE, NULL, etc.
9747 * doc/file-boilerplate.c: put include guards in here
9749 2002-11-21 Havoc Pennington <hp@redhat.com>
9751 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
9753 * COPYING: include the GPL as well, and license code
9754 under both AFL and GPL.
9756 2002-11-21 Havoc Pennington <hp@redhat.com>
9758 * acconfig.h: get rid of this
9760 * autogen.sh (run_configure): add --no-configure option
9762 * configure.in: remove AC_ARG_PROGRAM to make
9763 autoconf complain less. add AC_PREREQ.
9764 add AC_DEFINE third arg.
9766 2002-11-21 Anders Carlsson <andersca@codefactory.se>
9769 Fix references so we can distcheck.
9771 2002-11-21 Havoc Pennington <hp@redhat.com>
9773 * Initial module creation