1 2005-03-08 Joe Shaw <joeshaw@novell.com>
3 Fix a bunch of lifecycle and memory management problems
6 * mono/Arguments.cs (Arguments): Implement IDisposable
8 * mono/Bus.cs (Bus): Don't allow public instantiation. This is
9 strictly a static class.
11 * mono/Connection.cs: Move the DBusObjectPathVTable and associated
12 delegates into this file.
13 (Connection): Implement IDisposable.
14 (Dispose): Disconnect the connection and set the raw connection
15 pointer to IntPtr.Zero.
16 (~Connection): Call Dispose().
17 (RegisterObjectPath): Added. Manages the registration of object
18 paths so we can cleanly disconnect them at dispose/finalize time.
19 (UnregisterObjectPath): Ditto.
20 (set_RawConnection): Unregister all of the object paths when
21 changing the underlying DBusConnection. Add them back onto the
22 new connection, if any.
24 * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
25 more unmanaged resources anymore, so it's not necessary. Move all
26 the DBusObjectPathVTable stuff out of here.
27 (Handler): Save references to our delegates so that they don't get
28 finalized. Call Connection.RegisterObjectPath() instead of
29 dbus_connection_register_object_path() directly.
30 (Message_Called): Dispose the message after we're finished with
33 * mono/Message.cs (Message): Implement IDisposable.
34 (Dispose): Dispose the Arguments, and set the RawMessage to
36 (SendWithReplyAndBlock): We own the ref to the reply that comes
37 back from dbus_connection_send_with_reply_and_block() so add a
38 comment about that and unref it after we've constructed a managed
39 MethodReturn class around it. Fixes a big, big leak.
41 * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
43 (BuildSignalHandler): After we've sent the Signal message, dispose
45 (BuildMethod): Dispose of the method call and reply messages after
46 we've sent the message and extracted the data we want from the
49 * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
51 (Service_FilterCalled): Dispose of the message after we're
54 2005-03-08 Joe Shaw <joeshaw@novell.com>
56 * dbus/dbus-connection.c (dbus_connection_send_with_reply):
57 After we attach our pending call to the connection, unref
60 * mono/Connection.cs (set_RawConnection): Disconnect our
61 filter and match callbacks from the old connection and
62 reconnect them to the new connection, if any.
64 * mono/DBusType/Array.cs: "Code" is a static member, so
65 don't use "this" to refer to it. Fix for stricter checking
68 * mono/DBusType/ObjectPath.cs (Append): Don't leak the
69 object path that we pass into unmanaged code.
71 * mono/DBusType/String.cs (Append): Don't leak the string
72 that we pass into unmanged code.
74 2005-03-07 John (J5) Palmieri <johnp@redhat.com>
75 * NEWS: Update for 0.31
77 * configure.in: Release 0.31
78 add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
80 * qt/Makefile.am: fixed build
82 * dbus/Makefile.am: soname bump for libdbus
84 * glib/Makefile.am: soname bump for libdbus-glib
86 2005-03-05 Havoc Pennington <hp@redhat.com>
88 * dbus/dbus-sysdeps.c:
89 (pseudorandom_generate_random_bytes_buffer): fix to have no return
91 (_dbus_generate_random_bytes_buffer): fix return value
93 * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
94 checks actually work, from Tom Parker <fdo@tevp.net>
96 2005-03-01 Colin Walters <walters@verbum.org>
98 * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
99 functions copied from dbus-glib-tool.c.
100 (main): Convert lots of error code to use them.
101 Also add some testing for introspection bits.
103 2005-03-01 Colin Walters <walters@verbum.org>
105 * doc/TODO: Remove introspection signature TODO.
107 2005-02-27 Colin Walters <walters@verbum.org>
109 * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
110 Change return value to const char * instead of int so we can do
112 (struct PropertyInfo, struct ArgInfo): Store char *.
113 (property_info_new, arg_info_new): Update parameters, strdup.
114 (property_info_unref, arg_info_unref): Free.
116 * glib/dbus-gidl.h: Update prototypes.
118 * glib/dbus-gparser.c (basic_type_from_string): Delete.
119 (validate_signature): New function, just validates signature and
121 (parse_property, parse_arg): Invoke validate_signature. Store
122 signature instead of just type code.
124 * glib/dbus-gvalue.c (base_type_from_signature): New utility
125 function to return a primary type for a signature, dropping
126 information about types in container types.
127 (dbus_gvalue_genmarshal_name_from_type)
128 (dbus_gvalue_binding_type_from_type)
129 (dbus_gvalue_ctype_from_type): Update to take full signature
130 instead of type code.
131 (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
133 * glib/dbus-gvalue.h: Update prototypes for above.
135 * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
136 glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
137 (introspect_properties, introspect_signals, write_interface):
138 Update to handle signatures, and remove usage of
139 _dbus_gutils_type_to_string.
140 (handle_introspect): Print out type codes instead of e.g. "string"
141 in hardcoded introspection XML; also use x_AS_STRING constants
142 instead of hardcoding in string.
144 * glib/dbus-glib-tool.c (pretty_print): Handle signature change
145 to string. Remove usage of _dbus_gutils_type_to_string.
147 * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
149 * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
152 * glib/dbus-binding-tool-glib.c (compute_marshaller)
153 (compute_marshaller_name, generate_glue): Handle signature change
155 (write_formal_parameters, write_args_for_direction): Ditto, and
158 * tools/dbus-tree-view.c (type_to_string): Delete.
159 (info_set_func_text): Update to print full signatures.
161 * test/glib/test-service-glib.xml: Change types to new
162 introspection format.
164 2005-02-26 Havoc Pennington <hp@redhat.com>
166 * doc/TODO: remove the "guid" item
168 * test/glib/test-profile.c (no_bus_thread_func): use open_private
169 (with_bus_thread_func): use open_private
171 * dbus/dbus-connection.c (dbus_connection_open_private): new
172 function that works like the old dbus_connection_open()
173 (dbus_connection_open): now returns an existing connection if
176 * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
177 through the GUID to the transport
179 * dbus/dbus-server.c (_dbus_server_init_base): keep around the
180 GUID in hex-encoded form.
182 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
183 pass GUID argument in to the transport
185 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
188 * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
190 * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
192 2005-02-25 Havoc Pennington <hp@redhat.com>
194 * doc/dbus-specification.xml: document the GUID thing
196 * dbus/dbus-server.c (_dbus_server_init_base): initialize a
197 globally unique ID for the server, and put a "guid=hexencoded"
200 * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
202 * dbus/dbus-message.c: ditto
204 * dbus/dbus-dataslot.c: ditto
206 * dbus/dbus-list.c: ditto
208 * dbus/dbus-internals.h: wait, just include
209 dbus-threads-internal.h here
211 * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
214 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
216 2005-02-24 Colin Walters <walters@verbum.org>
218 * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
220 2005-02-24 John (J5) Palmieir <johnp@redhat.com>
222 * glib/Makefile.am: added dbus-gobject.h to sources list
223 so distcheck doesn't fail
225 2005-02-24 Havoc Pennington <hp@redhat.com>
227 * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
228 you must disconnect before unref, since locking and other things
229 are screwed up otherwise. Fix assorted other locking stuff.
231 * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
234 * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
235 into a private header and don't export from the library
237 * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
239 2005-02-24 Colin Walters <walters@verbum.org>
241 * dbus/dbus-signature.c: New file; implements various functions
242 related to type signatures. Includes an interator for parsing,
243 validation functions.
244 (dbus_type_is_basic): Moved here from
245 dbus-marshal-basic.c:_dbus_type_is_basic.
246 (dbus_type_is_container): Moved here from
247 dbus-marshal-basic.c:_dbus_type_is_container.
249 All callers of _dbus_type_is_container and _dbus_type_is_basic
250 updated, and include dbus-signature.h.
252 * dbus/dbus-signature.h: New file; prototypes for the above.
254 * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
257 * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
258 function factored out of _dbus_first_type_in_signature.
259 (_dbus_first_type_in_signature_c_str): New function; returns first
260 type code for a type signature character.
262 * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
263 handle function moves.
265 * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
267 * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
268 function; skips to next complete type in type signature.
269 Implemented using previous skip_one_complete_type. Now
270 skip_one_complete_type just delegates to
271 _dbus_type_signature_next.
273 * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
275 (_dbus_type_is_container): Ditto.
277 * doc/dbus-specification.xml: Update introspection sample to
278 use real type signatures.
280 * dbus/dbus-test.h: Prototype signature test.
282 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
285 * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
287 2005-02-23 John (J5) Palmieri <johnp@redhat.com>
289 * python/dbus_bindings.pyx.in (PendingCall::get_reply):
290 s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
292 2005-02-21 Colin Walters <walters@verbum.org>
294 * dbus/dbus-test-main.c (main): Take optional specific test
297 * dbus/dbus-test.c (run_test): New function, runs a test function
298 with no data directory.
299 (run_data_test): Like above, but takes data directory.
300 (dbus_internal_do_not_use_run_tests): Take
301 specific test argument. Replace lots of cut n' paste code
302 with run_test and run_data_test.
304 * dbus/dbus-test.h: Update prototype for
305 dbus_internal_do_not_use_run_tests.
307 2005-02-20 Havoc Pennington <hp@redhat.com>
309 Fix bugs reported by Daniel P. Berrange
311 * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
312 (protected_change_watch): new function
313 (_dbus_server_toggle_watch, _dbus_server_remove_watch)
314 (_dbus_server_add_watch): change to work like the
315 dbus-connection.c equivalents; like those, probably kind of
316 busted, but should at least mostly work for now
317 (dbus_server_disconnect): drop the lock if we were already
318 disconnected, patch from Daniel P. Berrange
320 * dbus/dbus-server.c (_dbus_server_toggle_timeout)
321 (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
324 * doc/TODO: todo about unscrewing this mess
326 2005-02-19 Colin Walters <walters@verbum.org>
328 * glib/dbus-binding-tool-glib.c
329 (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
331 * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
332 as errno.h and sys/stat.h.
333 (lose): New function, prints error with
335 (lose_gerror): Similar, but takes GError for message.
336 (main): Add --output argument to specify output file to write to,
337 instead of always printing to stdout. In this mode, determine
338 timestamps on source files to see whether any are newer than the
339 target file. If not, exit. Also convert a number of error
340 messages to use lose (since it's shorter), and switch to using
341 g_io_channel_shutdown.
343 2005-02-19 Havoc Pennington <hp@redhat.com>
345 * glib/dbus-gobject.c
346 (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
348 * glib/dbus-glib.c: fix doxygen warnings
350 * glib/dbus-gparser.c (parse_annotation): error if an annotation
353 2005-02-17 Colin Walters <walters@verbum.org>
355 * glib/dbus-gobject.h: Don't export
356 _dbus_glib_marshal_dbus_message_to_gvalue_array.
358 * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
359 (invoke_object_method): Handle it.
361 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
364 2005-02-17 Colin Walters <walters@verbum.org>
366 * bus/.cvsignore, doc/.cvsignore
367 * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
370 2005-02-17 Colin Walters <walters@verbum.org>
372 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
373 Rename to DBUS_SERVICE_DBUS.
374 (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
375 (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
376 Change the value from "org.freedesktop.Local"
377 to "org.freedesktop.DBus.Local".
378 (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
379 (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
380 DBUS_INTERFACE_INTROSPECTABLE.
381 Change the value from "org.freedesktop.Introspectable"
382 to "org.freedesktop.DBus.Introspectable".
383 (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
384 DBUS_INTERFACE_PROPERTIES.
385 Change the value from "org.freedesktop.Properties"
386 to "org.freedesktop.DBus.Properties".
387 (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
389 Change the value from "org.freedesktop.Peer"
390 to "org.freedesktop.DBus.Peer".
391 (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
392 DBUS_INTERFACE_LOCAL.
393 Change the value from "org.freedesktop.Local"
394 to "org.freedesktop.DBus.Local".
396 All other users of those constants have been changed.
398 * bus/driver.c (bus_driver_handle_introspect): Use constants.
400 * glib/dbus-gobject.c (handle_introspect): Use constants.
402 * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
404 2005-02-17 Colin Walters <walters@verbum.org>
406 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
407 (parse_node, parse_interface, parse_method, parse_signal)
408 (parse_property, parse_annotation): Lose if we're currently in an
410 (parse_annotation): New function.
411 (parser_start_element, parser_end_element): Handle annotation.
412 (parse_method, parse_interface): Remove support for c_name attribute,
413 switch to annotations.
415 * glib/dbus-gidl.h (interface_info_get_binding_names)
416 (method_info_get_binding_names)
417 (interface_info_get_binding_name, method_info_get_binding_name)
418 (interface_info_set_binding_name, method_info_set_binding_name):
420 (interface_info_get_annotations, method_info_get_annotations)
421 (interface_info_get_annotation, method_info_get_annotation)
422 (interface_info_add_annotation, method_info_add_annotation):
425 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
427 (struct MethodInfo): Ditto.
428 Straightfoward conversion of binding methods into annotation methods
431 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
433 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
435 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
436 Use new annotation API.
438 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
441 * doc/dbus-specification.xml: Discuss introspection annotations,
442 include list of well-known annotations.
444 * test/glib/test-service-glib.xml: Make validate against new DTD.
446 2005-02-17 Colin Walters <walters@verbum.org>
448 This patch is based on initial work from
449 Paul Kuliniewicz <kuliniew@purdue.edu>.
451 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
452 initialization of GValue from dbus type to here.
453 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
454 for the "glib-genmarshal" program from a DBus type.
455 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
456 into the C name for it we use in the glib bindings.
457 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
458 glib C type (not GValue).
459 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
461 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
464 * glib/dbus-gutils.h: Prototype it.
466 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
467 (marshal_dbus_message_to_g_marshaller): Use new shared function
468 dbus_glib_marshal_dbus_message_to_gvalue_array.
470 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
471 Will be changed once we have annotations.
473 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
474 GStaticRWLock. Callers updated.
475 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
476 (string_table_next): New function for iterating over zero-terminated
478 (string_table_lookup): New function; retrieves specific entry in
480 (get_method_data): New function; look up method data in object data chunk.
481 (object_error_domain_prefix_from_object_info)
482 (object_error_code_from_object_info): New functions, but not implemented yet.
483 (method_interface_from_object_info): New function; retrieve interface name.
484 (method_name_from_object_info): New function; retrieve method name.
485 (method_arg_info_from_object_info): New function; retrieve argument data.
486 (arg_iterate): New function; iterates over serialized argument data.
487 (method_dir_signature_from_object_info): New function; returns a
488 GString holding type signature for arguments for just one
489 direction (input or output).
490 (method_input_signature_from_object_info)
491 (method_output_signature_from_object_info): New functions.
492 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
493 converts dbus message arguments into a GValue array. Used for both
494 signal handling and method invocation.
495 (struct DBusGlibWriteIterfaceData): New utility structure.
496 (write_interface): New function; generate introspection XML for
498 (introspect_interfaces): New function; gathers all interface->methods,
499 generates introspection XML for them.
500 (handle_introspect): Invoke introspect_interfaces.
501 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
502 (lookup_object_and_method): New function; examines an incoming message
503 and attempts to match it up (via interface, method name, and argument
504 signature) with a known object and method.
505 (gerror_domaincode_to_dbus_error_name): New function; converts a
506 GError domain and code into a DBus error name. Needs GError data
507 added to object introspection to work well.
508 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
510 (invoke_object_method): New function to invoke an object method
511 looked up via lookup_object_and_method. Parses the incoming
512 message, turns it into a GValue array, then invokes the marshaller
513 specified in the DBusGMethodInfo. Creates a new message with
514 either return values or error message as appropriate.
515 (gobject_message_function): Invoke lookup_object_and_method and
516 invoke_object_method.
518 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
519 (enum DBusBindingOutputMode): New enum for binding output modes.
520 (pretty_print): Print binding names.
521 (dbus_binding_tool_error_quark): GError bits.
523 (main): Create GIOChannel for output. Parse new --mode argument,
524 possible values are "pretty-print", "glib-server", "glib-client".
525 Use mode to invoke appropriate function.
527 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
529 * glib/dbus-glib-tool.h: New header, just includes GError bits
532 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
533 maps binding style to name.
534 (struct MethodInfo): Ditto.
535 (get_hash_keys, get_hash_key): Utility function, returns keys for
537 (interface_info_new, method_info_new): Initialize bindings.
538 (interface_info_unref, method_info_unref): Destroy bindings.
539 (method_info_get_binding_names, method_info_get_binding_name)
540 (interface_info_get_binding_names, interface_info_get_binding_name):
541 Functions for retrieving binding names.
542 (method_info_set_binding_name, interface_info_set_binding_name):
543 Functions for setting binding names.
545 * glib/dbus-binding-tool-glib.h: New file, has prototypes
546 for glib binding generation.
548 * glib/dbus-binding-tool-glib.c: New file, implements server-side
549 and client-side glib glue generation.
551 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
552 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
555 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
556 of using GClosureMarshal directly.
557 (struct DBusGObjectInfo): Add n_infos member.
559 * test/glib/test-service-glib.xml: New file; contains introspection data
560 for MyTestObject used in test-service-glib.c.
562 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
563 (my_object_do_nothing, my_object_increment, my_object_throw_error)
564 (my_object_uppercase, my_object_many_args): New test methods.
565 (main): Use dbus_g_object_class_install_info to include generated object
568 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
569 as well as client-side bindings.
571 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
572 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
573 using both the dbus_gproxy stuff directly as well as the generated bindings.
575 2005-02-15 Havoc Pennington <hp@redhat.com>
577 * dbus/dbus-connection.c (dbus_connection_dispatch): always
578 complete a pending call, don't run filters first.
580 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
581 dbus_pending_call_steal_reply
583 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
584 _dbus_connection_block_pending_call
585 (dbus_pending_call_get_reply): change to steal_reply and return a
588 * dbus/dbus-connection.c
589 (dbus_connection_send_with_reply_and_block): port to work in terms
591 (_dbus_connection_block_pending_call): replace block_for_reply
594 2005-02-14 Havoc Pennington <hp@redhat.com>
596 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
597 properly handle looking up group information by name; fix
600 2005-02-13 Havoc Pennington <hp@redhat.com>
602 * dbus/dbus-connection.c (dbus_connection_return_message)
603 (dbus_connection_borrow_message): hold dispatch lock while message
605 (_dbus_connection_block_for_reply): hold dispatch lock while we
606 block for the reply, so nobody steals our reply
607 (dbus_connection_pop_message): hold the dispatch lock while we
610 2005-02-13 Havoc Pennington <hp@redhat.com>
612 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
613 (_dbus_connection_release_dispatch)
614 (_dbus_connection_acquire_io_path)
615 (_dbus_connection_release_io_path): make the mutex and condvar
616 control access to the "acquired" flag. Drop the connection lock
617 while waiting on the condvar. Hopefully these are baby steps in
618 roughly the right direction.
620 2005-02-13 Havoc Pennington <hp@redhat.com>
622 * dbus/dbus-connection.c: use separate mutexes for the condition
623 variables; this is some kind of baseline for sanity, but the
624 condition variables still aren't used correctly afaict
626 2005-02-13 Havoc Pennington <hp@redhat.com>
628 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
631 * dbus/dbus-connection.c
632 (_dbus_connection_detach_pending_call_unlocked): add this
634 Initial semi-correct pass through to fix thread locking; there are
635 still some issues with the condition variable paths I'm pretty
638 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
641 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
642 rename to add _unlocked
643 (struct DBusConnection): move "dispatch_acquired" and
644 "io_path_acquired" to use only one bit each.
645 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
646 (dbus_connection_set_watch_functions): hacky fix to reentrancy
647 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
648 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
649 (_dbus_connection_remove_timeout)
650 (_dbus_connection_toggle_timeout): drop lock when calling out to
651 user functions; done in a hacky/bad way.
652 (_dbus_connection_send_and_unlock): add a missing unlock
653 (_dbus_connection_block_for_reply): add a missing unlock
655 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
656 drop lock in a hacky probably unsafe way to call out to user
659 2005-02-12 Havoc Pennington <hp@redhat.com>
661 * tools/dbus-tree-view.c (info_set_func_text): display more
664 * bus/driver.c (bus_driver_handle_list_services): list the bus
667 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
669 * glib/dbus-gidl.c (signal_info_get_n_args): new function
670 (method_info_get_n_args): new function
672 2005-02-12 Havoc Pennington <hp@redhat.com>
674 * bus/driver.c (bus_driver_handle_introspect): add introspection
677 2005-02-12 Havoc Pennington <hp@redhat.com>
679 * bus/driver.c: put the signature of each bus driver method in the
680 table of handlers and check it on incoming calls; this isn't
681 really useful, but going to add introspect support in a minute.
683 2005-02-11 Joe Shaw <joeshaw@novell.com>
685 * mono/Connection.cs: The unpredictability of finalizers in mono
686 prevents us from deterministically disconnecting the filters from
687 the Service class's finalizer, so move tracking of filters and
688 matches here. Add API for that.
690 * mono/Service.cs: Remove the code, add code which calls the
691 methods now on the Connection class.
693 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
695 * python/dbus.py (class Sender): added to support dbus signals better
696 (Bus::add_signal_receiver): added expand_args parameter which defaults
697 to True. When expand args is True the signal handler will pass the
698 message arguments as parameters to the signal handler. If False
699 revert to previous behavior where the signal handler must get the
700 argument list from the message. This is to help port applications
701 like HAL that have a tendancy to send variable length argument lists.
702 self._match_rule_to_receivers is now a dict of dicts.
703 (Bus::remove_signal_receiver): pop handler off the dict intead of
704 removing it from a list
705 (Bus::_signal_func): change signal handlers so that interface,
706 signal_name, service, path and message are packed into a Sender
707 object and that is passed to the handler. If expand_args is True
708 extract the args list from the message and append it to the parameter
711 * python/dbus_bindings.pyx.in (class Signature): added to support
713 (MessageIter::__init__): changed iteration limit to match D-BUS
714 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
715 STRUCT and VARIENT type support
716 (MessageIter::python_value_to_dbus_sig): made recursive to support
718 (MessageIter::append*): added Signature, dict, tuple
721 * python/examples/example-client.py: added examples of getting tuples
724 * python/examples/example-service.py: added examples of sending tuples
727 * python/examples/example-signal-recipient.py: Fixed to handle new
728 signal callback format
730 2005-02-10 Havoc Pennington <hp@redhat.com>
732 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
733 (call dbus_g_proxy_add_signal)
735 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
737 (_dbus_server_new_for_domain_socket): escape the path
739 * dbus/dbus-address.c (dbus_address_escape_value): new
740 (dbus_address_unescape_value): new
741 (dbus_parse_address): unescape values
743 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
745 * doc/dbus-specification.xml: explain how to escape values in
748 2005-02-10 Havoc Pennington <hp@redhat.com>
750 * dbus/dbus-message-factory.c (generate_special): modify test to
751 avoid using a non-basic dict key
753 * dbus/dbus-marshal-validate-util.c: add test for the below
755 * doc/dbus-specification.xml: require that dict keys are a basic
758 * dbus/dbus-marshal-validate.c
759 (_dbus_validate_signature_with_reason): require that dict key is a
762 2005-02-10 Havoc Pennington <hp@redhat.com>
764 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
765 change to be _and_unlock instead of _unlocked
767 * dbus/dbus-connection.c
768 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
769 have no_update so we can find this bug quickly in future
771 2005-02-10 Havoc Pennington <hp@redhat.com>
773 * dbus/dbus-message-util.c (verify_test_message): tests for string
776 * dbus/dbus-message.c (dbus_message_append_args_valist): add
777 support for arrays of string/signature/path
779 2005-02-10 Joe Shaw <joeshaw@novell.com>
781 * dbus/dbus-connection.c
782 (_dbus_connection_queue_received_message_link,
783 _dbus_connection_message_sent): Add the path to
785 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
786 _dbus_connection_send_preallocated_unlocked(), updated the
787 dispatch status, and unlocks. Fixes a bug where certain
788 situations (like a broken pipe) could cause a Disconnect message
789 to not be sent, tricking the bus into thinking a service was still
790 there when the process had quit.
791 (_dbus_connection_send_preallocated): Call
792 _dbus_connection_send_preallocated_and_unlock().
793 (_dbus_connection_send_and_unlock): Added. Calls
794 _dbus_connection_send_preallocated_and_unlock().
795 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
796 (dbus_connection_send_with_reply): Update the dispatch status and
799 * mono/Service.cs (~Service): Added. Removes the filter so that
800 we don't get unmanaged code calling back into a GCed delegate.
801 (RemoveFilter); Added.
803 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
805 * dbus/dbus-message.c (dbus_message_iter_open_container):
806 - Removed check for iterator type being an array because
807 get_arg_type does not work with writer iterators
808 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
810 2005-02-07 Havoc Pennington <hp@redhat.com>
812 * doc/dbus-specification.xml: some more language cleanups; add
813 stuff about how to deal with invalid protocol and extension
814 points; add _ to allowed chars in auth commands; add EXTENSION_
817 2005-02-06 Havoc Pennington <hp@redhat.com>
819 * s/expected/required/ in a couple places for clarity
821 2005-02-07 Colin Walters <walters@verbum.org>
823 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
824 sender or proposed_recipient.
826 2005-02-06 Havoc Pennington <hp@redhat.com>
828 * dbus/dbus-message-factory.c (generate_special): more tests
830 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
831 array length that exceeds the maximum
833 2005-02-05 Havoc Pennington <hp@redhat.com>
835 * dbus/dbus-message-factory.c (generate_special): more test cases,
838 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
839 reason why a signature was invalid
841 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
842 skip the length of the string before we look at it in validation
844 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
847 * dbus/dbus-message.c (_dbus_message_loader_new): default
848 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
850 2005-02-05 Havoc Pennington <hp@redhat.com>
852 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
853 if the signature of a variant was empty
854 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
855 struct with no element type)
857 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
858 mangled messages to break things
860 2005-02-04 Havoc Pennington <hp@redhat.com>
862 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
863 g_quark_try_string() so it actually can return 0
864 (dbus_g_proxy_connect_signal): ditto
866 2005-02-04 Havoc Pennington <hp@redhat.com>
868 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
870 (tristring_from_message): assert cleanly on null path/interface
871 (should not be possible though I decided later)
872 (dbus_g_proxy_dispose): move proxy manager unregistration here
873 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
874 g_return_if_fail() checks
876 2005-02-04 Havoc Pennington <hp@redhat.com>
878 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
880 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
881 (with some minor changes)
883 * doc/dbus-specification.xml: add deprecated attribute to
886 2005-01-31 Havoc Pennington <hp@redhat.com>
888 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
889 think it's sort of right
891 2005-01-30 Havoc Pennington <hp@redhat.com>
893 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
895 2005-01-30 Havoc Pennington <hp@redhat.com>
897 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
899 * autogen.sh: change to autotools 1.9
901 * glib/dbus-gproxy.c: completely change how signals work
902 (dbus_g_proxy_add_signal): new function to specify signature of a
904 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
905 and g_warning if the incoming message has the wrong signature.
907 2005-01-30 Havoc Pennington <hp@redhat.com>
909 * tools/dbus-names-model.c (have_names_notify): fix this
911 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
912 up the string array handling a bit
914 2005-01-30 Havoc Pennington <hp@redhat.com>
916 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
917 (dbus_g_pending_call_cancel): new function
919 * dbus/dbus-glib.h: move GType decls for connection/message here;
920 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
921 here, just kind of rationalizing how we handle all that
923 * tools/dbus-names-model.c: new file for a tree model listing the
926 * tools/dbus-tree-view.c (model_new): use proper typing on the
929 2005-01-30 Havoc Pennington <hp@redhat.com>
931 * glib/dbus-gmain.c: add a custom GSource back that just checks
932 whether the message queue has anything in it; otherwise, there are
933 cases where we won't see messages in the queue since there was no
934 IO visible to the glib main loop
936 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
937 increase default message timeout to 25 seconds
939 2005-01-30 Havoc Pennington <hp@redhat.com>
941 * test/glib/test-profile.c (no_bus_stop_server): remove the
942 warning about the g_warning that I just fixed
944 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
945 custom source, seems to be a lot easier to understand and work
948 2005-01-30 Havoc Pennington <hp@redhat.com>
950 I think this main loop thing is conceptually broken, but here are
951 some band aids. I'll maybe rewrite it in a minute.
953 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
954 custom GSource, so don't pass it in; confusing
955 (gsource_server_finalize, gsource_connection_finalize): add
956 finalize handlers that remove all the watches.
958 2005-01-30 Havoc Pennington <hp@redhat.com>
960 * glib/dbus-gobject.c (introspect_properties): fix the XML
963 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
964 which effectively detects the use of freed messages
966 * glib/dbus-gobject.c (handle_introspect): modify and return the
967 reply message instead of the incoming message
969 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
970 gee, maybe it should SEND THE XML instead of just making a string
971 and freeing it again ;-)
973 * tools/dbus-print-message.c (print_message): improve printing of
976 * configure.in: add debug-glib.service to the output
978 2005-01-30 Havoc Pennington <hp@redhat.com>
980 dbus-viewer introspected and displayed the bus driver
982 * dbus/dbus-object-tree.c
983 (object_tree_test_iteration): add tests for a handler registered on "/"
985 * dbus/dbus-object-tree.c
986 (_dbus_decompose_path): fix to handle path "/" properly
987 (run_decompose_tests): add tests for path decomposition
989 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
992 * glib/dbus-gobject.c (handle_introspect): fix quotes
994 * test/glib/run-test.sh: support launching the bus, then running
997 * test/glib/test-service-glib.c (main): put in a trivial gobject
998 subclass and register it on the connection
1000 * bus/driver.c (bus_driver_handle_introspect): implement
1001 introspection of the bus driver service
1003 * dbus/dbus-protocol.h: add #defines for the XML namespace,
1004 identifiers, doctype decl
1006 * bus/driver.c (bus_driver_handle_get_service_owner): handle
1007 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
1008 returning the service unchanged.
1009 (bus_driver_handle_message): remove old check for reply_serial in
1010 method calls, now the message type deals with that
1011 (bus_driver_handle_message): handle NULL interface
1013 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
1015 * glib/dbus-gloader-expat.c (description_load_from_string): allow
1018 * tools/dbus-viewer.c: add support for introspecting a service on
1021 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
1022 (dbus_g_pending_call_unref): add
1024 2005-01-29 Havoc Pennington <hp@redhat.com>
1026 * tools/dbus-tree-view.c: add support for displaying properties.
1027 (run dbus-viewer with an introspect xml file as arg, then resize
1028 the window so the tree elements show up, not sure what that is)
1030 * glib/dbus-gobject.c (handle_introspect): return
1031 org.freedesktop.Properties and org.freedesktop.Introspectable
1032 interfaces when we are introspected.
1034 * doc/dbus-specification.xml: allow empty interface name when
1037 2005-01-29 Havoc Pennington <hp@redhat.com>
1039 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
1040 though it uses glib, it could be extended for any binding in
1043 * glib/dbus-gobject.c (gobject_message_function): change to the
1044 new way properties work
1046 * dbus/dbus-protocol.h: add the new interfaces
1048 * doc/dbus-specification.xml: document the introspection format,
1049 Introspectable interface, and add an org.freedesktop.Properties
1052 * glib/dbus-gparser.c: add support for a <property> element
1054 * glib/dbus-gidl.c: add PropertyInfo
1056 * glib/dbus-gobject.c (handle_introspect): put the outermost
1057 <node> outside the signal and property descriptions.
1058 (introspect_properties): export properties as <property> rather
1059 than as method calls
1061 2005-01-28 Havoc Pennington <hp@redhat.com>
1063 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
1064 related to authentication protocol
1066 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
1068 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
1069 - BUS_ACTIVATION -> BUS_STARTER
1070 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
1071 - class MessageIter (__init__): Added recursion checking
1072 so we throw a nice error instead of just disconnecting from the
1074 (get): Added arg_type parameter for recursion.
1075 Removed the nil type
1076 Added signiture type placeholder (not implemented)
1077 Added struct type placeholder (not implemented)
1078 Added varient type placeholder (not implemented)
1079 Commented out dict type for now
1080 (get_element_type): renamed from get_array_type
1081 (get_*): changed to use the dbus_message_iter_get_basic API
1082 (get_*_array): removed in favor of recursive get_array method
1083 (get_array): new recursive method which calls get to marshal
1084 the elements of the array
1085 (value_to_dbus_sig): New method returns the corrasponding
1086 dbus signiture to a python value
1087 (append): Comment out dict handling for now
1088 Handle lists with the new recursive API
1089 Comment out None handling for now
1090 (append_nil): removed
1091 (append_*): changed to use dbus_message_iter_append_basic API
1092 (append_*_array): removed in favor of recursive append_array
1094 (__str__): Make it easier to print out recursive iterators
1096 - class Message (__str__): moved type inspection to the
1097 MessageIter class' __str__ method
1098 (get_iter): Added an append parameter wich defaults to False
1099 If True use the new API's to create an append iterator
1101 * python/dbus.py: Update to use new bindings API
1102 - TYPE_ACTIVATION -> TYPE_STARTER
1103 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
1104 - class ActivationBus -> class StarterBus
1105 - class RemoteObject (__call__): get an append iterator
1106 - (_dispatch_dbus_method_call): get an append iterator
1107 - class Object (emit_signal): get an append iterator
1109 * python/examples/: Fixed up the examples to work with the new API
1111 2005-01-28 Joe Shaw <joeshaw@novell.com>
1113 * configure.in: Bump version up to 0.30.
1115 * HACKING: Add a release item to bump the version number up after
1118 2005-01-28 Havoc Pennington <hp@redhat.com>
1120 * doc/dbus-specification.xml: update to describe 16-bit types and
1123 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
1126 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
1129 * dbus/dbus-marshal-recursive.c: implement
1131 2005-01-27 Havoc Pennington <hp@redhat.com>
1133 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
1135 * configure.in: find the right type for 16 and 32 bit ints as well
1138 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
1139 the 16-bit types so people don't have to stuff them in 32-bit or
1142 2005-01-27 Havoc Pennington <hp@redhat.com>
1144 * dbus/dbus-message.c: byteswap the message if you init an
1145 iterator to read/write from it
1147 * dbus/dbus-marshal-byteswap.c: new file implementing
1148 _dbus_marshal_byteswap()
1150 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
1152 2005-01-26 Havoc Pennington <hp@redhat.com>
1154 * dbus/dbus-marshal-validate-util.c: break this out (and fix
1155 build, apparently - nobody noticed?)
1157 2005-01-26 Havoc Pennington <hp@redhat.com>
1159 * dbus/dbus-marshal-recursive.h: remove todo comment
1161 2005-01-25 Joe Shaw <joeshaw@novell.com>
1163 * Land the mono binding changes to conform to the new APIs.
1165 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
1166 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
1168 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
1169 type code as a string.
1170 (InitAppending): Rename dbus_message_append_iter_init() to
1171 dbus_message_iter_init_append().
1173 * mono/BusDriver.cs: Rename ServiceEventHandler to
1174 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
1175 Rename ServiceOwnerChanged to NameOwnerChanged.
1177 * mono/Connection.cs: Rename BaseService to UniqueName, and the
1180 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
1182 * mono/Service.cs: Rename Exists to HasOwner, internally rename
1183 dbus_bus_acquire_service() to dbus_bus_request_name().
1185 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
1186 of Type.UnderlyingSystemType to get the correct element type for
1188 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
1189 dbus_message_get_{element|arg}_type() instead of
1190 dbus_message_iter_init_array_iterator().
1191 (Append): Replace dbus_message_iter_append_array() with
1192 dbus_message_iter_open_container() and
1193 dbus_message_iter_close_container().
1195 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
1196 types have been removed.
1198 * mono/DBusType/*.cs: Replace calls of
1199 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
1200 but specify the type in the DllImport extern declaration. Ditto
1201 for dbus_message_iter_append_[type]() ->
1202 dbus_message_iter_append_basic().
1204 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
1205 NameOwnerChangedHandler.
1207 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
1209 * python/dbus_bindings.pyx.in: Rename of methods and bindings
1210 - get_base_service -> get_unique_name
1211 - bus_get_base_service -> bus_get_unique_name
1212 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
1213 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
1214 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
1215 - bus_activate_service -> bus_start_service_by_name
1216 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
1217 - bus_acquire_service -> bus_request_name
1218 - dbus_bus_acquire_service -> dbus_bus_request_name
1219 - bus_service_exists -> bus_name_has_owner
1220 - dbus_bus_service_exists -> dbus_bus_name_has_owner
1222 * python/dbus.py: Rename of methods
1223 - activate_service -> start_service_by_name
1224 - bus_acquire_service -> bus_request_name
1225 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
1226 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
1229 2005-01-24 Joe Shaw <joeshaw@novell.com>
1231 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
1232 signature for the method that can't be found.
1234 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
1235 the message has any arguments, we need to call
1236 _dbus_type_reader_get_current_type(), not
1237 _dbus_type_reader_has_next().
1239 2005-01-24 Havoc Pennington <hp@redhat.com>
1241 * dbus/dbus-message-factory.c: more testing of message validation
1243 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
1246 2005-01-23 Havoc Pennington <hp@redhat.com>
1248 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
1249 get this all working, not many tests in the framework yet though
1251 2005-01-22 Havoc Pennington <hp@redhat.com>
1253 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
1254 tutorial, based on work from David Wheeler.
1256 2005-01-21 Havoc Pennington <hp@redhat.com>
1258 * dbus/dbus-bus.c: add more return_if_fail checks
1260 * dbus/dbus-message.c (load_message): have the "no validation"
1261 mode (have to edit the code to toggle the mode for now though)
1263 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
1264 skips all validation; I want to use this at least for benchmark
1265 baseline, I'm not sure if it should be a publicly-available switch.
1267 2005-01-21 Havoc Pennington <hp@redhat.com>
1269 * glib/dbus-gmain.c: don't put the GLib bindings in the same
1270 toplevel doxygen group as the low-level API stuff
1272 * dbus/dbus.h: note that libdbus is the low-level API
1274 2005-01-20 Havoc Pennington <hp@redhat.com>
1276 * update-dbus-docs.sh: script to update docs on the web site, only
1277 works for me though. neener.
1279 2005-01-20 Havoc Pennington <hp@redhat.com>
1281 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
1282 code can reveal bugs in it
1284 2005-01-20 Havoc Pennington <hp@redhat.com>
1286 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
1287 select() version, patches from Tor Lillqvist
1289 2005-01-20 Havoc Pennington <hp@redhat.com>
1291 * doc/dbus-tutorial.xml: replace > with >
1293 * bus/services.c (bus_registry_acquire_service): validate the name
1294 and return a better error if it's no good.
1296 * doc/dbus-specification.xml: note NO_AUTO_START change
1298 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
1299 from AUTO_START, we're toggling the default
1301 * bus/dispatch.c: adapt the tests to change of auto-start default
1303 2005-01-18 Havoc Pennington <hp@redhat.com>
1305 * rename dbus-daemon-1 to dbus-daemon throughout
1307 2005-01-18 Havoc Pennington <hp@redhat.com>
1309 * Throughout, grand renaming to strip out the use of "service",
1310 just say "name" instead (or "bus name" when ambiguous). Did not
1311 change the internal code of the message bus itself, only the
1312 programmer-facing API and messages.
1314 * doc/dbus-specification.xml: further update the message bus section
1316 * bus/config-parser.c (all_are_equiv): fix bug using freed string
1319 2005-01-17 Havoc Pennington <hp@redhat.com>
1321 * dbus/dbus-types.h: remove 16-bit types since we don't use them
1324 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
1325 "invalid name character" not only non-ASCII
1327 * doc/dbus-specification.xml: further update spec, message bus
1328 parts are still out-of-date but the marshaling etc. stuff is now
1331 2005-01-17 Havoc Pennington <hp@redhat.com>
1333 * doc/dbus-specification.xml: partially update spec
1335 2005-01-17 Havoc Pennington <hp@redhat.com>
1337 * Throughout, align variant bodies according to the contained
1338 type, rather than always to 8. Should save a fair bit of space in
1341 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
1342 fix handling of case where p == end
1344 * doc/TODO: remove the dbus_bool_t item and variant alignment items
1346 2005-01-17 Havoc Pennington <hp@redhat.com>
1348 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
1350 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
1351 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
1352 are marshaling/unmarshaling a boolean.
1354 2005-01-16 Havoc Pennington <hp@redhat.com>
1356 This is about it on what can be disabled/deleted from libdbus
1357 easily, back below 150K anyhow. Deeper cuts are more work than
1358 just turning the code off as I've done here.
1360 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
1361 signed int convenience funcs
1363 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
1366 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
1367 things out of libdbus
1369 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
1371 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
1372 tests-enabled-only, though it should probably be deleted)
1374 * dbus/dbus-message-util.c: same stuff
1376 * dbus/dbus-auth-util.c: same stuff
1378 2005-01-16 Havoc Pennington <hp@redhat.com>
1380 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
1382 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
1383 way for stripping down dbus-userdb.c stuff included in libdbus.
1384 Rename _dbus_parse_uid for consistency.
1386 2005-01-16 Havoc Pennington <hp@redhat.com>
1388 * dbus/dbus-internals.c (_dbus_real_assert): print the function
1389 name the assertion failed in
1391 * dbus/dbus-internals.h (_dbus_return_if_fail)
1392 (_dbus_return_val_if_fail): assert that the name of the function
1393 containing the check doesn't start with '_', since we only want to
1394 use checks on public functions
1396 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
1397 checks to assertions
1399 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
1400 change checks to asserts for private function
1402 * dbus/dbus-message.c (_dbus_message_set_serial): checks
1403 to asserts for private function
1405 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
1406 broken assertion that was breaking make check
1407 (_dbus_type_reader_array_is_empty): remove this rather than fix
1408 it, was only used in assertions
1410 2005-01-16 Havoc Pennington <hp@redhat.com>
1412 * test/unused-code-gc.py: hacky script to find code that's used
1413 only by the bus (not libdbus) or used only by tests or not used at
1414 all. It has some false alarms, but looks like we can clean up a
1415 lot of size from libdbus.
1417 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
1418 dbus/Makefile.am: initially move 10K of binary size out of libdbus
1420 2005-01-16 Havoc Pennington <hp@redhat.com>
1422 * Add and fix docs according to Doxygen warnings throughout
1425 * dbus/dbus-marshal-recursive.c
1426 (_dbus_type_reader_array_is_empty): change this to just call
1427 array_reader_get_array_len() and make it static
1429 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
1431 (dbus_message_iter_init_append): rename from append_iter_init
1433 * dbus/dbus-marshal-recursive.c
1434 (_dbus_type_reader_get_element_type): rename from
1435 _dbus_type_reader_get_array_type
1437 2005-01-15 Havoc Pennington <hp@redhat.com>
1439 * test/glib/test-profile.c (with_bus_server_filter): fix crash
1441 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
1442 when DBUS_DISABLE_ASSERT
1443 (_dbus_marshal_set_basic): be sure we align for the string length
1445 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
1448 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
1449 inline macro version
1450 (_dbus_string_set_byte): provide inline macro version
1452 2005-01-15 Havoc Pennington <hp@redhat.com>
1454 * Land the new message args API and type system.
1456 This patch is huge, but the public API change is not
1457 really large. The set of D-BUS types has changed somewhat,
1458 and the arg "getters" are more geared toward language bindings;
1459 they don't make a copy, etc.
1461 There are also some known issues. See these emails for details
1463 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
1464 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
1466 * dbus/dbus-marshal-*: all the new stuff
1468 * dbus/dbus-message.c: basically rewritten
1470 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
1471 freed blocks to be all non-nul bytes so using freed memory is less
1472 likely to work right
1474 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
1475 DBUS_FAIL_MALLOC=N environment variable, so you can do
1476 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
1477 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
1480 * qt/message.cpp: port to the new message args API
1481 (operator<<): use str.utf8() rather than str.unicode()
1482 (pretty sure this is right from the Qt docs?)
1484 * glib/dbus-gvalue.c: port to the new message args API
1486 * bus/dispatch.c, bus/driver.c: port to the new message args API
1488 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
1489 "locked" flag to TRUE and align_offset to 0; I guess we never
1490 looked at these anyhow, but seems cleaner.
1492 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
1493 move allocation padding macro to this header; use it to implement
1494 (_DBUS_STRING_STATIC): ability to declare a static string.
1496 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
1497 change to return TRUE if the interface is not set.
1499 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
1500 to dbus-marshal-validate.[hc]
1502 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
1505 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
1506 to dbus-marshal-*.[hc]
1508 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
1509 function here from dbus-marshal.c
1511 2005-01-12 Joe Shaw <joeshaw@novell.com>
1513 * NEWS: Update for 0.23.
1515 * configure.in: Release 0.23.
1517 2005-01-12 Joe Shaw <joeshaw@novell.com>
1519 * mono/Makefile.am, mono/example/Makefile.am: Always build the
1520 dbus DLL with --debug. Clean up after the .mdb files this leaves
1523 * mono/doc/Makefile.am: Need to uninstall the docs on "make
1526 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
1527 is an enum, get the enum's underlying type. Another mono
1530 2005-01-11 Joe Shaw <joeshaw@novell.com>
1532 Patch from Sjoerd Simons <sjoerd@luon.net>
1534 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
1535 DESTDIR. It breaks stuff.
1537 2005-01-11 Joe Shaw <joeshaw@novell.com>
1539 Patch from Tambet Ingo <tambet@ximian.com>
1541 * mono/DBusType/Array.cs (Get): Get the underlying element type by
1542 calling type.GetElementType(). The code previously depended on
1543 broken Mono behavior, which was fixed in Mono 1.1.3.
1545 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
1546 Activator.CreateInstance() so that the class's constructor is
1547 called with the right parameters.
1549 2005-01-11 Joe Shaw <joeshaw@novell.com>
1551 Patch from Timo Teräs <ext-timo.teras@nokia.com>
1553 * dbus/dbus-connection.c
1554 (_dbus_connection_queue_received_message_link): Call
1555 _dbus_connection_remove_timeout() instead of the _locked()
1556 variant, since it's always called from
1557 _dbus_connection_handle_watch(), which handles the locking.
1558 Removed the _locked() variant since it's no longer used.
1560 2005-01-03 Havoc Pennington <hp@redhat.com>
1562 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
1565 2004-12-26 Havoc Pennington <hp@redhat.com>
1567 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
1569 2005-01-03 Havoc Pennington <hp@redhat.com>
1571 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
1574 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
1576 2005-01-02 Havoc Pennington <hp@redhat.com>
1578 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
1580 2005-01-01 Havoc Pennington <hp@redhat.com>
1582 * configure.in: add -Wfloat-equal
1584 2005-01-01 Havoc Pennington <hp@redhat.com>
1586 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
1587 for a variety of reasons '==' doesn't do this.
1589 2004-12-31 Havoc Pennington <hp@redhat.com>
1591 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
1592 I keep wishing I had
1594 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1596 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
1598 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
1600 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
1601 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
1602 dbus-protocol.h. Because they are defines and not enums they are not
1605 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
1607 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
1608 dbus_bus_activate_service
1610 * python/dbus.py (Bus.activate_service): activate a service on the
1613 2004-12-24 Havoc Pennington <hp@redhat.com>
1615 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
1616 file format has also changed and I haven't adapted to that yet
1618 * Makefile.am: load .gcno files from latest gcc
1620 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
1621 * Patch from Rob Taylor <robtaylor@fastmail.fm>
1623 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
1626 * python/dbus.py (get_unix_user): Added binding to
1627 call dbus_bindings.bus_get_unix_user
1629 * python/extract.py: Modified the proto_pat regex to
1630 handle unsigned long
1632 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
1634 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
1635 better POSIX compliance.
1637 2004-12-19 Havoc Pennington <hp@redhat.com>
1639 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
1640 (_dbus_string_insert_8_aligned): new functions
1642 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
1644 2004-12-18 Havoc Pennington <hp@redhat.com>
1646 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
1649 * dbus/dbus-message.c: fix a comment, and add a still-unused
1650 not-implemented function
1652 * dbus/dbus-marshal.h: fix comment
1654 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
1656 2004-12-17 Joe Shaw <joeshaw@novell.com>
1658 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
1659 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
1660 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
1661 Type.UnderlyingSystemType to get the actual system type
1662 underneath. This code previously depended on the broken Mono
1663 behavior, which was fixed in 1.1.3.
1665 2004-11-27 Havoc Pennington <hp@redhat.com>
1667 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
1669 (_dbus_string_get_const_data): inline when asserts are disabled
1671 * dbus/dbus-message.c: record the _dbus_current_generation of
1672 creation so we can complain if dbus_shutdown() is used improperly.
1673 Do this only if checks are enabled.
1675 * dbus/dbus-connection.c: ditto
1677 2004-11-26 Havoc Pennington <hp@redhat.com>
1679 * test/glib/test-profile.c: add with_bus mode to profile echoes
1680 that go through the bus.
1682 * test/glib/run-test.sh: add ability to run test-profile
1684 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
1687 2004-11-26 Havoc Pennington <hp@redhat.com>
1689 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
1690 thing was implemented
1692 2004-11-26 Havoc Pennington <hp@redhat.com>
1694 * test/glib/test-profile.c: tweak a bit, add support for some
1695 made-up minimal malloc overhead with plain sockets, since in
1696 real life some sort of buffers are unavoidable thus we could
1697 count them in the theoretical best case
1699 2004-11-26 Havoc Pennington <hp@redhat.com>
1701 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
1702 where I was trying to cache one too many messages
1704 2004-11-26 Havoc Pennington <hp@redhat.com>
1706 * dbus/dbus-message.c: reimplement message cache as an array which
1707 makes the cache about twice as fast and saves maybe 1.5% overall
1709 2004-11-26 Havoc Pennington <hp@redhat.com>
1711 * dbus/dbus-threads.c (init_global_locks): forgot to put the
1712 message cache lock here
1714 2004-11-26 Havoc Pennington <hp@redhat.com>
1716 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
1717 the "char byte_order" next to each other to save 4 bytes
1718 (dbus_message_new_empty_header): reduce preallocation, since the
1719 message cache should achieve a similar effect
1720 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
1721 message cache that keeps a few DBusMessage around in a pool,
1722 another 8% speedup or so.
1724 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
1726 2004-11-25 Havoc Pennington <hp@redhat.com>
1728 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
1729 to write, without reading or blocking, try it before the poll()
1730 and skip the poll() if nothing remains to write. This is about a
1731 3% speedup in the echo client/server
1733 2004-11-25 Havoc Pennington <hp@redhat.com>
1735 The primary change here is to always write() once before adding
1736 the write watch, which gives us about a 10% performance increase.
1738 * dbus/dbus-transport-unix.c: a number of modifications to cope
1739 with removing messages_pending
1740 (check_write_watch): properly handle
1741 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
1742 messages_pending stuff
1743 (check_read_watch): properly handle WAITING_FOR_MEMORY and
1745 (unix_handle_watch): after writing, see if the write watch can be
1747 (unix_do_iteration): assert that write_watch/read_watch are
1748 non-NULL rather than testing that they aren't, since they
1749 aren't allowed to be NULL. check_write_watch() at the end so
1750 we add the watch if we did not finish writing (e.g. got EAGAIN)
1752 * dbus/dbus-transport-protected.h: remove messages_pending call,
1753 since it resulted in too much inefficient watch adding/removing;
1754 instead we now require that the transport user does an iteration
1755 after queueing outgoing messages, and after trying the first
1756 write() we add a write watch if we got EAGAIN or exceeded our
1757 max bytes to write per iteration setting
1759 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
1762 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
1763 freed and then accessed, valgrind flagged this bug, fix it
1765 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
1766 as the last valid field plus 1, where really it is equal to the
1767 last valid field. Corrects some message corruption issues.
1769 * dbus/dbus-mainloop.c: verbosity changes
1771 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
1772 instead of aborting in one of the test codepaths
1774 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
1775 caused not printing the pid ever again if a verbose was missing
1776 the newline at the end
1777 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
1779 * dbus/dbus-connection.c: verbosity changes;
1780 (dbus_connection_has_messages_to_send): new function
1781 (_dbus_connection_message_sent): no longer call transport->messages_pending
1782 (_dbus_connection_send_preallocated_unlocked): do one iteration to
1783 try to write() immediately, so we can avoid the write watch. This
1784 is the core purpose of this patchset
1785 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
1786 dump the outgoing message queue, so nobody will get confused
1787 trying to send them or thinking stuff is pending to be sent
1789 * bus/test.c: verbosity changes
1791 * bus/driver.c: verbosity/assertion changes
1793 * bus/dispatch.c: a bunch of little tweaks to get it working again
1794 because this patchset changes when/where you need to block.
1796 2004-11-23 Havoc Pennington <hp@redhat.com>
1798 * test/glib/test-profile.c: modify to accept a plain_sockets
1799 argument in which case it will bench plain sockets instead of
1800 libdbus, for comparison purposes.
1802 2004-11-22 Havoc Pennington <hp@redhat.com>
1804 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
1805 threads for more time, so sysprof can get a grip on it.
1807 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
1810 2004-11-13 Havoc Pennington <hp@redhat.com>
1812 * test/glib/test-profile.c: fix this thing up a bit
1814 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
1815 preallocation sizes by a fair bit; not sure if this will be an
1816 overall performance win or not, but it does reduce reallocs.
1818 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
1819 the test hack that forced constant realloc if asserts are
1820 disabled, so we can profile sanely. Sprinkle in some
1821 _DBUS_UNLIKELY() which are probably pointless, but before I
1822 noticed the real performance problem I put them in.
1823 (_dbus_string_validate_utf8): micro-optimize this thing a little
1824 bit, though callgrind says it didn't help; then special-case
1825 ascii, which did help a lot; then be sure we detect nul bytes as
1826 invalid, which is a bugfix.
1827 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
1828 superstition; use memset to nul the padding instead of a manual
1830 (_dbus_string_get_length): inline this as a
1831 macro; it showed up in the profile because it's used for loop
1834 2004-11-10 Colin Walters <walters@verbum.org>
1836 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
1839 2004-11-09 Colin Walters <walters@verbum.org>
1841 * dbus/dbus-string.c (_dbus_string_get_length): New
1842 function, writes DBusString to C buffer.
1844 * dbus/dbus-string.h: Prototype it.
1846 * dbus/dbus-message.c (dbus_message_type_to_string): New
1847 function, converts message type into C string.
1849 * dbus/dbus-message.h: Prototype it.
1851 * bus/selinux.c (bus_selinux_check): Take source pid,
1852 target pid, and audit data. Pass audit data to
1854 (log_audit_callback): New function, appends extra
1856 (bus_selinux_allows_acquire_service): Also take
1857 service name, add it to audit data.
1858 (bus_selinux_allows_send): Also take message
1859 type, interface, method member, error name,
1860 and destination, and add them to audit data.
1861 (log_cb): Initialize func_audit.
1863 * bus/selinux.h (bus_selinux_allows_acquire_service)
1864 (bus_selinux_allows_send): Update prototypes
1866 * bus/services.c (bus_registry_acquire_service): Pass
1867 service name to bus_selinux_allows_acquire_service.
1869 * bus/bus.c (bus_context_check_security_policy): Pass
1870 additional audit data. Move assignment of dest
1873 2004-11-07 Colin Walters <walters@verbum.org>
1875 * dbus/dbus-transport-unix.c (do_authentication): Always
1876 initialize auth_completed.
1878 2004-11-07 Colin Walters <walters@verbum.org>
1880 * bus/bus.c (load_config): Break into three
1881 separate functions: process_config_first_time_only,
1882 process_config_every_time, and process_config_postinit.
1883 (process_config_every_time): Move call of
1884 bus_registry_set_service_context_table into
1885 process_config_postinit.
1886 (process_config_postinit): New function, does
1887 any processing that needs to happen late
1888 in initialization (and also on reload).
1889 (bus_context_new): Instead of calling load_config,
1890 open config parser here and call process_config_first_time_only
1891 and process_config_every_time directly. Later, after
1892 we have forked but before changing UID,
1893 invoke bus_selinux_full_init, and then call
1894 process_config_postinit.
1895 (bus_context_reload_config): As in bus_context_new,
1896 load parse file inside here, and call process_config_every_time
1897 and process_config_postinit.
1899 * bus/services.h, bus/services.c
1900 (bus_registry_set_service_context_table): Rename
1901 from bus_registry_set_sid_table. Take string hash from config
1902 parser, and convert them here into SIDs.
1904 * bus/config-parser.c (struct BusConfigParser): Have
1905 config parser only store a mapping of service->context
1907 (merge_service_context_hash): New function.
1908 (merge_included): Merge context string hashes instead
1909 of using bus_selinux_id_table_union.
1910 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
1911 simply create a new string hash.
1912 (bus_config_parser_unref): Unref it.
1913 (start_selinux_child): Simply insert strings into hash,
1914 don't call bus_selinux_id_table_copy_over.
1916 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
1917 (bus_selinux_id_table_copy_over): Delete.
1919 2004-11-03 Colin Walters <walters@verbum.org>
1921 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
1924 2004-11-03 Colin Walters <walters@verbum.org>
1926 * bus/test-main.c (test_pre_hook): Fix test logic,
1927 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
1929 2004-11-02 Colin Walters <walters@redhat.com>
1931 * bus/selinux.c (bus_selinux_init): Split into two functions,
1932 bus_selinux_pre_init and bus_selinux_post_init.
1933 (bus_selinux_pre_init): Just determine whether SELinux is
1935 (bus_selinux_post_init): Do everything else.
1937 * bus/main.c (main): Call bus_selinux_pre_init before parsing
1938 config file, and bus_selinux_post_init after. This ensures that
1939 we don't lose the policyreload notification thread that
1940 bus_selinux_init created before forking previously.
1942 * bus/test-main.c (test_pre_hook): Update for split.
1944 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
1946 Patch from Johan Fischer <linux@fischaz.com>
1948 * mono/doc/Makefile.am (install-data-local): Added directory
1951 2004-10-29 Colin Walters <walters@redhat.com>
1953 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
1954 parameter for fd to write pid to.
1956 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
1958 * bus/bus.c (bus_context_new): Pass print_pid_fd
1959 to _dbus_become_daemon (bug #1720)
1961 2004-10-29 Colin Walters <walters@redhat.com>
1963 Patch from Ed Catmur <ed@catmur.co.uk>
1965 * mono/doc/Makefile.am (install-data-local): Handle
1968 2004-10-29 Colin Walters <walters@redhat.com>
1970 * bus/.cvsignore, qt/.cvsignore: Update.
1972 2004-10-29 Colin Walters <walters@redhat.com>
1974 Patch from Kristof Vansant <de_lupus@pandora.be>
1976 * configure.in: Detect Slackware.
1977 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
1978 * bus/rc.messagebus.in: New file.
1980 2004-10-29 Colin Walters <walters@redhat.com>
1982 * tools/dbus-monitor.c (filter_func): Return
1983 DBUS_HANDLER_RESULT_HANDLED in filter function
1985 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
1987 2004-10-29 Colin Walters <walters@redhat.com>
1989 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
1991 * bus/services.c (bus_registry_acquire_service):
1992 Correctly retrieve service name from DBusString
1995 2004-10-29 Colin Walters <walters@redhat.com>
1997 * dbus/dbus-glib.h: Update documentation to not
1998 refer to internal APIs.
2000 2004-10-27 Joe Shaw <joeshaw@novell.com>
2002 * mono/Arguments.cs (GetDBusTypeConstructor):
2003 type.UnderlyingSystemType will return "System.Byte" if you do it
2004 on "byte[]", which is not what we want. So check the type.IsArray
2005 property and use System.Array instead.
2007 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
2009 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
2010 the DBusUserInfo structure since this is passed into the function.
2011 This would cause a double free when the function that allocated
2012 the structure would try to free it when an error occured.
2014 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
2015 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
2016 for service activation to avoid 32bit/64bit parallel install issues
2018 2004-10-21 Colin Walters <walters@verbum.org>
2020 * AUTHORS: Fix my email address, the @gnu.org one
2021 has been bouncing for some time. Also add J5.
2023 2004-10-21 Colin Walters <walters@verbum.org>
2025 * dbus/dbus-transport-unix.c (do_authentication): Return
2026 authentication status to callers.
2027 (unix_handle_watch): If we completed authentication this round,
2028 don't do another read. Instead wait until the next iteration,
2029 after we've read any pending data in the auth buffer.
2030 (unix_do_iteration): Ditto.
2031 (unix_handle_watch): Updated for new do_authentication prototype.
2033 2004-10-18 Colin Walters <walters@verbum.org>
2035 * bus/selinux.c (bus_selinux_enabled): Handle
2036 --disable-selinux case.
2038 2004-10-18 Colin Walters <walters@verbum.org>
2040 * bus/selinux.h: Add bus_selinux_enabled.
2042 * bus/selinux.c (bus_selinux_enabled): Implement it.
2044 * bus/config-parser.c (struct include): Add
2045 if_selinux_enabled member.
2046 (start_busconfig_child): Parse if_selinux_enabled
2047 attribute for include.
2048 (bus_config_parser_content): Handle it.
2050 * bus/session.conf.in, bus/system.conf.in: Add
2051 inclusion of context mapping to default config files;
2052 conditional on SELinux being enabled.
2054 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
2056 * test/data/invalid-config-files/badselinux-1.conf,
2057 test/data/invalid-config-files/badselinux-2.conf:
2058 Test files for bad syntax.
2060 2004-10-17 Colin Walters <walters@verbum.org>
2062 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
2063 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
2064 format specifier mismatches.
2066 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
2068 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
2071 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
2072 pointer (bug #1540, Leonardo Boiko).
2074 2004-09-28 Jon Trowbridge <trow@ximian.com>
2076 * mono/BusDriver.cs: Changed BusDriver struct to remove
2077 the ServiceCreated and ServiceDeleted events and replace them
2078 with the new ServiceOwnerChanged event.
2080 * mono/example/BusListener.cs: Added a new example program,
2081 which listens for and reports any ServiceOwnerChanged events
2084 * mono/example/Makefile.am (DESTDIR): Build changes for the
2085 new BusListener.cs example.
2087 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
2089 * bus/signals.c (bus_match_rule_parse): validate the components of
2090 match rules (bug #1439).
2092 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
2094 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
2096 * doc/dbus-specification.xml: document ServiceOwnerChanged
2099 * bus/driver.c, bus/driver.h, bus/services.c: Use
2100 ServiceOwnerChanged signal instead of ServiceCreated and
2103 * bus/dispatch.c: update testcase for the new signal.
2105 2004-09-20 Jon Trowbridge <trow@ximian.com>
2107 Patch from Nat Friedman <nat@novell.com>
2109 * mono/Makefile.am: A number of small build fixes to allow "make
2110 distcheck" to succeed.
2112 * mono/example/Makefile.am: "make distcheck" fixes.
2114 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
2117 * test/Makefile.am: "make distcheck" fixes.
2119 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
2121 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
2123 * doc/busconfig.dtd: update the DTD for the at_console attribute.
2125 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
2126 messages after the first one (bug #1389).
2128 * bus/dispatch.c (check_double_hello_message): add a test case for
2129 the double hello message bug.
2130 (check_existent_service_activation): fix check of spawning error.
2132 2004-09-16 David Zeuthen <david@fubar.dk>
2134 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
2136 2004-09-12 David Zeuthen <david@fubar.dk>
2138 Patch from Kay Sievers <kay.sievers@vrfy.org>
2140 * bus/bus.c (bus_context_new):
2142 * bus/main.c (usage)
2144 Add commandline option --nofork to override configuration file
2147 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
2149 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
2150 compilers don't like it (bug #974).
2152 2004-09-04 Harald Fernengel <harry@kdevelop.org>
2154 * qt/connection.*: Applied patch by Jérôme Lodewyck
2155 <lodewyck@clipper.ens.fr> to integrate an existing
2156 connection into the Qt eventloop
2158 2004-08-30 Jon Trowbridge <trow@ximian.com>
2160 * mono/BusDriver.cs: Added. This is a class for interacting with
2161 the org.freedesktop.DBus service.
2163 * mono/Message.cs: Added a mechanism to expose the message that is
2164 currently being dispatched via the static Message.Current
2165 property. Added Message.Sender and Message.Destination
2168 * mono/Handler.cs: Expose the dispatched message via
2169 Message.Current when handling method calls.
2171 * mono/Service.cs: Expose the dispatched message via
2172 Message.Current when handling signal emissions.
2174 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
2175 Connection.BaseService property.
2177 2004-08-28 Havoc Pennington <hp@redhat.com>
2179 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
2181 More fixes from Steve Grubb
2183 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
2184 (_dbus_listen_tcp_socket): fix fd leak
2186 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
2187 EINTR to a bit lower in the code
2189 2004-08-26 Jon Trowbridge <trow@ximian.com>
2191 * bus/driver.c (bus_driver_handle_service_exists): Respond with
2192 TRUE if we are inquiring about the existence of the built-in
2193 org.freedesktop.DBus service.
2195 2004-08-25 John Palmieri <johnp@redhat.com>
2196 * bus/config-parser.c:
2197 (struct PolicyType): Add POLICY_CONSOLE
2198 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
2199 (start_busconfig_child): Sets up console element when
2200 <policy at_console=""> is encountered in a policy file
2201 (append_rule_from_element): Convert console elements to console
2205 (bus_policy_create_client_policy): Add console rules to the client
2206 policy based on if the client is at the console
2207 (bus_policy_append_console_rule): New function for adding a
2208 console rule to a policy
2209 (bus_policy_merge): Handle console rule merging
2211 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
2212 where we check for console user files
2214 * dbus/dbus-sysdeps.c:
2215 (_dbus_file_exists): New function which checks if the given
2217 (_dbus_user_at_console): New function which does the system
2218 specific process of checking if the user is at the console
2220 * dbus/dbus-userdb.c:
2221 (_dbus_is_console_user): New function converts a UID to user name
2222 and then calls the system specific _dbus_user_at_console to
2223 see if the user is at the console and therefor a console user
2225 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
2227 * bus/config-parser.c (set_limit):
2228 * bus/dbus-daemon-1.1.in:
2229 * test/data/valid-config-files/many-rules.conf: set the
2230 max_match_rules_per_connection limt from the config file.
2232 * doc/busconfig.dtd: update the DTD.
2234 * bus/driver.c: remove some unused variables.
2236 2004-08-24 Mikael Hallendal <micke@imendio.com>
2238 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
2239 it's been replaced by dbus_g_bus_get
2241 2004-08-23 Colin Walters <walters@redhat.com>
2243 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2245 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
2247 * bus/selinux.c: Create a thread for policy reload notification.
2248 (bus_selinux_get_policy_root): Implement.
2250 * bus/config-parser.c (start_busconfig_child)
2251 (bus_config_parser_content): Support SELinux-root relative
2254 * configure.in <HAVE_SELINUX>: Add -lpthread.
2256 * bus/test-main.c (test_pre_hook, test_post_hook): New.
2257 (test_post_hook): Move memory checking into here.
2258 (test_pre_hook, test_post_hook): Move SELinux checks in
2259 here, but conditional on a DBUS_TEST_SELINUX environment
2260 variable. Unfortunately we can't run the SELinux checks
2261 as a normal user, since they won't have any permissions
2262 for /selinux. So this will have to be tested manually
2263 for now, until we have virtualization for most of
2266 2004-08-23 Havoc Pennington <hp@redhat.com>
2268 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
2269 drop supplementary groups, suggested by Steve Grubb
2271 2004-08-20 Colin Walters <walters@redhat.com>
2273 * bus/config-parser.c (start_busconfig_child): Remove some unused
2276 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
2279 2004-08-17 Joe Shaw <joeshaw@novell.com>
2281 * configure.in: If --enable-mono is passed in, if we can't find
2284 * mono/Makefile.am: Use /gacutil to install assemblies into the
2287 2004-08-12 Havoc Pennington <hp@redhat.com>
2289 * NEWS: update for 0.22
2291 * configure.in: release 0.22
2293 2004-08-11 Colin Walters <walters@redhat.com>
2295 * tools/dbus-send.c (main, usage): Add --reply-timeout
2298 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
2300 * bus/bus.c (process_config_first_time_only): get rid of an unused
2301 DBusError that was causing a memoy leak (bug #989).
2303 * dbus/dbus-keyring.c, dbus/dbus-message.c:
2304 fix compilation on Solaris/Forte C (bug #974)
2306 * bus/main.c (main): plug two minuscule memleaks.
2308 2004-08-10 Havoc Pennington <hp@redhat.com>
2310 * doc/dbus-tutorial.xml: add some more info on GLib bindings
2312 2004-08-09 Havoc Pennington <hp@redhat.com>
2314 * COPYING: switch to Academic Free License version 2.1 instead of
2315 2.0, to resolve complaints about patent termination clause.
2317 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
2319 * README: added documentation for the --enable-python
2322 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
2324 * bus/config-parser.c (bus_config_parser_new): fix an invalid
2325 _unref in the SELinux support.
2327 * doc/busconfig.dtd: update DTD for SELinux support.
2329 * bus/config-loader-libxml.c: fix error handler and parser
2330 initialisation/cleanup. OOM test now works with libxml2 HEAD.
2332 * configure.in: remove the warning about libxml2.
2334 * dbus/dbus-bus.c: silence doxygen warning.
2336 2004-07-31 Colin Walters <walters@redhat.com>
2338 * configure.in: Move #error in SELinux check to its own line.
2340 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
2342 * dbus/dbus-internals.h (_DBUS_SET_OOM):
2343 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
2346 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
2347 broken by the change in the _SET_OOM macros.
2349 2004-07-31 Colin Walters <walters@redhat.com>
2351 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
2354 2004-07-31 Colin Walters <walters@redhat.com>
2356 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
2357 to correctly detect DBUS__ACQUIRE_SVC. Also add an
2360 2004-07-24 Havoc Pennington <hp@redhat.com>
2362 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2364 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
2367 * configure.in: add --enable-selinux
2369 * bus/policy.c (bus_policy_merge): add FIXME to a comment
2371 * bus/main.c (main): initialize and shut down selinux
2373 * bus/connection.c: store SELinux ID on each connection, to avoid
2374 repeated getting of the string context and converting it into
2377 * bus/bus.c (bus_context_get_policy): new accessor, though it
2379 (bus_context_check_security_policy): check whether the security
2380 context of sender connection can send to the security context of
2381 recipient connection
2383 * bus/config-parser.c: add parsing for <selinux> and <associate>
2385 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
2386 implement dbus_connection_get_unix_fd()
2388 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
2389 function, used by the selinux stuff
2391 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
2393 * bus/config-loader-libxml.c: complete the implementation of
2394 libxml backend for config file loader. Doesn't work with full OOM
2397 * configure.in: change error when selecting libxml into a warning.
2399 * test/data/invalid-config-files: add two non-well-formed XML
2402 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
2404 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
2405 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
2406 be necessary to read all the buffer. (bug #894)
2408 * bus/activation.c (bus_activation_activate_service): fix a
2409 potential assertion failure (bug #896). Small optimization in the
2410 case of auto-activation messages.
2412 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
2413 add test case for byte-through-vararg bug (#901). patch by Kimmo
2416 2004-07-28 Anders Carlsson <andersca@gnome.org>
2419 * python/dbus_bindings.pyx.in:
2420 Add dbus.init_gthreads (), allow emit_signal to pass
2421 arguments to the signal.
2423 2004-07-24 Havoc Pennington <hp@redhat.com>
2425 * AUTHORS: add some people, not really comprehensively, let me
2426 know if I missed you
2428 2004-07-24 Havoc Pennington <hp@redhat.com>
2430 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
2433 * test/Makefile.am (DIST_SUBDIRS): here also
2435 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2437 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
2438 breaking build on Solaris, reported by Farhad Saberi on the ML.
2440 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
2441 va_arg invocation to account for integer promotion in the case of
2442 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
2444 * bus/services.c (bus_service_remove_owner): fix bug #902, use
2445 _dbus_list_get_first_link, not _dbus_list_get_first.
2447 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
2449 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
2450 handler functions so that the asserts in _dbus_object_subtree_unref
2453 * dbus/dbus-transport-unix.c (do_reading):
2454 _dbus_transport_queue_messages return value is of type
2455 dbus_bool_t, not DBusDispatchStatus.
2457 2004-07-19 David Zeuthen <david@fubar.dk>
2459 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
2462 (check_get_connection_unix_user): Debug says GetProperty; but the
2463 method is called GetConnectionUnixUser
2464 (check_get_connection_unix_process_id): New function
2465 (bus_dispatch_test): Actually call check_get_connection_unix_user();
2466 also call check_get_connection_unix_process_id()
2469 (bus_driver_handle_get_connection_unix_process_id): New function,
2470 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
2474 (handle_server_data_external_mech): Set pid from the credentials
2475 obtained from the socket
2477 * dbus/dbus-connection.c:
2478 (dbus_connection_get_unix_process_id): New function
2480 * dbus/dbus-connection.h:
2481 Add prototype for dbus_connection_get_unix_process_id
2483 * dbus/dbus-transport.c:
2484 (_dbus_transport_get_unix_process_id): New function
2486 * dbus/dbus-transport.h:
2487 Add prototype for _dbus_transport_get_unix_process_id
2489 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
2491 * dbus/dbus-message.c: Message counter fix, patch by Christian
2492 Hammond <chipx86@gnupdate.org>
2494 2004-07-18 Seth Nickell <seth@gnome.org>
2497 * python/dbus_bindings.pyx.in:
2498 * python/tests/test-client.py:
2500 Add dbus.ByteArray and dbus_bindings.ByteArray
2501 types so that byte streams can be passed back.
2503 Give jdahlin the heaps of credit that are so
2506 2004-07-12 Seth Nickell <seth@gnome.org>
2510 Add message argument to the default object_method_handler
2513 * python/dbus_bindings.pyx.in:
2515 Automatically return NIL when passed an empty list
2516 (we can't pass back a list since lists are typed
2517 and we don't have any idea what type the the client
2518 intended the list to be... :-( )
2520 2004-07-10 Seth Nickell <seth@gnome.org>
2522 * python/examples/Makefile.am:
2524 Fix distcheck breakage caused by new examples.
2526 2004-07-10 Seth Nickell <seth@gnome.org>
2530 Add "message" argument to service-side dbus.Object
2531 methods. This will break existing services written
2532 using the python bindings, but will allow extraction
2533 of all the message information (e.g. who its from).
2535 Add improved "object oriented" signal handling/emission.
2537 * python/examples/example-service.py:
2541 * python/examples/example-signal-emitter.py:
2542 * python/examples/example-signal-recipient.py:
2544 Two new examples that show how to emit and receive
2545 signals using the new APIs.
2547 * python/examples/example-signals.py:
2548 * python/examples/gconf-proxy-service.py:
2549 * python/examples/gconf-proxy-service2.py:
2551 Add "message" argument to service methods.
2553 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
2555 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
2556 * dbus/bus.c (dbus_bus_get_unix_user)
2557 * doc/dbus-specification.xml: implement GetConnectionUnixUser
2558 method of org.freedesktop.DBus interface.
2560 * bus/dispatch.c: test case
2562 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
2564 * python/Makefile.am: switched include directory from glib/ to dbus/
2565 since dbus-glib.h moved
2567 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
2569 * configure.in: prevent building the gcj stuff and libxml loader
2570 since they are broken.
2572 2004-06-20 Havoc Pennington <hp@redhat.com>
2574 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
2575 codes from the dbus error names
2577 * glib/dbus-glib.h: move to subdir dbus/ since it's included
2578 as dbus/dbus-glib.h and that breakage is now visible due to
2579 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
2581 * glib/dbus-glib.h: s/gproxy/g_proxy/
2583 * dbus/dbus-shared.h: new header to hold stuff shared with
2586 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
2589 * glib/dbus-glib.h (dbus_set_g_error): move to
2590 dbus-glib-lowlevel.h
2592 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
2593 of stuff to enable this
2595 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
2597 * a bunch of other changes with the same basic "separate glib
2598 bindings from dbus.h" theme
2600 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
2602 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
2604 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
2606 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
2608 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
2609 the reply value of the ServiceExists message.
2611 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
2613 * python/dbus_bindings.pyx.in: No longer need to parse path
2614 elements and pass them as arrays of strings. The C API now
2615 accepts plain path strings.
2616 (_build_parsed_path): removed
2618 2004-06-07 Havoc Pennington <hp@redhat.com>
2620 * doc/TODO: remove auto-activation item since it's done; sort
2621 items by importance/milestone
2623 2004-06-07 Havoc Pennington <hp@redhat.com>
2625 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
2626 random signature when using REQUIRED_FIELDS (this hack won't work
2629 * dbus/dbus-message.c: change the signature to be a header field,
2630 instead of message->signature special-case string. Incremental
2631 step forward. Then we can fix up code to send the signature in the
2632 message, then fix up code to validate said signature, then fix up
2633 code to not put the typecodes inline, etc.
2634 (load_one_message): don't make up the signature after the fact
2635 (decode_header_data): require signature field for the known
2638 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
2640 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
2642 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
2644 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
2646 * mono/Handler.cs: Updated to follow new path argument for
2647 (un-)registering objects.
2649 * mono/example/Makefile.am:
2651 * configure.in: Bumped required version for mono and use new -pkg
2654 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
2656 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
2657 registration functions take the path argument as char* instead of
2660 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
2661 split off the path decompostion part of
2662 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
2665 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
2667 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2669 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
2670 machine approach. A state is implemented as a function that
2671 handles incoming events as specified for that state.
2673 * doc/dbus-specification.xml: Update auth protocol state machine
2674 specification to match implementation. Remove some leftover
2677 2004-06-02 Kristian Høgsberg <krh@redhat.com>
2679 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
2680 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
2683 * Doxyfile.in: remove deprecated options.
2685 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
2686 glib/test-thread.h, glib/test-thread-client.c,
2687 glib/test-thread-server.c, glib/test-profile.c,
2688 glib/test-dbus-glib.c: remove these unused files.
2690 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
2692 * dbus/dbus-object-tree.c
2693 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
2694 non-fallback handlers (bug #684).
2695 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
2696 (find_subtree_recurse): report wether the returned subtree is an
2697 exact match or a "fallback" match higher up in the tree.
2698 (object_tree_test_iteration): update test case.
2700 2004-06-01 Seth Nickell <seth@gnome.org>
2702 * python/dbus_bindings.pyx.in:
2703 * python/tests/test-client.py:
2705 Round off basic type support. Add dicts (yay!), and
2706 remaining array types.
2708 Make MessageIter more general so it works for dicts too.
2710 Mark all loop variables as C integers.
2712 2004-05-31 Havoc Pennington <hp@redhat.com>
2714 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
2717 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
2719 * glib/dbus-glib-tool.c (main): set up to have a --self-test
2720 option that runs the tests, and start filling in some code
2721 including for starters just dumping the interfaces to stdout
2723 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
2725 * test/data/valid-introspection-files/lots-of-types.xml: test of
2726 an example introspection file
2728 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
2731 2004-05-31 Seth Nickell <seth@gnome.org>
2733 * python/dbus_bindings.pyx.in:
2734 * python/tests/test-client.py:
2739 Fix string array memory trashing bug... oops...
2741 2004-05-30 Seth Nickell <seth@gnome.org>
2745 Add a nicer-but-less-flexible alternate API for handling
2746 calls to virtual objects in dbus.ObjectTree.
2748 Screw up the argument order to the dbus.Object constructor
2749 for consistency with dbus.ObjectTree (and to make dbus_methods
2750 optional for future extension)
2752 * python/examples/Makefile.am:
2753 * python/examples/gconf-proxy-service.py:
2754 * python/examples/gconf-proxy-service2.py:
2756 Alternate implementation of gconf-proxy-service using the
2757 nicer dbus.ObjectTree API.
2759 * python/examples/example-service.py:
2760 * python/tests/test-server.py
2762 Reverse the argument order to deal with dbus.Object constructor
2765 2004-05-30 Seth Nickell <seth@gnome.org>
2767 * python/examples/example-client.py:
2768 * python/examples/example-service.py:
2770 Take it back. Lists seem to work but they're broken
2771 in the test suite. Make the base examples use
2774 2004-05-30 Seth Nickell <seth@gnome.org>
2776 * python/dbus_bindings.pyx.in:
2777 * python/tests/test-client.py:
2779 Add some more tests and fix errors that crop up.
2780 Unfortunately, currently it seems like marshalling
2781 and unmarshalling of lists is completely broken :-(
2783 2004-05-30 Seth Nickell <seth@gnome.org>
2785 * python/dbus_bindings.pyx.in:
2787 Add support for ObjectPath type.
2791 Refactor message handling code to a common function.
2793 * python/tests/test-client.py:
2794 * python/tests/test-server.py:
2796 Add tests that check to make sure values of all types
2797 can be echoed from a service w/o mangling.
2799 2004-05-29 Seth Nickell <seth@gnome.org>
2803 Add ObjectTree class which allows implementation
2804 of trees of "virtual" objects. Basically the python
2805 wrapper for "register_fallback".
2807 * python/examples/Makefile.am
2808 * python/examples/gconf-proxy-client.py:
2809 * python/examples/gconf-proxy-service.py:
2811 Implement a simple GConf proxy service that supports
2812 get/set on string and int GConf keys using the ObjectTree.
2814 2004-05-29 Seth Nickell <seth@gnome.org>
2817 * python/examples/example-client.py:
2818 * python/examples/example-service.py:
2819 * python/examples/list-system-services.py:
2821 Add SessionBus, SystemBus and ActivationBus classes
2822 so you don't need to know the special little BUS_TYPE
2825 2004-05-29 Havoc Pennington <hp@redhat.com>
2827 * bus/config-parser.c (process_test_valid_subdir): temporarily
2828 stop testing config parser OOM handling, since expat has issues
2829 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
2831 * bus/dbus-daemon-1.1.in: change requested_reply to
2832 send_requested_reply/receive_requested_reply so we can send the
2833 replies, not just receive them.
2835 * bus/config-parser.c: parse the new
2836 send_requested_reply/receive_requested_reply
2838 * bus/policy.c (bus_client_policy_check_can_send): add
2839 requested_reply argument and use it
2841 * bus/bus.c (bus_context_check_security_policy): pass through
2842 requested_reply status to message send check
2844 * bus/system.conf.in: adapt to requested_reply change
2846 2004-05-28 Havoc Pennington <hp@redhat.com>
2848 * test/glib/test-service-glib.c (main): remove unused variable
2850 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
2852 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
2853 from the enum, no longer in use.
2855 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
2858 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
2859 whether error_name passed in is a valid error name.
2861 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
2863 * dbus/dbus-message.c (dbus_message_get_args): Added support for
2864 OBJECT_PATH and OBJECT_PATH_ARRAY
2866 2004-05-28 Seth Nickell <seth@gnome.org>
2868 * python/examples/Makefile.am:
2870 Forget to add Makefile.am. Do not pass go.
2872 2004-05-28 Michael Meeks <michael@ximian.com>
2874 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
2877 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
2879 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
2880 (_dbus_message_iter_get_basic_type_array): impl.
2881 drastically simplify ~all relevant _get methods to use these.
2882 (_dbus_message_iter_append_basic_array),
2883 (dbus_message_iter_append_basic): impl
2884 drastically simplify ~all relevant _append methods to use these.
2886 * dbus/dbus-message-builder.c (parse_basic_type)
2887 (parse_basic_array, lookup_basic_type): impl.
2888 (_dbus_message_data_load): prune scads of duplicate /
2891 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
2892 (_dbus_demarshal_basic_type): implement,
2893 (demarshal_and_validate_len/arg): beef up debug.
2894 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
2896 2004-05-27 Seth Nickell <seth@gnome.org>
2899 * python/Makefile.am:
2901 Include the example python apps in the tarball.
2903 * python/examples/list-system-services.py
2905 Add a python new example that fetches the list of services
2906 from the system bus.
2908 2004-05-27 Seth Nickell <seth@gnome.org>
2911 * python/dbus_bindings.pyx.in:
2913 Fix failure to notify that a signal was not handled,
2914 resulted in hung functions.
2916 2004-05-25 Colin Walters <walters@redhat.com>
2918 * tools/dbus-monitor.c (main): Monitor all types of messages.
2920 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
2922 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
2923 which unregisters the object path and disposes the handler.
2925 2004-05-23 Kristian Høgsberg <krh@redhat.com>
2927 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
2929 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
2930 operands to && so we call dbus_message_iter_next () for the last
2933 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
2935 * dbus/dbus-object-tree.c
2936 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
2937 children even if the requested path isn't registered.
2938 (object_tree_test_iteration): test object_tree_list_registered.
2940 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
2943 2004-05-20 Kristian Høgsberg <krh@redhat.com>
2945 * doc/TODO: Remove resolved items.
2947 * bus/expirelist.h (struct BusExpireList): remove unused n_items
2950 * bus/connection.c (bus_connections_expect_reply): Enforce the
2951 per-connection limit on pending replies.
2953 Patch from Jon Trowbridge <trow@ximian.com>:
2955 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
2956 up a watch that triggers a config reload when one end of the pipe
2958 (signal_handler): Instead of doing the config reload in our SIGHUP
2959 handler, just write to the reload pipe and let the associated
2960 watch handle the reload when control returns to the main loop.
2962 * bus/driver.c (bus_driver_handle_reload_config): Added.
2963 Implements a ReloadConfig method for requesting a configuration
2964 file reload via the bus driver.
2966 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
2968 * HACKING: Updated release instructions concerning the wiki page.
2970 2004-05-18 Kristian Høgsberg <krh@redhat.com>
2972 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
2973 filter against auth->allowed_mechs; we only add allowed mechs in
2974 record_mechanisms().
2976 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
2977 ALLOWED_MECHS to auth-script format so we can set the list of
2980 * data/auth/client-out-of-mechanisms.auth-script: New test to
2981 check client disconnects when it is out of mechanisms to try.
2983 * dbus/dbus-auth.c (process_command): Remove check for lines
2984 longer that 1 MB; we only buffer up maximum 16 kB.
2986 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2987 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
2988 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
2989 assume there might be unused bytes.
2991 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
2992 client-out-of-mechs, it is handled in process_reject(). Move check
2993 for max failures to send_rejected(), as it's a server-only thing.
2995 * dbus/dbus-auth.c: Factor out protocol reply code into functions
2996 send_auth(), send_data(), send_rejected(), send_error(),
2997 send_ok(), send_begin() and send_cancel().
2999 2004-05-17 Kristian Høgsberg <krh@redhat.com>
3001 Remove base64 encoding, replace with hex encoding. Original patch
3002 from trow@ximian.com, added error handling.
3004 * dbus/dbus-string.c (_dbus_string_base64_encode)
3005 (_dbus_string_base64_decode): Remove.
3006 (_dbus_string_hex_decode): Add end_return argument so we can
3007 distinguish between OOM and invalid hex encoding.
3008 (_dbus_string_test): Remove base64 tests and add test case for
3011 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
3012 Replace base64 with hex.
3014 * test/data/auth/invalid-hex-encoding.auth-script: New test case
3015 for invalid hex encoded data in auth protocol.
3017 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
3019 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
3022 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
3024 * mono/dbus-sharp.dll.config.in: Added for GAC
3025 * mono/dbus-sharp.snk: Added for GAC
3026 * mono/Assembly.cs.in: Added for GAC
3027 * mono/Makefile.am: Changes for GAC installation
3028 * configure.in: Added refs for dbus-sharp.dll.config.in and
3029 Assembly.cs.in. More fixes for mono testing
3030 * mono/example/Makefile.am: Changed var to CSC
3031 * Makefile.am: Changed flag name to DBUS_USE_CSC
3033 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
3035 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
3036 * mono/doc/*: Added documentation framework
3037 * configure.in: Added monodoc check
3038 * README: Added description of mono configure flags
3040 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
3042 * doc/dbus-specification.xml: Added a "Required" column to the
3043 header fields table and changed the "zero or more" verbage in
3044 the above paragraph to read "The header must contain the required
3045 named header fields and zero or more of the optional named header
3047 * test/data/invalid-messages/*.message: Added the required PATH
3048 named header field to the tests so that they don't fail on
3049 'Missing path field'
3051 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
3053 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
3054 the stack by implicitly defining variable and parameter types and
3055 removing the hack of defining C pointers as python objects and later
3058 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
3060 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
3062 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
3064 * mono/DBusType/Dict.cs: Handle empty dicts
3065 * mono/DBusType/Array.cs: Handle empty arrays
3066 * mono/Arguments.cs: Handle empty arguments
3068 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
3070 * dbus-sharp.pc.in: Modified to include include Libs and Requires
3073 2004-04-25 Kristian Høgsberg <krh@redhat.com>
3075 * test/data/valid-messages/standard-*.message: Update message
3076 test scripts to new header field names.
3078 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
3080 * test/break-loader.c (randomly_do_n_things): tracked down buffer
3081 overflow to times_we_did_each_thing array which would chop off the
3082 first character of the failure_dir string. Increased the size of
3083 the array to 7 to reflect the number of random mutation functions
3086 2004-04-21 Kristian Høgsberg <krh@redhat.com>
3088 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
3089 unix_server->watch here, it is unreffed in disconnect.
3090 (_dbus_server_new_for_tcp_socket): convert NULL host to
3091 "localhost" here so we don't append NULL to address.
3093 * dbus/dbus-server.c (_dbus_server_test): Add test case for
3094 various addresses, including tcp with no explicit host.
3096 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3098 * dbus/dbus-message.c (decode_header_data, decode_string_field):
3099 fix incorrect setting of .name_offset in the HeaderField (it was
3100 off by two bytes, positioned right after the name and typecode)
3102 * bus/bus.c (bus_context_new, bus_context_unref): test before
3103 calling dbus_server_free_data_slot and _dbus_user_database_unref
3104 in case of an error.
3106 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
3109 2004-04-19 Kristian Høgsberg <krh@redhat.com>
3111 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
3112 _dbus_poll() instead of select().
3114 2004-04-15 Jon Trowbridge <trow@ximian.com>
3116 * bus/main.c (signal_handler): Reload the configuration files
3118 (main): Set up our SIGHUP handler.
3120 * bus/bus.c (struct BusContext): Store the config file, user and
3121 fork flag in the BusContext.
3122 (process_config_first_time_only): Added. Contains the code
3123 (previously in bus_context_new) for setting up the BusContext from
3124 the BusConfigParser that should only be run the first time the
3125 config files are read.
3126 (process_config_every_time): Added. Contains the code (previously
3127 in bus_context_new) for setting up the BusContext from the
3128 BusConfigParser that should be run every time the config files are
3130 (load_config): Added. Builds a BusConfigParser from the config
3131 files and passes the resulting structure off to
3132 process_config_first_time_only (assuming this is the first time)
3133 and process_config_every_time.
3134 (bus_context_new): All of the config-related code has been moved
3135 to process_config_first_time_only and process_config_every_time.
3136 Now this function just does the non-config-related initializations
3137 and calls load_config.
3138 (bus_context_reload_config): Added.
3140 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
3142 * bus/driver.c (bus_driver_handle_get_service_owner):
3143 implement a GetServiceOwner method.
3144 * doc/dbus-specification.xml: document it.
3145 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
3147 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
3148 implement, using the bus GetServiceOwner method.
3150 * test/glib/test-dbus-glib.c:
3151 use dbus_gproxy_new_for_service_owner so that we can receive the
3154 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
3156 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
3157 dbus/dbus-message.c, dbus/dbus-protocol.h
3158 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
3160 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
3161 dbus/dbus-message.c, dbus/dbus-protocol.h
3162 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
3164 * dbus/dbus-internals.c (_dbus_header_field_to_string):
3165 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
3166 DBUS_HEADER_FIELD_SENDER resolves to "sender"
3168 * doc/dbus-specification.xml (Header Fields Table):
3169 s/SERVICE/DESTINATION
3170 s/SENDER_SERVICE/SENDER
3173 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
3175 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
3178 2004-04-13 Michael Meeks <michael@ximian.com>
3180 * glib/dbus-gobject.c (handle_introspect): split out
3181 (introspect_properties): this.
3182 (handle_introspect): implement this.
3184 * test/glib/Makefile.am: use the absolute path so the bus
3185 daemon's chdir ("/") doesn't kill us dead.
3187 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
3189 2004-04-12 Jon Trowbridge <trow@ximian.com>
3191 * bus/config-parser.c (struct BusConfigParser): Added
3192 included_files field.
3193 (seen_include): Added. Checks whether or not a file has already
3194 been included by any parent BusConfigParser.
3195 (bus_config_parser_new): Copy the parent's included_files.
3196 (include_file): Track which files have been included, and fail on
3197 circular inclusions.
3198 (process_test_valid_subdir): Changed printf to report if we are
3199 testing valid or invalid conf files.
3200 (all_are_equiv): Changed printf to be a bit clearer about
3201 what we are actually doing.
3202 (bus_config_parser_test): Test invalid configuration files.
3204 2004-04-09 Jon Trowbridge <trow@ximian.com>
3206 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
3207 argument. If non-null, the newly-constructed BusConfigParser will
3208 be initialized with the parent's BusLimits instead of the default
3210 (include_file): When including a config file, pass in
3211 the current parser as the parent and then copy the BusLimits
3212 from the included BusConfigParser pack to the current parser.
3213 (process_test_valid_subdir): Renamed from process_test_subdir.
3214 (process_test_equiv_subdir): Added. Walks through a directory,
3215 descending into each subdirectory and loading the config files
3216 it finds there. If any subdirectory contains two config files
3217 that don't produce identical BusConfigParser structs, fail.
3218 For now, the BusConfigParser's BusPolicies are not compared.
3219 (bus_config_parser_test): Call both process_test_valid_subdir and
3220 process_test_equiv_subdir.
3222 * bus/config-loader-libxml.c (bus_config_load): Take a parent
3223 argument and pass it along to the call to bus_config_parser_new.
3224 Also made a few small changes to allow this code to compile.
3226 * bus/config-loader-expat.c (bus_config_load): Take a parent
3227 argument and pass it along to the call to bus_config_parser_new.
3229 * bus/bus.c (bus_context_new): Load the config file
3230 with a NULL parent argument.
3232 2004-03-29 Michael Meeks <michael@ximian.com>
3234 * glib/dbus-gobject.c (introspect_properties): split
3235 out, fix mangled 'while' flow control.
3236 (introspect_signals): implement.
3237 (handle_introspect): update.
3239 2004-03-29 Michael Meeks <michael@ximian.com>
3241 * glib/dbus-gobject.c (set_object_property): split out /
3242 re-work, use the property type, and not the message type(!)
3243 (get_object_property): ditto.
3245 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
3246 (dbus_gvalue_marshal): make this code re-usable, needed
3247 for signals too, also on both proxy and server side.
3248 Re-write for more efficiency / readability.
3250 2004-03-29 Michael Meeks <michael@ximian.com>
3252 * dbus/dbus-message.c
3253 (dbus_message_new_error_printf): impl.
3255 * dbus/dbus-connection.c
3256 (dbus_connection_unregister_object_path): fix warning.
3258 * configure.in: fix no-mono-installed situation.
3260 2004-03-27 Havoc Pennington <hp@redhat.com>
3262 Patch from Timo Teräs:
3264 * tools/dbus-send.c (main): if --print-reply, assume type is
3265 method call; support boolean type args
3267 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
3268 bunch of memleak and logic bugs
3270 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
3272 * mono/Arguments.cs:
3273 * mono/Introspector.cs:
3275 * mono/InterfaceProxy.cs:
3277 * mono/ProxyBuilder.cs:
3279 Added InterfaceProxy class to avoid building proxies for every
3283 * dbus-message.c (dbus_message_append_args_valist)
3284 (dbus_message_iter_get_object_path)
3285 (dbus_message_iter_get_object_path_array)
3286 (dbus_message_iter_append_object_path)
3287 (dbus_message_iter_append_object_path_array):
3288 Added object_path iter functions to handle OBJECT_PATH arguments
3290 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
3292 First checkin of mono bindings.
3295 Build stuff for the bindings
3296 * dbus-sharp.pc.in: Added for pkgconfig
3298 2004-03-21 Havoc Pennington <hp@redhat.com>
3300 * test/test-service.c (main): remove debug spew
3302 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
3304 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
3307 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
3308 (dbus_message_iter_init_array_iterator)
3309 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
3310 indicate whether the iterator is empty
3312 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
3315 2004-03-19 Havoc Pennington <hp@redhat.com>
3317 * NEWS: 0.21 updates
3319 * configure.in: 0.21
3321 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
3323 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
3324 you don't need pyrex to make dist
3326 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
3329 2004-03-18 Richard Hult <richard@imendio.com>
3331 * dbus/dbus-message.c (dbus_message_get_auto_activation)
3332 (dbus_message_set_auto_activation): Add doxygen docs.
3334 2004-03-16 Richard Hult <richard@imendio.com>
3336 * bus/activation.c: (bus_activation_service_created),
3337 (bus_activation_send_pending_auto_activation_messages),
3338 (bus_activation_activate_service):
3340 * bus/dispatch.c: (bus_dispatch),
3341 (check_nonexistent_service_auto_activation),
3342 (check_service_auto_activated),
3343 (check_segfault_service_auto_activation),
3344 (check_existent_service_auto_activation), (bus_dispatch_test):
3345 * bus/driver.c: (bus_driver_handle_activate_service):
3346 * bus/services.c: (bus_registry_acquire_service):
3347 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
3348 (dbus_message_get_auto_activation):
3349 * dbus/dbus-message.h:
3350 * dbus/dbus-protocol.h: Implement auto-activation.
3352 * doc/dbus-specification.xml: Add auto-activation to the spec.
3354 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
3356 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
3357 fix a bug with CUSTOM types.
3359 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
3360 a unit test for this bug (used to fail).
3362 2004-03-12 Mikael Hallendal <micke@imendio.com>
3365 (babysitter_watch_callback): notify all pending activations waiting for
3366 the same exec that the activation failed.
3367 (bus_activation_activate_service): shortcut the activation if we
3368 already waiting for the same executable to start up.
3370 2004-03-12 Mikael Hallendal <micke@imendio.com>
3373 - Added service file reloading.
3374 Each service files directory is kept in an hash table in
3375 BusActivation and each BusActivationEntry knows what .service-file it
3376 was read from. So when you try to activate a service the bus will
3377 check if it's been updated, removed or if new .service-files has
3379 - Test code at the bottom for the service file reloading.
3380 * bus/test-main.c: (main):
3382 - added service reloading test.
3383 * dbus/dbus-sysdeps.c:
3384 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
3386 2004-03-08 Michael Meeks <michael@ximian.com>
3388 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
3389 bail immediately if disconnected, to avoid busy loop.
3391 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
3392 cleanup cut/paste/inefficiency.
3394 2004-03-01 David Zeuthen <david@fubar.dk>
3396 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
3397 bug where args were used twice. This bug resulted in a segfault
3398 on a Debian/PPC system when starting the messagebus daemon. Include
3399 dbus-sysdeps.h for DBUS_VA_COPY
3401 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
3403 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
3404 appropriate va_copy implementation. From GLib
3406 2004-02-24 Joe Shaw <joe@ximian.com>
3408 * bus/services.c (bus_registry_acquire_service): We need to pass
3409 in the service name to dbus_set_error() to prevent a crash.
3411 2003-12-26 Anders Carlsson <andersca@gnome.org>
3413 * AUTHORS: Reveal my True identity.
3415 2003-12-17 Mikael Hallendal <micke@imendio.com>
3417 * dbus/dbus-message.c: (dbus_message_append_args_valist):
3418 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
3420 2003-12-13 Mikael Hallendal <micke@imendio.com>
3422 * doc/TODO: Added not about better error check of configuration files.
3424 2003-12-02 Richard Hult <richard@imendio.com>
3426 * Update AFL version to 2.0 throughout the source files to reflect
3427 the update that was done a while ago.
3429 2003-12-02 Richard Hult <richard@imendio.com>
3431 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
3432 wrote_dict_key to FALSE on the iter that the dict is appended to,
3433 just like when appending other types. Fixes a bug where a dict
3434 couldn't be put inside a dict.
3435 (dbus_message_iter_append_dict_key): Fix typo in warning message.
3436 (message_iter_test, _dbus_message_test): Add test case for dict
3439 2003-12-01 David Zeuthen <david@fubar.dk>
3441 * python/dbus.py: Add the actual message when calling the reciever
3442 of a signal such that parameters can be inspected. Add the method
3443 remove_signal_receiver
3445 2003-11-26 Mikael Hallendal <micke@imendio.com>
3449 * glib/*.[ch]: Made ref functions return the pointer
3451 2003-11-25 Zack Rusin <zack@kde.org>
3453 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
3455 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
3458 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
3459 the Integrator and to better fit with the server,
3461 2003-11-24 Zack Rusin <zack@kde.org>
3463 * qt/connection.h, qt/connection.cpp: removing initDbus method since
3464 the integrator handles it now
3466 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
3467 since QTimer wasn't really meant to be used the way DBusTimeout is
3469 2003-11-24 Zack Rusin <zack@kde.org>
3471 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
3472 Integrator class which integrates D-BUS with the Qt event loop,
3474 * qt/connection.h, qt/connection.cpp: Move all the code which
3475 was dealing with D-BUS integration to the Integrator class,
3476 and start using Integrator,
3478 2003-11-23 Zack Rusin <zack@kde.org>
3480 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
3483 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
3484 switching namespaces to DBusQt, reworking the class,
3486 * Makefile.cvs: switching dependencies so that it matches KDE
3489 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
3492 2003-11-19 Havoc Pennington <hp@redhat.com>
3496 * configure.in: bump version to 0.20
3498 * configure.in (have_qt): add yet another place to look for qt
3499 (someone hand trolltech a .pc file...)
3501 2003-11-01 Havoc Pennington <hp@redhat.com>
3503 * doc/dbus-specification.xml: add state machine docs on the auth
3504 protocol; just a first draft, I'm sure it's wrong.
3506 2003-10-28 David Zeuthen <david@fubar.dk>
3508 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
3509 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
3511 2003-10-28 Havoc Pennington <hp@redhat.com>
3513 * dbus/dbus-message.c (get_next_field): delete unused function
3515 2003-10-28 Havoc Pennington <hp@redhat.com>
3517 * bus/expirelist.c (do_expiration_with_current_time): detect
3518 failure of the expire_func due to OOM
3520 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
3522 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
3523 NoReply error that's now created by the bus when the service exits
3525 2003-10-28 Havoc Pennington <hp@redhat.com>
3527 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
3528 tests for set_path, set_interface, set_member, etc.
3530 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
3532 * dbus/dbus-message.c (set_string_field): always just delete and
3533 re-append the field; accept NULL for deletion
3534 (re_align_fields_recurse): reimplement
3536 2003-10-26 Havoc Pennington <hp@redhat.com>
3538 * dbus/dbus-connection.c: fix docs to properly describe the
3539 disconnected message
3540 (_dbus_connection_notify_disconnected): remove this function;
3541 we can't synchronously add the disconnected message, we have to
3542 do it after we've queued any remaining real messages
3543 (_dbus_connection_get_dispatch_status_unlocked): queue the
3544 disconnect message only if the transport has finished queueing all
3545 its real messages and is disconnected.
3546 (dbus_connection_disconnect): update the dispatch status here
3548 2003-10-22 Havoc Pennington <hp@redhat.com>
3550 * bus/bus.c (bus_context_check_security_policy): fix up assertion
3552 * bus/connection.c (bus_transaction_send_from_driver): set the
3553 destination to the connection's base service
3555 2003-10-20 Havoc Pennington <hp@redhat.com>
3557 hmm, make check is currently not passing.
3559 * doc/dbus-specification.xml: add requirement that custom type
3560 names follow the same rules as interface names.
3562 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
3563 duplication and allow 'c' to be 'custom'; dict is now 'm' for
3566 * doc/dbus-specification.xml: update type codes to match
3567 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
3568 CUSTOM. Add type OBJECT_PATH to the spec.
3570 2003-10-17 Havoc Pennington <hp@redhat.com>
3572 * bus/driver.c (create_unique_client_name): use "." as separator
3573 in base service names instead of '-'
3575 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
3576 byte at the end of the string
3578 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
3579 optimization macros since string validation seems to be a slow
3582 * doc/dbus-specification.xml: restrict valid
3583 service/interface/member/error names. Add test suite code for the
3586 * dbus/dbus-string.c: limit service/interface/member/error names
3589 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
3590 format arg to verbose spew
3592 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
3593 memory, return instead of g_error
3595 * test/test-service.c (path_message_func): support emitting a
3598 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
3599 activation bus type if DBUS_BUS_ACTIVATION was set; default to
3600 assuming the activation bus was the session bus so that services
3601 started manually will still register.
3602 (init_connections_unlocked): fix so that in OOM situation we get
3603 the same semantics when retrying the function
3605 * test/test-service.c (main): change to use path registration, to
3606 test those codepaths; register with DBUS_BUS_ACTIVATION rather
3607 than DBUS_BUS_SESSION
3609 2003-10-16 Havoc Pennington <hp@redhat.com>
3611 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
3613 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
3614 coverage of the tests
3615 (coverage-report.txt): don't move the .da and .bbg files around
3617 2003-10-16 Havoc Pennington <hp@redhat.com>
3619 * bus/bus.c (struct BusContext): remove struct field I didn't mean
3622 2003-10-16 Havoc Pennington <hp@redhat.com>
3624 * bus/connection.c (bus_pending_reply_expired): either cancel or
3626 (bus_connections_check_reply): use unlink, not remove_link, as we
3627 don't want to free the link; fixes double free mess
3629 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
3630 where no reply was received
3632 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
3635 * bus/signals.c (match_rule_matches): add special cases for the
3636 bus driver, so you can match on sender/destination for it.
3638 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
3639 DBUS_PRINT_BACKTRACE is set
3641 * dbus/dbus-internals.c: add pid to assertion failure messages
3643 * dbus/dbus-connection.c: add message type code to the debug spew
3645 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
3646 sender=foo not service=foo
3648 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
3649 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
3650 DBUS_ACTIVATION_ADDRESS instead
3652 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
3653 DBUS_SYSTEM_BUS_ADDRESS if appropriate
3655 * bus/bus.c (bus_context_new): handle OOM copying bus type into
3658 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
3659 (dbus_message_iter_get_object_path_array): new function (half
3660 finished, disabled for the moment)
3662 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
3663 DBUS_MESSAGE_TYPE_ERROR
3665 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
3666 avoid redirecting stderr to /dev/null
3667 (babysit): close stdin if not doing the "exit_with_session" thing
3669 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
3670 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
3671 stdout/stdin, so things don't get confused
3673 * bus/system.conf.in: fix to allow replies, I modified .conf
3674 instead of .conf.in again.
3676 2003-10-14 David Zeuthen <david@fubar.dk>
3678 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
3679 argtype to arg_type when raising unknown arg type exception.
3680 Changed type list to reflect the changes in dbus-protocol.h so
3681 the bindings actually work.
3683 2003-10-14 Havoc Pennington <hp@redhat.com>
3685 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
3686 to have a bug keeping it from outputting the .da files sometimes
3687 (string_get_string): don't append garbage nul bytes to the string.
3689 2003-10-15 Seth Nickell <seth@gnome.org>
3691 * python/Makefile.am:
3693 Include dbus_h_wrapper.h in the dist tarball.
3695 2003-10-14 Havoc Pennington <hp@redhat.com>
3697 * bus/bus.c (bus_context_check_security_policy): revamp this to
3698 work more sanely with new policy-based requested reply setup
3700 * bus/connection.c (bus_transaction_send_from_driver): set bus
3701 driver messages as no reply
3703 * bus/policy.c (bus_client_policy_check_can_receive): handle a
3704 requested_reply attribute on allow/deny rules
3706 * bus/system.conf: add <allow requested_reply="true"/>
3708 * bus/driver.c (bus_driver_handle_message): fix check for replies
3709 sent to the bus driver, which was backward. How did this ever work
3710 at all though? I think I'm missing something.
3712 * dbus/dbus-message.c (decode_header_data): require error and
3713 method return messages to have a reply serial field to be valid
3714 (_dbus_message_loader_queue_messages): break up this function;
3715 validate that reply serial and plain serial are nonzero;
3716 clean up the OOM/error handling.
3717 (get_uint_field): don't return -1 from this
3718 (dbus_message_create_header): fix signed/unsigned bug
3720 * bus/connection.c (bus_connections_expect_reply): save serial of
3721 the incoming message, not reply serial
3723 2003-10-14 Havoc Pennington <hp@redhat.com>
3725 * bus/connection.c: implement pending reply tracking using
3728 * bus/bus.c (bus_context_check_security_policy): verify that a
3729 reply is pending in order to allow a reply to be sent. Deny
3730 messages of unknown type.
3732 * bus/dbus-daemon-1.1.in: update to mention new resource limits
3734 * bus/bus.c (bus_context_get_max_replies_per_connection): new
3735 (bus_context_get_reply_timeout): new
3737 2003-10-13 Seth Nickell <seth@gnome.org>
3739 * python/Makefile.am:
3741 Pass "make distcheck": remove a couple files from DIST_FILES
3742 that weren't included in the final version.
3744 2003-10-12 Havoc Pennington <hp@pobox.com>
3746 Added test code that 1) starts an actual bus daemon and 2) uses
3747 DBusGProxy; fixed bugs that were revealed by the test. Lots
3748 more testing possible, but this is the basic framework.
3750 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
3751 empty proxy lists from the proxy list hash
3753 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
3754 couple of return_if_fail checks
3756 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
3757 to allocate, so everything is cleared to NULL as it should be.
3759 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
3760 source as data to dbus_connection_set_timeout_functions() as the
3761 timeout functions expected
3763 * test/glib/run-test.sh: add a little script to start up a message
3764 bus and run tests using it
3766 * tools/dbus-launch.1: updates
3768 * tools/dbus-launch.c (main): add --config-file option
3770 * tools/dbus-launch.c (main): remove confusing else if (runprog)
3771 that could never be reached.
3773 * dbus/dbus-message.c (dbus_message_new_method_return)
3774 (dbus_message_new_error, dbus_message_new_signal): set the
3775 no-reply-expected flag on all these. Redundant, but may
3776 as well be consistent.
3778 2003-10-11 Havoc Pennington <hp@pobox.com>
3780 * test/decode-gcov.c (function_solve_graph): make broken block
3781 graph a nonfatal error since it seems to be broken. Need to debug
3784 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
3785 can't just check type > INVALID < LAST anymore
3787 * dbus/dbus-message.c (dbus_message_get_signature): new function
3788 (dbus_message_has_signature): new function
3789 (struct DBusMessage): add signature field (right now it isn't sent
3790 over the wire, just generated on the fly)
3791 (dbus_message_copy): copy the signature, and init strings to
3792 proper length to avoid some reallocs
3793 (dbus_message_iter_init_array_iterator): return void, since it
3795 (dbus_message_iter_init_dict_iterator): return void since it can't fail
3796 (_dbus_message_loader_queue_messages): add silly temporary hack to
3797 fill in message->signature on load
3799 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
3800 characters, so they are relatively human-readable.
3802 2003-10-11 Havoc Pennington <hp@pobox.com>
3804 * dbus/dbus-message.c (_dbus_message_test): add more test
3805 coverage, but #if 0 for now since they uncover a bug
3806 not fixed yet; I think in re_align_field_recurse()
3807 (re_align_field_recurse): add FIXME about broken assertion
3809 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
3811 * bus/connection.c: share a couple code bits with expirelist.c
3813 * bus/expirelist.h, bus/expirelist.c: implement a generic
3814 expire-items-after-N-seconds facility, was going to share between
3815 expiring connections and replies, decided not to use for expiring
3816 connections for now.
3818 * COPYING: include AFL 2.0 (still need to change all the file headers)
3820 2003-10-09 Havoc Pennington <hp@redhat.com>
3822 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
3823 gcc 3.3. Not that we do anything about it yet.
3825 * bus/signals.c (bus_match_rule_parse): impose max length on the
3828 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
3830 2003-10-09 Havoc Pennington <hp@redhat.com>
3832 Make matching rules theoretically work (add parser).
3834 * bus/bus.c (bus_context_check_security_policy): fix up to handle
3835 the case where destination is explicitly specified as bus driver
3836 and someone else is eavesdropping.
3838 * bus/policy.c (bus_client_policy_check_can_receive): fix up
3839 definition of eavesdropping and assertion
3841 * tools/dbus-send.c (main): use dbus_message_type_from_string
3843 * bus/signals.c (bus_match_rule_parse): implement
3845 * dbus/dbus-message.c (dbus_message_type_from_string): new
3847 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
3849 2003-10-02 Havoc Pennington <hp@pobox.com>
3851 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
3852 dbus_gproxy_oneway_call
3854 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
3855 (dbus_server_setup_with_g_main): fix to allow calling them more
3856 than once on the same args
3857 (dbus_bus_get_with_g_main): new function
3859 2003-10-02 Havoc Pennington <hp@redhat.com>
3861 * doc/dbus-tutorial.xml: write some stuff
3863 2003-09-29 Havoc Pennington <hp@pobox.com>
3865 * configure.in: split checks for Doxygen from XML docs, check for
3868 * doc/Makefile.am: XML-ify all the docs, and add a blank
3871 2003-09-29 Havoc Pennington <hp@pobox.com>
3873 * Merge dbus-object-names branch. To see the entire patch
3874 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
3875 it's huuuuge though.
3876 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
3878 2003-09-28 Havoc Pennington <hp@pobox.com>
3880 * HACKING: update to reflect new server
3882 2003-09-26 Seth Nickell <seth@gnome.org>
3885 * python/examples/example-signals.py:
3887 Start implementing some notions of signals. The API
3888 is really terrible, but they sort of work (with the
3889 exception of being able to filter by service, and to
3890 transmit signals *as* a particular service). Need to
3891 figure out how to make messages come from the service
3894 * python/dbus_bindings.pyx.in:
3896 Removed duplicate message_handler callbacks.
3898 2003-09-25 Havoc Pennington <hp@redhat.com>
3900 * bus/session.conf.in: fix my mess
3902 2003-09-25 Havoc Pennington <hp@pobox.com>
3904 * bus/session.conf.in: fix security policy, reported by Seth Nickell
3906 2003-09-25 Seth Nickell <seth@gnome.org>
3908 * python/examples/example-service.py:
3910 Johan notices complete wrong code in example-service, but
3911 completely wrong in a way that works exactly the same (!).
3912 Johan is confused, how could this possibly work? Example
3913 code fails to serve purpose of making things clear.
3916 2003-09-25 Mark McLoughlin <mark@skynet.ie>
3918 * doc/dbus-specification.sgml: don't require header fields
3919 to be 4-byte aligned and specify that fields should be
3920 distinguished from padding by the fact that zero is not
3923 * doc/TODO: remove re-alignment item and add item to doc
3924 the OBJECT_PATH type.
3926 * dbus/dbus-message.c:
3927 (HeaderField): rename the original member to value_offset
3928 and introduce a name_offset member to keep track of where
3929 the field actually begins.
3930 (adjust_field_offsets): remove.
3931 (append_int_field), (append_uint_field),
3932 (append_string_field): don't align the start of the header
3933 field to a 4-byte boundary.
3934 (get_next_field): impl finding the next marhsalled field
3935 after a given field.
3936 (re_align_field_recurse): impl re-aligning a number of
3937 already marshalled fields.
3938 (delete_field): impl deleting a field of any type and
3939 re-aligning any following fields.
3940 (delete_int_or_uint_field), (delete_string_field): remove.
3941 (set_int_field), (set_uint_field): no need to re-check
3942 that we have the correct type for the field.
3943 (set_string_field): ditto and impl re-aligning any
3945 (decode_header_data): update to take into account that
3946 the fields aren't 4-byte aligned any more and the new
3947 way to distinguish padding from header fields. Also,
3948 don't exit when there is too much header padding.
3949 (process_test_subdir): print the directory.
3950 (_dbus_message_test): add test to make sure a following
3951 field is re-aligned correctly after field deletion.
3953 * dbus/dbus-string.[ch]:
3954 (_dbus_string_insert_bytes): rename from insert_byte and
3955 allow the insert of multiple bytes.
3956 (_dbus_string_test): test inserting multiple bytes.
3958 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
3959 warning note to docs about having to re-align any
3960 marshalled values following the string.
3962 * dbus/dbus-message-builder.c:
3963 (append_string_field), (_dbus_message_data_load):
3964 don't align the header field.
3966 * dbus/dbus-auth.c: (process_test_subdir): print the
3969 * test/break-loader.c: (randomly_add_one_byte): upd. for
3972 * test/data/invalid-messages/bad-header-field-alignment.message:
3975 * test/data/valid-messages/unknown-header-field.message: shove
3976 a dict in the unknown field.
3978 2003-09-25 Seth Nickell <seth@gnome.org>
3981 * python/dbus_bindings.pyx.in:
3983 Handle return values.
3985 * python/examples/example-client.py:
3986 * python/examples/example-service.py:
3988 Pass back return values from the service to the client.
3990 2003-09-24 Seth Nickell <seth@gnome.org>
3994 Connect Object methods (when you are sharing an object) up... pass
3995 in a list of methods to be shared. Sharing all the methods just
3996 worked out too weird. You can now create nice Services over the
3999 * python/dbus_bindings.pyx.in:
4001 Keep references to user_data tuples passed into C functions so
4002 Python doesn't garbage collect on us.
4004 Implement MethodReturn and Error subclasses of Message for creating
4005 DBusMessage's of those types.
4007 * python/examples/example-client.py:
4008 * python/examples/example-service.py:
4010 Simple example code showing both how create DBus services and objects,
4011 and how to use them.
4013 2003-09-23 Havoc Pennington <hp@pobox.com>
4015 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
4017 2003-09-23 Havoc Pennington <hp@redhat.com>
4019 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
4020 (dbus_gproxy_disconnect_signal): implement
4021 (dbus_gproxy_manager_remove_signal_match): implement
4022 (dbus_gproxy_manager_add_signal_match): implement
4023 (dbus_gproxy_oneway_call): implement
4025 2003-09-23 Havoc Pennington <hp@pobox.com>
4027 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
4028 subclass. This means dropping the transparent thread safety of the
4029 proxy; you now need a separate proxy per-thread, or your own
4030 locking on the proxy. Probably right anyway.
4031 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
4033 2003-09-22 Havoc Pennington <hp@redhat.com>
4035 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
4037 2003-09-21 Seth Nickell <seth@gnome.org>
4039 First checkin of the Python bindings.
4041 * python/.cvsignore:
4042 * python/Makefile.am:
4043 * python/dbus_bindings.pyx.in:
4044 * python/dbus_h_wrapper.h:
4046 Pieces for Pyrex to operate on, building a dbus_bindings.so
4047 python module for low-level access to the DBus APIs.
4051 High-level Python module for accessing DBus objects.
4056 Build stuff for the python bindings.
4060 Extra macro needed for finding the Python C header files.
4062 2003-09-21 Havoc Pennington <hp@pobox.com>
4064 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
4065 implementing the proxy manager, didn't get very far.
4067 * dbus/dbus-bus.c (dbus_bus_add_match): new
4068 (dbus_bus_remove_match): new
4070 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
4071 path_name argument; adjust the other not-yet-implemented
4072 gproxy constructors to be what I think they should be.
4074 2003-09-21 Havoc Pennington <hp@pobox.com>
4076 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
4077 by default for message bus connections.
4079 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
4080 exit_on_disconnect flag is set and we process the disconnected
4082 (dbus_connection_set_exit_on_disconnect): new function
4084 2003-09-21 Havoc Pennington <hp@pobox.com>
4086 Get matching rules mostly working in the bus; only actually
4087 parsing the rule text remains. However, the client side of
4088 "signal connections" hasn't been started, this patch is only the
4091 * dbus/dispatch.c: fix for the matching rules changes
4093 * bus/driver.c (bus_driver_handle_remove_match)
4094 (bus_driver_handle_add_match): send an ack reply from these
4097 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
4098 arguments, reported by Seth Nickell
4100 * bus/config-parser.c (append_rule_from_element): support
4101 eavesdrop=true|false attribute on policies so match rules
4102 can be prevented from snooping on the system bus.
4104 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
4105 and "destination" in attribute names; fix some docs bugs;
4106 add eavesdrop=true|false attribute
4108 * bus/driver.c (bus_driver_handle_add_match)
4109 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
4112 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
4113 rid of broadcast service concept, signals are just always broadcast
4115 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
4116 mostly implement matching rules stuff (currently only exposed as signal
4119 2003-09-21 Mark McLoughlin <mark@skynet.ie>
4121 * doc/dbus-specification.sgml: Change the header field name
4122 to be an enum and update the rest of the spec to reference
4123 the fields using the conventinal name.
4125 * dbus/dbus-protocol.h: update to reflect the spec.
4127 * doc/TODO: add item to remove the 4 byte alignment requirement.
4129 * dbus/dbus-message.c: Remove the code to generalise the
4130 header/body length and serial number header fields as named
4131 header fields so we can reference field names using the
4133 (append_int_field), (append_uint_field), (append_string_field):
4134 Append the field name as a byte rather than four chars.
4135 (delete_int_or_uint_field), (delete_string_field): reflect the
4136 fact that the field name and typecode now occupy 4 bytes instead
4138 (decode_string_field), (decode_header_data): update to reflect
4139 protocol changes and move the field specific encoding from
4140 decode_string_field() back into decode_header_data().
4142 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
4143 Add utility to aid debugging.
4145 * dbus/dbus-message-builder.c:
4146 (append_string_field), (_dbus_message_data_load): Update to
4147 reflect protocol changes; Change the FIELD_NAME directive
4148 to HEADER_FIELD and allow it to take the field's conventional
4149 name rather than the actual value.
4151 * test/data/*/*.message: Update to use HEADER_FIELD instead
4152 of FIELD_NAME; Always align the header on an 8 byte boundary
4153 *before* updating the header length.
4155 2003-09-15 Havoc Pennington <hp@pobox.com>
4157 * dbus/dbus-pending-call.c: add the get/set object data
4158 boilerplate as for DBusConnection, etc. Use generic object data
4159 for the notify callback.
4161 * glib/dbus-gparser.c (parse_node): parse child nodes
4163 * tools/dbus-viewer.c: more hacking on the dbus-viewer
4165 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
4166 contain functions shared between the convenience lib and the
4169 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
4170 -export-symbols-regex to the GLib library
4172 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
4173 fix the locking in here, and add a default handler for
4174 Introspect() that just returns sub-nodes.
4176 2003-09-14 Havoc Pennington <hp@pobox.com>
4178 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
4179 rather than gfoo consistent
4181 * glib/dbus-gproxy.h: delete for now, move contents to
4182 dbus-glib.h, because the include files don't work right since we
4183 aren't in the dbus/ subdir.
4185 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
4186 (dbus_gproxy_end_call): finish
4187 (dbus_gproxy_begin_call): finish
4189 * glib/dbus-gmain.c (dbus_set_g_error): new
4191 * glib/dbus-gobject.c (handle_introspect): include information
4192 about child nodes in the introspection
4194 * dbus/dbus-connection.c (dbus_connection_list_registered): new
4195 function to help in implementation of introspection
4197 * dbus/dbus-object-tree.c
4198 (_dbus_object_tree_list_registered_and_unlock): new function
4200 2003-09-12 Havoc Pennington <hp@pobox.com>
4202 * glib/dbus-gidl.h: add common base class for all the foo_info
4205 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
4208 * test/Makefile.am: try test srcdir -ef . in addition to test
4209 srcdir = ., one of them should work (yeah lame)
4211 * glib/Makefile.am: build the "idl" parser stuff as a convenience
4214 * glib/dbus-gparser.h: make description_load routines return
4215 NodeInfo* not Parser*
4217 * Makefile.am (SUBDIRS): build test dir after all library dirs
4219 * configure.in: add GTK+ detection
4221 2003-09-07 Havoc Pennington <hp@pobox.com>
4223 * Make Doxygen contented.
4225 2003-09-07 Havoc Pennington <hp@pobox.com>
4227 * doc/dbus-specification.sgml: more updates
4229 2003-09-06 Havoc Pennington <hp@pobox.com>
4231 * doc/dbus-specification.sgml: partial updates
4233 * bus/dbus-daemon-1.1.in: fix the config file docs for the
4234 zillionth time; hopefully I edited the right file this time.
4236 * bus/config-parser.c (append_rule_from_element): support
4237 send_type, send_path, receive_type, receive_path
4239 * bus/policy.c: add message type and path to the list of things
4240 that can be "firewalled"
4242 2003-09-06 Havoc Pennington <hp@pobox.com>
4244 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
4245 (dbus_connection_register_object_path): make this not handle
4246 messages to paths below the given path
4248 2003-09-03 Havoc Pennington <hp@pobox.com>
4250 * test/glib/Makefile.am: add this with random glib-linked test
4253 * glib/Makefile.am: remove the random test programs from here,
4254 leave only the unit tests
4256 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
4257 uscore/javacaps conversion, and fix
4258 (get_object_property, set_object_property): change to .NET
4259 convention for mapping props to methods, set_FooBar/get_FooBar,
4260 since one language has such a convention we may as well copy it.
4261 Plus real methods in either getFooBar or get_foo_bar style won't
4262 collide with this convention.
4264 2003-09-01 Havoc Pennington <hp@pobox.com>
4266 * glib/dbus-gparser.c: implement
4268 * glib/dbus-gobject.c: start implementing skeletons support
4270 * configure.in: when disabling checks/assert, also define
4271 G_DISABLE_ASSERT and G_DISABLE_CHECKS
4273 2003-09-01 Havoc Pennington <hp@pobox.com>
4275 * glib/Makefile.am: rearrange a bunch of files and get "make
4276 check" framework set up
4278 2003-08-31 Havoc Pennington <hp@pobox.com>
4280 * fix build with --disable-tests
4282 2003-08-30 Havoc Pennington <hp@pobox.com>
4284 * dbus/dbus-connection.c: purge DBusMessageHandler
4286 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
4287 use callbacks everywhere
4289 2003-08-30 Havoc Pennington <hp@pobox.com>
4291 * test/data/valid-config-files/system.d/test.conf: change to
4292 root for the user so warnings don't get printed
4294 * dbus/dbus-message.c: add dbus_message_get_path,
4295 dbus_message_set_path
4297 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
4298 dispatching to a path
4300 * dbus/dbus-string.c (_dbus_string_validate_path): add
4302 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
4303 (_dbus_marshal_object_path): implement
4305 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
4306 to contain the path to the target object
4307 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
4308 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
4310 2003-08-30 Havoc Pennington <hp@pobox.com>
4312 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
4314 2003-08-29 Havoc Pennington <hp@pobox.com>
4316 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
4318 (struct DBusObjectSubtree): shrink this
4319 a lot, since we may have a lot of them
4320 (_dbus_object_tree_free_all_unlocked): implement
4321 (_dbus_object_tree_dispatch_and_unlock): implement
4323 2003-08-29 Havoc Pennington <hp@pobox.com>
4325 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
4327 2003-08-28 Havoc Pennington <hp@pobox.com>
4331 * dbus/dbus-connection.c: port to no ObjectID, create a
4332 DBusObjectTree, rename ObjectTree to ObjectPath in public API
4334 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
4335 everything except UnregisterFunction and MessageFunction
4337 * dbus/dbus-marshal.c: port away from DBusObjectID,
4338 add DBUS_TYPE_OBJECT_PATH
4340 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
4341 dbus/dbus-objectid.[hc]: remove these, we are moving to
4342 path-based object IDs
4344 2003-08-25 Havoc Pennington <hp@pobox.com>
4346 Just noticed that dbus_message_test is hosed, I wonder when I
4347 broke that. I thought make check was passing earlier...
4349 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
4350 container tree, will replace most of dbus-object-registry
4352 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
4355 2003-08-19 Havoc Pennington <hp@pobox.com>
4357 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
4358 (dbus_message_is_error): fix this function
4360 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
4363 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
4364 reflect clarified man page
4365 (bus_client_policy_check_can_send): ditto
4367 * bus/session.conf.in: fixup
4369 * bus/system.conf.in: fixup
4371 2003-08-18 Havoc Pennington <hp@redhat.com>
4373 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
4375 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4376 dumb bug created earlier (wrong order of args to
4377 decode_header_data())
4379 * tools/dbus-send.c: port
4381 * tools/dbus-print-message.c (print_message): port
4383 * test/data/*messages: port all messages over
4385 * dbus/dbus-message-builder.c: support including
4388 * bus/driver.c: port over
4390 * bus/dispatch.c: port over to new stuff
4392 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4393 rename disconnect signal to "Disconnected"
4395 2003-08-17 Havoc Pennington <hp@pobox.com>
4397 This doesn't compile yet, but syncing up so I can hack on it from
4398 work. What are branches for if not broken code? ;-)
4400 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
4401 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
4402 DBUS_HEADER_FIELD_ERROR_NAME
4404 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
4405 for the interface+member pairs
4406 (string_hash): change to use g_str_hash algorithm
4407 (find_direct_function, find_string_function): refactor these to
4410 * dbus/dbus-message.c: port all of this over to support
4411 interface/member fields instead of name field
4413 * dbus/dbus-object-registry.c: port over
4415 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
4416 from _dbus_string_validate_name
4418 * bus/dbus-daemon-1.1: change file format for the
4419 <deny>/<allow> stuff to match new message naming scheme
4421 * bus/policy.c: port over
4423 * bus/config-parser.c: parse new format
4425 2003-08-16 Havoc Pennington <hp@pobox.com>
4427 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
4430 * glib/dbus-gproxy.c: some hacking
4432 2003-08-15 Havoc Pennington <hp@redhat.com>
4434 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
4436 * dbus/dbus-connection.c
4437 (dbus_connection_send_with_reply_and_block): factor out internals;
4438 change to convert any error replies to DBusError instead of
4439 returning them as a message
4441 2003-08-15 Havoc Pennington <hp@pobox.com>
4443 * dbus/dbus-connection.c,
4444 dbus/dbus-pending-call.c: Finish the pending call stuff
4446 2003-08-14 Havoc Pennington <hp@redhat.com>
4448 * dbus/dbus-pending-call.c: start on new object that will replace
4449 DBusMessageHandler and ReplyHandlerData for tracking outstanding
4452 * dbus/dbus-gproxy.c: start on proxy object used to communicate
4453 with remote interfaces
4455 * dbus/dbus-gidl.c: do the boring boilerplate in here
4457 2003-08-12 Havoc Pennington <hp@pobox.com>
4459 * bus/dispatch.c (bus_dispatch): make this return proper
4460 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
4462 * dbus/dbus-errors.c (dbus_set_error): use
4463 _dbus_string_append_printf_valist
4465 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
4466 (_dbus_string_append_printf): new
4468 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
4471 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
4472 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
4473 message is unhandled.
4475 2003-08-11 Havoc Pennington <hp@pobox.com>
4477 * bus/test.c (client_disconnect_handler): change to return
4478 HANDLED (would have been REMOVE_MESSAGE)
4480 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
4481 HANDLED/NOT_YET_HANDLED instead of
4482 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
4485 2003-08-10 Havoc Pennington <hp@pobox.com>
4487 * tools/dbus-send.c (main): add --type argument, for now
4488 supporting only method_call and signal types.
4490 * tools/dbus-print-message.c: print message type
4492 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4493 init connection->objects
4495 * doc/dbus-specification.sgml: fix sgml
4497 * bus/*.c: port over to object-instance API changes
4499 * test/test-service.c: ditto
4501 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
4502 name, we will have to fix up the rest of the code to also handle
4504 (dbus_message_new): generic message-creation call
4505 (set_string_field): allow appending name field
4507 2003-08-06 Havoc Pennington <hp@pobox.com>
4509 * dbus/dbus-object-registry.c: implement signal connection
4512 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
4514 * dbus/dbus-internals.c (_dbus_memdup): new function
4516 2003-08-02 Havoc Pennington <hp@pobox.com>
4518 * dbus/dbus-message.c (dbus_message_get_no_reply)
4519 (dbus_message_set_no_reply): add these and remove
4520 set_is_error/get_is_error
4522 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
4523 remove the ERROR flag, since there's now an ERROR type
4525 2003-08-01 Havoc Pennington <hp@pobox.com>
4527 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
4530 * dbus/dbus-message.c (dbus_message_get_type): new function
4532 * doc/dbus-specification.sgml: add "type" byte to messages
4534 2003-08-01 Havoc Pennington <hp@pobox.com>
4536 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
4537 a message type enum to distinguish kinds of message
4538 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
4539 that need not be replied to
4541 2003-08-01 Havoc Pennington <hp@pobox.com>
4543 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
4544 (unpack_8_octets): fix no-64-bit-int bug
4546 * dbus/dbus-object-registry.c (validate_id): validate the
4547 connection ID bits, not just the instance ID.
4549 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
4550 the connection-global 33 bits of the object ID
4552 * dbus/dbus-object-registry.c (info_from_entry): fill in
4553 object ID in the new way
4555 * dbus/dbus-objectid.h: rather than high/low bits, specifically
4556 define server/client/instance bits.
4558 2003-07-30 Havoc Pennington <hp@pobox.com>
4560 * dbus/dbus-connection.c (dbus_connection_register_object): fix
4563 2003-07-13 Havoc Pennington <hp@pobox.com>
4565 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
4566 fields to DBusObjectVTable and DBusObjectInfo
4568 2003-07-12 Havoc Pennington <hp@pobox.com>
4570 * dbus/dbus-object-registry.c: implement unit test,
4571 fix bugs discovered in process
4573 * dbus/dbus-connection.c: remove handler_table and
4574 register_handler(), add DBusObjectRegistry usage
4576 * dbus/dbus-objectid.c (dbus_object_id_is_null)
4577 (dbus_object_id_set_null): new functions
4579 2003-07-08 Havoc Pennington <hp@pobox.com>
4581 * dbus/dbus-object.c: implement some of this
4583 * dbus/dbus-object-registry.c
4584 (_dbus_object_registry_add_and_unlock): fill in the object_id out
4586 (_dbus_object_registry_new): handle OOM
4588 2003-07-08 Havoc Pennington <hp@pobox.com>
4590 * dbus/dbus-object.h: sketch out an API for registering objects
4591 with a connection, that allows us to use as little as 24 bytes
4592 per object and lets application code represent an object in
4593 any conceivable way.
4595 * dbus/dbus-object-registry.c: implement the hard bits of the
4596 DBusConnection aspect of object API. Not yet wired up.
4598 2003-07-06 Havoc Pennington <hp@pobox.com>
4600 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
4601 (_dbus_marshal_object_id): new
4602 (_dbus_demarshal_object_id): new
4603 (_dbus_marshal_get_arg_end_pos): support object ID type, and
4604 consolidate identical switch cases. Don't conditionalize handling
4605 of DBUS_TYPE_UINT64, need to handle the type always.
4606 (_dbus_marshal_validate_arg): consolidate identical cases, and
4607 handle DBUS_TYPE_OBJECT_ID
4609 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
4611 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
4613 2003-09-28 Havoc Pennington <hp@pobox.com>
4617 2003-09-28 Havoc Pennington <hp@pobox.com>
4619 * doc/Makefile.am (dbus-specification.html): testing a funky hack
4620 to work with Debian db2html
4622 2003-09-28 Havoc Pennington <hp@pobox.com>
4624 * configure.in: 0.13
4626 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
4627 stylesheet-images for benefit of Debian
4629 Change back to using filesystem-linked sockets for the system
4630 bus, so only root can create the default system bus address.
4632 * bus/system.conf.in: change to use
4633 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4635 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
4638 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4639 here, and AC_DEFINE DBUS_SYSTEM_PATH
4641 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4644 * doc/busconfig.dtd:
4647 2003-08-09 Anders Carlsson <andersca@codefactory.se>
4649 * doc/dbus-specification.sgml:
4650 Add activation reply values.
4652 2003-08-05 Havoc Pennington <hp@redhat.com>
4654 * configure.in: 0.12
4656 2003-08-05 Anders Carlsson <andersca@codefactory.se>
4658 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
4659 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
4660 (add_watch), (remove_watch), (create_source):
4661 Refcount fds, fixes some reentrancy issues.
4663 2003-07-30 Havoc Pennington <hp@redhat.com>
4665 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
4666 bus address to be abstract if we have abstract sockets
4670 2003-07-28 Havoc Pennington <hp@redhat.com>
4672 * bus/messagebus.in: fix to avoid processname/servicename
4673 confusion, from Michael Kearey
4674 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
4676 2003-07-23 Havoc Pennington <hp@pobox.com>
4678 * dbus/dbus-message.c (dbus_message_iter_get_named):
4679 fix from Andy Hanton to remove broken "+1"
4681 2003-07-16 Havoc Pennington <hp@pobox.com>
4683 * tools/dbus-launch.c (babysit): close stdout/stderr in the
4684 babysitter process, as suggested by Thomas Leonard, so
4685 an "eval `dbus-launch --exit-with-session`" will actually
4688 2003-07-16 Havoc Pennington <hp@pobox.com>
4690 * configure.in: print out EXPANDED_* variables in the summary at
4691 the end; clean up the code that computes EXPANDED_ variables and
4692 get the ones using exec_prefix right. Should make things work
4693 when you build without --prefix
4695 2003-06-29 Havoc Pennington <hp@pobox.com>
4697 * mono/Test.cs (class Test): fire up a main loop and run it
4699 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
4700 done once, the app has to do it
4702 2003-06-26 Havoc Pennington <hp@pobox.com>
4704 * mono/Connection.cs: set up connection with the glib main loop
4706 2003-07-01 Havoc Pennington <hp@redhat.com>
4708 * doc/dbus-specification.sgml: clarify the format of a type code,
4709 change suggested by Jim Blandy
4711 2003-06-29 Miloslav Trmac <mitr@volny.cz>
4714 * tools/Makefile.am: Don't assume srcdir == builddir.
4716 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
4717 the allocated block.
4718 (_dbus_memory_test): New function.
4719 * dbus/dbus-test.h: Add _dbus_memory_test ().
4720 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
4722 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
4724 (dbus_message_new): Remove obsolete @todo.
4726 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
4727 (_dbus_marshal_set_uint64): Fix comment.
4729 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
4730 hardcode FIELD_REPLY_SERIAL.
4732 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
4733 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
4735 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
4736 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
4738 2003-06-24 Havoc Pennington <hp@pobox.com>
4740 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
4742 2003-06-23 Anders Carlsson <andersca@codefactory.se>
4748 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
4749 * gcj/org/.cvsignore:
4750 * gcj/org/Makefile.am:
4751 * gcj/org/freedesktop/.cvsignore:
4752 * gcj/org/freedesktop/Makefile.am:
4753 * gcj/org/freedesktop/dbus/.cvsignore:
4754 * gcj/org/freedesktop/dbus/Makefile.am:
4755 * gcj/org/freedesktop/dbus/Message.java: (Message),
4757 * gcj/org/freedesktop/dbus/natMessage.cc:
4758 Fix the build system.
4760 2003-06-22 Havoc Pennington <hp@pobox.com>
4762 * mono/Connection.cs: add more bindings
4764 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
4767 2003-06-22 Havoc Pennington <hp@pobox.com>
4769 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
4770 Start wrapping more stuff.
4772 2003-06-22 Havoc Pennington <hp@pobox.com>
4774 * mono/Message.cs: implement Message.Wrap() that ensures we only
4775 have a single C# wrapper per DBusMessage, assuming it works which
4776 it probably doesn't.
4778 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
4779 (dbus_message_free_data_slot): new
4780 (dbus_message_set_data): new
4781 (dbus_message_get_data): new
4783 2003-06-22 Havoc Pennington <hp@pobox.com>
4785 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
4786 (_dbus_data_slot_allocator_alloc): rework these to keep a
4787 reference count on each slot and automatically manage a global
4788 slot ID variable passed in by address
4790 * bus/bus.c: convert to new dataslot API
4792 * dbus/dbus-bus.c: convert to new dataslot API
4794 * dbus/dbus-connection.c: convert to new dataslot API
4796 * dbus/dbus-server.c: convert to new dataslot API
4798 * glib/dbus-gmain.c: ditto
4802 * bus/connection.c: ditto
4804 2003-06-22 Anders Carlsson <andersca@codefactory.se>
4806 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
4807 after the gcj checks so that the correct configuration tags
4808 will be added to libtool.
4810 * dbus-glib-1.pc.in: No need to specify any includes since
4811 dbus-1.pc.in has those.
4813 2003-06-22 Havoc Pennington <hp@pobox.com>
4815 * mono/*, gcj/*, configure.in, Makefile.am:
4816 Check in makefiles and subdirs for mono and gcj bindings.
4817 Neither binding actually exists, just trying to get through
4818 all the build and other boring bits.
4820 2003-06-21 Philip Blundell <philb@gnu.org>
4822 * tools/dbus-monitor.1: Updated.
4824 * tools/dbus-send.1: Likewise.
4826 2003-06-20 Anders Carlsson <andersca@codefactory.se>
4828 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
4829 for hangup and error after checking read so we won't discard
4830 pending data if both hangup and read are set.
4832 2003-06-19 Philip Blundell <philb@gnu.org>
4834 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
4836 * tools/dbus-send.c: Accept both --system and --session.
4838 * tools/dbus-monitor.c: Same here.
4840 2003-06-19 Anders Carlsson <andersca@codefactory.se>
4842 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
4843 from C++ (Patch by Miloslav Trmac).
4845 2003-06-15 Joe Shaw <joe@assbarn.com>
4847 * configure.in: Check for socklen_t.
4849 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
4851 * test/test-segfault.c: Add #include <sys/time.h>
4853 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
4854 dbus-launch needs it.
4856 2003-06-09 Havoc Pennington <hp@redhat.com>
4858 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
4859 SUN_LEN, it breaks abstract socket usage
4861 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
4864 2003-06-04 Havoc Pennington <hp@pobox.com>
4866 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
4867 using unix:abstract=/foo, and when listening in a tmpdir
4868 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
4870 * dbus/dbus-transport.c (_dbus_transport_open): support
4873 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4874 support abstract sockets
4876 * dbus/dbus-transport-unix.c
4877 (_dbus_transport_new_for_domain_socket): support abstract sockets
4879 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
4880 toggle as an argument, implement abstract namespace support
4881 (_dbus_listen_unix_socket): ditto
4883 * configure.in: add --enable-abstract-sockets and implement
4884 a configure check for autodetection of the right value.
4886 2003-06-01 Havoc Pennington <hp@pobox.com>
4888 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
4889 in /tmp (though on Linux this will end up being useless,
4890 when we add abstract namespace support)
4892 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
4895 2003-05-28 Colin Walters <walters@verbum.org>
4897 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
4899 2003-05-18 Anders Carlsson <andersca@codefactory.se>
4901 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
4903 2003-05-17 Colin Walters <walters@gnu.org>
4905 * tools/dbus-send.c: Don't exit with an error code if --help was
4906 passed. Default to using the session bus instead of the system
4909 * tools/dbus-launch.c: Ditto.
4911 * tools/dbus-monitor.c: Ditto.
4913 * tools/dbus-send.1: Update with new arguments.
4915 * tools/dbus-launch.c: Emit code to export variables. New
4916 arguments -s and -c to specify shell syntax, and a bit of code to
4917 autodetect syntax. Also, allow specifying a program to run.
4919 * tools/dbus-launch.1: Update with new arguments.
4921 * tools/dbus-send.1: Ditto.
4923 * tools/dbus-monitor.1: Ditto.
4925 2003-05-17 Havoc Pennington <hp@pobox.com>
4927 * bus/config-parser.c (merge_included): merge in policies from
4928 child configuration file.
4930 * bus/policy.c (bus_policy_merge): function to merge two policies
4933 2003-05-16 Havoc Pennington <hp@redhat.com>
4935 * dbus/dbus-connection.c: disable verbose lock spew
4937 * tools/dbus-send.c: add --print-reply command line option
4939 * tools/dbus-print-message.h (print_message): new util function
4940 shared by dbus-send and dbus-monitor
4942 * tools/dbus-monitor.c (handler_func): exit on disconnect
4944 * dbus/dbus-transport-unix.c (do_reading): if the transport is
4945 disconnected, don't try to use the read_watch
4947 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
4948 so we can find this bug more easily
4950 2003-05-16 Havoc Pennington <hp@redhat.com>
4952 * bus/policy.c (free_rule_list_func): avoid a crash when passed
4953 NULL as DBusHashTable is annoyingly likely to do.
4955 2003-05-16 Colin Walters <walters@verbum.org>
4957 * tools/dbus-monitor.c: Add --session argument and usage()
4960 * tools/dbus-monitor.1: Update with new --session arg.
4962 * bus/Makefile.am (install-data-hook): Create
4963 $(libdir)/dbus-1.0/services so that the session bus is happy.
4965 2003-05-15 Havoc Pennington <hp@redhat.com>
4967 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
4968 on non-x86. ifdef's are evil.
4970 2003-05-15 Havoc Pennington <hp@redhat.com>
4972 * configure.in: 0.11
4976 * bus/Makefile.am (initddir): apparently we are supposed to put
4977 init scripts in /etc/rc.d/init.d not /etc/init.d
4979 * bus/Makefile.am: remove the "you must --enable-tests to make
4980 check" as it broke distcheck
4982 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
4984 2003-05-13 James Willcox <jwillcox@gnome.org>
4987 * bus/activation.c: (bus_activation_service_created),
4988 (bus_activation_activate_service):
4989 * bus/driver.c: (bus_driver_send_service_deleted),
4990 (bus_driver_send_service_created), (bus_driver_send_service_lost),
4991 (bus_driver_send_service_acquired),
4992 (bus_driver_send_welcome_message),
4993 (bus_driver_handle_list_services):
4994 * bus/session.conf.in:
4995 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
4996 (dbus_bus_service_exists), (dbus_bus_activate_service):
4999 Add some convenience API which lets you activate a service, and did a
5000 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
5001 and dbus_message_get_args()
5003 2003-05-11 Havoc Pennington <hp@pobox.com>
5005 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
5006 calling _dbus_marshal_validate_arg() for every byte in a byte
5009 * dbus/dbus-message-handler.c: use atomic reference counting to
5010 reduce number of locks slightly; the global lock in here sucks
5012 * dbus/dbus-connection.c
5013 (_dbus_connection_update_dispatch_status_and_unlock): variant of
5014 update_dispatch_status that can be called with lock held; then use
5015 in a couple places to reduce locking/unlocking
5016 (dbus_connection_send): hold the lock over the whole function
5017 instead of acquiring it twice.
5019 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
5021 * bus/connection.c (bus_connections_setup_connection): fix access
5022 to already-freed memory.
5024 * dbus/dbus-connection.c: keep a little cache of linked list
5025 nodes, to avoid using the global linked list alloc lock in the
5026 normal send-message case. Instead we just use the connection lock
5027 that we already have to take.
5029 * dbus/dbus-list.c (_dbus_list_find_last): new function
5031 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
5032 change to use a struct for the atomic type; fix docs,
5033 they return value before increment, not after increment.
5035 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
5036 (_dbus_string_append_8_aligned): new functions to try to
5037 microoptimize this operation.
5038 (reallocate_for_length): break this out of set_length(), to
5039 improve profile info, and also so we can consider inlining the
5042 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
5043 strings with some preallocation, cuts down on our calls to realloc
5044 a fair bit. Though if we can get the "move entire string to empty
5045 string" optimization below to kick in here, it would be better.
5047 * dbus/dbus-string.c (_dbus_string_move): just call
5048 _dbus_string_move_len
5049 (_dbus_string_move_len): add a special case for moving
5050 an entire string into an empty string; we can just
5051 swap the string data instead of doing any reallocs.
5052 (_dbus_string_init_preallocated): new function
5054 2003-05-11 Havoc Pennington <hp@pobox.com>
5056 Write a "test-profile" that does echo client-server with threads;
5057 profile reveals lock contention, memcpy/realloc of buffers, and
5058 UTF-8 validation as hot spots. 20% of lock contention eliminated
5059 with dbus_atomic_inc/dec implementation on x86. Much remaining
5060 contention is global mempool locks for GList and DBusList.
5062 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
5065 * dbus/dbus-connection.c (struct DBusConnection): use
5066 dbus_atomic_t for the reference count
5068 * dbus/dbus-message.c (struct DBusMessage): declare
5069 dbus_atomic_t values as volatile
5071 * configure.in: code to detect ability to use atomic integer
5072 operations in assembly, from GLib patch
5074 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
5075 time, tired of it being wrong in threads and forked processes
5077 * glib/test-profile.c: a little program to bounce messages back
5078 and forth between threads and eat CPU
5080 * dbus/dbus-connection.c: add debug spew macros for debugging
5081 thread locks; include config.h at top; fix deadlock in
5082 dbus_connection_flush()
5084 2003-05-08 Havoc Pennington <hp@pobox.com>
5086 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
5087 data from getting written, and there wasn't a good reason to
5090 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
5091 dbus_verbose lines in test coverage
5092 (main): add list of functions sorted by # of untested blocks
5093 to the coverage report
5095 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
5097 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
5099 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
5100 extend test coverage
5102 * test/data/auth/cancel.auth-script: test canceling an
5105 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
5106 aren't used. in CVS history if we end up needing them.
5108 2003-05-04 Havoc Pennington <hp@pobox.com>
5110 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
5113 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
5114 function, which assumed length was in # of strings, not bytes
5116 * dbus/dbus-message.c (_dbus_message_test): add tests for some
5119 * dbus/dbus-connection.c
5120 (_dbus_connection_queue_received_message): disable function for
5121 now, we are only using it in test mode
5123 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
5124 remove a mistaken FIXME
5126 2003-05-04 Havoc Pennington <hp@pobox.com>
5128 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
5129 unlock mutex on successful return, patch from Anders Gustafsson
5131 2003-05-04 Havoc Pennington <hp@pobox.com>
5133 * dbus-glib-1.pc.in (Requires): fix dependencies, from
5136 2003-05-04 Havoc Pennington <hp@pobox.com>
5138 * tools/dbus-launch.c: implement
5140 * bus/main.c (main), bus/bus.c (bus_context_new):
5141 implement --print-pid and --fork
5143 2003-05-03 Havoc Pennington <hp@redhat.com>
5145 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
5146 the address had no value, and add to test suite. Fix and
5147 regression test from Miloslav Trmac
5149 2003-05-03 Havoc Pennington <hp@pobox.com>
5151 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
5152 watch is invalid when handled
5154 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
5155 dbus-launch utility to launch the bus from a shell script. Didn't
5156 actually implement dbus-launch yet, it's just a placeholder still.
5158 2003-05-03 Havoc Pennington <hp@pobox.com>
5160 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
5161 daemon; also documents daemon config file, so replaces
5162 doc/config-file.txt. Corrected some stuff from config-file.txt in
5163 the process of moving it.
5165 2003-05-03 Havoc Pennington <hp@pobox.com>
5167 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
5170 2003-05-03 Colin Walters <walters@verbum.org>
5172 * dbus/dbus-sysdeps.c (fill_user_info): Test against
5173 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
5175 * Makefile.am: Update to use new .pc versioning scheme.
5177 2003-05-02 Havoc Pennington <hp@redhat.com>
5179 * bus/system.conf.in: allow send/receive to/from message bus
5182 2003-04-30 Havoc Pennington <hp@redhat.com>
5184 * configure.in: print a note when building with unit tests and
5187 2003-04-30 Havoc Pennington <hp@redhat.com>
5189 * Makefile.am: add a check-local that complains if you didn't
5190 configure with --enable-tests
5192 2003-04-29 Havoc Pennington <hp@redhat.com>
5194 * glib/dbus-gmain.c: docs cleanups
5196 * dbus/dbus-types.h: add docs on int64 types
5198 * dbus/dbus-memory.c: fix docs to avoid putting private API in
5199 public API docs section
5201 2003-04-29 Havoc Pennington <hp@redhat.com>
5203 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
5204 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
5205 parallel install API version, not with the D-BUS package version.
5207 * HACKING: move some of README over here
5209 * README: updates, and document API/ABI policy
5211 * configure.in: reindentation
5213 2003-04-29 Havoc Pennington <hp@redhat.com>
5215 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
5216 to use this library" to be sure people have the right
5219 2003-04-28 Havoc Pennington <hp@redhat.com>
5221 * configure.in: add --enable-docs which by default is auto yes if
5222 doxygen and db2html found, no otherwise; but can be forced on/off
5224 * doc/Makefile.am: conditionalize whether to build docs on
5227 2003-04-28 Havoc Pennington <hp@redhat.com>
5229 * configure.in: 0.10
5233 * bus/system.conf.in: add <includedir>system.d</includedir>
5235 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
5236 username was provided but not uid
5238 * bus/config-parser.c (struct BusConfigParser): keep track of
5239 whether the parser is toplevel or was included; change some
5240 of the error handling if it's included.
5242 2003-04-27 Havoc Pennington <hp@pobox.com>
5246 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5247 report correct status if we finish processing authentication
5248 inside this function.
5250 * bus/activation.c (try_send_activation_failure): use
5251 bus_transaction_send_error_reply
5253 * bus/connection.c (bus_connection_get_groups): return an error
5254 explaining the problem
5256 * bus/bus.c (bus_context_check_security_policy): implement
5257 restriction here that inactive connections can only send the
5258 hello message. Also, allow bus driver to send anything to
5261 * bus/connection.c (bus_connection_complete): create the
5262 BusClientPolicy here instead of on-demand.
5263 (bus_connection_get_policy): don't return an error
5265 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
5266 sender field in message being replied to
5268 * bus/bus.c (bus_context_check_security_policy): fix silly typo
5269 causing it to return FALSE always
5271 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
5272 we checked sender rather than destination
5274 2003-04-25 Havoc Pennington <hp@redhat.com>
5276 test suite is slightly hosed at the moment, will fix soon
5278 * bus/connection.c (bus_connections_expire_incomplete): fix to
5279 properly disable the timeout when required
5280 (bus_connection_set_name): check whether we can remove incomplete
5281 connections timeout after we complete each connection.
5283 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
5284 probably still broken.
5286 * bus/services.c (bus_registry_acquire_service): implement max
5287 number of services owned, and honor allow/deny rules on which
5288 services a connection can own.
5290 * bus/connection.c (bus_connection_get_policy): report errors here
5292 * bus/activation.c: implement limit on number of pending
5295 2003-04-25 Havoc Pennington <hp@redhat.com>
5297 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
5298 where we used >= 0 instead of != DBUS_UID_UNSET.
5300 2003-04-25 Havoc Pennington <hp@redhat.com>
5302 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
5303 were toggled without add/remove, fix from Anders Gustafsson
5305 2003-04-24 Havoc Pennington <hp@redhat.com>
5307 * test/data/valid-config-files/basic.conf: add <limit> tags to
5310 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
5311 <limit> tag in configuration file.
5313 2003-04-24 Havoc Pennington <hp@redhat.com>
5315 * bus/dispatch.c: somehow missed some name_is
5317 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
5318 (_dbus_timeout_set_interval): new
5320 * bus/connection.c (bus_connections_setup_connection): record time
5321 when each connection is first set up, and expire them after the
5322 auth timeout passes.
5324 2003-04-24 Havoc Pennington <hp@redhat.com>
5326 * dbus/dbus-message.c (dbus_message_name_is): rename
5327 (dbus_message_service_is): rename
5328 (dbus_message_sender_is): rename
5329 (dbus_message_get_service): rename
5331 2003-04-24 Havoc Pennington <hp@redhat.com>
5333 * configure.in: add --enable-checks
5335 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
5337 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
5338 to use thread locks.
5339 (_dbus_connection_handler_destroyed_locked): move some private
5340 functions into proper docs group
5342 * dbus/dbus-internals.h: add _dbus_return_if_fail,
5343 _dbus_return_val_if_fail
5345 Throughout: use dbus_return_if_fail
5347 2003-04-23 James Willcox <jwillcox@gnome.org>
5350 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
5351 (dbus_connection_setup_with_g_main),
5352 (dbus_server_setup_with_g_main):
5353 * glib/test-dbus-glib.c: (main):
5354 * glib/test-thread-client.c: (main):
5355 * glib/test-thread-server.c: (new_connection_callback), (main):
5356 * tools/dbus-monitor.c: (main):
5358 Added a GMainContext argument to dbus_connection_setup_with_g_main()
5359 and dbus_server_setup_with_g_main().
5361 2003-04-20 Havoc Pennington <hp@pobox.com>
5363 * doc/dbus-specification.sgml: document the restrictions on
5364 message and service names
5366 2003-04-22 Havoc Pennington <hp@redhat.com>
5368 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
5369 support, and do some code cleanups to share more code and
5370 speed up array marshal/demarshal.
5372 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
5374 * configure.in: generate dbus-arch-deps.h
5376 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
5379 2003-04-22 Havoc Pennington <hp@redhat.com>
5381 * test/data/valid-messages/opposite-endian.message: fix test
5382 to use proper type for rply field
5384 * test/data/invalid-messages: add tests for below validation
5386 * dbus/dbus-message.c (decode_header_data): validate field types,
5387 and validate that named fields are valid names
5388 (decode_name_field): consider messages in the
5389 org.freedesktop.Local. namespace to be invalid.
5391 * dbus/dbus-string.c (_dbus_string_validate_name): new
5393 2003-04-19 Havoc Pennington <hp@pobox.com>
5395 * bus/driver.c (bus_driver_handle_hello): check limits and
5396 return an error if they are exceeded.
5398 * bus/connection.c: maintain separate lists of active and inactive
5399 connections, and a count of each. Maintain count of completed
5400 connections per user. Implement code to check connection limits.
5402 * dbus/dbus-list.c (_dbus_list_unlink): export
5404 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
5405 number of bytes in the message queue for a connection
5407 2003-04-18 Havoc Pennington <hp@pobox.com>
5409 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
5411 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
5414 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
5415 on realloc be sure to update the pointer in the keyring
5417 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
5418 offset to avoid writing to unallocated memory
5420 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
5421 try the next mechanism, so we properly handle OOM
5423 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
5425 (_dbus_keyring_new): fix OOM bug
5426 (_dbus_keyring_new_homedir): always set error; impose a maximum
5427 number of keys we'll load from the file, mostly to speed up the
5428 test suite and make its OOM checks more useful, but also for
5431 * dbus/dbus-auth.c (process_error_server): reject authentication
5432 if we get an error from the client
5433 (process_cancel): on cancel, send REJECTED, per the spec
5434 (process_error_client): send CANCEL if we get an error from the
5437 2003-04-18 Havoc Pennington <hp@pobox.com>
5439 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
5442 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
5445 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
5446 about DBUS_TEST_HOMEDIR once
5448 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
5451 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
5452 config file so we test the right thing
5454 Throughout: assorted docs improvements
5456 2003-04-18 Havoc Pennington <hp@pobox.com>
5458 * glib/dbus-gmain.c: adapt to watch changes
5460 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
5462 * dbus/dbus-server.h: remove dbus_server_handle_watch
5464 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
5466 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
5467 like DBusTimeout, so we don't need dbus_connection_handle_watch
5470 2003-04-17 Havoc Pennington <hp@redhat.com>
5472 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
5473 database usage so it all goes via the DBusUserDatabase cache.
5475 2003-04-17 Havoc Pennington <hp@redhat.com>
5477 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
5478 there was an OOM watch we skipped, we always return TRUE so we
5479 iterate again to have a look at it again. Fixes test suite hang.
5480 Code rearrangement also lets us lose some memset and only iterate
5481 over callbacks once.
5483 * bus/driver.c (bus_driver_handle_message): sense of test for
5486 2003-04-16 Havoc Pennington <hp@pobox.com>
5488 * doc/dbus-specification.sgml: make spec say serials are unsigned
5490 * dbus/dbus-message.h: change message serials to unsigned
5492 * dbus/dbus-connection.c: adapt to message serials being unsigned
5494 2003-04-15 Havoc Pennington <hp@pobox.com>
5496 * bus/bus.c: create and keep around a shared DBusUserDatabase
5499 * bus/connection.c (bus_connection_get_groups): don't cache
5500 groups for user in the connection object, since user database
5501 object now does that.
5503 2003-04-16 Havoc Pennington <hp@redhat.com>
5505 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
5506 list of size counters
5507 (_dbus_message_loader_putback_message_link): put back a popped link
5509 * dbus/dbus-connection.c
5510 (dbus_connection_set_max_live_messages_size): rename
5512 (dbus_connection_get_outgoing_size): get size of outgoing
5514 (_dbus_connection_set_connection_counter): remove this cruft
5516 2003-04-14 Havoc Pennington <hp@redhat.com>
5518 * dbus/dbus-userdb.c: user database abstraction, mostly to get
5519 caching, but at some point we might want to be able to use a
5522 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
5523 SHA1 conf file to test the sha1 auth mechanism, since the regular
5524 test always uses EXTERNAL when available.
5527 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
5528 add conf file that requires use of sha1 auth
5530 2003-04-13 Havoc Pennington <hp@pobox.com>
5532 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
5533 from Philip Blundell to send messages and monitor them.
5535 2003-04-13 Havoc Pennington <hp@pobox.com>
5537 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
5540 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
5543 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5544 fix to only recover unused bytes if we're already authenticated
5545 (_dbus_transport_get_is_authenticated): fix to still mark us
5546 authenticated if there are unused bytes.
5548 * bus/dispatch.c: implement security policy checking
5550 * bus/connection.c (bus_transaction_send_from_driver): new
5552 * bus/bus.c (bus_context_check_security_policy): new
5554 * bus/dispatch.c (send_service_nonexistent_error): delete this,
5555 now we just set the DBusError and it gets converted to an error
5558 * bus/connection.c (allow_user_function): enable code using actual
5559 data from the config file
5561 * bus/policy.c (list_allows_user): handle wildcard rules for
5562 user/group connection perms
5564 2003-04-13 Havoc Pennington <hp@pobox.com>
5566 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
5568 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
5570 * bus/policy.c (bus_policy_append_mandatory_rule)
5571 (bus_policy_append_default_rule, bus_policy_append_user_rule)
5572 (bus_policy_append_group_rule): new functions
5574 2003-04-12 Havoc Pennington <hp@pobox.com>
5576 * bus/config-parser.c (bus_config_parser_new): fix a memleak
5578 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
5579 the pid/gid/uid, just for paranoia.
5581 * test/break-loader.c (randomly_do_n_things): find a byte
5582 containing a type code, and randomly change it to a different
5585 2003-04-12 Havoc Pennington <hp@pobox.com>
5587 * bus/policy.h: change BusPolicy to be the thing from the config
5588 file, and rename old BusPolicy to BusClientPolicy
5590 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
5591 match change in how policy works
5593 * dbus/dbus-internals.h: mark assert_not_reached as
5594 __attribute((noreturn))__
5596 2003-04-11 Havoc Pennington <hp@redhat.com>
5598 * doc/dbus-specification.sgml: fix a spot with the wrong name for
5599 the broadcast service. Use boolean return for ServiceExists.
5601 2003-04-11 Havoc Pennington <hp@redhat.com>
5603 * configure.in: add another directory to look for qt in.
5605 2003-04-11 Havoc Pennington <hp@redhat.com>
5607 * AUTHORS: add Colin Walters
5609 2003-04-11 Havoc Pennington <hp@redhat.com>
5615 2003-04-11 Havoc Pennington <hp@redhat.com>
5617 * bus/messagebus.in: remove pid file when stopping the
5618 message bus, since the bus won't have privileges to remove it
5621 2003-04-11 Havoc Pennington <hp@redhat.com>
5623 * bus/bus.c (bus_context_new): move credentials change after
5626 2003-04-11 Havoc Pennington <hp@pobox.com>
5628 * test/decode-gcov.c: add "below average functions" to the
5629 coverage report, and change how some of the code works.
5631 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
5632 not in the coverage stats.
5634 * test/test-service.c (main): use _dbus_verbose not fprintf in a
5635 couple places so running the test suite doesn't result in megaspam.
5637 2003-04-11 Havoc Pennington <hp@pobox.com>
5639 * bus/dispatch.c (check_existent_service_activation): accept a no
5640 memory error in a place we didn't before
5642 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
5643 in case the first one failed," since the test suite is less
5646 2003-04-10 Havoc Pennington <hp@pobox.com>
5648 * bus/dispatch.c (check_segfault_service_activation): add test
5649 for launching an executable that just crashes.
5651 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
5652 don't leave a million cores. We'll see how portable this is.
5654 2003-04-10 Havoc Pennington <hp@pobox.com>
5656 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
5657 the possible parent failures before we fork, so that we don't
5658 fail to create a babysitter after creating the child.
5660 * bus/activation.c (bus_activation_activate_service): kill child
5661 if we don't successfully complete the activation.
5663 2003-04-10 Havoc Pennington <hp@redhat.com>
5665 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
5666 the connection if it's disconnected
5668 * bus/activation.c (bus_activation_service_created): use new
5669 transaction features to roll back removal of pending activation if
5670 we don't successfully create the service after all. Don't remove
5671 pending activation if the function fails.
5673 * dbus/dbus-list.c (_dbus_list_insert_before_link)
5674 (_dbus_list_insert_after_link): new code to facilitate
5677 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
5678 new functionality, so we can preallocate the ability to insert
5681 * bus/connection.c (bus_transaction_add_cancel_hook): new function
5682 allowing us to put custom hooks in a transaction to be used for
5683 cancelling said transaction
5685 * doc/dbus-specification.sgml: add some discussion of secondary
5686 service owners, and disallow zero-length service names
5688 * bus/services.c (bus_registry_acquire_service): new function,
5689 splits out part of bus_driver_handle_acquire_service() and fixes
5690 a bug where we didn't remove the service doing the acquiring
5691 from the secondary queue if we failed to remove the current owner
5692 from the front of the queue.
5694 2003-04-10 Alexander Larsson <alexl@redhat.com>
5696 * doc/dbus-specification.sgml:
5697 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
5699 2003-04-10 Alexander Larsson <alexl@redhat.com>
5704 Added files to cvsignore
5706 * dbus/dbus-message.h:
5707 * dbus/dbus-message.c: (dbus_message_iter_get_named):
5708 Make get_named() take two out argument and return a boolean.
5709 (dbus_message_iter_get_args_valist):
5710 Update usage of get_named().
5711 (dbus_message_iter_append_byte):
5713 (dbus_message_iter_append_named)
5715 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
5718 2003-04-10 Alexander Larsson <alexl@redhat.com>
5720 * dbus/dbus-marshal.[ch]:
5721 Add array_type_pos argument to _dbus_marshal_validate_arg.
5722 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
5724 * dbus/dbus-message.[ch]:
5725 Multi-dimensional arrays have full type specification in the
5726 outermost array. Iter code re-arranged to handle this.
5727 Added some more iter tests.
5729 * doc/dbus-specification.sgml:
5732 Update new array encoding description.
5733 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
5735 * test/data/invalid-messages/array-with-mixed-types.message:
5736 * test/data/valid-messages/array-of-array-of-uint32.message:
5737 Change to the new array format.
5739 * test/data/invalid-messages/too-short-dict.message:
5742 * test/data/valid-messages/recursive-types.message:
5743 Fix up and extend test.
5745 2003-04-10 Havoc Pennington <hp@pobox.com>
5747 * bus/dispatch.c: lots of fixes
5749 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
5750 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
5751 that was crack, broke the test service.
5753 * dbus/dbus-transport.c (_dbus_transport_open): fix error
5754 handling to avoid piling up errors if we get a failure on the
5757 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
5758 pid in assertion failures.
5760 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
5761 to some fixed size of file descriptor array. Don't return TRUE
5762 anytime a timeout exists, that led to lots of busy loop silliness
5765 2003-04-09 Havoc Pennington <hp@redhat.com>
5767 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
5768 I'd checked this in earlier but hadn't.
5770 2003-04-09 Havoc Pennington <hp@redhat.com>
5772 * bus/dispatch.c (bus_dispatch_test): get a bit further through
5773 the activation test (man this is getting old!)
5775 2003-04-09 Havoc Pennington <hp@redhat.com>
5777 * test/test-utils.c: use dispatch status function to fix this up
5779 * bus/connection.c (connection_watch_callback): don't dispatch
5781 (connection_timeout_callback): don't dispatch from here
5782 (bus_connections_setup_connection): set the dispatch status function
5783 (bus_connection_disconnected): unset it
5785 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
5786 used to add a connection to be dispatched
5787 (_dbus_loop_iterate): do the dispatching at the end of each
5790 * dbus/dbus-connection.c
5791 (dbus_connection_set_dispatch_status_function): new function
5792 allowing us to fix up main loop usage
5793 (_dbus_connection_last_unref): free all the various function
5795 (dbus_connection_dispatch): call the DispatchStatusFunction
5796 whenever this function returns
5797 (dbus_connection_handle_watch): call DispatchStatusFunction
5798 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
5799 (reply_handler_timeout): call DispatchStatusFunction
5800 (dbus_connection_flush): call DispatchStatusFunction
5802 2003-04-09 Havoc Pennington <hp@redhat.com>
5804 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
5807 * bus/dispatch.c (check_service_activated): fix bug in test
5809 * dbus/dbus-mainloop.c (check_timeout): fix this up
5811 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
5812 verbose output so we can sort out output from different processes,
5813 e.g. in the activation case.
5815 2003-04-08 Colin Walters <walters@gnu.org>
5817 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
5819 (bus_context_new): Set it.
5820 (bus_context_unref): Use it to delete the pid file.
5822 2003-04-08 Havoc Pennington <hp@redhat.com>
5824 * test/data/invalid-messages/array-with-mixed-types.message:
5825 regression test that fails for the moment
5827 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
5828 tests for convenience
5830 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
5831 array of nil, it broke things.
5833 * test/data/invalid-messages/array-of-nil.message: regression test
5835 * test/data/valid-messages/array-of-array-of-uint32.message:
5836 happened to write this so added it to suite
5838 2003-04-08 Havoc Pennington <hp@redhat.com>
5840 * bus/driver.c (bus_driver_handle_acquire_service): init
5841 retval/reply before checking name
5843 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
5844 recursion depth argument
5846 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
5847 in the public struct for future extension
5849 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
5852 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
5855 * doc/dbus-specification.sgml: fix typo
5857 2003-04-08 Alexander Larsson <alexl@redhat.com>
5859 Implemented recursive types, named types and new-style iters
5862 * glib/test-thread-client.c: (thread_func):
5863 * glib/test-thread-server.c: (handle_test_message):
5864 * test/test-service.c: (handle_echo):
5873 * dbus/dbus-internals.c: (_dbus_type_to_string):
5874 Update for new types.
5876 * dbus/dbus-marshal.[ch]:
5877 Implement recursive types and the new marshalling format.
5878 Remove hardcoded dict marshalling.
5879 Marshal named types.
5881 * dbus/dbus-message-builder.c:
5883 Remove references to old types
5885 * dbus/dbus-message.[ch]:
5886 New non-refcounted iter API that supports recursive iters.
5887 Use iters for appending, including support for recursive
5889 Add byte and named type support.
5890 Update everything to new marshalling formats.
5891 Add tests for new API.
5893 * dbus/dbus-protocol.h:
5894 Remove old array types.
5895 Add types: BYTE, ARRAY, DICT, NAMED
5897 * dbus/dbus-string.c:
5898 * dbus/dbus-sysdeps.c:
5899 Make parse_double locale safe.
5901 * dbus/dbus-test-main.c:
5907 * doc/dbus-specification.sgml:
5910 * test/data/incomplete-messages/missing-body.message:
5911 * test/data/invalid-messages/bad-boolean.message:
5912 * test/data/invalid-messages/bad-boolean-array.message:
5913 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
5914 * test/data/invalid-messages/boolean-has-no-value.message-raw:
5915 * test/data/invalid-messages/too-short-dict.message:
5916 * test/data/valid-messages/dict-simple.message:
5917 * test/data/valid-messages/dict.message:
5918 * test/data/valid-messages/emptiness.message:
5919 * test/data/valid-messages/lots-of-arguments.message:
5920 * test/data/valid-messages/no-padding.message:
5921 * test/data/valid-messages/recursive-types.message:
5922 Add missing NAME fields
5923 Fix up dicts & arrays
5925 * test/data/invalid-messages/dict-with-nil-value.message:
5926 Removed, this is not invalid anymore.
5928 * test/data/valid-messages/recursive-types.message:
5929 Add new test for deeply recursive types.
5931 2003-04-07 Havoc Pennington <hp@pobox.com>
5933 * bus/driver.c (bus_driver_handle_acquire_service): return an
5934 error if you try to acquire a service that starts with ':'
5936 2003-04-07 Havoc Pennington <hp@redhat.com>
5938 * doc/dbus-specification.sgml: require that base service names
5939 start with ':' and that the base service is created/deleted
5940 as first and last things a connection does on the bus
5942 * bus/dispatch.c (check_existent_service_activation): lots more
5943 work on the activation test; it doesn't fully pass yet...
5945 * test/test-service.c (main): fix so we don't memleak the
5946 connection to the message bus
5947 (filter_func): accept a message asking us to exit
5949 2003-04-06 Havoc Pennington <hp@pobox.com>
5951 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
5954 * configure.in: fixes to Qt detection from Colin Walters
5956 * doc/Makefile.am: Only remove generated docbook dirs if they
5957 exist, from Colin Walters
5959 * dbus/dbus-bus.c: change how we set well-known connections to
5960 NULL, so that it works if a single connection is stored in
5961 two well-known array slots.
5963 * test/Makefile.am: remove a lot of stuff that isn't immediately
5964 useful, it's in CVS history if we want it.
5966 * test/test-service.c: use dbus-mainloop instead of that
5969 2003-04-06 Havoc Pennington <hp@pobox.com>
5971 * dbus/Makefile.am: split lists of sources into stuff that goes in
5972 the library, util functions that go in the lib and are also used
5973 elsewhere, and util functions that are used in tests/daemon but
5974 don't go in the lib.
5976 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
5977 here so it can be used in test binaries also
5979 2003-04-06 Havoc Pennington <hp@pobox.com>
5981 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
5982 here in the parent process, so we can return an error if it
5983 fails. Also, move some of the code into the child so the parent
5984 is less hosed if we fail midway through.
5986 * bus/bus.c (bus_context_new): move pidfile detection further up
5987 in the function, before we start overwriting sockets and such.
5989 * bus/messagebus.in: adjust this a bit, not sure if it will work.
5991 * configure.in: add --with-system-pid-file and --with-system-socket
5993 2003-04-06 Colin Walters <walters@verbum.org>
5995 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
5997 * bus/system.conf.in: Declare a pidfile.
5999 * bus/bus.c (bus_context_new): Test for an existing pid file, and
6000 create one (if appropriate).
6002 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
6003 (struct BusConfigParser) [pidfile]: New.
6004 (element_type_to_name, merge_included, start_busconfig_child)
6005 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
6006 (bus_config_parser_unref): Free it.
6007 (bus_config_parser_get_pidfile): New function.
6009 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
6011 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
6013 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
6015 * dbus/dbus-sysdeps.h: Prototype it.
6017 2003-04-06 Havoc Pennington <hp@pobox.com>
6019 * bus/bus.c (bus_context_new): print the address in here, rather
6020 than in main(), because we need to do it before forking the daemon
6022 * bus/dispatch.c (send_service_nonexistent_error): set the sender
6023 on the service nonexistent error
6025 * bus/driver.c (bus_driver_handle_acquire_service): set the
6026 sender on the AcquireService reply
6028 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
6029 server also listen on a UNIX socket so services can connect to it.
6031 2003-04-06 Havoc Pennington <hp@pobox.com>
6033 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
6034 so it detects deadlocks and also we actually init threads when
6037 2003-04-06 Havoc Pennington <hp@pobox.com>
6039 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
6040 save the domain socket name, and unlink it when we disconnect the
6041 server. Means that at least when we exit normally, we won't leave
6042 a bunch of junk in /tmp
6044 * dbus/dbus-transport-unix.c
6045 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
6046 memory management). (I was making a real change here but then
6049 2003-04-06 Havoc Pennington <hp@pobox.com>
6051 * bus/bus.c (bus_context_new): fix wrong handling of
6052 server_data_slot_unref() in the error case.
6054 * dbus/dbus-internals.h (_dbus_assert): change so it passes
6055 "(condition) != 0" to _dbus_real_assert so that
6056 "_dbus_assert (pointer)" doesn't cause a warning
6058 * bus/main.c (main): accept --print-address option to print out
6059 the message bus address
6061 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
6063 * dbus/dbus-transport.c (_dbus_transport_open): special error for
6064 "tmpdir" option to unix: address on client side
6066 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
6069 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
6070 we can use to create sockets in the test suite.
6072 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
6073 cleanly. To be used for testing.
6075 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
6077 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
6079 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6080 handle trying to call this when there's no servers active
6082 2003-04-05 Havoc Pennington <hp@pobox.com>
6088 2003-04-05 Havoc Pennington <hp@pobox.com>
6090 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
6091 crash on startup. Need to get "try starting the daemon"
6092 in the test suite I guess. ;-)
6094 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
6095 tracked the number of open connections; it's better done in
6096 application-specific code as you want it to span all servers etc.
6098 2003-04-05 Havoc Pennington <hp@pobox.com>
6100 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
6101 patch from Colin Walters
6103 2003-04-05 Havoc Pennington <hp@pobox.com>
6105 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
6106 reality; in fact multiple mechanisms are allowed.
6108 * dbus/dbus-internals.c (_dbus_real_assert)
6109 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
6110 _dbus_assert_not_reached() into functions, so that they don't show
6111 up in basic block counts for test coverage, and don't use up as
6112 much disk space. Does mean slower execution speed though, so
6113 assumes --disable-asserts is the normal production case.
6115 2003-04-05 Havoc Pennington <hp@pobox.com>
6117 * test/Makefile.am (dist-hook): also dist *.in files
6123 2003-04-05 Havoc Pennington <hp@pobox.com>
6125 * dbus/dbus-string.c: docs warning
6127 * dbus/dbus-spawn.c: missing docs
6129 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
6131 2003-04-05 Havoc Pennington <hp@pobox.com>
6133 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
6136 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
6137 to -1 once we've reaped the babysitter
6138 (_dbus_babysitter_handle_watch): do as much work as we can, not
6141 * bus/activation.c: add code using DBusBabysitter so that we
6142 handle it when a service fails to start up properly.
6143 (bus_activation_service_created): don't remove the activation
6144 entries as we go, just let them get removed when we free the pending
6145 activation. Unref reply messages after sending them.
6147 2003-04-05 Havoc Pennington <hp@pobox.com>
6149 * test/decode-gcov.c (main): print per-directory stats in the report
6151 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
6153 2003-04-05 Havoc Pennington <hp@pobox.com>
6155 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
6157 * test/decode-gcov.c: hack up a little program to suck data
6158 out of gcov files. Yes this is sort of silly.
6160 * configure.in: define something in config.h and do an
6161 AM_CONDITIONAL when gcov is enabled
6163 2003-04-04 Havoc Pennington <hp@redhat.com>
6165 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
6166 return a "babysitter" object that is used to monitor the status of
6167 the spawned process and reap it when required.
6169 * test/test-segfault.c, test/test-exit.c,
6170 test/test-sleep-forever.c: binaries that do various lame things,
6171 used in the test suite.
6173 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
6175 2003-04-03 Havoc Pennington <hp@pobox.com>
6177 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
6178 in preparation for modifying it, dbus-sysdeps is getting
6181 2003-04-03 Havoc Pennington <hp@redhat.com>
6183 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
6186 * bus/*.[hc]: adapt to mainloop change
6188 2003-04-03 Havoc Pennington <hp@redhat.com>
6190 * bus/activation.c (load_directory): fix up memleaks
6191 (bus_activation_entry_free): free the entry
6193 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
6194 we get one from the message bus; fix memleaks.
6196 * dbus/dbus-message.c (dbus_set_error_from_message): new function
6198 2003-04-03 Havoc Pennington <hp@pobox.com>
6200 * bus/config-parser.c (bus_config_parser_unref): free
6201 list of mechanisms, bug discovered by test suite enhancements
6202 (putting system.conf and session.conf into suite)
6204 * test/Makefile.am, test/test-service.c: add placeholder for a
6205 test service that we'll activate as part of test suite. Doesn't
6208 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
6209 setting NULL value, and use system malloc not dbus_malloc()
6210 when we have unavoidable memleakage.
6212 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
6213 didn't work, and support DBUS_BUS_ACTIVATION.
6215 * bus/activation.c (child_setup): pass our well-known bus type to
6218 * bus/config-parser.c: support <type> to specify well-known type
6220 * doc/dbus-specification.sgml: document the env variables to
6221 locate well-known buses and find service activator
6223 2003-04-02 Havoc Pennington <hp@redhat.com>
6225 * test/Makefile.am (all-local): add a rule to copy tests to
6226 builddir, so we can have generated tests. Use this to remove the
6227 silly hack for testing system.conf and session.conf. Will use this
6228 shortly to generate .service files pointing to test binaries.
6230 2003-04-02 Havoc Pennington <hp@redhat.com>
6232 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
6233 current alloc and needed new length, not max of the doubled
6234 allocation and needed new length. Also, when building tests,
6235 don't do the double-allocation stuff, just realloc every time.
6237 2003-04-02 Havoc Pennington <hp@redhat.com>
6239 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
6241 (_dbus_string_get_dirname): new
6242 (_dbus_sysdeps_test): new
6243 (_dbus_directory_open): include dirnames in error messages
6245 * bus/config-parser.c: interpret <include> and <includedir> and
6246 <servicedir> relative to config file location if the given
6247 filename is not absolute.
6249 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
6251 2003-04-02 Havoc Pennington <hp@redhat.com>
6253 * bus/connection.c (bus_transaction_send_error_reply): set sender
6254 service for the error, and unref the reply on success
6256 * bus/activation.c: convert to use BusTransaction so OOM can be
6258 (bus_activation_service_created): set sender of the message
6260 2003-04-01 Havoc Pennington <hp@redhat.com>
6262 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
6263 <includedir> (at least mostly)
6265 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
6266 first, then the user ID
6268 2003-04-01 Havoc Pennington <hp@pobox.com>
6270 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
6273 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
6275 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
6277 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
6278 socket 0777, and unlink any existing socket.
6280 * bus/bus.c (bus_context_new): change our UID/GID and fork if
6281 the configuration file so specifies; set up auth mechanism
6284 * bus/config-parser.c (bus_config_parser_content): add support
6285 for <fork> option and fill in code for <auth>
6287 * bus/system.conf.in: add <fork/> to default configuration,
6288 and limit auth mechanisms to EXTERNAL
6290 * doc/config-file.txt (Elements): add <fork>
6292 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
6293 (_dbus_change_identity): new function
6295 2003-03-31 Havoc Pennington <hp@redhat.com>
6297 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
6298 (_dbus_listen_unix_socket): fix off-by-one error in null
6299 termination spotted by Nalin
6301 2003-03-31 Havoc Pennington <hp@redhat.com>
6303 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
6304 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
6305 having a real home directory available.
6307 2003-03-31 Havoc Pennington <hp@redhat.com>
6309 * bus/Makefile.am (install-data-hook): create /var/run/dbus
6311 * bus/messagebus.in: add init script for Red Hat /etc/init.d
6313 * configure.in: add support for specifying a style of init script
6316 2003-03-31 Havoc Pennington <hp@redhat.com>
6318 Fix some annoying DBusString API and fix all affected code.
6320 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
6322 (_dbus_string_get_data): change to return string instead of using
6324 (_dbus_string_get_const_data): ditto
6325 (_dbus_string_get_data_len): ditto
6326 (_dbus_string_get_const_data_len): ditto
6328 2003-03-31 Havoc Pennington <hp@redhat.com>
6330 * bus/main.c (main): fix up the command line arguments to be nicer
6332 2003-03-31 Havoc Pennington <hp@redhat.com>
6334 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
6335 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
6336 final location that lands in the config file
6338 * bus/config-loader-expat.c (bus_config_load): fix type of
6341 * doc/TODO: remove TODO item for dbus_bus_get()
6343 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
6345 2003-03-31 Havoc Pennington <hp@pobox.com>
6347 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
6348 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
6349 argument since they are always client side
6351 * dbus/dbus-server.c (dbus_server_get_address): new function
6353 * bus/main.c (main): take the configuration file as an argument.
6355 * test/data/valid-config-files/debug-allow-all.conf: new file to
6356 use with dispatch.c tests for example
6358 * bus/test-main.c (main): require test data dir
6360 * bus/bus.c (bus_context_new): change this to take a
6361 configuration file name as argument
6363 * doc/config-file.txt (Elements): add <servicedir>
6365 * bus/system.conf, bus/session.conf: new files
6367 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
6368 well-known socket if none set
6370 * configure.in: create system.conf and session.conf
6372 2003-03-30 Havoc Pennington <hp@pobox.com>
6374 * bus/config-parser.c: hacking
6376 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
6377 to shut down, since it could cause weirdness with the DBusList
6380 * dbus/dbus-list.c (_dbus_list_test): add tests for the
6381 link-oriented stack routines
6382 (alloc_link): free the mempool if the first alloc from it fails
6384 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
6386 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
6388 (_dbus_string_skip_white): new
6390 * doc/config-file.txt (Elements): add <includedir>
6392 2003-03-28 Havoc Pennington <hp@pobox.com>
6394 * dbus/dbus-string.c (_dbus_string_copy_data_len)
6395 (_dbus_string_copy_data): new functions
6397 2003-03-28 Anders Carlsson <andersca@codefactory.se>
6399 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
6403 * dbus/dbus-memory.c:
6406 2003-03-28 Havoc Pennington <hp@pobox.com>
6408 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
6409 I think it may have just been superstition. Not sure.
6411 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
6412 failures that were not being handled.
6414 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
6416 * dbus/dbus-memory.c: add ability to set number of mallocs in a
6417 row that will fail on out-of-memory.
6419 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
6420 function for testing out-of-memory handling.
6422 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
6423 allocation functions, they do map exactly to the expat ones.
6425 2003-03-27 Havoc Pennington <hp@redhat.com>
6427 * bus/config-loader-libxml.c (bus_config_load): add another error
6430 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6433 Add note about automatic service activation.
6435 * doc/dbus-specification.sgml:
6436 Rename the specification and clarify a few things.
6438 2003-03-26 Anders Carlsson <andersca@codefactory.se>
6441 * dbus/dbus-address.c:
6443 * dbus/dbus-marshal.c:
6444 * dbus/dbus-server-debug-pipe.c:
6445 * dbus/dbus-transport-unix.c:
6446 Fix documentation warnings.
6448 2003-03-26 Havoc Pennington <hp@pobox.com>
6450 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
6451 after every test so it's quick and easy to see which leaked, and
6452 so we test multiple dbus_shutdown() calls
6454 * configure.in: change configure.in XML stuff to also support
6457 * config-loader-libxml.c: some hacking
6459 * config-loader-expat.c: some hacking
6461 * config-parser.c: some hacking, plus tests
6463 2003-03-25 Havoc Pennington <hp@redhat.com>
6465 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
6467 * configure.in: add --with-xml option to specify XML library,
6468 right now only libxml is supported.
6470 * bus/config-loader-libxml.c, config-parser.c: sync some minor
6471 nonworking code between home and work, still just stubs
6473 2003-03-24 Havoc Pennington <hp@redhat.com>
6475 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
6478 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
6479 NULL argument for "message" if the error is a well-known one,
6480 fill in a generic message in this case.
6482 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
6485 * bus/test.c (bus_test_flush_bus): add
6487 * bus/policy.c (bus_policy_test): test code stub
6489 2003-03-24 Havoc Pennington <hp@pobox.com>
6491 * bus/connection.c (bus_connections_setup_connection): set up
6492 the "can this user connect" function, but it always returns
6493 TRUE until we have a config file parser so we can have a config
6494 file that allows connections.
6496 2003-03-23 Havoc Pennington <hp@pobox.com>
6498 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
6499 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
6500 the mutex, so we can check for proper memory management
6503 * dbus/dbus-dataslot.c: remove the mutex from
6504 DBusDataSlotAllocator and lock it manually when using it,
6505 to simplify fitting it into the global slots framework.
6507 * dbus/dbus-threads.c (init_static_locks): rework how we're
6508 handling global locks so they are easily shut down.
6510 * bus/policy.c (bus_policy_append_rule): fix
6512 * bus/test-main.c (main): check for memleaks
6514 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
6515 test suite check for memleaks
6517 * dbus/dbus-memory.c: add support in test mode for tracking
6518 number of outstanding blocks
6520 2003-03-23 Havoc Pennington <hp@pobox.com>
6522 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
6525 * dbus/dbus-hash.h: add ULONG hash keys
6527 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
6528 (_dbus_get_group_id): new function
6530 2003-03-20 Havoc Pennington <hp@redhat.com>
6532 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
6534 (dbus_connection_get_unix_user): new function
6536 2003-03-20 Havoc Pennington <hp@pobox.com>
6538 * bus/connection.c (bus_connection_send_oom_error): assert that
6539 message has a sender
6540 (connection_execute_transaction): ditto
6541 (bus_connection_preallocate_oom_error): fix to set the sender, and
6542 set recipient to the destination service, not the bus driver
6544 * bus/policy.c: hacking
6546 * dbus/dbus-message.c (dbus_message_service_is): new function
6547 (dbus_message_sender_is): new
6549 2003-03-19 Havoc Pennington <hp@redhat.com>
6551 * bus/policy.c: start sketching code for policy restrictions on
6552 what connections can do.
6554 2003-03-18 Havoc Pennington <hp@redhat.com>
6556 * doc/TODO: some notes on high-level todo items. Little nitpick
6557 stuff is all in @todo, so no need to add it here.
6559 * doc/config-file.txt: some notes on how config file might look
6561 2003-03-18 Anders Carlsson <andersca@codefactory.se>
6567 2003-03-17 Havoc Pennington <hp@redhat.com>
6569 * dbus/dbus-internals.h: add gcc attributes so that
6570 our printf-style functions warn on bad arguments to
6573 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
6576 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
6579 2003-03-17 Havoc Pennington <hp@redhat.com>
6581 * bus/test-main.c (main): make it print something as it runs
6582 so make check doesn't look stuck
6584 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
6585 from CVS, now obsolete
6587 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6589 * bus/dispatch.c: (bus_dispatch):
6590 Refetch the service name since it may have been reallocated
6591 when dbus_message_set_sender was called.
6593 * dbus/dbus-sysdeps.c: (_dbus_accept):
6594 Add address and address length variables and use them to stop
6595 valgrind from complaining.
6597 2003-03-17 Havoc Pennington <hp@pobox.com>
6599 All tests pass, no memleaks, no valgrind complaints.
6601 * bus/test.c: refcount handler_slot
6603 * bus/connection.c (bus_connections_new): refcount
6604 connection_data_slot
6606 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
6607 bytes so that auth scripts pass.
6609 * bus/dispatch.c: init message_handler_slot so it gets allocated
6612 * bus/dispatch.c (message_handler_slot_ref): fix memleak
6614 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
6615 dealloc server_pipe_hash when no longer used for benefit of
6618 * dbus/dbus-auth.c (process_command): memleak fix
6620 * bus/dispatch.c (check_hello_message): memleak fix
6622 2003-03-16 Havoc Pennington <hp@pobox.com>
6624 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
6626 2003-03-17 Anders Carlsson <andersca@codefactory.se>
6628 * bus/activation.c (bus_activation_activate_service): Append
6629 the pending activation entry to the list of pending activations.
6631 2003-03-16 Havoc Pennington <hp@pobox.com>
6633 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
6636 * dbus/dbus-address.c (create_entry): fix OOM handling when
6637 failing to alloc entry->method
6639 2003-03-16 Havoc Pennington <hp@pobox.com>
6641 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
6644 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6645 add some missing dbus_set_result
6647 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
6648 alloc the DBusMessageHandler
6650 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
6651 the transport here, since we call this from the finalizer; it
6652 resulted in a double-finalize.
6654 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
6655 where we tried to use transport->connection that was NULL,
6656 happened when transport was disconnected early on due to OOM
6658 * bus/*.c: adapt to handle OOM for watches/timeouts
6660 * dbus/dbus-transport-unix.c: port to handle OOM during
6663 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
6664 reference to unused bytes instead of a copy
6666 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
6669 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
6672 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
6675 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6677 * doc/dbus-specification.sgml:
6678 Document reply message for ActivateService.
6680 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6682 * bus/activation.c: (bus_pending_activation_entry_free),
6683 (bus_pending_activation_free), (bus_activation_new),
6684 (bus_activation_unref), (bus_activation_service_created),
6685 (bus_activation_activate_service):
6687 * bus/bus.c: (bus_context_new):
6688 * bus/desktop-file.c: (new_section):
6689 * bus/driver.c: (bus_driver_send_service_deleted),
6690 (bus_driver_handle_activate_service):
6691 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
6693 * dbus/dbus-connection.c:
6694 (dbus_connection_send_with_reply_and_block):
6695 * dbus/dbus-message.c: (dbus_message_append_args_valist):
6696 * dbus/dbus-protocol.h:
6697 Make activation work better. Now pending activations will be queued
6698 and the daemon won't try to activate services that are already registered.
6700 2003-03-16 Havoc Pennington <hp@pobox.com>
6702 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
6705 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
6706 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
6708 2003-03-16 Havoc Pennington <hp@pobox.com>
6710 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
6711 this. always run the test suite before commit...
6713 * bus/*: adapt to DBusConnection API changes
6715 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
6716 requires renaming stuff to avoid dbus_connection_dispatch name
6719 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
6722 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6723 separate from _dbus_message_loader_return_buffer()
6725 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
6726 this, because it's now always broken to use; the number of
6727 messages in queue vs. the number still buffered by the message
6728 loader is undefined/meaningless. Should use
6729 dbus_connection_get_dispatch_state().
6730 (dbus_connection_dispatch): rename from
6731 dbus_connection_dispatch_message
6733 2003-03-16 Havoc Pennington <hp@pobox.com>
6735 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
6738 2003-03-16 Anders Carlsson <andersca@codefactory.se>
6740 * dbus/dbus-connection.c:
6741 (dbus_connection_send_with_reply_and_block):
6742 Decrease connection->n_incoming when removing an entry
6744 * dbus/dbus-dict.c: (dbus_dict_entry_free),
6745 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6746 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6747 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
6748 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
6749 (dbus_dict_get_byte_array):
6750 Handle NULL arrays and strings. Also add support for byte arrays.
6752 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
6753 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
6754 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6755 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6756 (_dbus_demarshal_dict), (demarshal_and_validate_len),
6757 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
6758 * dbus/dbus-marshal.h:
6759 Add support for marshalling and demarshalling empty arrays and strings.
6761 * dbus/dbus-message.c: (dbus_message_append_args_valist),
6762 (dbus_message_append_string_array),
6763 (dbus_message_iter_get_boolean),
6764 (dbus_message_iter_get_boolean_array),
6765 (dbus_message_iter_get_int32_array),
6766 (dbus_message_iter_get_uint32_array),
6767 (dbus_message_iter_get_double_array),
6768 (dbus_message_iter_get_byte_array),
6769 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
6770 (check_message_handling):
6771 Add support for getting empty arrays and dicts.
6773 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
6774 Don't do any validation at all for now, that's better than just checking
6777 * test/data/valid-messages/emptiness.message:
6778 New test message with lots of empty arrays.
6780 2003-03-16 Havoc Pennington <hp@pobox.com>
6782 * dbus/dbus-connection.c
6783 (_dbus_connection_queue_received_message_link): new function that
6784 can't fail due to OOM
6786 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
6787 new function pops a message together with a list link
6790 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
6791 message queuing functions to avoid needing to alloc memory
6793 2003-03-16 Havoc Pennington <hp@pobox.com>
6795 Oops - test code was only testing failure of around 30 of the
6796 mallocs in the test path, but it turns out there are 500+
6797 mallocs. I believe this was due to misguided linking setup such
6798 that there was one copy of dbus_malloc etc. in the daemon and one
6799 in the shared lib, and only daemon mallocs were tested. In any
6800 case, the test case now tests all 500+ mallocs, and doesn't pass
6801 yet, though there are lots of fixes in this patch.
6803 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6804 this so that it doesn't need to allocate memory, since it
6805 has no way of indicating failure due to OOM (and would be
6806 annoying if it did).
6808 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
6810 * bus/Makefile.am: rearrange to create two self-contained
6811 libraries, to avoid having libraries with overlapping symbols.
6812 that was resulting in weirdness, e.g. I'm pretty sure there
6813 were two copies of global static variables.
6815 * dbus/dbus-internals.c: move the malloc debug stuff to
6818 * dbus/dbus-list.c (free_link): free list mempool if it becomes
6821 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
6823 * dbus/dbus-address.c (dbus_parse_address): free list nodes
6826 * bus/dispatch.c (bus_dispatch_add_connection): free
6827 message_handler_slot when no longer using it, so
6828 memory leak checkers are happy for the test suite.
6830 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
6832 * bus/bus.c (new_connection_callback): disconnect in here if
6833 bus_connections_setup_connection fails.
6835 * bus/connection.c (bus_connections_unref): fix to free the
6837 (bus_connections_setup_connection): if this fails, don't
6838 disconnect the connection, just be sure there are no side
6841 * dbus/dbus-string.c (undo_alignment): unbreak this
6843 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
6845 (_dbus_auth_new): fix the order in which we free strings
6848 * bus/connection.c (bus_connection_disconnected): fix to
6849 not send ServiceDeleted multiple times in case of memory
6852 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
6853 get the base service name
6854 (dbus_bus_register_client): don't return base service name,
6855 instead store it on the DBusConnection and have an accessor
6857 (dbus_bus_register_client): rename dbus_bus_register()
6859 * bus/dispatch.c (check_hello_message): verify that other
6860 connections on the bus also got the correct results, not
6861 just the one sending hello
6863 2003-03-15 Havoc Pennington <hp@pobox.com>
6865 Make it pass the Hello handling test including all OOM codepaths.
6866 Now to do other messages...
6868 * bus/services.c (bus_service_remove_owner): fix crash when
6869 removing owner from an empty list of owners
6870 (bus_registry_ensure): don't leave service in the list of
6871 a connection's owned services if we fail to put the service
6874 * bus/connection.c (bus_connection_preallocate_oom_error): set
6875 error flag on the OOM error.
6877 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6878 handle _dbus_transport_set_connection failure
6880 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
6881 to create watches up front and simply enable/disable them as
6883 (unix_connection_set): this can now fail on OOM
6885 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
6886 of enabling/disabling a watch or timeout.
6888 * bus/loop.c (bus_loop_iterate): don't touch disabled
6891 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
6893 2003-03-15 Havoc Pennington <hp@pobox.com>
6895 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
6896 write useful test code, after all that futzing around ;-)
6898 Test does not yet pass because we can't handle OOM in
6899 _dbus_transport_messages_pending (basically,
6900 dbus_connection_preallocate_send() does not prealloc the write
6901 watch). To fix this, I think we need to add new stuff to
6902 set_watch_functions, namely a SetEnabled function so we can alloc
6903 the watch earlier, then enable it later.
6905 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
6906 dbus-memory.c to the convenience lib
6908 * bus/test.c: rename some static functions to keep them clearly
6909 distinct from stuff in connection.c. Handle client disconnection.
6911 2003-03-14 Havoc Pennington <hp@pobox.com>
6913 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
6914 transport, tests more of the real codepath. Set up clients
6915 with bus_setup_debug_client.
6917 * bus/test.c (bus_setup_debug_client): function to set up debug
6918 "clients" on the main loop
6920 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
6923 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
6926 * dbus/dbus-server-debug.c: support a debug server based on pipes
6928 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
6929 (_dbus_close): new function
6931 * configure.in: check for socketpair
6933 2003-03-14 Havoc Pennington <hp@redhat.com>
6935 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
6938 * dbus/dbus-transport-debug.c: rework this a good bit to be
6939 less complicated. hopefully still works.
6941 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
6944 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
6947 * dbus/dbus-message.c (dbus_message_copy): rename from
6948 dbus_message_new_from_message, fix it up to copy
6949 all the message fields, add test case
6951 * bus/dispatch.c (bus_dispatch_test): add some more test code,
6952 not quite passing yet
6954 2003-03-14 Havoc Pennington <hp@pobox.com>
6956 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
6957 until no work remains" in test code. (the large diff here
6958 is just code movement, no actual changes)
6960 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
6961 1, no point waiting around for test code.
6962 (_dbus_server_debug_accept_transport): unref the timeout
6963 after adding it (right?)
6965 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
6967 2003-03-13 Havoc Pennington <hp@redhat.com>
6969 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
6972 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
6975 * dbus/dbus-connection.h: Make AddWatchFunction and
6976 AddTimeoutFunction return a bool so they can fail on out-of-memory
6978 * bus/bus.c (bus_context_new): set up timeout handlers
6980 * bus/connection.c (bus_connections_setup_connection): set up
6983 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
6986 * bus/bus.c (bus_context_new): adapt to changes
6988 * bus/connection.c: adapt to changes
6990 * test/watch.c: adapt to DBusWatch changes
6992 * bus/dispatch.c (bus_dispatch_test): started adding this but
6995 2003-03-14 Anders Carlsson <andersca@codefactory.se>
6997 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
6999 2003-03-13 Havoc Pennington <hp@pobox.com>
7001 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
7002 set up a test framework as for the library
7004 2003-03-12 Havoc Pennington <hp@pobox.com>
7006 Throughout: purge global variables, introduce BusActivation,
7007 BusConnections, BusRegistry, etc. objects instead.
7009 * bus/bus.h, bus/bus.c: introduce BusContext as a global
7012 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
7013 going to redo this a bit differently I think
7015 2003-03-12 Havoc Pennington <hp@redhat.com>
7017 Mega-patch that gets the message bus daemon initially handling
7018 out-of-memory. Work still needed. Also lots of random
7019 moving stuff to DBusError instead of ResultCode.
7021 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
7023 * dbus/dbus-connection.c
7024 (dbus_connection_send_with_reply_and_block): use DBusError
7026 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
7029 * dbus/dbus-connection.c (dbus_connection_send): drop the result
7030 code here, as the only failure possible is OOM.
7032 * bus/connection.c (bus_connection_disconnect):
7033 rename bus_connection_disconnected as it's a notification only
7035 * bus/driver.c (bus_driver_handle_acquire_service): don't free
7036 "name" on get_args failure, should be done by get_args;
7037 don't disconnect client for bad args, just return an error.
7038 (bus_driver_handle_service_exists): ditto
7040 * bus/services.c (bus_services_list): NULL-terminate returned array
7042 * bus/driver.c (bus_driver_send_service_lost)
7043 (bus_driver_send_service_acquired): send messages from driver to a
7044 specific client to the client's unique name, not to the broadcast
7047 * dbus/dbus-message.c (decode_header_data): reject messages that
7048 contain no name field
7049 (_dbus_message_get_client_serial): rename to
7050 dbus_message_get_serial and make public
7051 (_dbus_message_set_serial): rename from set_client_serial
7052 (_dbus_message_set_reply_serial): make public
7053 (_dbus_message_get_reply_serial): make public
7055 * bus/connection.c (bus_connection_foreach): allow stopping
7056 iteration by returning FALSE from foreach function.
7058 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
7059 (dbus_connection_free_preallocated_send)
7060 (dbus_connection_preallocate_send): new API for sending a message
7061 without possibility of malloc failure.
7062 (dbus_connection_send_message): rename to just
7063 dbus_connection_send (and same for whole function family)
7065 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
7067 * dbus/dbus-sysdeps.c (_dbus_exit): new function
7069 * bus/activation.c: handle/return errors
7071 * dbus/dbus-errors.h: add more DBUS_ERROR #define
7073 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
7074 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
7075 (_dbus_result_from_errno): move to this file
7077 2003-03-10 Anders Carlsson <andersca@codefactory.se>
7079 * dbus/dbus-marshal.c:
7080 (_dbus_marshal_set_string):
7081 Take a length argument so we can marshal the correct string
7084 (_dbus_marshal_dict), (_dbus_demarshal_dict),
7085 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
7086 (_dbus_marshal_test):
7087 * dbus/dbus-marshal.h:
7088 Add support for marshalling and demarshalling dicts.
7090 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7091 Add support for TYPE DICT.
7093 * dbus/dbus-message.c: (set_string_field):
7094 Adjust header padding.
7096 (dbus_message_append_args_valist), (dbus_message_append_dict),
7097 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
7098 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
7099 (check_message_handling), (check_have_valid_message):
7100 * dbus/dbus-message.h:
7101 Add functions for setting and getting dicts.
7103 * dbus/dbus-protocol.h:
7109 * doc/dbus-specification.sgml:
7110 Add information about how dicts are marshalled.
7112 * test/data/invalid-messages/dict-with-nil-value.message:
7113 * test/data/invalid-messages/too-short-dict.message:
7114 * test/data/valid-messages/dict-simple.message:
7115 * test/data/valid-messages/dict.message:
7116 Add sample messages containing dicts.
7118 2003-03-08 Anders Carlsson <andersca@codefactory.se>
7120 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
7122 2003-03-07 Anders Carlsson <andersca@codefactory.se>
7125 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
7126 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
7127 (dbus_dict_set_int32), (dbus_dict_set_uint32),
7128 (dbus_dict_set_double), (dbus_dict_set_string),
7129 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
7130 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
7131 (dbus_dict_set_string_array), (_dbus_dict_test):
7133 Fix according to comments from Havoc.
7135 2003-03-06 Michael Meeks <michael@server.home>
7137 * configure.in: if we don't have kde-config, disable have_qt.
7139 2003-03-07 Anders Carlsson <andersca@codefactory.se>
7144 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
7145 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
7146 (dbus_dict_remove), (dbus_dict_get_value_type),
7147 (dbus_dict_get_keys), (dbus_dict_put_boolean),
7148 (dbus_dict_put_int32), (dbus_dict_put_uint32),
7149 (dbus_dict_put_double), (dbus_dict_put_string),
7150 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
7151 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
7152 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
7153 (dbus_dict_get_int32), (dbus_dict_get_uint32),
7154 (dbus_dict_get_double), (dbus_dict_get_string),
7155 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
7156 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
7157 (dbus_dict_get_string_array), (_dbus_dict_test):
7159 Add DBusDict implementation
7161 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
7165 2003-03-04 Havoc Pennington <hp@pobox.com>
7167 * test/data/auth/*: adapt to changes
7169 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
7170 USERID_BASE64 and change USERNAME_BASE64 to put in username not
7173 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
7174 more stuff from being in a context name, to make the protocol
7175 simpler to deal with
7177 * dbus/dbus-errors.c (dbus_error_has_name): new function
7178 (dbus_error_is_set): new function
7180 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
7181 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
7183 * dbus/dbus-connection.c (dbus_connection_flush): also read
7184 messages during a flush operation
7186 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
7188 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7190 * configure.in: Check for gethostbyname on Solaris.
7192 * dbus/dbus-transport.c: (_dbus_transport_open):
7193 Remove duplicate "tcp" entry.
7195 * doc/dbus-specification.sgml:
7196 Clarify some things.
7198 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7200 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
7201 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
7202 (_dbus_keyring_test):
7203 * dbus/dbus-md5.c: (_dbus_md5_compute):
7204 * dbus/dbus-sha.c: (_dbus_sha_compute):
7207 2003-03-05 Anders Carlsson <andersca@codefactory.se>
7209 * README: Add some things.
7211 2003-03-04 Anders Carlsson <andersca@codefactory.se>
7213 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
7214 after case DBUS_TYPE_BOOELAN.
7216 2003-03-02 Havoc Pennington <hp@pobox.com>
7218 * test/break-loader.c (randomly_set_extreme_ints): add test that
7219 sets really huge and small integers
7221 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
7222 that length of boolean array fits in the string, and that
7223 string has room for boolean value in single-bool case.
7225 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
7226 optional value to "ALIGN" command which is what to fill the
7229 * test/data/valid-messages/no-padding.message: add regression
7230 test for the message padding problem
7232 2003-03-02 Havoc Pennington <hp@pobox.com>
7234 * dbus/dbus-message.c (decode_header_data): fix to always init
7235 message_padding, from Benjamin Dauvergne
7237 2003-03-02 Havoc Pennington <hp@pobox.com>
7243 2003-03-01 Joe Shaw <joe@assbarn.com>
7245 * configure.in: Check for "struct cmsgcred" and try to access its
7246 members for BSD-like unices.
7248 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
7249 _dbus_read_credentials_unix_socket().
7250 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
7251 read() for reading the credential byte off the unix socket. Use
7252 struct cmsgcred on systems that support it.
7254 2003-02-27 Alexander Larsson <alexl@redhat.com>
7258 Make gthreads-2.0 dependency optional. Don't build thread test if
7261 2003-02-27 Havoc Pennington <hp@pobox.com>
7263 * dbus/dbus-connection.c
7264 (dbus_connection_send_message_with_reply_and_block): fix doh!
7265 doh! doh! bug that resulted in never removing a reply from the
7266 queue, no wonder we called get_reply_serial so much ;-)
7268 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
7269 and client serial instead of demarshaling them every time
7271 2003-02-27 Havoc Pennington <hp@pobox.com>
7273 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
7274 more inlined, using dbus-string-private.h, speeds things up
7277 * dbus/dbus-string.c (_dbus_string_free): apply align offset
7278 when freeing the string
7279 (_dbus_string_steal_data): fix for align offset
7280 (undo_alignment): new function
7282 2003-02-26 Havoc Pennington <hp@redhat.com>
7284 All kinds of audit fixes from Owen, plus initial attempt to
7285 handle unaligned memory returned from malloc.
7287 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
7288 leave room for align_offset and nul byte
7289 (fixup_alignment): function to track an align_offset and
7290 ensure real->str is aligned
7291 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
7292 to allow a nul byte plus align offset
7293 (_dbus_string_lock): fix overflow issue
7294 (_dbus_string_init_const_len): add assertions on sanity of len,
7295 assign allocated to be ALLOCATION_PADDING larger than len
7296 (set_length): fixup the overflow handling
7297 (_dbus_string_get_data_len): fix overflow in assertion
7298 (open_gap): detect overflow in size of gap to be opened
7299 (_dbus_string_lengthen): add overflow check
7300 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
7301 (_dbus_string_append): add overflow check
7302 (_dbus_string_append_unichar): overflow
7303 (_dbus_string_delete): fix overflow in assertion
7304 (_dbus_string_copy_len): overflow in assertion
7305 (_dbus_string_replace_len): overflows in assertions
7306 (_dbus_string_find): change to implement in terms of
7307 _dbus_string_find_to
7308 (_dbus_string_find_to): assorted fixage
7309 (_dbus_string_equal_c_str): assert c_str != NULL,
7310 fix logic so the function works
7311 (_dbus_string_ends_with_c_str): fix overflow thingy
7312 (_dbus_string_base64_encode): overflow fix
7313 (_dbus_string_validate_ascii): overflow
7314 (_dbus_string_validate_nul): overflow
7316 2003-02-26 Havoc Pennington <hp@redhat.com>
7318 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
7320 2003-02-26 Alexander Larsson <alexl@redhat.com>
7323 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
7325 * dbus/dbus-connection.c:
7326 * dbus/dbus-connection.h:
7327 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
7328 Add dbus_connection_set_wakeup_main_function and use it when queueing
7329 incoming and outgoing messages.
7332 * dbus/dbus-dataslot.c:
7333 Threadsafe usage of DBusDataSlotAllocator
7335 * dbus/dbus-message.c: (dbus_message_get_args_iter):
7338 * dbus/dbus-server-unix.c:
7341 * glib/dbus-gmain.c:
7342 Implement the new wakeup functions for glib.
7345 * glib/test-thread-client.c:
7346 * glib/test-thread-server.c:
7347 * glib/test-thread.h:
7348 Initial cut at some thread test code. Not really done yet.
7350 2003-02-26 Havoc Pennington <hp@pobox.com>
7352 * dbus/dbus-connection.c
7353 (dbus_connection_send_message_with_reply_and_block): fix crash
7354 where we ref'd the outgoing message instead of the returned reply
7356 * dbus/dbus-transport-unix.c (do_authentication): check read watch
7357 at the end of this function, so if we didn't need to read for
7358 authentication, we reinstall it for receiving messages
7360 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
7361 a NULL sender for peer-to-peer case
7363 * dbus/dbus-transport-unix.c (check_read_watch): handle
7364 !authenticated case correctly
7366 * glib/dbus-gmain.c: add support for DBusServer
7368 * dbus/dbus-server.c: add data slot support
7370 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
7371 return values and handle errors
7373 * dbus/dbus-dataslot.c: factor out the data slot stuff from
7376 * Doxyfile.in (INPUT): add glib subdir
7378 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
7379 setup_with_g_main instead of hookup_with_g_main; write docs
7381 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7383 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
7384 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7385 * dbus/dbus-message.c: (dbus_message_append_boolean),
7386 (dbus_message_append_boolean_array),
7387 (dbus_message_get_args_valist), (_dbus_message_test):
7388 * dbus/dbus-message.h:
7389 * doc/dbus-specification.sgml:
7390 Various fixes as pointed out by Havoc.
7392 * test/data/invalid-messages/bad-boolean-array.message:
7393 * test/data/invalid-messages/bad-boolean.message:
7394 Add invalid boolean value test cases.
7396 2003-02-24 Anders Carlsson <andersca@codefactory.se>
7398 * dbus/dbus-internals.c: (_dbus_type_to_string):
7399 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7400 (_dbus_marshal_validate_arg):
7401 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7402 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7403 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
7404 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
7405 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
7406 (dbus_message_iter_get_double),
7407 (dbus_message_iter_get_boolean_array), (message_iter_test):
7408 * dbus/dbus-message.h:
7409 * dbus/dbus-protocol.h:
7410 * doc/dbus-specification.sgml:
7411 * test/data/valid-messages/lots-of-arguments.message:
7412 Add support for boolean and boolean array types.
7414 2003-02-23 Havoc Pennington <hp@pobox.com>
7416 * dbus/dbus-keyring.c: finish most of this implementation and
7419 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7420 these barf if the error isn't cleared to NULL
7422 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
7423 (_dbus_create_directory): new function
7425 * dbus/dbus-errors.c (dbus_set_error): fix warning
7427 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
7428 (_dbus_string_hex_decode): new function
7429 (test_hex_roundtrip): test code
7431 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
7433 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
7435 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
7436 the save-to-temp/rename trick to atomically write the new file
7437 (_dbus_string_parse_uint): new function
7439 2003-02-22 Havoc Pennington <hp@pobox.com>
7441 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
7443 2003-02-22 Havoc Pennington <hp@pobox.com>
7445 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
7446 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
7448 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7450 * dbus/test/data/sha-1: add US government test suite for SHA-1
7452 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7454 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7455 Make string arrays NULL-terminated.
7457 * dbus/dbus-memory.c: (dbus_free_string_array):
7458 * dbus/dbus-memory.h:
7459 New function for freeing NULL-terminated string arrays.
7461 * dbus/dbus-message-builder.c: (append_quoted_string),
7462 (_dbus_message_data_load):
7463 Add support for array types.
7465 * dbus/dbus-message.c: (check_message_handling):
7466 Add more types as test cases.
7468 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
7469 (_dbus_string_parse_double):
7470 Add the start offset to the end offset.
7472 * test/data/valid-messages/lots-of-arguments.message:
7473 New test message with lots of arguments.
7475 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7477 * dbus/dbus-message.c: (dbus_message_append_nil),
7478 (dbus_message_append_int32), (dbus_message_append_uint32),
7479 (dbus_message_append_double), (dbus_message_append_string),
7480 (dbus_message_append_int32_array),
7481 (dbus_message_append_uint32_array),
7482 (dbus_message_append_double_array),
7483 (dbus_message_append_byte_array),
7484 (dbus_message_append_string_array):
7485 Fix all out-of-memory handling in these functions.
7487 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7489 * dbus/dbus-message.c: (dbus_message_append_nil):
7492 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7494 * dbus/dbus-message.c: (dbus_message_append_args_valist),
7495 (dbus_message_append_nil), (dbus_message_append_int32_array),
7496 (dbus_message_append_uint32_array),
7497 (dbus_message_append_double_array),
7498 (dbus_message_append_byte_array),
7499 (dbus_message_append_string_array), (dbus_message_get_args_valist),
7500 (dbus_message_iter_get_int32_array),
7501 (dbus_message_iter_get_uint32_array),
7502 (dbus_message_iter_get_double_array),
7503 (dbus_message_iter_get_byte_array),
7504 (dbus_message_iter_get_string_array):
7506 * dbus/dbus-message.h:
7507 Add functions for appending and getting arrays.
7509 2003-02-21 Anders Carlsson <andersca@codefactory.se>
7511 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
7512 element size at least 8 bytes, fixes mempool tests on
7515 2003-02-20 Alexander Larsson <alexl@redhat.com>
7517 * dbus/dbus-transport-unix.c (unix_do_iteration):
7518 Unlock the connection mutex during a blocking select call.
7519 Add todo about how we need a way to wake up the select.
7521 * dbus/dbus-connection-internal.h:
7522 * dbus/dbus-connection.c:
7523 Add _dbus_connection_lock and _dbus_connection_unlock.
7525 2003-02-19 Havoc Pennington <hp@pobox.com>
7527 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
7528 Doxyfile.in, not Doxyfile
7530 * dbus/dbus-keyring.c: do some hacking on this
7532 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
7534 * dbus/dbus-errors.c (dbus_set_error_const): do not call
7536 (dbus_set_error): remove dbus_error_init, check for message ==
7537 NULL *before* we sprintf into it, and add @todo about including
7538 system headers in this file
7540 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
7542 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
7544 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
7545 get various bits of user information based on either username
7547 (_dbus_homedir_from_username): new function
7549 2003-02-19 Anders Carlsson <andersca@codefactory.se>
7552 Add check for nonposix getpwnam_r
7554 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
7555 Align the pool element size to a sizeof (void *) boundary.
7557 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
7558 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
7559 General Solaris fixes.
7561 * test/data/valid-messages/simplest-manual.message:
7562 Explicitly state that we want little-endian packing.
7564 2003-02-19 Mikael Hallendal <micke@codefactory.se>
7566 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7568 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
7569 Added to create a transport connecting using a tcp/ip socket.
7571 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
7572 to a tcp socket at given host and port.
7573 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
7576 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7578 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
7579 Added to create a server listening on a TCP/IP socket.
7581 2003-02-19 Havoc Pennington <hp@pobox.com>
7583 Throughout: mop up all the Doxygen warnings and undocumented
7586 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
7587 to search any paths.
7589 * dbus/dbus-threads.c: move global mutex initializers to
7590 dbus-internals.h, multiple prototypes was confusing doxygen
7591 besides being kind of ugly
7593 * Doxyfile (PREDEFINED): have Doxygen define
7594 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
7595 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
7596 (do not abuse the feature! it's for stuff like the autogenerated
7597 macros in dbus-md5.c, not just for things you don't feel like
7600 2003-02-18 Havoc Pennington <hp@pobox.com>
7602 * dbus/dbus-string.c (_dbus_string_zero): new function
7604 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
7605 wrap it in some dbus-friendly API
7607 * dbus/dbus-types.h: add 16-bit types
7609 2003-02-18 Joe Shaw <joe@assbarn.com>
7611 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
7612 credentials from our currently running process.
7613 (get_word): Fix a buglet where we were copying the entire length
7614 instead of relative to our position.
7616 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
7617 keys on the stack... it's 640k of data.
7619 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
7620 read the credentials byte off the socket, even if we don't have
7622 (_dbus_poll): Implement poll() using select() for systems which
7625 * glib/test-dbus-glib.c (main): Print out an error if no
7626 parameters are given.
7628 * test/data/auth/fallback.auth-script: Added. Tests that a client
7629 can fallback to a secondary auth mechanism if the first fails.
7631 2003-02-18 Havoc Pennington <hp@pobox.com>
7635 2003-02-17 Havoc Pennington <hp@pobox.com>
7637 * doc/dbus-specification.sgml: lots of cosmetic
7638 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
7639 env variable to DBUS_BUS_ADDRESS, s/client/application/,
7640 s/server/bus/ (except in authentication section). Add a section
7641 "Message Bus Message Routing"
7643 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
7649 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7651 * doc/dbus-specification.sgml:
7652 Specification updates.
7654 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7656 * bus/activation.c: (bus_activation_init), (child_setup),
7657 (bus_activation_activate_service):
7659 * bus/main.c: (main):
7660 Set DBUS_ADDRESS environment variable.
7662 * dbus/dbus-errors.c: (dbus_set_error):
7663 Don't use va_copy since that's a C99 feature.
7665 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
7666 (_dbus_spawn_async):
7667 * dbus/dbus-sysdeps.h:
7668 Add child_setup_func to _dbus_spawn_async.
7670 * doc/dbus-specification.sgml:
7671 Update specification.
7673 * test/spawn-test.c: (setup_func), (main):
7676 2003-02-17 Alexander Larsson <alexl@redhat.com>
7678 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
7681 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7685 * doc/dbus-test-plan.sgml:
7686 Add test plan document.
7691 2003-02-17 Anders Carlsson <andersca@codefactory.se>
7693 * dbus/dbus-message.c: (decode_header_data),
7694 (_dbus_message_loader_return_buffer):
7695 Set the header padding amount when loading a message.
7697 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7699 * bus/dispatch.c: (send_one_message):
7700 Only send broadcast messages to registered connections.
7702 * dbus/dbus-message.c: (dbus_message_name_is):
7703 * dbus/dbus-message.h:
7704 New convenience function.
7706 * dbus/dbus-transport-debug.c: (do_reading):
7707 Only dispatch one message per run.
7710 * test/bus-test.c: (new_connection_callback), (die),
7711 (test_hello_client1_handler), (test_hello_client2_handler),
7712 (test_hello_replies), (main):
7714 * test/bus-test-loop.[ch]:
7717 2003-02-16 Havoc Pennington <hp@pobox.com>
7719 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7720 backward conditional
7722 2003-02-16 Alexander Larsson <alexl@redhat.com>
7724 * dbus/dbus-connection.c:
7725 Implement sent_message_with_reply. (with_reply_and block is still
7727 Made dispatch_message not lose message if OOM.
7729 * dbus/dbus-errors.h:
7730 Add NoReply error (for reply timeouts).
7732 2003-02-16 Alexander Larsson <alexl@redhat.com>
7734 * dbus/dbus-hash.c (_dbus_hash_table_unref):
7735 Actually free keys and values when destroying hashtable.
7737 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7739 * dbus/dbus-auth.c: (client_try_next_mechanism):
7742 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
7743 Return TRUE if there's no thread implementation around.
7745 * glib/dbus-gmain.c: (free_source),
7746 (dbus_connection_hookup_with_g_main):
7747 Make sure to remove the GSource when the connection is finalized.
7749 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7751 * bus/dispatch.c: (bus_dispatch_message_handler):
7752 * dbus/dbus-errors.h:
7753 Return an error if someone tries to send a message to a service
7756 2003-02-16 Anders Carlsson <andersca@codefactory.se>
7758 * bus/activation.c: (load_directory), (bus_activation_init),
7759 (bus_activation_activate_service):
7762 (bus_driver_handle_activate_service), (bus_driver_handle_message):
7763 More work on the activation handling.
7765 * dbus/dbus-errors.h:
7766 Add some error messages
7768 * dbus/dbus-message.c: (dbus_message_new_error_reply):
7769 * dbus/dbus-message.h:
7770 New function that creates an error message.
7772 * dbus/dbus-protocol.h:
7773 Add ACTIVATE_SERVER message.
7775 * dbus/dbus-server-unix.c: (unix_handle_watch),
7776 (_dbus_server_new_for_domain_socket):
7777 Call _dbus_fd_set_close_on_exec.
7779 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
7780 (_dbus_spawn_async), (_dbus_disable_sigpipe),
7781 (_dbus_fd_set_close_on_exec):
7782 * dbus/dbus-sysdeps.h:
7783 Add _dbus_fd_set_close_on exec function. Also add function that checks
7784 that all open fds are set to close-on-exec and warns otherwise.
7786 * dbus/dbus-transport-unix.c:
7787 (_dbus_transport_new_for_domain_socket):
7788 Call _dbus_fd_set_close_on_exec.
7790 2003-02-16 Havoc Pennington <hp@pobox.com>
7792 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
7793 allow people to avoid setting SIGPIPE to SIG_IGN
7794 (_dbus_connection_new_for_transport): disable SIGPIPE unless
7795 we've been asked not to
7797 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7799 * dbus/dbus-list.c: (_dbus_list_append_link),
7800 (_dbus_list_prepend_link):
7801 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
7805 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7808 * bus/activation.c: (bus_activation_entry_free),
7809 (add_desktop_file_entry), (load_directory), (bus_activation_init):
7811 * bus/main.c: (main):
7812 Add simple activation support, doesn't work yet though.
7814 2003-02-15 Zack Rusin <zack@kde.org>
7816 * qt/dbus-qthread.cpp: small casting fix
7818 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7820 * dbus/dbus-errors.c: (dbus_set_error):
7821 * dbus/dbus-errors.h:
7822 Add a few errors and make dbus_set_error void.
7824 * dbus/dbus-sysdeps.c:
7825 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
7826 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
7827 * dbus/dbus-sysdeps.h:
7828 Add _dbus_spawn_async.
7830 * test/spawn-test.c: (main):
7831 Test for _dbus_spawn_async.
7833 2003-02-15 Anders Carlsson <andersca@codefactory.se>
7835 * dbus/dbus-internals.h:
7836 Fix build without tests.
7838 * dbus/dbus-list.c: (alloc_link):
7839 Fix a segfault when a malloc fails.
7841 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
7842 (dbus_malloc0), (dbus_realloc):
7843 Add support for malloc debugging.
7845 2003-02-15 Alexander Larsson <alexl@redhat.com>
7847 * dbus/dbus-threads.c:
7848 * dbus/dbus-threads.h:
7849 Add condvars. Remove static mutext from API.
7850 Implement static mutexes by initializing them from threads_init.
7852 * glib/dbus-gthread.c:
7853 * qt/dbus-qthread.cpp:
7854 Update with the thread api changes.
7859 Turn StaticMutex into normal mutex + init function.
7860 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
7861 _dbus_list_append_link, _dbus_list_prepend_link
7864 * dbus/dbus-sysdeps.c:
7865 * dbus/dbus-sysdeps.h:
7866 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
7867 _dbus_atomic_dec. Only slow fallback implementation at the moment.
7869 * dbus/dbus-protocol.h:
7870 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
7872 * dbus/dbus-message.c:
7873 Make ref/unref atomic.
7876 * dbus/dbus-connection-internal.h:
7877 * dbus/dbus-connection.c:
7878 * dbus/dbus-connection.h:
7880 Change _peek to _borrow,_return & _steal_borrowed.
7881 Change disconnect callback to event.
7882 Make dbus_connection_dispatch_messages reentrant.
7884 * dbus/dbus-transport.c:
7885 Don't ref the connection on calls to the transport
7888 * dbus/dbus-message-handler.c:
7891 * glib/dbus-gmain.c:
7892 Don't use peek_message anymore
7895 * test/debug-thread.c:
7896 * test/debug-thread.h:
7897 Simple thread implementation that asserts() on deadlocks in
7898 single-threaded code.
7901 (main) Call debug_threads_init.
7904 Use disconnect message instead of disconnect callback.
7908 Don't call dbus_connection_set_disconnect_function. Instead export
7909 bus_connection_disconnect.
7912 Call bus_connection_disconnect when we get a disconnected message.
7914 2003-02-15 Havoc Pennington <hp@pobox.com>
7916 * dbus/dbus-message.c (dbus_message_new): fool around with the
7919 2003-02-14 Havoc Pennington <hp@pobox.com>
7921 * dbus/dbus-mempool.c: fail if the debug functions so indicate
7923 * dbus/dbus-memory.c: fail if the debug functions indicate we
7926 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
7927 (_dbus_decrement_fail_alloc_counter): debug functions to
7928 simulate memory allocation failures
7930 2003-02-14 Havoc Pennington <hp@pobox.com>
7932 * dbus/dbus-errors.h (struct DBusError): add a word of padding
7935 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7937 * bus/driver.c: (bus_driver_handle_hello):
7939 * bus/services.c: (bus_service_lookup):
7940 Reorder message sending so we get a more sane order.
7942 * test/bus-test.c: (message_handler):
7945 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7947 * bus/driver.c: (bus_driver_send_service_deleted),
7948 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7949 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7950 (bus_driver_send_welcome_message),
7951 (bus_driver_handle_list_services),
7952 (bus_driver_handle_acquire_service),
7953 (bus_driver_handle_service_exists):
7954 * dbus/dbus-bus.c: (dbus_bus_register_client),
7955 (dbus_bus_acquire_service), (dbus_bus_service_exists):
7956 * dbus/dbus-errors.c: (dbus_result_to_string):
7957 * dbus/dbus-errors.h:
7958 * dbus/dbus-message.c: (dbus_message_append_args),
7959 (dbus_message_append_args_valist), (dbus_message_get_args),
7960 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
7961 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
7962 (dbus_message_iter_get_byte_array),
7963 (dbus_message_iter_get_string_array), (message_iter_test),
7964 (check_message_handling), (_dbus_message_test):
7965 * dbus/dbus-message.h:
7966 * test/bus-test.c: (main):
7967 Change fields to arguments in messages, so that they won't be
7968 confused with header fields.
7970 * glib/test-dbus-glib.c: (main):
7971 Remove append_fields from hello message.
7973 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7975 * dbus/dbus-errors.c:
7976 * dbus/dbus-message.c:
7977 * dbus/dbus-string.c:
7978 Documentation fixes.
7980 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7982 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
7984 Implement support for timeouts in dbus-glib.
7986 2003-02-13 Anders Carlsson <andersca@codefactory.se>
7988 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7989 * dbus/dbus-message.c: (process_test_subdir):
7990 * test/break-loader.c: (find_breaks_based_on):
7991 Plug some memory leaks.
7993 2003-02-13 Richard Hult <rhult@codefactory.se>
7995 * bus/main.c: Fix build.
7997 * dbus/dbus-errors.h:
7998 * dbus/dbus-errors.c: Fix copyright for Anders.
8000 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8005 * bus/connection.c: (bus_connection_foreach):
8008 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
8009 (unescape_string), (new_section), (parse_section_start),
8010 (parse_key_value), (report_error), (bus_desktop_file_load),
8011 (bus_desktop_file_get_string):
8012 * bus/desktop-file.h:
8013 Use DBusError for error reporting.
8015 * bus/dispatch.c: (send_one_message),
8016 (bus_dispatch_message_handler):
8017 * bus/driver.c: (bus_driver_send_service_deleted),
8018 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8019 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
8020 (bus_driver_send_welcome_message),
8021 (bus_driver_handle_list_services),
8022 (bus_driver_handle_acquire_service),
8023 (bus_driver_handle_service_exists):
8024 * bus/loop.c: (bus_loop_run):
8026 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
8028 * bus/utils.c: (bus_wait_for_memory):
8030 New files with general utility functions.
8032 * dbus/dbus-internals.h:
8033 Remove _DBUS_HANDLE_OOM.
8035 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8037 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
8038 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
8039 * dbus/dbus-errors.h:
8040 Add DBusError structure.
8042 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8044 * test/data/valid-messages/standard-acquire-service.message:
8045 * test/data/valid-messages/standard-hello.message:
8046 * test/data/valid-messages/standard-list-services.message:
8047 * test/data/valid-messages/standard-service-exists.message:
8048 Add some standard messages.
8050 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8052 * bus/driver.c: (bus_driver_send_welcome_message),
8053 (bus_driver_handle_list_services),
8054 (bus_driver_handle_acquire_service),
8055 (bus_driver_handle_service_exists), (bus_driver_handle_message):
8056 Update for API changes in libdbus.
8058 * dbus/dbus-message.c: (dbus_message_new_reply):
8059 * dbus/dbus-message.h:
8060 Remove the name argument. The spec states that replies shouldn't
8063 2003-02-13 Anders Carlsson <andersca@codefactory.se>
8065 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
8066 (report_error), (bus_desktop_file_load), (lookup_section),
8067 (lookup_line), (bus_desktop_file_get_raw),
8068 (bus_desktop_file_get_string):
8069 * bus/desktop-file.h:
8070 Some fixes, and new functions for getting a key value from a section.
8072 2003-02-13 Havoc Pennington <hp@pobox.com>
8074 * test/data/auth/fail-after-n-attempts.auth-script: new test
8076 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
8079 2003-02-13 Havoc Pennington <hp@pobox.com>
8081 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
8082 dbus_credentials_match were backward
8084 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
8085 NO_CREDENTIALS and ROOT_CREDENTIALS
8087 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
8088 into here. Never process more commands after we've reached an
8089 end state; store further data as unused bytes.
8091 * test/data/auth/*: add more auth tests
8093 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
8094 command to match exact string and EXPECT_UNUSED to match unused
8097 * test/Makefile.am (dist-hook): fix to dist all the test stuff
8099 2003-02-12 Havoc Pennington <hp@pobox.com>
8101 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
8102 \r off of popped lines
8104 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
8107 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
8110 2003-02-12 Havoc Pennington <hp@pobox.com>
8112 * dbus/Makefile.am: remove break-loader from the build, since it
8115 * configure.in: add --enable-gcov to turn on coverage profiling
8116 flags and disable optimization
8118 2003-02-10 Havoc Pennington <hp@pobox.com>
8120 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
8121 initial cut at test framework for DBusAuth from laptop.
8122 Doesn't quite work yet but it compiles and I need to get
8123 it off the 266mhz laptop. ;-)
8125 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
8126 fix a memleak in error case
8128 2003-02-12 Anders Carlsson <andersca@codefactory.se>
8131 * bus/desktop-file.c:
8132 * bus/desktop-file.h:
8133 Add a desktop file parser.
8135 2003-02-11 Zack Rusin <zack@kde.org>
8137 * qt/message.[h|cpp]: sample implementation
8138 of the KDE wrapper for DBusMessage
8140 2003-02-09 Zack Rusin <zack@kde.org>
8142 * test/bus-test.c: make_it_compile
8143 * doc/dbus-specification.sgml: minimal semantic fix
8145 2003-02-06 Anders Carlsson <andersca@codefactory.se>
8151 2003-02-06 Anders Carlsson <andersca@codefactory.se>
8154 * dbus/dbus-break-loader.c:
8156 * test/break-loader.c:
8157 Move dbus-break-loader to test/ and rename it to break-loader.
8159 2003-02-02 Havoc Pennington <hp@pobox.com>
8161 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
8162 for code to manage cookies in your home directory
8164 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
8166 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
8167 to authenticate, then disconnect the client.
8169 2003-02-03 Alexander Larsson <alexl@redhat.com>
8171 * dbus/dbus-message.c (dbus_message_append_fields):
8174 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8176 * doc/dbus-specification.sgml:
8177 Update address format section.
8179 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8182 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
8183 (message_handler), (new_connection_callback), (loop_quit),
8187 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8189 * bus/driver.c: (bus_driver_handle_service_exists):
8190 Simplify the code a bit.
8192 * dbus/dbus-bus.c: (dbus_bus_service_exists):
8195 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8198 Add libdbus-daemon.la and link to it.
8200 2003-02-01 James Willcox <jwillcox@gnome.org>
8202 * bus/driver.c: (bus_driver_handle_own_service):
8203 Actually include the service reply code in the message.
8205 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8207 * bus/driver.c: (bus_driver_handle_service_exists):
8208 Don't unref the incoming message.
8210 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8212 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
8214 2003-02-02 Anders Carlsson <andersca@codefactory.se>
8216 * dbus/dbus-server.c: (dbus_server_listen):
8217 * dbus/dbus-transport.c: (_dbus_transport_open):
8218 ifdef out the calls to the debug transport and server.
8220 2003-02-02 Alexander Larsson <alexl@redhat.com>
8222 * dbus/dbus-watch.c (dbus_watch_get_flags):
8223 Add note in the docs that ERROR or HANGUP won't be returned
8224 and are assumed always on.
8226 * glib/dbus-gmain.c (add_watch):
8227 Always add IO_ERR | IO_HUP
8229 * dbus/dbus-message.h:
8230 Add semicolon after dbus_message_iter_get_string_array().
8231 Makes qt code build again
8233 2003-02-01 Anders Carlsson <andersca@codefactory.se>
8235 * bus/driver.c: (create_unique_client_name),
8236 (bus_driver_handle_hello):
8237 Don't take a name, just use a numeric id to identify
8241 * dbus/dbus-bus.c: (dbus_bus_register_client),
8242 (dbus_bus_acquire_service), (dbus_bus_service_exists):
8244 Add new convenience functions for communicating with the bus.
8246 * dbus/dbus-message.h:
8248 * dbus/dbus-protocol.h:
8251 2003-02-01 Alexander Larsson <alexl@redhat.com>
8253 * dbus/dbus-message.c (dbus_message_append_fields):
8254 Add some more doc comments.
8256 2003-02-01 Havoc Pennington <hp@pobox.com>
8258 * dbus/dbus-break-loader.c (randomly_modify_length): change
8259 a 4-byte value in the message as if it were a length
8261 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
8262 execute bit on saved files
8264 2003-02-01 Havoc Pennington <hp@pobox.com>
8266 * dbus/dbus-break-loader.c (main): new program to find messages
8267 that break the loader.
8269 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
8270 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
8272 * dbus/dbus-string.c (_dbus_string_set_byte): new
8274 2003-01-31 Havoc Pennington <hp@pobox.com>
8276 * dbus/dbus-message.c: refactor the test code to be more general,
8277 in preparation for writing a "randomly permute test cases to
8278 try to break the loader" program.
8280 2003-01-31 Havoc Pennington <hp@pobox.com>
8282 * doc/dbus-specification.sgml: work on the specification
8284 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
8285 the protocol version of the message.
8287 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
8288 no longer specifies that.
8289 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
8292 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
8293 "break" for DBUS_TYPE_NIL, remove @todo
8295 2003-01-31 Havoc Pennington <hp@pobox.com>
8297 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
8298 just set_is_error/get_is_error as this is a commonly-used
8299 function, and write docs.
8301 2003-01-31 Anders Carlsson <andersca@codefactory.se>
8303 * dbus/dbus-address.c: (dbus_address_entry_free):
8304 Free key and value lists.
8306 * dbus/dbus-internals.c: (_dbus_type_to_string):
8307 Add the types we didn't have.
8309 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
8310 (_dbus_marshal_validate_arg):
8313 * dbus/dbus-message.c: (dbus_message_set_sender):
8314 Remove todo about being able to set sender to NULL.
8316 (dbus_message_set_is_error_reply),
8317 (dbus_message_get_is_error_reply):
8318 * dbus/dbus-message.h:
8321 * dbus/dbus-protocol.h:
8322 Add error reply flag.
8324 * test/data/valid-messages/opposite-endian.message:
8325 Add NIL type to test.
8327 2003-01-31 Havoc Pennington <hp@pobox.com>
8329 * doc/dbus-specification.sgml: fully specify the header. Add
8330 flags and major protocol version, and change header/body len to
8333 * dbus/dbus-message-builder.c (append_saved_length): append length
8336 * dbus/dbus-message.c (dbus_message_create_header): change header
8337 length and body length to unsigned. Add the new fields from the
8339 (_dbus_message_loader_return_buffer): unsigned header/body len
8341 2003-01-30 Havoc Pennington <hp@pobox.com>
8343 * dbus/dbus-auth.c: rework to use only REJECTED, no
8346 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
8347 use REJECTED, suggested by Mark McLoughlin
8349 2003-01-30 Havoc Pennington <hp@pobox.com>
8351 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
8352 a better way to report errors here. e.g. "unix address lacks
8353 path" or something. also "no such file" when the path doesn't
8356 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
8358 (dbus_parse_address): add @todo about documenting address format,
8359 and allowing , and ; to be escaped
8361 2003-01-30 Anders Carlsson <andersca@codefactory.se>
8364 Add dbus-address.[ch]
8366 * dbus/dbus-address.c: (dbus_address_entry_free),
8367 (dbus_address_entries_free), (create_entry),
8368 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
8369 (dbus_parse_address), (_dbus_address_test):
8370 * dbus/dbus-address.h:
8371 New files for dealing with address parsing.
8373 * dbus/dbus-connection.c:
8374 Document timeout functions.
8376 * dbus/dbus-message.c:
8377 Document dbus_message_new_from_message.
8379 * dbus/dbus-server-debug.c:
8382 * dbus/dbus-server.c: (dbus_server_listen):
8383 Parse address and use correct server implementation.
8385 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
8386 * dbus/dbus-string.h:
8387 New function with test.
8389 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
8393 * dbus/dbus-transport-debug.c:
8396 * dbus/dbus-transport.c: (_dbus_transport_open):
8397 Parse address and use correct transport implementation.
8399 2003-01-30 Havoc Pennington <hp@pobox.com>
8401 * dbus/dbus-message.c: use message->byte_order instead of
8402 DBUS_COMPILER_BYTE_ORDER throughout.
8403 (dbus_message_create_header): pad header to align the
8404 start of the body of the message to 8-byte boundary
8406 * dbus/dbus-marshal.h: make all the demarshalers take const
8407 DBusString arguments.
8409 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
8410 validate message args here, so we don't have to do slow validation
8411 later, and so we catch bad messages as they are incoming. Also add
8412 better checks on header_len and body_len. Also fill in
8415 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
8416 implemented properly)
8417 (_dbus_string_validate_nul): new function to check all-nul
8419 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
8420 get_arg_end_pos and remove all validation
8421 (_dbus_marshal_validate_arg): actually do validation here.
8423 2003-01-29 Havoc Pennington <hp@pobox.com>
8425 * dbus/dbus-message.c (check_message_handling): fix assertion
8426 failure on set_client_serial
8428 2003-01-28 Havoc Pennington <hp@pobox.com>
8430 * dbus/dbus-server-debug.c: Add doc section comments
8432 * dbus/dbus-transport-debug.c: add doc section comments
8434 2003-01-28 Havoc Pennington <hp@redhat.com>
8436 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
8437 the reverse order from how I had it
8438 (_dbus_string_base64_encode): reverse encoding order. I was
8439 basically byteswapping everything during encoding.
8441 2003-01-28 Anders Carlsson <andersca@codefactory.se>
8443 * dbus/dbus-connection-internal.h:
8444 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
8445 (_dbus_connection_remove_timeout):
8446 Add functions for adding and removing timeouts.
8448 * dbus/dbus-message.c: (dbus_message_new_from_message):
8449 Add new function that takes a message and creates an exact
8450 copy of it, but with the refcount set to 1.
8451 (check_message_handling):
8454 * dbus/dbus-server-protected.h:
8455 * dbus/dbus-server.c: (_dbus_server_init_base),
8456 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
8457 (dbus_server_set_timeout_functions):
8458 (_dbus_server_remove_timeout):
8459 New functions so that a server can add and remove timeouts.
8461 (dbus_server_listen):
8462 Add commented out call to dbus_server_debug_new.
8464 * dbus/dbus-timeout.c: (_dbus_timeout_new):
8465 Actually set the handler, doh.
8467 * dbus/dbus-transport.c: (_dbus_transport_open):
8468 Add commented out call to dbus_transport_debug_client_new.
8471 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
8473 2003-01-28 Havoc Pennington <hp@pobox.com>
8475 * dbus/dbus-message.c (check_message_handling): function to check
8476 on the loaded message, iterates over it etc.
8478 2003-01-28 Havoc Pennington <hp@pobox.com>
8480 * test/Makefile.am (dist-hook): fix make distdir
8482 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
8484 2003-01-27 Havoc Pennington <hp@pobox.com>
8486 * dbus/dbus-mempool.c (time_for_size): replace printf with
8489 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
8490 empty lines; fix the SAVE_LENGTH stuff to be
8491 START_LENGTH/END_LENGTH so it actually works; couple other
8494 * test/Makefile.am (dist-hook): add dist-hook for .message files
8496 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
8497 can be constant or locked.
8498 (_dbus_string_free): allow freeing a const string as
8501 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
8503 * dbus/dbus-test-main.c (main): take an argument which is the
8504 directory containing test data
8506 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
8507 argument to this and load all the messages in test/data/
8508 checking that they can be loaded or not loaded as appropriate.
8510 2003-01-27 Anders Carlsson <andersca@codefactory.se>
8512 * bus/dispatch.c: (bus_dispatch_message_handler):
8513 Dispatch messages sent to services.
8515 * bus/driver.c: (bus_driver_send_service_deleted),
8516 (bus_driver_send_service_created), (bus_driver_send_service_lost),
8517 (bus_driver_send_service_acquired):
8518 Add helper functions for sending service related messages.
8520 (bus_driver_send_welcome_message):
8521 Send HELLO_REPLY instead of WELCOME.
8523 (bus_driver_handle_list_services):
8524 Send LIST_SERVICES_REPLY instead of SERVICES.
8526 (bus_driver_handle_own_service),
8527 (bus_driver_handle_service_exists):
8528 New message handlers.
8530 (bus_driver_handle_message):
8531 Invoke new message handlers.
8533 (bus_driver_remove_connection):
8534 Don't remove any services here since that's done automatically
8535 by bus_service_remove_owner now.
8538 New function signatures.
8540 * bus/services.c: (bus_service_add_owner):
8541 Send ServiceAcquired message if we're the only primary owner.
8543 (bus_service_remove_owner):
8544 Send ServiceAcquired/ServiceLost messages.
8546 (bus_service_set_prohibit_replacement),
8547 (bus_service_get_prohibit_replacement):
8548 Functions for setting prohibit replacement.
8550 (bus_service_has_owner):
8551 New function that checks if a connection is in the owner queue of
8555 Add new function signatures.
8557 * dbus/dbus-list.c: (_dbus_list_test):
8558 Add tests for _dbus_list_remove_last and traversing the list backwards.
8561 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
8562 go any further, so return NULL then.
8564 * dbus/dbus-protocol.h:
8565 Add new messages, service flags and service replies.
8567 2003-01-26 Havoc Pennington <hp@pobox.com>
8569 * dbus/dbus-message-builder.c: implement, completely untested.
8571 * test/data/*: add data to be used in testing.
8572 ".message" files are our simple loadable text format.
8573 ".message-raw" will be binary dumps of messages.
8575 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
8577 2003-01-26 Havoc Pennington <hp@pobox.com>
8579 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
8581 * dbus/dbus-errors.c (dbus_result_to_string): add
8584 * dbus/dbus-message-builder.c: new file, will contain code to load
8585 up messages from files. Not implemented yet.
8587 2003-01-26 Havoc Pennington <hp@pobox.com>
8589 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
8590 the sender by setting to NULL
8592 2003-01-26 Havoc Pennington <hp@pobox.com>
8594 The unit tests pass, but otherwise untested. If it breaks, the
8595 tests should have been better. ;-)
8597 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
8600 * dbus/dbus-message.c: redo everything so we maintain
8601 message->header as the only copy of the various fields.
8602 This avoids the possibility of out-of-memory in some cases,
8603 for example dbus_message_lock() can't run out of memory anymore,
8604 and avoids extra copying. Figured I may as well go ahead and do
8605 this since it was busted for dbus_message_lock to not return
8606 failure on OOM, and dbus_message_write_header was totally
8607 unchecked for OOM. Also fixed some random other bugs.
8609 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
8610 that strings are nul-terminated. Also, end_pos can be equal
8611 to string length just not greater than, I think.
8612 (_dbus_marshal_set_int32): new function
8613 (_dbus_marshal_set_uint32): new function
8614 (_dbus_marshal_set_string): new function
8616 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
8617 a warning, init timeout_list to NULL
8618 (dbus_connection_send_message): don't use uninitialized variable
8621 * dbus/dbus-string.c (_dbus_string_replace_len): new function
8623 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8625 * bus/driver.c: (bus_driver_handle_hello),
8626 (bus_driver_send_welcome_message):
8629 2003-01-26 Anders Carlsson <andersca@codefactory.se>
8631 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
8632 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8633 (dbus_connection_unref):
8634 * dbus/dbus-marshal.c: (_dbus_marshal_test):
8635 * dbus/dbus-message.c: (dbus_message_unref),
8638 (dbus_message_get_fields):
8639 Remove debugging printout.
8641 (_dbus_message_loader_return_buffer):
8642 Don't store the header string.
8644 (_dbus_message_test):
8647 2003-01-26 Richard Hult <rhult@codefactory.se>
8649 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
8650 the file descriptor list, since it can change under us.
8652 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8654 * glib/dbus-gmain.c: (dbus_connection_prepare),
8655 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
8656 (remove_watch), (dbus_connection_hookup_with_g_main):
8657 Rewrite the glib handling to use its own GSource instead of a
8658 GIOChannel so we can catch messages put in the queue while waiting
8661 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8664 * bus/connection.c: (connection_disconnect_handler),
8665 (connection_watch_callback), (bus_connection_setup):
8666 * bus/dispatch.c: (send_one_message),
8667 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
8668 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
8670 * bus/driver.c: (bus_driver_send_service_deleted),
8671 (bus_driver_send_service_created), (bus_driver_handle_hello),
8672 (bus_driver_send_welcome_message),
8673 (bus_driver_handle_list_services), (bus_driver_remove_connection),
8674 (bus_driver_handle_message):
8676 Refactor code, put the message dispatching in its own file. Use
8677 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
8680 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8682 * dbus/dbus-internals.h:
8683 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
8685 * dbus/dbus-message.c: (dbus_message_get_sender):
8686 * dbus/dbus-message.h:
8687 Implement dbus_message_get_sender.
8689 * dbus/dbus-protocol.h:
8690 Add message and service defines.
8692 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8694 * dbus/dbus-connection.c: (dbus_connection_send_message):
8695 * dbus/dbus-message-internal.h:
8696 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
8697 (dbus_message_write_header):
8698 Remove _dbus_messag_unlock and don't set the client serial on a
8699 message if one already exists.
8701 2003-01-24 Havoc Pennington <hp@pobox.com>
8703 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
8706 * bus/driver.c (bus_driver_handle_list_services): fix a leak
8709 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8711 * dbus/dbus-list.c: (alloc_link), (free_link):
8712 Use a memory pool for the links.
8714 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8716 * bus/connection.c: (bus_connection_foreach):
8718 Add new bus_connection_foreach function.
8720 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
8721 Add function that broadcasts a message to all clients.
8723 (bus_driver_send_service_created), (bus_driver_handle_hello),
8724 (bus_driver_send_welcome_message),
8725 (bus_driver_handle_list_services), (bus_driver_message_handler):
8726 Implement functions that take care of listing services, and notifying
8727 clients when new services are created.
8729 * bus/services.c: (bus_services_list):
8731 Add new function that returns an array of strings with the currently
8732 registered services.
8735 * glib/dbus-gmain.c:
8736 Update copyright year.
8738 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8740 * dbus/dbus-connection.c: (dbus_connection_send_message):
8741 Unlock the message in case it was sent earlier.
8743 (dbus_connection_send_message_with_reply_and_block):
8744 Remove the reply message from the list.
8746 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8747 Set array_len and new_pos correctly.
8749 (_dbus_marshal_test):
8750 Remove debug output.
8752 * dbus/dbus-message-internal.h:
8753 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
8754 New function that returns the reply serial.
8756 (_dbus_message_unlock):
8757 New function that unlocks a message and resets its header.
8759 (dbus_message_append_string_array),
8760 (dbus_message_get_fields_valist),
8761 (dbus_message_iter_get_field_type),
8762 (dbus_message_iter_get_string_array),
8763 (dbus_message_get_fields),
8764 (dbus_message_append_fields_valist):
8765 Handle string arrays.
8767 (dbus_message_set_sender):
8768 Make this function public since the bus daemon needs it.
8770 (decode_header_data):
8771 Set the reply serial to -1 initially.
8773 * dbus/dbus-message.h:
8774 Add dbus_message_set_sender.
8776 2003-01-24 Havoc Pennington <hp@pobox.com>
8778 * doc/dbus-specification.sgml: add some stuff
8780 2003-01-22 Havoc Pennington <hp@pobox.com>
8782 * doc/dbus-specification.sgml: Start to document the protocol.
8784 2003-01-22 Havoc Pennington <hp@pobox.com>
8786 * dbus/dbus-connection.c
8787 (dbus_connection_send_message_with_reply_and_block): add some @todo
8789 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
8791 2003-01-21 Havoc Pennington <hp@pobox.com>
8793 (patch untested because can't compile)
8795 * bus/driver.c (create_unique_client_name): make this function
8796 never recycle client names. Also, caller should initialize
8799 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
8801 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8803 * dbus/dbus-marshal.c: (_dbus_marshal_double),
8804 (_dbus_marshal_int32), (_dbus_marshal_uint32),
8805 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
8806 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
8807 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
8808 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
8809 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
8810 * dbus/dbus-marshal.h:
8811 * dbus/dbus-protocol.h:
8812 Add support for marshalling and demarshalling integer, double
8815 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8820 * bus/connection.c: (connection_disconnect_handler):
8821 Remove the connection from the bus driver's list.
8823 (connection_watch_callback): Dispatch messages.
8825 (free_connection_data): Free connection name.
8827 (bus_connection_setup): Add connection to the bus driver's list.
8828 (bus_connection_remove_owned_service):
8829 (bus_connection_set_name), (bus_connection_get_name):
8830 Add functions for setting and getting the connection's name.
8833 Add function headers.
8835 * bus/driver.c: (create_unique_client_name),
8836 (bus_driver_handle_hello_message),
8837 (bus_driver_send_welcome_message), (bus_driver_message_handler),
8838 (bus_driver_add_connection), (bus_driver_remove_connection):
8841 * bus/services.c: (bus_service_free):
8843 New file that handles communication and registreation with the bus
8846 2003-01-21 Anders Carlsson <andersca@codefactory.se>
8848 * dbus/dbus-connection.c: (dbus_connection_send_message):
8849 Add a new client_serial parameter.
8851 (dbus_connection_send_message_with_reply):
8852 Remove a @todo since we've implemented the blocking function.
8854 (dbus_connection_send_message_with_reply_and_block):
8855 New function that sends a message and waits for a reply and
8856 then returns the reply.
8858 * dbus/dbus-connection.h:
8861 * dbus/dbus-errors.c: (dbus_result_to_string):
8862 * dbus/dbus-errors.h:
8863 Add new DBUS_RESULT.
8865 * dbus/dbus-message-internal.h:
8866 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
8867 (_dbus_message_set_sender), (dbus_message_write_header),
8868 (dbus_message_new_reply), (decode_header_data),
8869 (_dbus_message_loader_return_buffer), (_dbus_message_test):
8870 * dbus/dbus-message.h:
8871 Add new functions that set the reply serial and sender.
8872 Also marshal and demarshal them correctly and add test.
8874 * dbus/dbus-protocol.h:
8875 Add new DBUS_MESSAGE_TYPE_SENDER.
8878 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
8879 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
8880 (dbus_connection_hookup_with_g_main):
8881 * glib/test-dbus-glib.c: (main):
8882 Rewrite to use GIOChannel and remove the GSource crack.
8884 * test/echo-client.c: (main):
8885 * test/watch.c: (check_messages):
8886 Update for changed APIs
8888 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8890 * dbus/Makefile.am: Add dbus-timeout.[cħ]
8892 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
8893 Create a DBusTimeoutList.
8894 (dbus_connection_set_timeout_functions): Add new function to
8895 set timeout callbacks
8897 * dbus/dbus-connection.h: Add public DBusTimeout API.
8899 * dbus/dbus-message.c: (dbus_message_get_service):
8900 * dbus/dbus-message.h: New function.
8902 * dbus/dbus-server.c: Fix small doc typo.
8904 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
8906 2003-01-19 Anders Carlsson <andersca@codefactory.se>
8908 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
8909 of the string, just as long as specified.
8911 2003-01-19 Havoc Pennington <hp@pobox.com>
8913 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
8916 * dbus/dbus-server.c (dbus_server_set_max_connections)
8917 (dbus_server_get_max_connections, dbus_server_get_n_connections):
8918 keep track of current number of connections, and add API for
8919 setting a max (but haven't implemented enforcing the max yet)
8921 2003-01-18 Havoc Pennington <hp@pobox.com>
8923 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
8924 reading/writing if read_watch != NULL or write_watch != NULL.
8926 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
8927 the message loader code to actually load message->header and
8928 message->body into the newly-created message.
8930 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
8933 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
8934 (dbus_connection_get_max_message_size)
8935 (dbus_connection_set_max_live_messages_size)
8936 (dbus_connection_get_max_live_messages_size): implement some
8937 resource limitation functions
8939 * dbus/dbus-resources.c: new file implementing some of the
8940 resource limits stuff
8942 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
8943 missing docs, add @todo to handle OOM etc.
8945 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
8948 2003-01-18 Havoc Pennington <hp@pobox.com>
8950 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
8951 connection if it hasn't been already.
8953 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
8954 replace with DisconnectFunction.
8956 2003-01-18 Havoc Pennington <hp@pobox.com>
8958 Building --disable-verbose-mode --disable-asserts --disable-tests
8959 cuts the library from 112K to 45K or so
8961 * configure.in: check for varargs macro support,
8962 add --enable-verbose-mode, --enable-asserts.
8964 * dbus/dbus-internals.h (_dbus_assert): support
8966 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
8968 2003-01-18 Havoc Pennington <hp@pobox.com>
8970 * dbus/dbus-test.c: include config.h so that tests actually run
8972 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
8973 so the failure mode when that assumption fails will be plenty
8976 2003-01-18 Havoc Pennington <hp@pobox.com>
8978 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
8980 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
8983 * test/Makefile.am: don't use special variable "TESTS" for echo-*
8984 since we don't want to use those in make check
8986 2003-01-15 Havoc Pennington <hp@redhat.com>
8992 2003-01-15 Havoc Pennington <hp@redhat.com>
8994 * test/Makefile.am: fix so that test source code ends up in the
8995 distribution on make distcheck
8997 2003-01-15 Havoc Pennington <hp@redhat.com>
9003 2003-01-15 Havoc Pennington <hp@redhat.com>
9005 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
9006 fix build when --disable-tests
9008 * Makefile.am (EXTRA_DIST): put HACKING in here
9010 * HACKING: document procedure for making a tarball release.
9012 2003-01-14 Anders Carlsson <andersca@codefactory.se>
9014 * bus/connection.c: (connection_error_handler),
9015 (bus_connection_setup):
9016 * bus/main.c: (main):
9017 Make sure that the DBusConnectionData struct is NULLed
9018 out to prevent a segfault.
9020 * dbus/dbus-errors.c: (dbus_result_to_string):
9021 * dbus/dbus-errors.h:
9022 * dbus/dbus-message.c: (dbus_message_get_fields),
9023 (dbus_message_get_fields_valist), (_dbus_message_test):
9024 * dbus/dbus-message.h:
9025 Make dbus_message_get_fields return a result code so we can
9026 track invalid fields as well as oom.
9028 2003-01-11 Havoc Pennington <hp@pobox.com>
9030 * configure.in: change --enable-test/--enable-ansi action-if-given
9031 to enable_foo=$enableval instead of enable_foo=yes
9033 2003-01-08 Havoc Pennington <hp@pobox.com>
9035 * dbus/dbus-string.c (_dbus_string_align_length): new function
9037 * dbus/dbus-test-main.c: move main() for test app here
9039 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
9040 symbol to run tests, because dbus-test isn't in the main
9043 Code review nitpicks.
9045 * dbus/dbus-message.c (dbus_message_write_header): add newlines
9046 for people with narrow emacs ;-). Assert client_serial was filled
9047 in. Assert message->name != NULL.
9048 (dbus_message_append_fields): have "first_field_type" arg separate
9049 from va list, needed for C++ binding that also uses varargs IIRC
9050 and helps with type safety
9051 (dbus_message_new): add @todo about using DBusString to store
9052 service/name internally
9053 (dbus_message_new): don't leak ->service and ->name on OOM later
9055 (dbus_message_unref): free the service name
9056 (dbus_message_get_fields): same change to varargs
9057 i.e. first_field_type
9058 (_dbus_message_loader_return_buffer): assert that the message data
9059 is aligned (if not it's a bug in our code). Put in verbose griping
9060 about why we set corrupted = TRUE.
9061 (decode_header_data): add FIXME that char* is evil. Was going to
9062 add FIXME about evil locale-specific string.h strncmp, but just
9063 switched to wacky string-as-uint32 optimization. Move check for
9064 "no room for field name" above get_const_data_len() to avoid
9065 assertion failure in get_const_data_len if we have trailing 2
9066 bytes or the like. Check for service and name fields being
9067 provided twice. Don't leak service/name on error. Require field
9068 names to be aligned to 4 bytes.
9070 * dbus/dbus-marshal.c: move byte swap stuff to header
9071 (_dbus_pack_int32): uscore-prefix
9072 (_dbus_unpack_int32): uscore-prefix
9073 (_dbus_unpack_uint32): export
9074 (_dbus_demarshal_string): add @todo complaining about use of
9076 (_dbus_marshal_get_field_end_pos): add @todo about bad error
9077 handling allowing corrupt data to go unchecked
9079 2003-01-08 Havoc Pennington <hp@redhat.com>
9081 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
9082 to the select() as needed for authentication. (should be using
9083 _dbus_poll() not select, but for another day)
9085 * dbus/dbus.h: include dbus/dbus-protocol.h
9087 2003-01-08 Anders Carlsson <andersca@codefactory.se>
9089 * dbus/Makefile.am (dbusinclude_HEADERS): Install
9092 2003-01-08 Anders Carlsson <andersca@codefactory.se>
9094 * dbus/dbus-internals.c: (_dbus_type_to_string):
9095 New function that returns a string describing a type.
9097 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
9098 * dbus/dbus-marshal.h:
9099 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
9100 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
9101 (dbus_message_iter_get_byte_array):
9102 * dbus/dbus-message.h:
9103 Add new convenience functions for appending and getting message fields.
9104 Also add demarshalling routines for byte arrays.
9106 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9108 * dbus/dbus-connection-internal.h:
9109 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
9110 (_dbus_connection_get_next_client_serial),
9111 (dbus_connection_send_message):
9112 * dbus/dbus-internals.h:
9113 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
9114 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
9115 (_dbus_marshal_uint32), (_dbus_demarshal_double),
9116 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
9117 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
9118 (_dbus_verbose_bytes), (_dbus_marshal_test):
9119 * dbus/dbus-marshal.h:
9120 * dbus/dbus-message-internal.h:
9121 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
9122 (dbus_message_write_header), (_dbus_message_lock),
9123 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
9124 (dbus_message_get_name), (dbus_message_append_int32),
9125 (dbus_message_append_uint32), (dbus_message_append_double),
9126 (dbus_message_append_string), (dbus_message_append_byte_array),
9127 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
9128 (dbus_message_iter_unref), (dbus_message_iter_has_next),
9129 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
9130 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
9131 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
9132 (decode_header_data), (_dbus_message_loader_return_buffer),
9133 (message_iter_test), (_dbus_message_test):
9134 * dbus/dbus-message.h:
9135 * dbus/dbus-protocol.h:
9136 * dbus/dbus-test.c: (main):
9138 * glib/test-dbus-glib.c: (message_handler), (main):
9139 * test/echo-client.c: (main):
9140 * test/watch.c: (check_messages):
9141 Make messages sendable and receivable for real.
9143 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9145 * dbus/dbus-marshal.c: (_dbus_marshal_double),
9146 (_dbus_marshal_string), (_dbus_marshal_byte_array):
9147 * dbus/dbus-message.c: (dbus_message_append_int32),
9148 (dbus_message_append_uint32), (dbus_message_append_double),
9149 (dbus_message_append_string), (dbus_message_append_byte_array):
9150 Handle OOM restoration.
9152 2003-01-07 Anders Carlsson <andersca@codefactory.se>
9154 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9155 (_dbus_demarshal_string), (_dbus_marshal_test):
9156 * dbus/dbus-marshal.h:
9157 * dbus/dbus-message.c: (dbus_message_get_name),
9158 Document these functions.
9160 (dbus_message_append_int32), (dbus_message_append_uint32),
9161 (dbus_message_append_double), (dbus_message_append_string),
9162 (dbus_message_append_byte_array):
9163 * dbus/dbus-message.h:
9164 Add functions for adding message fields of different types.
9166 * dbus/dbus-protocol.h:
9167 Add the different types.
9169 2003-01-05 Havoc Pennington <hp@pobox.com>
9171 * bus/connection.c: implement routines for handling connections,
9172 first thing is keeping a list of owned services on each connection
9173 and setting up watches etc.
9175 * bus/services.c: implement a mapping from service names to lists
9178 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
9180 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
9181 to use static mutexes for global data
9183 * dbus/dbus-connection.c (dbus_connection_set_data): add new
9184 collection of functions to set/get application-specific data
9185 on the DBusConnection.
9187 2003-01-04 Havoc Pennington <hp@pobox.com>
9189 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
9190 (_dbus_poll): new function
9192 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
9195 * bus/loop.c: initial code for the daemon main loop
9197 2003-01-04 Havoc Pennington <hp@pobox.com>
9199 * test/watch.c (error_handler): make it safe if the error handler
9200 is called multiple times (if we s/error handler/disconnect
9201 handler/ we should just guarantee it's called only once)
9203 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
9204 error handler on disconnect (it's quite possible we should
9205 just change the error handler to a "disconnect handler," I'm
9206 not sure we have any other meaningful errors)
9208 * configure.in: check for getpwnam_r
9210 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
9211 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
9212 mechanism as in SASL spec, using socket credentials
9214 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
9215 (_dbus_send_credentials_unix_socket): new function
9217 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
9219 (_dbus_write): only check errno if <0 returned
9220 (_dbus_write_two): ditto
9222 2003-01-02 Anders Carlsson <andersca@codefactory.se>
9224 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
9225 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
9226 (_dbus_marshal_test):
9227 * dbus/dbus-marshal.h:
9228 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
9229 to _dbus_marshal_utf8_string. Also fix some tests.
9231 2002-12-28 Harri Porten <porten@kde.org>
9233 * configure.in: added check for C++ compiler and a very cheesy
9234 check for the Qt integration
9236 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
9238 * qt/Makefile.am: added
9240 * qt/.cvsignore: added
9242 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
9243 latter, added #ifdef QT_THREAD_SUPPORT guard.
9245 * dbus/Makefile.am: added missing headers for make dist
9247 2002-12-28 Kristian Rietveld <kris@gtk.org>
9249 * dbus/Makefile.am: fixup export-symbols-regex.
9251 2002-12-27 Anders Carlsson <andersca@codefactory.se>
9253 * acinclude.m4: Add this file and put the
9254 PKG_CHECK_MODULE macro in it.
9256 2002-12-27 Anders Carlsson <andersca@codefactory.se>
9258 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9259 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9260 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9261 (_dbus_marshal_test):
9262 Make the demarshalling routines align the pos argument.
9263 Add string marshalling tests and fix the obvious bugs
9266 2002-12-26 Havoc Pennington <hp@pobox.com>
9268 * dbus/dbus-auth.c: fixes fixes fixes
9270 * dbus/dbus-transport-unix.c: wire up support for
9271 encoding/decoding data on the wire
9273 * dbus/dbus-auth.c (_dbus_auth_encode_data)
9274 (_dbus_auth_decode_data): append to target string
9275 instead of nuking it.
9277 2002-12-26 Havoc Pennington <hp@pobox.com>
9279 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
9280 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
9283 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
9284 avoid swap_bytes() overhead (ignoring possible assembly stuff for
9285 now). Main point is because I wanted unpack_uint32 to implement
9287 (_dbus_verbose_bytes): new function
9289 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
9291 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
9292 mechanism to handle a corrupt message stream
9293 (_dbus_message_loader_new): fix preallocation to only prealloc,
9296 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
9297 (_dbus_string_test): enhance tests for copy/move and fix the
9300 * dbus/dbus-transport-unix.c: Hold references in more places to
9301 avoid reentrancy problems
9303 * dbus/dbus-transport.c: ditto
9305 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
9306 leak reference count in no-message case
9308 * test/watch.c (do_mainloop): handle adding/removing watches
9309 during iteration over the watches. Also, ref the connection/server
9310 stored on a watch, so we don't try to mangle a destroyed one.
9312 * dbus/dbus-transport-unix.c (do_authentication): perform
9315 * dbus/dbus-auth.c (get_state): add a state
9316 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
9317 (_dbus_auth_get_unused_bytes): append the unused bytes
9318 to the passed in string, rather than prepend
9320 * dbus/dbus-transport.c (_dbus_transport_init_base): create
9321 the auth conversation DBusAuth
9323 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
9324 (_dbus_transport_new_for_domain_socket): when creating a
9325 transport, pass in whether it's a client-side or server-side
9326 transport so we know which DBusAuth to create
9328 2002-12-03 Havoc Pennington <hp@pobox.com>
9330 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
9331 _after_ finalizing the derived members
9332 (unix_connection_set): unref watch if we fail to add it
9334 * dbus/dbus-connection.c (dbus_connection_unref): delete the
9335 transport first, so that the connection owned by the
9336 transport will be valid as the transport finalizes.
9338 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
9339 if necessary, and remove watches from the connection.
9341 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
9343 2002-12-26 Anders Carlsson <andersca@codefactory.se>
9345 * dbus/dbus-marshal.c: (_dbus_marshal_string),
9346 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9347 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9348 (_dbus_marshal_test):
9349 * dbus/dbus-marshal.h:
9350 Add string marshal functions and have the demarshal functions
9351 return the new position.
9353 2002-12-25 Havoc Pennington <hp@pobox.com>
9355 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
9356 it is a simple protocol that just maps directly to SASL.
9358 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
9359 initial implementation, not actually used yet.
9361 * dbus/dbus-string.c (_dbus_string_find): new function
9362 (_dbus_string_equal): new function
9363 (_dbus_string_base64_encode): new function
9364 (_dbus_string_base64_decode): new function
9366 2002-12-25 Anders Carlsson <andersca@codefactory.se>
9369 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
9370 (_dbus_marshal_int32), (_dbus_marshal_uint32),
9371 (_dbus_demarshal_double), (_dbus_demarshal_int32),
9372 (_dbus_demarshal_uint32), (_dbus_marshal_test):
9373 * dbus/dbus-marshal.h:
9374 * dbus/dbus-protocol.h:
9375 * dbus/dbus-test.c: (main):
9377 Add un-optimized marshalling/demarshalling routines.
9379 2002-12-25 Harri Porten <porten@kde.org>
9381 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
9383 2002-12-24 Zack Rusin <zack@kde.org>
9385 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
9386 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
9389 2002-12-24 Havoc Pennington <hp@pobox.com>
9391 * glib/dbus-gthread.c: fix include
9393 * glib/dbus-glib.h: rename DBusMessageHandler for now.
9394 I think glib API needs to change, though, as you don't
9395 want to use DBusMessageFunction, you want to use the
9396 DBusMessageHandler object. Probably
9397 dbus_connection_open_with_g_main_loop()
9398 and dbus_connection_setup_g_main_loop() or something like that
9399 (but think of better names...) that just create a connection
9400 that has watch/timeout functions etc. already set up.
9402 * dbus/dbus-connection.c
9403 (dbus_connection_send_message_with_reply): new function just to
9404 show how the message handler helps us deal with replies.
9406 * dbus/dbus-list.c (_dbus_list_remove_last): new function
9408 * dbus/dbus-string.c (_dbus_string_test): free a string that
9411 * dbus/dbus-hash.c: use memory pools for the hash entries
9412 (rebuild_table): be more paranoid about overflow, and
9413 shrink table when we can
9414 (_dbus_hash_test): reduce number of sprintfs and write
9415 valid C89. Add tests for case where we grow and then
9416 shrink the hash table.
9418 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
9420 * dbus/dbus-connection.c (dbus_connection_register_handler)
9421 (dbus_connection_unregister_handler): new functions
9423 * dbus/dbus-message.c (dbus_message_get_name): new
9425 * dbus/dbus-list.c: fix docs typo
9427 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
9428 an object representing a handler for messages.
9430 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9433 * glib/dbus-gthread.c: (dbus_gthread_init):
9434 Don't use the gdbus prefix for public functions.
9436 2002-12-16 Anders Carlsson <andersca@codefactory.se>
9440 Add GLib checks and fixup .pc files
9444 * glib/dbus-gmain.c: (gdbus_connection_prepare),
9445 (gdbus_connection_check), (gdbus_connection_dispatch),
9446 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
9447 (dbus_connection_gsource_new):
9448 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
9449 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
9450 * glib/test-dbus-glib.c: (message_handler), (main):
9453 2002-12-15 Harri Porten <porten@kde.org>
9455 * autogen.sh: check for libtoolize before attempting to use it
9457 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
9460 * .cvsignore: ignore more stamp files
9462 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
9464 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
9465 without make install.
9467 2002-12-15 Havoc Pennington <hp@pobox.com>
9469 * dbus/dbus-threads.c: add thread stubs that a higher library
9470 layer can fill in. e.g. the GLib wrapper might fill them in with
9471 GThread stuff. We still need to use this thread API to
9472 thread-safe-ize the library.
9474 2002-12-12 Havoc Pennington <hp@pobox.com>
9476 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
9477 below new interfaces and include fewer system headers.
9479 * dbus/dbus-sysdeps.c (_dbus_read): new function
9480 (_dbus_write): new function
9481 (_dbus_write_two): new function
9482 (_dbus_connect_unix_socket): new function
9483 (_dbus_listen_unix_socket): new function
9485 * dbus/dbus-message-internal.h: change interfaces to use
9488 2002-12-11 Havoc Pennington <hp@pobox.com>
9490 * dbus/dbus-types.h: add dbus_unichar
9492 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
9494 * dbus/dbus-connection.c (dbus_connection_send_message): return
9497 * dbus/dbus-transport.c: include dbus-watch.h
9499 * dbus/dbus-connection.c: include dbus-message-internal.h
9501 * HACKING: add file with coding guidelines stuff.
9503 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
9504 handling here, for security purposes (as in vsftpd). Not actually
9505 using this class yet.
9507 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
9508 system/libc usage here, as in vsftpd, for ease of auditing (and
9509 should also simplify portability). Haven't actually moved all the
9510 system/libc usage into here yet.
9512 2002-11-25 Havoc Pennington <hp@pobox.com>
9514 * dbus/dbus-internals.c (_dbus_verbose): fix to not
9515 always print the first verbose message.
9517 2002-11-24 Havoc Pennington <hp@pobox.com>
9519 * test/echo-client.c, test/echo-server.c: cheesy test
9522 * configure.in (AC_CHECK_FUNCS): check for writev
9524 * dbus/dbus-message.c (_dbus_message_get_network_data): new
9527 * dbus/dbus-list.c (_dbus_list_foreach): new function
9529 * dbus/dbus-internals.c (_dbus_verbose): new function
9531 * dbus/dbus-server.c, dbus/dbus-server.h: public object
9532 representing a server that listens for connections.
9534 * dbus/.cvsignore: create
9536 * dbus/dbus-errors.h, dbus/dbus-errors.c:
9537 public API for reporting errors
9539 * dbus/dbus-connection.h, dbus/dbus-connection.c:
9540 public object representing a connection that
9541 sends/receives messages. (Same object used for
9542 both client and server.)
9544 * dbus/dbus-transport.h, dbus/dbus-transport.c:
9545 Basic abstraction for different kinds of stream
9546 that we might read/write messages from.
9548 2002-11-23 Havoc Pennington <hp@pobox.com>
9550 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
9553 * dbus/dbus-test.c (main): add list test, and include
9554 dbus-test.h as intended
9556 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
9557 (_dbus_hash_table_remove_int): return value indicates
9558 whether the entry existed to remove
9560 * dbus/dbus-list.c: add linked list utility class,
9563 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
9566 2002-11-23 Havoc Pennington <hp@pobox.com>
9568 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
9569 DBUS_END_DECLS to nothing, that should fix this once and for all
9571 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
9573 * dbus/dbus-message.c, dbus/dbus-hash.c:
9574 add some missing @brief
9576 2002-11-23 Havoc Pennington <hp@pobox.com>
9578 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
9579 to avoid confusing Doxygen
9581 * dbus/dbus-hash.c: @} not }@
9583 * dbus/dbus-message.c (struct DBusMessage): split out
9586 2002-11-23 Havoc Pennington <hp@pobox.com>
9588 * configure.in: pile on more warning flags if using gcc
9590 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
9591 to document static functions
9593 * configure.in: add summary to end of configure so it
9594 looks nice and attractive
9596 * dbus/dbus-hash.c: finish implementation and write unit
9599 * configure.in: add --enable-tests to enable unit tests
9601 * dbus/dbus-test.c: test program to run unit tests
9602 for all files in dbus/*, initially runs a test for
9605 * dbus/dbus-internals.h: file to hold some internal utility stuff
9607 2002-11-22 Havoc Pennington <hp@redhat.com>
9609 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
9610 "ported" away from Tcl
9612 * dbus/dbus-types.h: header for types such as dbus_bool_t
9614 2002-11-22 Havoc Pennington <hp@redhat.com>
9616 * dbus/dbus.h: fixups for doc warnings
9618 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
9620 (QUIET): make it quiet so we can see warnings
9622 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
9624 2002-11-22 Havoc Pennington <hp@redhat.com>
9626 * Makefile.am: include "Doxyfile" target in all-local
9628 * configure.in: generate the Doxyfile
9630 * Doxyfile.in: move Doxyfile here, so we can use
9631 configure to generate a Doxyfile with the right
9634 2002-11-22 Havoc Pennington <hp@redhat.com>
9636 * dbus/dbus-message.c: move inline docs into .c file
9638 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
9639 so all docs are under doc/
9640 (MAN_EXTENSION): generate man pages. Use extension
9641 ".3dbus" which matches ".3qt" on my system,
9642 I guess this is OK, I don't know really.
9643 (FILE_PATTERNS): look for .c files not .h, makes sense
9646 2002-11-22 Havoc Pennington <hp@pobox.com>
9648 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
9649 because any app can be a server, and any app can be a client,
9650 the bus is a special kind of server.
9652 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
9654 * Doxyfile : adding. Still needs Makefile rules to be generated
9655 automatically (just run "doxygen" in the toplevel dir for now to
9658 * dbus/dbus-message.h : Adding sample docs (javadoc since
9659 resembles gtk-doc a little more)
9661 * dbus/dbus.h : Adding sample docs
9663 2002-11-21 Havoc Pennington <hp@redhat.com>
9665 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
9666 so we can allow ourselves to include files directly,
9667 instead of having to use dbus.h
9669 * dbus/dbus.h: fill in
9671 * dbus/dbus-message.h: sketch out a sample header file.
9672 Include griping if you include it directly instead of
9675 * dbus/dbus-macros.h: new file with macros for extern "C",
9676 TRUE/FALSE, NULL, etc.
9678 * doc/file-boilerplate.c: put include guards in here
9680 2002-11-21 Havoc Pennington <hp@redhat.com>
9682 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
9684 * COPYING: include the GPL as well, and license code
9685 under both AFL and GPL.
9687 2002-11-21 Havoc Pennington <hp@redhat.com>
9689 * acconfig.h: get rid of this
9691 * autogen.sh (run_configure): add --no-configure option
9693 * configure.in: remove AC_ARG_PROGRAM to make
9694 autoconf complain less. add AC_PREREQ.
9695 add AC_DEFINE third arg.
9697 2002-11-21 Anders Carlsson <andersca@codefactory.se>
9700 Fix references so we can distcheck.
9702 2002-11-21 Havoc Pennington <hp@redhat.com>
9704 * Initial module creation