2005-02-17 Colin Walters <walters@verbum.org>
[platform/upstream/dbus.git] / ChangeLog
1 2005-02-17  Colin Walters  <walters@verbum.org>
2
3         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
4         Rename to DBUS_SERVICE_DBUS.
5         (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
6         (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
7         (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
8         (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
9         DBUS_INTERFACE_INTROSPECTABLE.
10         (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
11         DBUS_INTERFACE_PROPERTIES.
12         (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
13         DBUS_INTERFACE_PEER.
14         (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL): 
15         DBUS_INTERFACE_LOCAL.
16
17         All other users of those constants have been changed.
18
19         * bus/driver.c (bus_driver_handle_introspect): Use constants.
20
21         * glib/dbus-gobject.c (handle_introspect): Use constants.
22
23         * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
24
25 2005-02-17  Colin Walters  <walters@verbum.org>
26
27         * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
28         (parse_node, parse_interface, parse_method, parse_signal)
29         (parse_property, parse_annotation): Lose if we're currently in an
30         annotation.
31         (parse_annotation): New function.
32         (parser_start_element, parser_end_element): Handle annotation.
33         (parse_method, parse_interface): Remove support for c_name attribute,
34         switch to annotations.
35
36         * glib/dbus-gidl.h (interface_info_get_binding_names)
37         (method_info_get_binding_names)
38         (interface_info_get_binding_name, method_info_get_binding_name)
39         (interface_info_set_binding_name, method_info_set_binding_name):
40         Remove.
41         (interface_info_get_annotations, method_info_get_annotations)
42         (interface_info_get_annotation, method_info_get_annotation)
43         (interface_info_add_annotation, method_info_add_annotation):
44         Prototype.
45
46         * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
47         for "bindings".
48         (struct MethodInfo): Ditto.
49         Straightfoward conversion of binding methods into annotation methods
50         as prototyped.
51
52         * glib/dbus-glib-tool.c (pretty_print): Print annotations.
53
54         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
55
56         * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
57         Use new annotation API.
58
59         * doc/introspect.dtd: Fix a number of DTD syntax errors.  Add
60         annotation element.
61         
62         * doc/dbus-specification.xml: Discuss introspection annotations,
63         include list of well-known annotations.
64
65         * test/glib/test-service-glib.xml: Make validate against new DTD.
66
67 2005-02-17  Colin Walters  <walters@verbum.org>
68
69         This patch is based on initial work from
70         Paul Kuliniewicz <kuliniew@purdue.edu>.
71
72         * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
73         initialization of GValue from dbus type to here.
74         (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
75         for the "glib-genmarshal" program from a DBus type.
76         (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
77         into the C name for it we use in the glib bindings.
78         (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
79         glib C type (not GValue).
80         (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
81
82         * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
83         from dbus-gobject.c.
84
85         * glib/dbus-gutils.h: Prototype it.
86
87         * glib/dbus-gproxy.c: Include new dbus-gobject.h.
88         (marshal_dbus_message_to_g_marshaller): Use new shared function
89         dbus_glib_marshal_dbus_message_to_gvalue_array.
90
91         * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
92         Will be changed once we have annotations.
93
94         * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
95         GStaticRWLock.  Callers updated.
96         (wincaps_to_uscore): Move to dbus-gutils.c.  Callers updated.
97         (string_table_next): New function for iterating over zero-terminated
98         string value array.
99         (string_table_lookup): New function; retrieves specific entry in
100         array.
101         (get_method_data): New function; look up method data in object data chunk.
102         (object_error_domain_prefix_from_object_info)
103         (object_error_code_from_object_info): New functions, but not implemented yet.
104         (method_interface_from_object_info): New function; retrieve interface name.
105         (method_name_from_object_info): New function; retrieve method name.
106         (method_arg_info_from_object_info): New function; retrieve argument data.
107         (arg_iterate): New function; iterates over serialized argument data.
108         (method_dir_signature_from_object_info): New function; returns a
109         GString holding type signature for arguments for just one
110         direction (input or output).
111         (method_input_signature_from_object_info)
112         (method_output_signature_from_object_info): New functions.
113         (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
114         converts dbus message arguments into a GValue array.  Used for both
115         signal handling and method invocation.
116         (struct DBusGlibWriteIterfaceData): New utility structure.
117         (write_interface): New function; generate introspection XML for
118         an interface.
119         (introspect_interfaces): New function; gathers all interface->methods,
120         generates introspection XML for them.
121         (handle_introspect): Invoke introspect_interfaces.
122         (get_object_property): Be sure to zero-initalize stack-allocated GValue.
123         (lookup_object_and_method): New function; examines an incoming message
124         and attempts to match it up (via interface, method name, and argument
125         signature) with a known object and method.
126         (gerror_domaincode_to_dbus_error_name): New function; converts a
127         GError domain and code into a DBus error name.  Needs GError data
128         added to object introspection to work well.
129         (gerror_to_dbus_error_message): Creates a DBusMessage error return from
130         GError.
131         (invoke_object_method): New function to invoke an object method
132         looked up via lookup_object_and_method.  Parses the incoming
133         message, turns it into a GValue array, then invokes the marshaller
134         specified in the DBusGMethodInfo.  Creates a new message with
135         either return values or error message as appropriate.
136         (gobject_message_function): Invoke lookup_object_and_method and
137         invoke_object_method.
138
139         * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
140         (enum DBusBindingOutputMode): New enum for binding output modes.
141         (pretty_print): Print binding names.
142         (dbus_binding_tool_error_quark): GError bits.
143         (version): Fix typo.
144         (main): Create GIOChannel for output.  Parse new --mode argument,
145         possible values are "pretty-print", "glib-server", "glib-client".
146         Use mode to invoke appropriate function.
147         
148         * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
149
150         * glib/dbus-glib-tool.h: New header, just includes GError bits
151         for now.
152
153         * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
154         maps binding style to name.
155         (struct MethodInfo): Ditto.
156         (get_hash_keys, get_hash_key): Utility function, returns keys for
157         a GHashTable.
158         (interface_info_new, method_info_new): Initialize bindings.
159         (interface_info_unref, method_info_unref): Destroy bindings.
160         (method_info_get_binding_names, method_info_get_binding_name)
161         (interface_info_get_binding_names, interface_info_get_binding_name):
162         Functions for retrieving binding names.
163         (method_info_set_binding_name, interface_info_set_binding_name):
164         Functions for setting binding names.
165
166         * glib/dbus-binding-tool-glib.h: New file, has prototypes
167         for glib binding generation.
168
169         * glib/dbus-binding-tool-glib.c: New file, implements server-side
170         and client-side glib glue generation.
171
172         * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
173         dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
174         dbus-glib-tool.h.
175
176         * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
177         of using GClosureMarshal directly.
178         (struct DBusGObjectInfo): Add n_infos member.
179
180         * test/glib/test-service-glib.xml: New file; contains introspection data
181         for MyTestObject used in test-service-glib.c.
182
183         * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
184         (my_object_do_nothing, my_object_increment, my_object_throw_error)
185         (my_object_uppercase, my_object_many_args): New test methods.
186         (main): Use dbus_g_object_class_install_info to include generated object
187         info.
188
189         * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
190         as well as client-side bindings.
191
192         * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
193         (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
194         using both the dbus_gproxy stuff directly as well as the generated bindings.
195
196 2005-02-15  Havoc Pennington  <hp@redhat.com>
197
198         * dbus/dbus-connection.c (dbus_connection_dispatch): always
199         complete a pending call, don't run filters first.
200
201         * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
202         dbus_pending_call_steal_reply
203
204         * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
205         _dbus_connection_block_pending_call
206         (dbus_pending_call_get_reply): change to steal_reply and return a
207         ref
208
209         * dbus/dbus-connection.c
210         (dbus_connection_send_with_reply_and_block): port to work in terms
211         of DBusPendingCall
212         (_dbus_connection_block_pending_call): replace block_for_reply
213         with this
214
215 2005-02-14  Havoc Pennington  <hp@redhat.com>
216
217         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
218         properly handle looking up group information by name; fix 
219         from j@bootlab.org
220
221 2005-02-13  Havoc Pennington  <hp@redhat.com>
222
223         * dbus/dbus-connection.c (dbus_connection_return_message) 
224         (dbus_connection_borrow_message): hold dispatch lock while message
225         is outstanding
226         (_dbus_connection_block_for_reply): hold dispatch lock while we
227         block for the reply, so nobody steals our reply
228         (dbus_connection_pop_message): hold the dispatch lock while we
229         pluck the message
230
231 2005-02-13  Havoc Pennington  <hp@redhat.com>
232
233         * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
234         (_dbus_connection_release_dispatch)
235         (_dbus_connection_acquire_io_path)
236         (_dbus_connection_release_io_path): make the mutex and condvar
237         control access to the "acquired" flag. Drop the connection lock
238         while waiting on the condvar. Hopefully these are baby steps in
239         roughly the right direction.
240
241 2005-02-13  Havoc Pennington  <hp@redhat.com>
242
243         * dbus/dbus-connection.c: use separate mutexes for the condition
244         variables; this is some kind of baseline for sanity, but the
245         condition variables still aren't used correctly afaict
246
247 2005-02-13  Havoc Pennington  <hp@redhat.com>
248
249         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
250         fix a double-unlock
251
252         * dbus/dbus-connection.c
253         (_dbus_connection_detach_pending_call_unlocked): add this
254
255         Initial semi-correct pass through to fix thread locking; there are
256         still some issues with the condition variable paths I'm pretty
257         sure
258         
259         * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
260         lock/unlock calls
261
262         * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
263         rename to add _unlocked
264         (struct DBusConnection): move "dispatch_acquired" and
265         "io_path_acquired" to use only one bit each.
266         (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
267         (dbus_connection_set_watch_functions): hacky fix to reentrancy
268         (_dbus_connection_add_watch, _dbus_connection_remove_watch) 
269         (_dbus_connection_toggle_watch, _dbus_connection_add_timeout) 
270         (_dbus_connection_remove_timeout) 
271         (_dbus_connection_toggle_timeout): drop lock when calling out to
272         user functions; done in a hacky/bad way.
273         (_dbus_connection_send_and_unlock): add a missing unlock
274         (_dbus_connection_block_for_reply): add a missing unlock
275
276         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
277         drop lock in a hacky probably unsafe way to call out to user
278         function
279
280 2005-02-12  Havoc Pennington  <hp@redhat.com>
281
282         * tools/dbus-tree-view.c (info_set_func_text): display more
283         details on args
284
285         * bus/driver.c (bus_driver_handle_list_services): list the bus
286         driver
287
288         * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
289
290         * glib/dbus-gidl.c (signal_info_get_n_args): new function
291         (method_info_get_n_args): new function
292
293 2005-02-12  Havoc Pennington  <hp@redhat.com>
294
295         * bus/driver.c (bus_driver_handle_introspect): add introspection
296         for bus driver
297
298 2005-02-12  Havoc Pennington  <hp@redhat.com>
299
300         * bus/driver.c: put the signature of each bus driver method in the
301         table of handlers and check it on incoming calls; this isn't
302         really useful, but going to add introspect support in a minute.
303
304 2005-02-11  Joe Shaw  <joeshaw@novell.com>
305
306         * mono/Connection.cs: The unpredictability of finalizers in mono
307         prevents us from deterministically disconnecting the filters from
308         the Service class's finalizer, so move tracking of filters and
309         matches here.  Add API for that.
310
311         * mono/Service.cs: Remove the code, add code which calls the
312         methods now on the Connection class.
313
314 2005-02-11  John (J5) Palmieri  <johnp@redhat.com>
315
316         * python/dbus.py (class Sender): added to support dbus signals better
317         (Bus::add_signal_receiver): added expand_args parameter which defaults
318         to True.  When expand args is True the signal handler will pass the 
319         message arguments as parameters to the signal handler.  If False
320         revert to previous behavior where the signal handler must get the
321         argument list from the message.  This is to help port applications
322         like HAL that have a tendancy to send variable length argument lists.
323         self._match_rule_to_receivers is now a dict of dicts.
324         (Bus::remove_signal_receiver): pop handler off the dict intead of 
325         removing it from a list
326         (Bus::_signal_func): change signal handlers so that interface,
327         signal_name, service, path and message are packed into a Sender
328         object and that is passed to the handler.  If expand_args is True
329         extract the args list from the message and append it to the parameter
330         list
331         
332         * python/dbus_bindings.pyx.in (class Signature): added to support 
333         signiature types
334         (MessageIter::__init__): changed iteration limit to match D-BUS
335         (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY, 
336         STRUCT and VARIENT type support
337         (MessageIter::python_value_to_dbus_sig): made recursive to support
338         recursive types
339         (MessageIter::append*): added Signature, dict, tuple 
340         support
341
342         * python/examples/example-client.py: added examples of getting tuples
343         and dicts
344
345         * python/examples/example-service.py: added examples of sending tuples
346         and dicts
347
348         * python/examples/example-signal-recipient.py: Fixed to handle new
349         signal callback format
350
351 2005-02-10  Havoc Pennington  <hp@redhat.com>
352
353         * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
354         (call dbus_g_proxy_add_signal)
355
356         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
357         escape the hostname
358         (_dbus_server_new_for_domain_socket): escape the path
359
360         * dbus/dbus-address.c (dbus_address_escape_value): new
361         (dbus_address_unescape_value): new
362         (dbus_parse_address): unescape values
363
364         * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
365
366         * doc/dbus-specification.xml: explain how to escape values in
367         addresses
368
369 2005-02-10  Havoc Pennington  <hp@redhat.com>
370
371         * dbus/dbus-message-factory.c (generate_special): modify test to
372         avoid using a non-basic dict key
373
374         * dbus/dbus-marshal-validate-util.c: add test for the below
375
376         * doc/dbus-specification.xml: require that dict keys are a basic
377         type
378
379         * dbus/dbus-marshal-validate.c
380         (_dbus_validate_signature_with_reason): require that dict key is a
381         basic type
382
383 2005-02-10  Havoc Pennington  <hp@redhat.com>
384
385         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
386         change to be _and_unlock instead of _unlocked
387
388         * dbus/dbus-connection.c
389         (_dbus_connection_send_preallocated_unlocked_no_update): rename to
390         have no_update so we can find this bug quickly in future
391
392 2005-02-10  Havoc Pennington  <hp@redhat.com>
393
394         * dbus/dbus-message-util.c (verify_test_message): tests for string
395         array
396
397         * dbus/dbus-message.c (dbus_message_append_args_valist): add
398         support for arrays of string/signature/path
399
400 2005-02-10  Joe Shaw  <joeshaw@novell.com>
401
402         * dbus/dbus-connection.c
403         (_dbus_connection_queue_received_message_link,
404         _dbus_connection_message_sent): Add the path to
405         the verbose output.
406         (_dbus_connection_send_preallocated_and_unlock): Added.  Calls
407         _dbus_connection_send_preallocated_unlocked(), updated the
408         dispatch status, and unlocks.  Fixes a bug where certain
409         situations (like a broken pipe) could cause a Disconnect message
410         to not be sent, tricking the bus into thinking a service was still
411         there when the process had quit.
412         (_dbus_connection_send_preallocated): Call
413         _dbus_connection_send_preallocated_and_unlock().
414         (_dbus_connection_send_and_unlock): Added.  Calls
415         _dbus_connection_send_preallocated_and_unlock().
416         (dbus_connection_send): Call _dbus_connection_send_and_unlock().
417         (dbus_connection_send_with_reply): Update the dispatch status and
418         unlock.
419
420         * mono/Service.cs (~Service): Added.  Removes the filter so that
421         we don't get unmanaged code calling back into a GCed delegate.
422         (RemoveFilter); Added.
423
424 2005-02-09  John (J5) Palmieri  <johnp@redhat.com>
425
426         * dbus/dbus-message.c (dbus_message_iter_open_container):
427         - Removed check for iterator type being an array because
428         get_arg_type does not work with writer iterators
429         - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
430
431 2005-02-07  Havoc Pennington  <hp@redhat.com>
432
433         * doc/dbus-specification.xml: some more language cleanups; add
434         stuff about how to deal with invalid protocol and extension
435         points; add _ to allowed chars in auth commands; add EXTENSION_
436         auth command prefix
437
438 2005-02-06  Havoc Pennington  <hp@redhat.com>
439
440         * s/expected/required/ in a couple places for clarity
441
442 2005-02-07  Colin Walters  <walters@verbum.org>
443
444         * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
445         sender or proposed_recipient.
446
447 2005-02-06  Havoc Pennington  <hp@redhat.com>
448
449         * dbus/dbus-message-factory.c (generate_special): more tests
450
451         * dbus/dbus-marshal-validate.c (validate_body_helper): detect
452         array length that exceeds the maximum
453
454 2005-02-05  Havoc Pennington  <hp@redhat.com>
455
456         * dbus/dbus-message-factory.c (generate_special): more test cases,
457         increasing coverage
458
459         * dbus/dbus-marshal-validate.c (validate_body_helper): return the
460         reason why a signature was invalid
461
462         * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
463         skip the length of the string before we look at it in validation
464
465         * dbus/dbus-string-util.c (_dbus_string_test): add tests for
466         equal_substring
467
468         * dbus/dbus-message.c (_dbus_message_loader_new): default
469         max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
470
471 2005-02-05  Havoc Pennington  <hp@redhat.com>
472
473         * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
474         if the signature of a variant was empty
475         (_dbus_validate_signature_with_reason): catch "(a)" (array inside
476         struct with no element type)
477
478         * dbus/dbus-message-factory.c (generate_uint32_changed): add more
479         mangled messages to break things
480
481 2005-02-04  Havoc Pennington  <hp@redhat.com>
482
483         * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
484         g_quark_try_string() so it actually can return 0
485         (dbus_g_proxy_connect_signal): ditto
486
487 2005-02-04  Havoc Pennington  <hp@redhat.com>
488
489         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
490         bogus warning
491         (tristring_from_message): assert cleanly on null path/interface
492         (should not be possible though I decided later)
493         (dbus_g_proxy_dispose): move proxy manager unregistration here
494         (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
495         g_return_if_fail() checks
496
497 2005-02-04  Havoc Pennington  <hp@redhat.com>
498
499         * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
500
501         * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
502         (with some minor changes)
503
504         * doc/dbus-specification.xml: add deprecated attribute to
505         introspection format
506
507 2005-01-31  Havoc Pennington  <hp@redhat.com>
508
509         * glib/dbus-gproxy.c: rewrite how signals work again, this time I
510         think it's sort of right
511
512 2005-01-30  Havoc Pennington  <hp@redhat.com>
513
514         * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
515
516 2005-01-30  Havoc Pennington  <hp@redhat.com>
517
518         * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
519
520         * autogen.sh: change to autotools 1.9
521
522         * glib/dbus-gproxy.c: completely change how signals work
523         (dbus_g_proxy_add_signal): new function to specify signature of a
524         signal
525         (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
526         and g_warning if the incoming message has the wrong signature.
527
528 2005-01-30  Havoc Pennington  <hp@redhat.com>
529
530         * tools/dbus-names-model.c (have_names_notify): fix this
531
532         * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
533         up the string array handling a bit 
534
535 2005-01-30  Havoc Pennington  <hp@redhat.com>
536
537         * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
538         (dbus_g_pending_call_cancel): new function
539
540         * dbus/dbus-glib.h: move GType decls for connection/message here;
541         * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
542         here, just kind of rationalizing how we handle all that
543
544         * tools/dbus-names-model.c: new file for a tree model listing the
545         services on a bus
546
547         * tools/dbus-tree-view.c (model_new): use proper typing on the
548         model rows
549
550 2005-01-30  Havoc Pennington  <hp@redhat.com>
551
552         * glib/dbus-gmain.c: add a custom GSource back that just checks
553         whether the message queue has anything in it; otherwise, there are 
554         cases where we won't see messages in the queue since there was no 
555         IO visible to the glib main loop
556
557         * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
558         increase default message timeout to 25 seconds
559
560 2005-01-30  Havoc Pennington  <hp@redhat.com>
561
562         * test/glib/test-profile.c (no_bus_stop_server): remove the
563         warning about the g_warning that I just fixed
564
565         * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
566         custom source, seems to be a lot easier to understand and work
567         better.
568
569 2005-01-30  Havoc Pennington  <hp@redhat.com>
570
571         I think this main loop thing is conceptually broken, but here are 
572         some band aids. I'll maybe rewrite it in a minute.
573         
574         * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
575         custom GSource, so don't pass it in; confusing
576         (gsource_server_finalize, gsource_connection_finalize): add
577         finalize handlers that remove all the watches.  
578
579 2005-01-30  Havoc Pennington  <hp@redhat.com>
580
581         * glib/dbus-gobject.c (introspect_properties): fix the XML
582         generated
583
584         * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
585         which effectively detects the use of freed messages
586
587         * glib/dbus-gobject.c (handle_introspect): modify and return the
588         reply message instead of the incoming message
589
590         * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
591         gee, maybe it should SEND THE XML instead of just making a string
592         and freeing it again ;-)
593
594         * tools/dbus-print-message.c (print_message): improve printing of
595         messages
596
597         * configure.in: add debug-glib.service to the output
598
599 2005-01-30  Havoc Pennington  <hp@redhat.com>
600
601         dbus-viewer introspected and displayed the bus driver
602         
603         * dbus/dbus-object-tree.c 
604         (object_tree_test_iteration): add tests for a handler registered on "/"
605
606         * dbus/dbus-object-tree.c
607         (_dbus_decompose_path): fix to handle path "/" properly
608         (run_decompose_tests): add tests for path decomposition
609         
610         * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
611         properly
612
613         * glib/dbus-gobject.c (handle_introspect): fix quotes
614
615         * test/glib/run-test.sh: support launching the bus, then running
616         dbus-viewer
617
618         * test/glib/test-service-glib.c (main): put in a trivial gobject
619         subclass and register it on the connection
620
621         * bus/driver.c (bus_driver_handle_introspect): implement
622         introspection of the bus driver service
623
624         * dbus/dbus-protocol.h: add #defines for the XML namespace,
625         identifiers, doctype decl
626
627         * bus/driver.c (bus_driver_handle_get_service_owner): handle
628         attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by 
629         returning the service unchanged.
630         (bus_driver_handle_message): remove old check for reply_serial in
631         method calls, now the message type deals with that
632         (bus_driver_handle_message): handle NULL interface
633
634         * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
635
636         * glib/dbus-gloader-expat.c (description_load_from_string): allow
637         -1 for len
638
639         * tools/dbus-viewer.c: add support for introspecting a service on
640         a bus
641
642         * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
643         (dbus_g_pending_call_unref): add
644
645 2005-01-29  Havoc Pennington  <hp@redhat.com>
646
647         * tools/dbus-tree-view.c: add support for displaying properties.
648         (run dbus-viewer with an introspect xml file as arg, then resize
649         the window so the tree elements show up, not sure what that is)
650
651         * glib/dbus-gobject.c (handle_introspect): return
652         org.freedesktop.Properties and org.freedesktop.Introspectable
653         interfaces when we are introspected.
654
655         * doc/dbus-specification.xml: allow empty interface name when 
656         Get/Set a property
657
658 2005-01-29  Havoc Pennington  <hp@redhat.com>
659
660         * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
661         though it uses glib, it could be extended for any binding in
662         principle
663
664         * glib/dbus-gobject.c (gobject_message_function): change to the
665         new way properties work
666
667         * dbus/dbus-protocol.h: add the new interfaces
668
669         * doc/dbus-specification.xml: document the introspection format,
670         Introspectable interface, and add an org.freedesktop.Properties
671         interface.
672
673         * glib/dbus-gparser.c: add support for a <property> element
674
675         * glib/dbus-gidl.c: add PropertyInfo
676
677         * glib/dbus-gobject.c (handle_introspect): put the outermost
678         <node> outside the signal and property descriptions.
679         (introspect_properties): export properties as <property> rather
680         than as method calls
681
682 2005-01-28  Havoc Pennington  <hp@redhat.com>
683
684         * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
685         related to authentication protocol
686
687 2005-01-28  John (J5) Palmieri  <johnp@redhat.com>
688
689         * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
690                 - BUS_ACTIVATION -> BUS_STARTER
691                 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
692                 - class MessageIter (__init__): Added recursion checking 
693                 so we throw a nice error instead of just disconnecting from the
694                 bus.
695                 (get): Added arg_type parameter for recursion.
696                 Removed the nil type
697                 Added signiture type placeholder (not implemented)
698                 Added struct type placeholder (not implemented)
699                 Added varient type placeholder (not implemented)
700                 Commented out dict type for now     
701                 (get_element_type): renamed from get_array_type
702                 (get_*): changed to use the dbus_message_iter_get_basic API
703                 (get_*_array): removed in favor of recursive get_array method
704                 (get_array): new recursive method which calls get to marshal
705                 the elements of the array
706                 (value_to_dbus_sig): New method returns the corrasponding
707                 dbus signiture to a python value
708                 (append): Comment out dict handling for now
709                 Handle lists with the new recursive API
710                 Comment out None handling for now
711                 (append_nil): removed
712                 (append_*): changed to use dbus_message_iter_append_basic API
713                 (append_*_array): removed in favor of recursive append_array 
714                 method
715                 (__str__): Make it easier to print out recursive iterators
716                 for debugging
717                 - class Message (__str__): moved type inspection to the
718                 MessageIter class' __str__ method
719                 (get_iter): Added an append parameter wich defaults to False
720                 If True use the new API's to create an append iterator
721
722         * python/dbus.py: Update to use new bindings API
723                 - TYPE_ACTIVATION -> TYPE_STARTER
724                 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
725                 - class ActivationBus -> class StarterBus
726                 - class RemoteObject (__call__): get an append iterator
727                 - (_dispatch_dbus_method_call): get an append iterator
728                 - class Object (emit_signal): get an append iterator
729
730         * python/examples/: Fixed up the examples to work with the new API
731                 
732 2005-01-28  Joe Shaw  <joeshaw@novell.com>
733
734         * configure.in: Bump version up to 0.30.
735
736         * HACKING: Add a release item to bump the version number up after 
737         a release.
738
739 2005-01-28  Havoc Pennington  <hp@redhat.com>
740
741         * doc/dbus-specification.xml: update to describe 16-bit types and
742         dict entries
743
744         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
745         assertion
746
747         * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
748         type
749
750         * dbus/dbus-marshal-recursive.c: implement
751
752 2005-01-27  Havoc Pennington  <hp@redhat.com>
753
754         * dbus/dbus-arch-deps.h.in: add 16/32-bit types
755
756         * configure.in: find the right type for 16 and 32 bit ints as well
757         as 64
758
759         * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
760         the 16-bit types so people don't have to stuff them in 32-bit or
761         byte arrays.
762
763 2005-01-27  Havoc Pennington  <hp@redhat.com>
764
765         * dbus/dbus-message.c: byteswap the message if you init an
766         iterator to read/write from it
767         
768         * dbus/dbus-marshal-byteswap.c: new file implementing 
769         _dbus_marshal_byteswap()
770
771         * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
772
773 2005-01-26  Havoc Pennington  <hp@redhat.com>
774         
775         * dbus/dbus-marshal-validate-util.c: break this out (and fix
776         build, apparently - nobody noticed?)
777         
778 2005-01-26  Havoc Pennington  <hp@redhat.com>
779
780         * dbus/dbus-marshal-recursive.h: remove todo comment
781
782 2005-01-25  Joe Shaw  <joeshaw@novell.com>
783
784         * Land the mono binding changes to conform to the new APIs.
785
786         * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
787         DBusType/Dict.cs, and DBusType/Nil.cs from the build.
788
789         * mono/Arguments.cs (GetCodeAsString): Added.  Returns the dbus
790         type code as a string.
791         (InitAppending): Rename dbus_message_append_iter_init() to
792         dbus_message_iter_init_append().
793
794         * mono/BusDriver.cs: Rename ServiceEventHandler to
795         NameOwnerChangedHandler.  Rename GetServiceOwner to GetOwner.
796         Rename ServiceOwnerChanged to NameOwnerChanged.
797
798         * mono/Connection.cs: Rename BaseService to UniqueName, and the
799         underlying C call.
800
801         * mono/Custom.cs: Removed.  The CUSTOM type has been removed.
802
803         * mono/Service.cs: Rename Exists to HasOwner, internally rename
804         dbus_bus_acquire_service() to dbus_bus_request_name().
805
806         * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
807         of Type.UnderlyingSystemType to get the correct element type for
808         the array.
809         (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
810         dbus_message_get_{element|arg}_type() instead of
811         dbus_message_iter_init_array_iterator().
812         (Append): Replace dbus_message_iter_append_array() with
813         dbus_message_iter_open_container() and
814         dbus_message_iter_close_container().
815
816         * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed.  These
817         types have been removed.
818         
819         * mono/DBusType/*.cs: Replace calls of
820         dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
821         but specify the type in the DllImport extern declaration.  Ditto
822         for dbus_message_iter_append_[type]() ->
823         dbus_message_iter_append_basic().
824
825         * mono/example/BusListener.cs: Update for ServiceEventHandler ->
826         NameOwnerChangedHandler.
827
828 2005-01-25  John (J5) Palmieri  <johnp@redhat.com>
829
830         * python/dbus_bindings.pyx.in: Rename of methods and bindings
831                 - get_base_service -> get_unique_name
832                 - bus_get_base_service -> bus_get_unique_name
833                 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
834                 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS 
835                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
836                 - bus_activate_service -> bus_start_service_by_name
837                 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
838                 - bus_acquire_service -> bus_request_name
839                 - dbus_bus_acquire_service -> dbus_bus_request_name
840                 - bus_service_exists -> bus_name_has_owner
841                 - dbus_bus_service_exists -> dbus_bus_name_has_owner
842
843         * python/dbus.py: Rename of methods
844                 - activate_service -> start_service_by_name
845                 - bus_acquire_service -> bus_request_name
846                 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS 
847                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
848
849         
850 2005-01-24  Joe Shaw  <joeshaw@novell.com>
851
852         * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
853         signature for the method that can't be found.
854
855         * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
856         the message has any arguments, we need to call
857         _dbus_type_reader_get_current_type(), not
858         _dbus_type_reader_has_next().
859
860 2005-01-24  Havoc Pennington  <hp@redhat.com>
861
862         * dbus/dbus-message-factory.c: more testing of message validation
863
864         * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
865         header
866
867 2005-01-23  Havoc Pennington  <hp@redhat.com>
868
869         * dbus/dbus-message-factory.c, dbus/dbus-message-util.c: 
870         get this all working, not many tests in the framework yet though
871
872 2005-01-22  Havoc Pennington  <hp@redhat.com>
873
874         * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
875         tutorial, based on work from David Wheeler.
876
877 2005-01-21  Havoc Pennington  <hp@redhat.com>
878
879         * dbus/dbus-bus.c: add more return_if_fail checks
880
881         * dbus/dbus-message.c (load_message): have the "no validation"
882         mode (have to edit the code to toggle the mode for now though)
883
884         * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
885         skips all validation; I want to use this at least for benchmark
886         baseline, I'm not sure if it should be a publicly-available switch.
887
888 2005-01-21  Havoc Pennington  <hp@redhat.com>
889
890         * glib/dbus-gmain.c: don't put the GLib bindings in the same
891         toplevel doxygen group as the low-level API stuff
892
893         * dbus/dbus.h: note that libdbus is the low-level API
894
895 2005-01-20  Havoc Pennington  <hp@redhat.com>
896
897         * update-dbus-docs.sh: script to update docs on the web site, only
898         works for me though. neener.
899
900 2005-01-20  Havoc Pennington  <hp@redhat.com>
901
902         * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
903         code can reveal bugs in it
904
905 2005-01-20  Havoc Pennington  <hp@redhat.com>
906
907         * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
908         select() version, patches from Tor Lillqvist
909
910 2005-01-20  Havoc Pennington  <hp@redhat.com>
911
912         * doc/dbus-tutorial.xml: replace > with &gt;
913
914         * bus/services.c (bus_registry_acquire_service): validate the name
915         and return a better error if it's no good.
916
917         * doc/dbus-specification.xml: note NO_AUTO_START change
918
919         * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
920         from AUTO_START, we're toggling the default
921
922         * bus/dispatch.c: adapt the tests to change of auto-start default
923
924 2005-01-18  Havoc Pennington  <hp@redhat.com>
925
926         * rename dbus-daemon-1 to dbus-daemon throughout
927
928 2005-01-18  Havoc Pennington  <hp@redhat.com>
929
930         * Throughout, grand renaming to strip out the use of "service",
931         just say "name" instead (or "bus name" when ambiguous).  Did not
932         change the internal code of the message bus itself, only the
933         programmer-facing API and messages.
934         
935         * doc/dbus-specification.xml: further update the message bus section
936         
937         * bus/config-parser.c (all_are_equiv): fix bug using freed string
938         in error case
939
940 2005-01-17  Havoc Pennington  <hp@redhat.com>
941
942         * dbus/dbus-types.h: remove 16-bit types since we don't use them
943         ever
944
945         * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
946         "invalid name character" not only non-ASCII
947
948         * doc/dbus-specification.xml: further update spec, message bus 
949         parts are still out-of-date but the marshaling etc. stuff is now
950         accurate-ish
951
952 2005-01-17  Havoc Pennington  <hp@redhat.com>
953
954         * doc/dbus-specification.xml: partially update spec
955
956 2005-01-17  Havoc Pennington  <hp@redhat.com>
957
958         * Throughout, align variant bodies according to the contained
959         type, rather than always to 8. Should save a fair bit of space in
960         message headers.
961         
962         * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
963         fix handling of case where p == end
964
965         * doc/TODO: remove the dbus_bool_t item and variant alignment items
966
967 2005-01-17  Havoc Pennington  <hp@redhat.com>
968
969         * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
970
971         * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
972         of an 8-bit type. Now dbus_bool_t is the type to use whenever you 
973         are marshaling/unmarshaling a boolean.
974
975 2005-01-16  Havoc Pennington  <hp@redhat.com>
976
977         This is about it on what can be disabled/deleted from libdbus
978         easily, back below 150K anyhow. Deeper cuts are more work than 
979         just turning the code off as I've done here.
980         
981         * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
982         signed int convenience funcs
983
984         * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
985         verbose mode
986
987         * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
988         things out of libdbus
989
990         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
991         
992         * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
993         tests-enabled-only, though it should probably be deleted)
994
995         * dbus/dbus-message-util.c: same stuff
996
997         * dbus/dbus-auth-util.c: same stuff
998
999 2005-01-16  Havoc Pennington  <hp@redhat.com>
1000
1001         * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
1002
1003         * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
1004         way for stripping down dbus-userdb.c stuff included in libdbus.
1005         Rename _dbus_parse_uid for consistency.
1006
1007 2005-01-16  Havoc Pennington  <hp@redhat.com>
1008
1009         * dbus/dbus-internals.c (_dbus_real_assert): print the function
1010         name the assertion failed in
1011
1012         * dbus/dbus-internals.h (_dbus_return_if_fail) 
1013         (_dbus_return_val_if_fail): assert that the name of the function
1014         containing the check doesn't start with '_', since we only want to 
1015         use checks on public functions
1016         
1017         * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
1018         checks to assertions
1019
1020         * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
1021         change checks to asserts for private function
1022
1023         * dbus/dbus-message.c (_dbus_message_set_serial): checks
1024         to asserts for private function
1025
1026         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
1027         broken assertion that was breaking make check
1028         (_dbus_type_reader_array_is_empty): remove this rather than fix
1029         it, was only used in assertions
1030
1031 2005-01-16  Havoc Pennington  <hp@redhat.com>
1032
1033         * test/unused-code-gc.py: hacky script to find code that's used
1034         only by the bus (not libdbus) or used only by tests or not used at
1035         all. It has some false alarms, but looks like we can clean up a
1036         lot of size from libdbus.
1037
1038         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
1039         dbus/Makefile.am: initially move 10K of binary size out of libdbus
1040         
1041 2005-01-16  Havoc Pennington  <hp@redhat.com>
1042
1043         * Add and fix docs according to Doxygen warnings throughout
1044         source.
1045         
1046         * dbus/dbus-marshal-recursive.c
1047         (_dbus_type_reader_array_is_empty): change this to just call
1048         array_reader_get_array_len() and make it static
1049
1050         * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
1051         from get_array_type
1052         (dbus_message_iter_init_append): rename from append_iter_init
1053
1054         * dbus/dbus-marshal-recursive.c
1055         (_dbus_type_reader_get_element_type): rename from
1056         _dbus_type_reader_get_array_type
1057
1058 2005-01-15  Havoc Pennington  <hp@redhat.com>
1059
1060         * test/glib/test-profile.c (with_bus_server_filter): fix crash
1061
1062         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
1063         when DBUS_DISABLE_ASSERT
1064         (_dbus_marshal_set_basic): be sure we align for the string length
1065
1066         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
1067         this look faster
1068
1069         * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
1070         inline macro version
1071         (_dbus_string_set_byte): provide inline macro version
1072
1073 2005-01-15  Havoc Pennington  <hp@redhat.com>
1074
1075         * Land the new message args API and type system.
1076
1077         This patch is huge, but the public API change is not 
1078         really large. The set of D-BUS types has changed somewhat, 
1079         and the arg "getters" are more geared toward language bindings;
1080         they don't make a copy, etc.
1081
1082         There are also some known issues. See these emails for details
1083         on this huge patch:
1084         http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
1085         http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
1086         
1087         * dbus/dbus-marshal-*: all the new stuff
1088
1089         * dbus/dbus-message.c: basically rewritten
1090
1091         * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
1092         freed blocks to be all non-nul bytes so using freed memory is less
1093         likely to work right
1094
1095         * dbus/dbus-internals.c (_dbus_test_oom_handling): add
1096         DBUS_FAIL_MALLOC=N environment variable, so you can do
1097         DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
1098         DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
1099         thorough.
1100
1101         * qt/message.cpp: port to the new message args API
1102         (operator<<): use str.utf8() rather than str.unicode()
1103         (pretty sure this is right from the Qt docs?)
1104
1105         * glib/dbus-gvalue.c: port to the new message args API
1106
1107         * bus/dispatch.c, bus/driver.c: port to the new message args API
1108
1109         * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
1110         "locked" flag to TRUE and align_offset to 0; I guess we never
1111         looked at these anyhow, but seems cleaner.
1112
1113         * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
1114         move allocation padding macro to this header; use it to implement
1115         (_DBUS_STRING_STATIC): ability to declare a static string.
1116
1117         * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
1118         change to return TRUE if the interface is not set.
1119
1120         * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
1121         to dbus-marshal-validate.[hc]
1122
1123         * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
1124         dbus-internals.c
1125
1126         * dbus/Makefile.am: cut over from dbus-marshal.[hc]
1127         to dbus-marshal-*.[hc]
1128
1129         * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
1130         function here from dbus-marshal.c
1131
1132 2005-01-12  Joe Shaw  <joeshaw@novell.com>
1133
1134         * NEWS: Update for 0.23.
1135
1136         * configure.in: Release 0.23.
1137
1138 2005-01-12  Joe Shaw  <joeshaw@novell.com>
1139
1140         * mono/Makefile.am, mono/example/Makefile.am: Always build the 
1141         dbus DLL with --debug.  Clean up after the .mdb files this leaves
1142         behind.
1143
1144         * mono/doc/Makefile.am: Need to uninstall the docs on "make
1145         uninstall"
1146
1147         * mono/Arguments.cs (GetDBusTypeConstructor): If the type
1148         is an enum, get the enum's underlying type.  Another mono
1149         1.1.3 fix.
1150
1151 2005-01-11  Joe Shaw  <joeshaw@novell.com>
1152
1153         Patch from Sjoerd Simons <sjoerd@luon.net>
1154
1155         * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
1156         DESTDIR.  It breaks stuff.
1157
1158 2005-01-11  Joe Shaw  <joeshaw@novell.com>
1159
1160         Patch from Tambet Ingo <tambet@ximian.com>
1161
1162         * mono/DBusType/Array.cs (Get): Get the underlying element type by
1163         calling type.GetElementType().  The code previously depended on
1164         broken Mono behavior, which was fixed in Mono 1.1.3.
1165
1166         * mono/DBusType/Dict.cs (constructor): Fix the parameters for
1167         Activator.CreateInstance() so that the class's constructor is
1168         called with the right parameters.
1169
1170 2005-01-11  Joe Shaw  <joeshaw@novell.com>
1171
1172         Patch from Timo Teräs <ext-timo.teras@nokia.com>
1173
1174         * dbus/dbus-connection.c
1175         (_dbus_connection_queue_received_message_link): Call
1176         _dbus_connection_remove_timeout() instead of the _locked()
1177         variant, since it's always called from
1178         _dbus_connection_handle_watch(), which handles the locking.
1179         Removed the _locked() variant since it's no longer used.
1180
1181 2005-01-03  Havoc Pennington  <hp@redhat.com>
1182
1183         * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
1184         return
1185         
1186 2004-12-26  Havoc Pennington  <hp@redhat.com>
1187
1188         * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
1189
1190 2005-01-03  Havoc Pennington  <hp@redhat.com>
1191
1192         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
1193         floating point
1194
1195         * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
1196
1197 2005-01-02  Havoc Pennington  <hp@redhat.com>
1198
1199         * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
1200
1201 2005-01-01  Havoc Pennington  <hp@redhat.com>
1202
1203         * configure.in: add -Wfloat-equal
1204
1205 2005-01-01  Havoc Pennington  <hp@redhat.com>
1206
1207         * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro, 
1208         for a variety of reasons '==' doesn't do this.
1209
1210 2004-12-31  Havoc Pennington  <hp@redhat.com>
1211
1212         * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
1213         I keep wishing I had
1214
1215 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
1216
1217         * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
1218
1219 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
1220
1221         * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
1222         and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
1223         dbus-protocol.h.  Because they are defines and not enums they are not
1224         autogenerated.
1225
1226 2004-12-26  John (J5) Palmieri  <johnp@redhat.com>
1227
1228         * python/dbus_bindings.pyx.in (bus_activate_service): Bind
1229         dbus_bus_activate_service
1230
1231         * python/dbus.py (Bus.activate_service): activate a service on the
1232         bus.
1233
1234 2004-12-24  Havoc Pennington  <hp@redhat.com>
1235
1236         * test/decode-gcov.c: change to use .gcno and .gcda files, but the
1237         file format has also changed and I haven't adapted to that yet
1238         
1239         * Makefile.am: load .gcno files from latest gcc
1240
1241 2004-12-23  John (J5) Palmieri  <johnp@redhat.com>
1242         * Patch from Rob Taylor <robtaylor@fastmail.fm>
1243
1244         * python/dbus_bindings.pyx.in (bus_get_unix_user): New
1245         lowlevel binding
1246
1247         * python/dbus.py (get_unix_user): Added binding to 
1248         call dbus_bindings.bus_get_unix_user
1249
1250         * python/extract.py: Modified the proto_pat regex to
1251         handle unsigned long
1252
1253 2004-12-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1254
1255         * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
1256         better POSIX compliance.
1257
1258 2004-12-19  Havoc Pennington  <hp@redhat.com>
1259
1260         * dbus/dbus-string.c (_dbus_string_insert_4_aligned) 
1261         (_dbus_string_insert_8_aligned): new functions
1262
1263         * dbus/dbus-string.c (_dbus_string_alloc_space): new function
1264
1265 2004-12-18  Havoc Pennington  <hp@redhat.com>
1266
1267         * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
1268         macro
1269
1270         * dbus/dbus-message.c: fix a comment, and add a still-unused
1271         not-implemented function
1272
1273         * dbus/dbus-marshal.h: fix comment
1274
1275         * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
1276
1277 2004-12-17  Joe Shaw  <joeshaw@novell.com>
1278
1279         * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
1280         mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
1281         mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
1282         Type.UnderlyingSystemType to get the actual system type
1283         underneath.  This code previously depended on the broken Mono
1284         behavior, which was fixed in 1.1.3.
1285
1286 2004-11-27  Havoc Pennington  <hp@redhat.com>
1287
1288         * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
1289         are disabled
1290         (_dbus_string_get_const_data): inline when asserts are disabled
1291
1292         * dbus/dbus-message.c: record the _dbus_current_generation of
1293         creation so we can complain if dbus_shutdown() is used improperly.
1294         Do this only if checks are enabled.
1295
1296         * dbus/dbus-connection.c: ditto
1297         
1298 2004-11-26  Havoc Pennington  <hp@redhat.com>
1299
1300         * test/glib/test-profile.c: add with_bus mode to profile echoes
1301         that go through the bus.
1302
1303         * test/glib/run-test.sh: add ability to run test-profile
1304
1305         * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
1306         config file reload.
1307
1308 2004-11-26  Havoc Pennington  <hp@redhat.com>
1309
1310         * test/glib/test-profile.c: clean up how the fake_malloc_overhead
1311         thing was implemented
1312
1313 2004-11-26  Havoc Pennington  <hp@redhat.com>
1314
1315         * test/glib/test-profile.c: tweak a bit, add support for some
1316         made-up minimal malloc overhead with plain sockets, since in 
1317         real life some sort of buffers are unavoidable thus we could 
1318         count them in the theoretical best case
1319
1320 2004-11-26  Havoc Pennington  <hp@redhat.com>
1321
1322         * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
1323         where I was trying to cache one too many messages
1324
1325 2004-11-26  Havoc Pennington  <hp@redhat.com>
1326
1327         * dbus/dbus-message.c: reimplement message cache as an array which 
1328         makes the cache about twice as fast and saves maybe 1.5% overall
1329
1330 2004-11-26  Havoc Pennington  <hp@redhat.com>
1331
1332         * dbus/dbus-threads.c (init_global_locks): forgot to put the
1333         message cache lock here
1334
1335 2004-11-26  Havoc Pennington  <hp@redhat.com>
1336
1337         * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
1338         the "char byte_order" next to each other to save 4 bytes
1339         (dbus_message_new_empty_header): reduce preallocation, since the
1340         message cache should achieve a similar effect
1341         (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
1342         message cache that keeps a few DBusMessage around in a pool,
1343         another 8% speedup or so.
1344
1345         * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
1346
1347 2004-11-25  Havoc Pennington  <hp@redhat.com>
1348
1349         * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
1350         to write, without reading or blocking, try it before the poll()
1351         and skip the poll() if nothing remains to write. This is about a
1352         3% speedup in the echo client/server
1353
1354 2004-11-25  Havoc Pennington  <hp@redhat.com>
1355
1356         The primary change here is to always write() once before adding
1357         the write watch, which gives us about a 10% performance increase.
1358         
1359         * dbus/dbus-transport-unix.c: a number of modifications to cope
1360         with removing messages_pending
1361         (check_write_watch): properly handle
1362         DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
1363         messages_pending stuff
1364         (check_read_watch): properly handle WAITING_FOR_MEMORY and
1365         AUTHENTICATED cases
1366         (unix_handle_watch): after writing, see if the write watch can be
1367         removed
1368         (unix_do_iteration): assert that write_watch/read_watch are
1369         non-NULL rather than testing that they aren't, since they 
1370         aren't allowed to be NULL. check_write_watch() at the end so 
1371         we add the watch if we did not finish writing (e.g. got EAGAIN)
1372
1373         * dbus/dbus-transport-protected.h: remove messages_pending call,
1374         since it resulted in too much inefficient watch adding/removing; 
1375         instead we now require that the transport user does an iteration 
1376         after queueing outgoing messages, and after trying the first
1377         write() we add a write watch if we got EAGAIN or exceeded our 
1378         max bytes to write per iteration setting
1379
1380         * dbus/dbus-string.c (_dbus_string_validate_signature): add this
1381         function
1382
1383         * dbus/dbus-server-unix.c (unix_finalize): the socket name was
1384         freed and then accessed, valgrind flagged this bug, fix it
1385
1386         * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
1387         as the last valid field plus 1, where really it is equal to the
1388         last valid field. Corrects some message corruption issues.
1389
1390         * dbus/dbus-mainloop.c: verbosity changes
1391
1392         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
1393         instead of aborting in one of the test codepaths
1394
1395         * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
1396         caused not printing the pid ever again if a verbose was missing
1397         the newline at the end
1398         (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
1399
1400         * dbus/dbus-connection.c: verbosity changes; 
1401         (dbus_connection_has_messages_to_send): new function
1402         (_dbus_connection_message_sent): no longer call transport->messages_pending
1403         (_dbus_connection_send_preallocated_unlocked): do one iteration to
1404         try to write() immediately, so we can avoid the write watch. This
1405         is the core purpose of this patchset
1406         (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
1407         dump the outgoing message queue, so nobody will get confused
1408         trying to send them or thinking stuff is pending to be sent
1409
1410         * bus/test.c: verbosity changes
1411
1412         * bus/driver.c: verbosity/assertion changes
1413
1414         * bus/dispatch.c: a bunch of little tweaks to get it working again
1415         because this patchset changes when/where you need to block.
1416
1417 2004-11-23  Havoc Pennington  <hp@redhat.com>
1418
1419         * test/glib/test-profile.c: modify to accept a plain_sockets
1420         argument in which case it will bench plain sockets instead of
1421         libdbus, for comparison purposes.
1422
1423 2004-11-22  Havoc Pennington  <hp@redhat.com>
1424
1425         * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
1426         threads for more time, so sysprof can get a grip on it.
1427
1428         * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
1429         pointless variable
1430
1431 2004-11-13  Havoc Pennington  <hp@redhat.com>
1432
1433         * test/glib/test-profile.c: fix this thing up a bit
1434
1435         * dbus/dbus-message.c (dbus_message_new_empty_header): increase
1436         preallocation sizes by a fair bit; not sure if this will be an
1437         overall performance win or not, but it does reduce reallocs.
1438
1439         * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
1440         the test hack that forced constant realloc if asserts are
1441         disabled, so we can profile sanely. Sprinkle in some
1442         _DBUS_UNLIKELY() which are probably pointless, but before I
1443         noticed the real performance problem I put them in.
1444         (_dbus_string_validate_utf8): micro-optimize this thing a little
1445         bit, though callgrind says it didn't help; then special-case
1446         ascii, which did help a lot; then be sure we detect nul bytes as
1447         invalid, which is a bugfix.
1448         (align_length_then_lengthen): add some more _DBUS_UNLIKELY
1449         superstition; use memset to nul the padding instead of a manual
1450         loop.
1451         (_dbus_string_get_length): inline this as a
1452         macro; it showed up in the profile because it's used for loop
1453         tests and so forth
1454
1455 2004-11-10  Colin Walters  <walters@verbum.org>
1456
1457         * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
1458         for extra paranoia.
1459
1460 2004-11-09  Colin Walters  <walters@verbum.org>
1461
1462         * dbus/dbus-string.c (_dbus_string_get_length): New
1463         function, writes DBusString to C buffer.
1464
1465         * dbus/dbus-string.h: Prototype it.
1466
1467         * dbus/dbus-message.c (dbus_message_type_to_string): New
1468         function, converts message type into C string.
1469
1470         * dbus/dbus-message.h: Prototype it.
1471
1472         * bus/selinux.c (bus_selinux_check): Take source pid,
1473         target pid, and audit data.  Pass audit data to
1474         avc_has_perm.
1475         (log_audit_callback): New function, appends extra
1476         audit information.
1477         (bus_selinux_allows_acquire_service): Also take
1478         service name, add it to audit data.
1479         (bus_selinux_allows_send): Also take message
1480         type, interface, method member, error name,
1481         and destination, and add them to audit data.
1482         (log_cb): Initialize func_audit.
1483         
1484         * bus/selinux.h (bus_selinux_allows_acquire_service)
1485         (bus_selinux_allows_send): Update prototypes 
1486
1487         * bus/services.c (bus_registry_acquire_service): Pass
1488         service name to bus_selinux_allows_acquire_service.
1489
1490         * bus/bus.c (bus_context_check_security_policy): Pass
1491         additional audit data.  Move assignment of dest
1492         to its own line.
1493
1494 2004-11-07  Colin Walters  <walters@verbum.org>
1495
1496         * dbus/dbus-transport-unix.c (do_authentication): Always
1497         initialize auth_completed.
1498         
1499 2004-11-07  Colin Walters  <walters@verbum.org>
1500
1501         * bus/bus.c (load_config): Break into three
1502         separate functions: process_config_first_time_only,
1503         process_config_every_time, and process_config_postinit.
1504         (process_config_every_time): Move call of
1505         bus_registry_set_service_context_table into
1506         process_config_postinit.
1507         (process_config_postinit): New function, does
1508         any processing that needs to happen late
1509         in initialization (and also on reload).
1510         (bus_context_new): Instead of calling load_config,
1511         open config parser here and call process_config_first_time_only
1512         and process_config_every_time directly.  Later, after
1513         we have forked but before changing UID,
1514         invoke bus_selinux_full_init, and then call
1515         process_config_postinit.
1516         (bus_context_reload_config): As in bus_context_new,
1517         load parse file inside here, and call process_config_every_time
1518         and process_config_postinit.
1519
1520         * bus/services.h, bus/services.c
1521         (bus_registry_set_service_context_table): Rename
1522         from bus_registry_set_sid_table.  Take string hash from config
1523         parser, and convert them here into SIDs.
1524
1525         * bus/config-parser.c (struct BusConfigParser): Have
1526         config parser only store a mapping of service->context
1527         string.
1528         (merge_service_context_hash): New function.
1529         (merge_included): Merge context string hashes instead
1530         of using bus_selinux_id_table_union.
1531         (bus_config_parser_new): Don't use bus_selinux_id_table_new;
1532         simply create a new string hash.
1533         (bus_config_parser_unref): Unref it.
1534         (start_selinux_child): Simply insert strings into hash,
1535         don't call bus_selinux_id_table_copy_over.
1536
1537         * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
1538         (bus_selinux_id_table_copy_over): Delete.
1539
1540 2004-11-03  Colin Walters  <walters@verbum.org>
1541
1542         * bus/selinux.c (bus_selinux_pre_init): Kill some unused
1543         variables.
1544         
1545 2004-11-03  Colin Walters  <walters@verbum.org>
1546
1547         * bus/test-main.c (test_pre_hook): Fix test logic,
1548         thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
1549
1550 2004-11-02  Colin Walters  <walters@redhat.com>
1551
1552         * bus/selinux.c (bus_selinux_init): Split into two functions,
1553         bus_selinux_pre_init and bus_selinux_post_init.
1554         (bus_selinux_pre_init): Just determine whether SELinux is
1555         enabled.
1556         (bus_selinux_post_init): Do everything else.
1557
1558         * bus/main.c (main): Call bus_selinux_pre_init before parsing
1559         config file, and bus_selinux_post_init after.  This ensures that
1560         we don't lose the policyreload notification thread that
1561         bus_selinux_init created before forking previously.
1562         
1563         * bus/test-main.c (test_pre_hook): Update for split.
1564
1565 2004-10-31  Owen Fraser-Green  <owen@discobabe.net>
1566
1567         Patch from Johan Fischer <linux@fischaz.com>
1568         
1569         * mono/doc/Makefile.am (install-data-local): Added directory
1570         install for DESTDIR
1571
1572 2004-10-29  Colin Walters  <walters@redhat.com>
1573
1574         * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
1575         parameter for fd to write pid to.       
1576
1577         * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
1578         
1579         * bus/bus.c (bus_context_new): Pass print_pid_fd
1580         to _dbus_become_daemon (bug #1720)
1581
1582 2004-10-29  Colin Walters  <walters@redhat.com>
1583
1584         Patch from Ed Catmur <ed@catmur.co.uk>
1585
1586         * mono/doc/Makefile.am (install-data-local): Handle
1587         DESTDIR.
1588
1589 2004-10-29  Colin Walters  <walters@redhat.com>
1590
1591         * bus/.cvsignore, qt/.cvsignore: Update.
1592
1593 2004-10-29  Colin Walters  <walters@redhat.com>
1594
1595         Patch from Kristof Vansant <de_lupus@pandora.be>
1596
1597         * configure.in: Detect Slackware.
1598         * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
1599         * bus/rc.messagebus.in: New file.
1600
1601 2004-10-29  Colin Walters  <walters@redhat.com>
1602
1603         * tools/dbus-monitor.c (filter_func): Return
1604         DBUS_HANDLER_RESULT_HANDLED in filter function
1605         for now.  See:
1606         http://freedesktop.org/pipermail/dbus/2004-August/001433.html
1607
1608 2004-10-29  Colin Walters  <walters@redhat.com>
1609
1610         Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
1611
1612         * bus/services.c (bus_registry_acquire_service): 
1613         Correctly retrieve service name from DBusString
1614         for printing.
1615
1616 2004-10-29  Colin Walters  <walters@redhat.com>
1617
1618         * dbus/dbus-glib.h: Update documentation to not
1619         refer to internal APIs.
1620
1621 2004-10-27  Joe Shaw  <joeshaw@novell.com>
1622
1623         * mono/Arguments.cs (GetDBusTypeConstructor):
1624         type.UnderlyingSystemType will return "System.Byte" if you do it
1625         on "byte[]", which is not what we want.  So check the type.IsArray
1626         property and use System.Array instead.
1627
1628 2004-10-25  John (J5) Palmieri  <johnp@redhat.com>
1629
1630         * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
1631         the DBusUserInfo structure since this is passed into the function.
1632         This would cause a double free when the function that allocated
1633         the structure would try to free it when an error occured.
1634
1635         * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
1636         use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
1637         for service activation to avoid 32bit/64bit parallel install issues
1638
1639 2004-10-21  Colin Walters  <walters@verbum.org>
1640
1641         * AUTHORS: Fix my email address, the @gnu.org one
1642         has been bouncing for some time.  Also add J5.
1643         
1644 2004-10-21  Colin Walters  <walters@verbum.org>
1645
1646         * dbus/dbus-transport-unix.c (do_authentication): Return
1647         authentication status to callers.
1648         (unix_handle_watch): If we completed authentication this round,
1649         don't do another read.  Instead wait until the next iteration,
1650         after we've read any pending data in the auth buffer.
1651         (unix_do_iteration): Ditto.
1652         (unix_handle_watch): Updated for new do_authentication prototype.
1653
1654 2004-10-18  Colin Walters  <walters@verbum.org>
1655
1656         * bus/selinux.c (bus_selinux_enabled): Handle
1657         --disable-selinux case.
1658         
1659 2004-10-18  Colin Walters  <walters@verbum.org>
1660
1661         * bus/selinux.h: Add bus_selinux_enabled.
1662         
1663         * bus/selinux.c (bus_selinux_enabled): Implement it.
1664         
1665         * bus/config-parser.c (struct include): Add
1666         if_selinux_enabled member.
1667         (start_busconfig_child): Parse if_selinux_enabled
1668         attribute for include.
1669         (bus_config_parser_content): Handle it.
1670
1671         * bus/session.conf.in, bus/system.conf.in: Add
1672         inclusion of context mapping to default config files;
1673         conditional on SELinux being enabled.
1674         
1675         * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
1676         
1677         * test/data/invalid-config-files/badselinux-1.conf, 
1678         test/data/invalid-config-files/badselinux-2.conf:
1679         Test files for bad syntax.
1680         
1681 2004-10-17  Colin Walters  <walters@verbum.org>
1682
1683         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
1684         (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
1685         format specifier mismatches.
1686
1687 2004-10-07  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1688
1689         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
1690         format string.
1691
1692         * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
1693         pointer (bug #1540, Leonardo Boiko).
1694
1695 2004-09-28  Jon Trowbridge  <trow@ximian.com>
1696
1697         * mono/BusDriver.cs: Changed BusDriver struct to remove
1698         the ServiceCreated and ServiceDeleted events and replace them
1699         with the new ServiceOwnerChanged event.
1700
1701         * mono/example/BusListener.cs: Added a new example program,
1702         which listens for and reports any ServiceOwnerChanged events
1703         on the bus driver.
1704
1705         * mono/example/Makefile.am (DESTDIR): Build changes for the
1706         new BusListener.cs example.
1707
1708 2004-09-27  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1709
1710         * bus/signals.c (bus_match_rule_parse): validate the components of
1711         match rules (bug #1439).
1712
1713         * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
1714
1715 2004-09-24  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1716
1717         * doc/dbus-specification.xml: document ServiceOwnerChanged
1718         signal.
1719         
1720         * bus/driver.c, bus/driver.h, bus/services.c: Use
1721         ServiceOwnerChanged signal instead of ServiceCreated and
1722         ServiceDeleted.
1723         
1724         * bus/dispatch.c: update testcase for the new signal.
1725
1726 2004-09-20  Jon Trowbridge  <trow@ximian.com>
1727
1728         Patch from Nat Friedman <nat@novell.com>
1729
1730         * mono/Makefile.am: A number of small build fixes to allow "make
1731         distcheck" to succeed.
1732
1733         * mono/example/Makefile.am: "make distcheck" fixes.
1734
1735         * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
1736         key in @srcdir@.
1737
1738         * test/Makefile.am: "make distcheck" fixes.
1739
1740 2004-09-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1741
1742         * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
1743
1744         * doc/busconfig.dtd: update the DTD for the at_console attribute.
1745
1746         * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
1747         messages after the first one (bug #1389).
1748         
1749         * bus/dispatch.c (check_double_hello_message): add a test case for
1750         the double hello message bug.
1751         (check_existent_service_activation): fix check of spawning error.
1752         
1753 2004-09-16  David Zeuthen  <david@fubar.dk>
1754
1755         * python/dbus_bindings.pyx.in: Add support for int64 and uint64
1756
1757 2004-09-12  David Zeuthen  <david@fubar.dk>
1758
1759         Patch from Kay Sievers <kay.sievers@vrfy.org>
1760
1761         * bus/bus.c (bus_context_new):
1762         * bus/bus.h:
1763         * bus/main.c (usage)
1764         (main):
1765         Add commandline option --nofork to override configuration file
1766         setting.
1767
1768 2004-09-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1769
1770         * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
1771         compilers don't like it (bug #974).
1772
1773 2004-09-04  Harald Fernengel  <harry@kdevelop.org>
1774
1775         * qt/connection.*: Applied patch by Jérôme Lodewyck
1776         <lodewyck@clipper.ens.fr> to integrate an existing
1777         connection into the Qt eventloop
1778
1779 2004-08-30  Jon Trowbridge  <trow@ximian.com>
1780
1781         * mono/BusDriver.cs: Added.  This is a class for interacting with
1782         the org.freedesktop.DBus service.
1783
1784         * mono/Message.cs: Added a mechanism to expose the message that is
1785         currently being dispatched via the static Message.Current
1786         property.  Added Message.Sender and Message.Destination
1787         properties.
1788
1789         * mono/Handler.cs: Expose the dispatched message via
1790         Message.Current when handling method calls.
1791
1792         * mono/Service.cs: Expose the dispatched message via
1793         Message.Current when handling signal emissions.
1794         
1795         * mono/Connection.cs: Bind dbus_bus_get_base_service via the
1796         Connection.BaseService property.
1797
1798 2004-08-28  Havoc Pennington  <hp@redhat.com>
1799
1800         * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
1801
1802         More fixes from Steve Grubb
1803         
1804         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
1805         (_dbus_listen_tcp_socket): fix fd leak
1806
1807         * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
1808         EINTR to a bit lower in the code
1809
1810 2004-08-26  Jon Trowbridge  <trow@ximian.com>
1811
1812         * bus/driver.c (bus_driver_handle_service_exists): Respond with
1813         TRUE if we are inquiring about the existence of the built-in
1814         org.freedesktop.DBus service.
1815
1816 2004-08-25  John Palmieri  <johnp@redhat.com>
1817         * bus/config-parser.c:
1818         (struct PolicyType): Add POLICY_CONSOLE
1819         (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
1820         (start_busconfig_child): Sets up console element when
1821         <policy at_console=""> is encountered in a policy file
1822         (append_rule_from_element): Convert console elements to console
1823         rules.
1824
1825         * bus/policy.c: 
1826         (bus_policy_create_client_policy): Add console rules to the client
1827         policy based on if the client is at the console
1828         (bus_policy_append_console_rule): New function for adding a
1829         console rule to a policy
1830         (bus_policy_merge): Handle console rule merging
1831
1832         * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
1833         where we check for console user files
1834         
1835         * dbus/dbus-sysdeps.c:
1836         (_dbus_file_exists): New function which checks if the given
1837         file exists
1838         (_dbus_user_at_console): New function which does the system
1839         specific process of checking if the user is at the console
1840
1841         * dbus/dbus-userdb.c:
1842         (_dbus_is_console_user): New function converts a UID to user name
1843         and then calls the system specific _dbus_user_at_console to 
1844         see if the user is at the console and therefor a console user
1845
1846 2004-08-25  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1847
1848         * bus/config-parser.c (set_limit):
1849         * bus/dbus-daemon-1.1.in:
1850         * test/data/valid-config-files/many-rules.conf: set the
1851         max_match_rules_per_connection limt from the config file. 
1852
1853         * doc/busconfig.dtd: update the DTD.
1854
1855         * bus/driver.c: remove some unused variables.
1856
1857 2004-08-24  Mikael Hallendal  <micke@imendio.com>
1858
1859         * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since 
1860         it's been replaced by dbus_g_bus_get
1861
1862 2004-08-23  Colin Walters  <walters@redhat.com>
1863
1864         Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1865
1866         * bus/selinux.h: Prototype bus_selinux_get_policy_root.
1867
1868         * bus/selinux.c: Create a thread for policy reload notification.
1869         (bus_selinux_get_policy_root): Implement.
1870
1871         * bus/config-parser.c (start_busconfig_child)
1872         (bus_config_parser_content): Support SELinux-root relative
1873         inclusion.
1874
1875         * configure.in <HAVE_SELINUX>: Add -lpthread.
1876         
1877         * bus/test-main.c (test_pre_hook, test_post_hook): New.
1878         (test_post_hook): Move memory checking into here.
1879         (test_pre_hook, test_post_hook): Move SELinux checks in
1880         here, but conditional on a DBUS_TEST_SELINUX environment
1881         variable.  Unfortunately we can't run the SELinux checks
1882         as a normal user, since they won't have any permissions
1883         for /selinux.  So this will have to be tested manually
1884         for now, until we have virtualization for most of
1885         libselinux.
1886         
1887 2004-08-23  Havoc Pennington  <hp@redhat.com>
1888
1889         * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
1890         drop supplementary groups, suggested by Steve Grubb
1891
1892 2004-08-20  Colin Walters  <walters@redhat.com>
1893
1894         * bus/config-parser.c (start_busconfig_child): Remove some unused
1895         variables.
1896         
1897         * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
1898         warning.
1899
1900 2004-08-17  Joe Shaw  <joeshaw@novell.com>
1901
1902         * configure.in: If --enable-mono is passed in, if we can't find
1903         mono error out.
1904
1905         * mono/Makefile.am: Use /gacutil to install assemblies into the
1906         GAC and not /root.
1907
1908 2004-08-12  Havoc Pennington  <hp@redhat.com>
1909
1910         * NEWS: update for 0.22
1911
1912         * configure.in: release 0.22
1913
1914 2004-08-11  Colin Walters  <walters@redhat.com>
1915
1916         * tools/dbus-send.c (main, usage): Add --reply-timeout
1917         argument.
1918
1919 2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1920
1921         * bus/bus.c (process_config_first_time_only): get rid of an unused
1922         DBusError that was causing a memoy leak (bug #989).
1923
1924         * dbus/dbus-keyring.c, dbus/dbus-message.c:
1925         fix compilation on Solaris/Forte C (bug #974)
1926
1927         * bus/main.c (main): plug two minuscule memleaks.
1928
1929 2004-08-10  Havoc Pennington  <hp@redhat.com>
1930
1931         * doc/dbus-tutorial.xml: add some more info on GLib bindings
1932
1933 2004-08-09  Havoc Pennington  <hp@redhat.com>
1934
1935         * COPYING: switch to Academic Free License version 2.1 instead of
1936         2.0, to resolve complaints about patent termination clause.
1937
1938 2004-07-31  John (J5) Palmieri  <johnp@redhat.com>
1939
1940         * README: added documentation for the --enable-python 
1941         configure switch.
1942
1943 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1944
1945         * bus/config-parser.c (bus_config_parser_new): fix an invalid
1946         _unref in the SELinux support.
1947
1948         * doc/busconfig.dtd: update DTD for SELinux support.
1949
1950         * bus/config-loader-libxml.c: fix error handler and parser
1951         initialisation/cleanup. OOM test now works with libxml2 HEAD.
1952
1953         * configure.in: remove the warning about libxml2.
1954
1955         * dbus/dbus-bus.c: silence doxygen warning.
1956
1957 2004-07-31  Colin Walters  <walters@redhat.com>
1958
1959         * configure.in: Move #error in SELinux check to its own line.
1960
1961 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1962
1963         * dbus/dbus-internals.h (_DBUS_SET_OOM):
1964         * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
1965         dbus_error_set.
1966
1967         * bus/dispatch.c (check_send_exit_to_service): fix the test case,
1968         broken by the change in the _SET_OOM macros.
1969
1970 2004-07-31  Colin Walters  <walters@redhat.com>
1971
1972         * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
1973         BUS_SET_OOM.
1974
1975 2004-07-31  Colin Walters  <walters@redhat.com>
1976
1977         * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
1978         to correctly detect DBUS__ACQUIRE_SVC.  Also add an
1979         AC_MSG_CHECKING.
1980
1981 2004-07-24  Havoc Pennington  <hp@redhat.com>
1982
1983         SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
1984
1985         * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
1986         functionality
1987
1988         * configure.in: add --enable-selinux
1989         
1990         * bus/policy.c (bus_policy_merge): add FIXME to a comment
1991
1992         * bus/main.c (main): initialize and shut down selinux
1993
1994         * bus/connection.c: store SELinux ID on each connection, to avoid 
1995         repeated getting of the string context and converting it into 
1996         an ID
1997
1998         * bus/bus.c (bus_context_get_policy): new accessor, though it
1999         isn't used
2000         (bus_context_check_security_policy): check whether the security
2001         context of sender connection can send to the security context of
2002         recipient connection
2003
2004         * bus/config-parser.c: add parsing for <selinux> and <associate>
2005         
2006         * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
2007         implement dbus_connection_get_unix_fd()
2008
2009         * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
2010         function, used by the selinux stuff
2011         
2012 2004-07-29  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2013
2014         * bus/config-loader-libxml.c: complete the implementation of
2015         libxml backend for config file loader. Doesn't work with full OOM
2016         test yet. 
2017         
2018         * configure.in: change error when selecting libxml into a warning.
2019         
2020         * test/data/invalid-config-files: add two non-well-formed XML
2021         files. 
2022         
2023         * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
2024         
2025         * dbus/dbus-transport-unix.c (unix_handle_watch): do not
2026         disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
2027         be necessary to read all the buffer. (bug #894)
2028
2029         * bus/activation.c (bus_activation_activate_service): fix a
2030         potential assertion failure (bug #896). Small optimization in the
2031         case of auto-activation messages.
2032
2033         * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
2034         add test case for byte-through-vararg bug (#901). patch by Kimmo
2035         Hämäläinen. 
2036
2037 2004-07-28  Anders Carlsson  <andersca@gnome.org>
2038
2039         * python/dbus.py:
2040         * python/dbus_bindings.pyx.in:
2041         Add dbus.init_gthreads (), allow emit_signal to pass
2042         arguments to the signal.
2043         
2044 2004-07-24  Havoc Pennington  <hp@redhat.com>
2045
2046         * AUTHORS: add some people, not really comprehensively, let me
2047         know if I missed you
2048
2049 2004-07-24  Havoc Pennington  <hp@redhat.com>
2050
2051         * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
2052         Owen
2053
2054         * test/Makefile.am (DIST_SUBDIRS): here also
2055
2056 2004-07-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2057
2058         * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
2059         breaking build on Solaris, reported by Farhad Saberi on the ML.
2060
2061         * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
2062         va_arg invocation to account for integer promotion in the case of
2063         DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
2064
2065         * bus/services.c (bus_service_remove_owner): fix bug #902, use
2066         _dbus_list_get_first_link, not _dbus_list_get_first.
2067
2068         * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
2069
2070         * dbus/dbus-object-tree.c (free_subtree_recurse): always null
2071         handler functions so that the asserts in _dbus_object_subtree_unref
2072         do not fail.
2073
2074         * dbus/dbus-transport-unix.c (do_reading):
2075         _dbus_transport_queue_messages return value is of type
2076         dbus_bool_t, not DBusDispatchStatus.
2077         
2078 2004-07-19  David Zeuthen  <david@fubar.dk>
2079
2080         * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
2081
2082         * bus/dispatch.c:
2083         (check_get_connection_unix_user): Debug says GetProperty; but the
2084         method is called GetConnectionUnixUser
2085         (check_get_connection_unix_process_id): New function
2086         (bus_dispatch_test): Actually call check_get_connection_unix_user();
2087         also call check_get_connection_unix_process_id()
2088         
2089         * bus/driver.c:
2090         (bus_driver_handle_get_connection_unix_process_id): New function,
2091         handles GetConnectionUnixProcessID on the org.freedesktop.DBus
2092         interface
2093         
2094         * dbus/dbus-auth.c:
2095         (handle_server_data_external_mech): Set pid from the credentials
2096         obtained from the socket
2097         
2098         * dbus/dbus-connection.c:
2099         (dbus_connection_get_unix_process_id): New function
2100         
2101         * dbus/dbus-connection.h: 
2102         Add prototype for dbus_connection_get_unix_process_id
2103         
2104         * dbus/dbus-transport.c:
2105         (_dbus_transport_get_unix_process_id): New function
2106         
2107         * dbus/dbus-transport.h:
2108         Add prototype for _dbus_transport_get_unix_process_id
2109         
2110 2004-07-19  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2111
2112         * dbus/dbus-message.c: Message counter fix, patch by Christian
2113         Hammond <chipx86@gnupdate.org>
2114
2115 2004-07-18  Seth Nickell  <seth@gnome.org>
2116
2117         * python/dbus.py:
2118         * python/dbus_bindings.pyx.in:
2119         * python/tests/test-client.py:
2120
2121         Add dbus.ByteArray and dbus_bindings.ByteArray
2122         types so that byte streams can be passed back.
2123
2124         Give jdahlin the heaps of credit that are so
2125         rightfully his.
2126         
2127 2004-07-12  Seth Nickell  <seth@gnome.org>
2128
2129         * python/dbus.py:
2130
2131         Add message argument to the default object_method_handler
2132         function.
2133         
2134         * python/dbus_bindings.pyx.in:
2135
2136         Automatically return NIL when passed an empty list
2137         (we can't pass back a list since lists are typed
2138         and we don't have any idea what type the the client
2139         intended the list to be... :-( )
2140         
2141 2004-07-10  Seth Nickell  <seth@gnome.org>
2142
2143         * python/examples/Makefile.am:
2144
2145         Fix distcheck breakage caused by new examples.
2146
2147 2004-07-10  Seth Nickell  <seth@gnome.org>
2148
2149         * python/dbus.py:
2150
2151         Add "message" argument to service-side dbus.Object
2152         methods. This will break existing services written
2153         using the python bindings, but will allow extraction
2154         of all the message information (e.g. who its from).
2155
2156         Add improved "object oriented" signal handling/emission.
2157         
2158         * python/examples/example-service.py:
2159
2160         Nix this example.
2161         
2162         * python/examples/example-signal-emitter.py:
2163         * python/examples/example-signal-recipient.py:
2164
2165         Two new examples that show how to emit and receive
2166         signals using the new APIs.
2167         
2168         * python/examples/example-signals.py:
2169         * python/examples/gconf-proxy-service.py:
2170         * python/examples/gconf-proxy-service2.py:
2171
2172         Add "message" argument to service methods.
2173
2174 2004-06-28  Kay Sievers <kay.sievers@vrfy.org>
2175
2176         * bus/driver.c (bus_driver_handle_get_connection_unix_user)
2177         * dbus/bus.c (dbus_bus_get_unix_user)
2178         * doc/dbus-specification.xml: implement GetConnectionUnixUser
2179         method of org.freedesktop.DBus interface.
2180
2181         * bus/dispatch.c: test case
2182
2183 2004-06-23  John (J5) Palmieri  <johnp@redhat.com>
2184
2185         * python/Makefile.am: switched include directory from glib/ to dbus/
2186         since dbus-glib.h moved
2187  
2188 2004-06-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2189
2190         * configure.in: prevent building the gcj stuff and libxml loader
2191         since they are broken.
2192
2193 2004-06-20  Havoc Pennington  <hp@redhat.com>
2194
2195         * dbus/dbus-glib-error-enum.h: autogenerate the GError enum 
2196         codes from the dbus error names
2197         
2198         * glib/dbus-glib.h: move to subdir dbus/ since it's included 
2199         as dbus/dbus-glib.h and that breakage is now visible due to 
2200         including dbus/dbus-glib.h in dbus-glib-lowlevel.h
2201         
2202         * glib/dbus-glib.h: s/gproxy/g_proxy/
2203
2204         * dbus/dbus-shared.h: new header to hold stuff shared with
2205         binding APIs
2206         
2207         * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
2208         than dbus-errors.h
2209
2210         * glib/dbus-glib.h (dbus_set_g_error): move to
2211         dbus-glib-lowlevel.h
2212
2213         * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
2214         of stuff to enable this
2215
2216         * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
2217
2218         * a bunch of other changes with the same basic "separate glib 
2219         bindings from dbus.h" theme
2220         
2221 2004-06-10  Owen Fraser-Green  <owen@discobabe.net>
2222
2223         * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
2224
2225         * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
2226
2227 2004-06-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2228
2229         * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
2230         the reply value of the ServiceExists message.
2231
2232 2004-06-07  John (J5) Palmieri  <johnp@redhat.com>
2233
2234         * python/dbus_bindings.pyx.in: No longer need to parse path
2235         elements and pass them as arrays of strings.  The C API now
2236         accepts plain path strings.
2237         (_build_parsed_path): removed 
2238
2239 2004-06-07  Havoc Pennington  <hp@redhat.com>
2240
2241         * doc/TODO: remove auto-activation item since it's done; sort
2242         items by importance/milestone
2243
2244 2004-06-07  Havoc Pennington  <hp@redhat.com>
2245
2246         * dbus/dbus-message-builder.c (_dbus_message_data_load): append
2247         random signature when using REQUIRED_FIELDS (this hack won't work
2248         in the long term)
2249
2250         * dbus/dbus-message.c: change the signature to be a header field,
2251         instead of message->signature special-case string. Incremental
2252         step forward. Then we can fix up code to send the signature in the
2253         message, then fix up code to validate said signature, then fix up
2254         code to not put the typecodes inline, etc.
2255         (load_one_message): don't make up the signature after the fact
2256         (decode_header_data): require signature field for the known
2257         message types
2258
2259         * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
2260
2261         * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
2262
2263 2004-06-07  Owen Fraser-Green  <owen@discobabe.net>
2264
2265         * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
2266
2267         * mono/Handler.cs: Updated to follow new path argument for
2268         (un-)registering objects.
2269
2270         * mono/example/Makefile.am:
2271         * mono/Makefile.am:
2272         * configure.in: Bumped required version for mono and use new -pkg
2273         syntax for deps
2274
2275 2004-06-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2276
2277         * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
2278         registration functions take the path argument as char* instead of
2279         char**.
2280
2281         * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
2282         split off the path decompostion part of
2283         _dbus_demarshal_object_path. Some misc. fixes to silence compiler
2284         warnings. 
2285
2286         * glib/dbus-gobject.c, test/test-service.c: update accordingly.
2287         
2288 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
2289  
2290         * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
2291         machine approach.  A state is implemented as a function that
2292         handles incoming events as specified for that state.
2293         
2294         * doc/dbus-specification.xml: Update auth protocol state machine
2295         specification to match implementation.  Remove some leftover
2296         base64 examples.
2297
2298 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
2299
2300         * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
2301         dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
2302         quiet doxygen.
2303
2304         * Doxyfile.in: remove deprecated options.
2305
2306         * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
2307         glib/test-thread.h, glib/test-thread-client.c,
2308         glib/test-thread-server.c, glib/test-profile.c,
2309         glib/test-dbus-glib.c: remove these unused files.
2310
2311 2004-06-01  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2312
2313         * dbus/dbus-object-tree.c
2314         (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
2315         non-fallback handlers (bug #684).
2316         (_dbus_object_subtree_new): initialize invoke_as_fallback field.
2317         (find_subtree_recurse): report wether the returned subtree is an
2318         exact match or a "fallback" match higher up in the tree.
2319         (object_tree_test_iteration): update test case.
2320
2321 2004-06-01  Seth Nickell  <seth@gnome.org>
2322
2323         * python/dbus_bindings.pyx.in:
2324         * python/tests/test-client.py:
2325
2326         Round off basic type support. Add dicts (yay!), and 
2327         remaining array types.
2328
2329         Make MessageIter more general so it works for dicts too.
2330
2331         Mark all loop variables as C integers.
2332         
2333 2004-05-31  Havoc Pennington  <hp@redhat.com>
2334
2335         * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
2336         "in" before "out"
2337
2338         * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
2339
2340         * glib/dbus-glib-tool.c (main): set up to have a --self-test
2341         option that runs the tests, and start filling in some code
2342         including for starters just dumping the interfaces to stdout
2343
2344         * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
2345
2346         * test/data/valid-introspection-files/lots-of-types.xml: test of
2347         an example introspection file
2348
2349         * glib/dbus-gparser.c (parser_check_doctype): doctype should be
2350         "node" (I think...)
2351
2352 2004-05-31  Seth Nickell  <seth@gnome.org>
2353
2354         * python/dbus_bindings.pyx.in:
2355         * python/tests/test-client.py:
2356
2357         Test Suite: 1
2358         Python Bindings: 0
2359
2360         Fix string array memory trashing bug... oops...
2361
2362 2004-05-30  Seth Nickell  <seth@gnome.org>
2363
2364         * python/dbus.py:
2365
2366         Add a nicer-but-less-flexible alternate API for handling 
2367         calls to virtual objects in dbus.ObjectTree.
2368
2369         Screw up the argument order to the dbus.Object constructor
2370         for consistency with dbus.ObjectTree (and to make dbus_methods
2371         optional for future extension)
2372         
2373         * python/examples/Makefile.am:
2374         * python/examples/gconf-proxy-service.py:
2375         * python/examples/gconf-proxy-service2.py:
2376
2377         Alternate implementation of gconf-proxy-service using the
2378         nicer dbus.ObjectTree API.
2379         
2380         * python/examples/example-service.py:
2381         * python/tests/test-server.py
2382
2383         Reverse the argument order to deal with dbus.Object constructor
2384         changes.
2385         
2386 2004-05-30  Seth Nickell  <seth@gnome.org>
2387
2388         * python/examples/example-client.py:
2389         * python/examples/example-service.py:
2390
2391         Take it back. Lists seem to work but they're broken
2392         in the test suite. Make the base examples use
2393         lists (works fine).
2394
2395 2004-05-30  Seth Nickell  <seth@gnome.org>
2396
2397         * python/dbus_bindings.pyx.in:
2398         * python/tests/test-client.py:
2399
2400         Add some more tests and fix errors that crop up.
2401         Unfortunately, currently it seems like marshalling
2402         and unmarshalling of lists is completely broken :-(
2403
2404 2004-05-30  Seth Nickell  <seth@gnome.org>
2405
2406         * python/dbus_bindings.pyx.in:
2407
2408         Add support for ObjectPath type.
2409
2410         * python/dbus.py:
2411
2412         Refactor message handling code to a common function.
2413         
2414         * python/tests/test-client.py:
2415         * python/tests/test-server.py:
2416
2417         Add tests that check to make sure values of all types
2418         can be echoed from a service w/o mangling.
2419         
2420 2004-05-29  Seth Nickell  <seth@gnome.org>
2421
2422         * python/dbus.py:
2423
2424         Add ObjectTree class which allows implementation
2425         of trees of "virtual" objects. Basically the python
2426         wrapper for "register_fallback".
2427         
2428         * python/examples/Makefile.am
2429         * python/examples/gconf-proxy-client.py:
2430         * python/examples/gconf-proxy-service.py:
2431
2432         Implement a simple GConf proxy service that supports
2433         get/set on string and int GConf keys using the ObjectTree.
2434         
2435 2004-05-29  Seth Nickell  <seth@gnome.org>
2436
2437         * python/dbus.py:
2438         * python/examples/example-client.py:
2439         * python/examples/example-service.py:
2440         * python/examples/list-system-services.py:
2441
2442         Add SessionBus, SystemBus and ActivationBus classes
2443         so you don't need to know the special little BUS_TYPE
2444         flag.
2445         
2446 2004-05-29  Havoc Pennington  <hp@redhat.com>
2447
2448         * bus/config-parser.c (process_test_valid_subdir): temporarily
2449         stop testing config parser OOM handling, since expat has issues
2450         http://freedesktop.org/pipermail/dbus/2004-May/001153.html
2451
2452         * bus/dbus-daemon-1.1.in: change requested_reply to
2453         send_requested_reply/receive_requested_reply so we can send the
2454         replies, not just receive them.
2455
2456         * bus/config-parser.c: parse the new
2457         send_requested_reply/receive_requested_reply
2458
2459         * bus/policy.c (bus_client_policy_check_can_send): add
2460         requested_reply argument and use it
2461
2462         * bus/bus.c (bus_context_check_security_policy): pass through
2463         requested_reply status to message send check
2464
2465         * bus/system.conf.in: adapt to requested_reply change
2466         
2467 2004-05-28  Havoc Pennington  <hp@redhat.com>
2468
2469         * test/glib/test-service-glib.c (main): remove unused variable
2470
2471         * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
2472
2473         * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
2474         from the enum, no longer in use.
2475
2476         * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
2477         works right.
2478
2479         * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
2480         whether error_name passed in is a valid error name.
2481
2482 2004-05-28  John (J5) Palmieri  <johnp@redhat.com>
2483
2484         * dbus/dbus-message.c (dbus_message_get_args): Added support for
2485         OBJECT_PATH and OBJECT_PATH_ARRAY
2486
2487 2004-05-28  Seth Nickell  <seth@gnome.org>
2488
2489         * python/examples/Makefile.am:
2490
2491         Forget to add Makefile.am. Do not pass go.
2492
2493 2004-05-28  Michael Meeks  <michael@ximian.com>
2494
2495         * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): 
2496         fix no int64 case.
2497
2498         * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
2499
2500         * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
2501         (_dbus_message_iter_get_basic_type_array): impl.
2502         drastically simplify ~all relevant _get methods to use these.
2503         (_dbus_message_iter_append_basic_array),
2504         (dbus_message_iter_append_basic): impl
2505         drastically simplify ~all relevant _append methods to use these.
2506
2507         * dbus/dbus-message-builder.c (parse_basic_type) 
2508         (parse_basic_array, lookup_basic_type): impl.
2509         (_dbus_message_data_load): prune scads of duplicate /
2510         cut & paste coding.
2511
2512         * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) 
2513         (_dbus_demarshal_basic_type): implement,
2514         (demarshal_and_validate_len/arg): beef up debug.
2515         (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
2516
2517 2004-05-27  Seth Nickell  <seth@gnome.org>
2518
2519         * configure.in:
2520         * python/Makefile.am:
2521
2522         Include the example python apps in the tarball.
2523         
2524         * python/examples/list-system-services.py
2525
2526         Add a python new example that fetches the list of services
2527         from the system bus.
2528         
2529 2004-05-27  Seth Nickell  <seth@gnome.org>
2530
2531         * python/dbus.py:
2532         * python/dbus_bindings.pyx.in:
2533
2534         Fix failure to notify that a signal was not handled,
2535         resulted in hung functions.
2536         
2537 2004-05-25  Colin Walters  <walters@redhat.com>
2538
2539         * tools/dbus-monitor.c (main): Monitor all types of messages.
2540
2541 2004-05-23  Owen Fraser-Green  <owen@discobabe.net>
2542
2543         * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
2544         which unregisters the object path and disposes the handler.
2545
2546 2004-05-23  Kristian Høgsberg  <krh@redhat.com>
2547  
2548         Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
2549          
2550         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
2551         operands to && so we call dbus_message_iter_next () for the last
2552         argument also.
2553
2554 2004-05-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2555
2556         * dbus/dbus-object-tree.c
2557         (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
2558         children even if the requested path isn't registered.
2559         (object_tree_test_iteration): test object_tree_list_registered.
2560
2561         * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
2562         it to 0.
2563         
2564 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
2565
2566         * doc/TODO: Remove resolved items.
2567
2568         * bus/expirelist.h (struct BusExpireList): remove unused n_items
2569         field.
2570         
2571         * bus/connection.c (bus_connections_expect_reply): Enforce the
2572         per-connection limit on pending replies.
2573         
2574         Patch from Jon Trowbridge <trow@ximian.com>:
2575  
2576         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
2577         up a watch that triggers a config reload when one end of the pipe
2578         becomes readable.
2579         (signal_handler): Instead of doing the config reload in our SIGHUP
2580         handler, just write to the reload pipe and let the associated
2581         watch handle the reload when control returns to the main loop.
2582  
2583         * bus/driver.c (bus_driver_handle_reload_config): Added.
2584         Implements a ReloadConfig method for requesting a configuration
2585         file reload via the bus driver.
2586  
2587 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
2588
2589         * HACKING: Updated release instructions concerning the wiki page.
2590
2591 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
2592
2593         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
2594         filter against auth->allowed_mechs; we only add allowed mechs in
2595         record_mechanisms().
2596  
2597         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
2598         ALLOWED_MECHS to auth-script format so we can set the list of
2599         allowed mechanisms.
2600  
2601         * data/auth/client-out-of-mechanisms.auth-script: New test to
2602         check client disconnects when it is out of mechanisms to try.
2603  
2604         * dbus/dbus-auth.c (process_command): Remove check for lines
2605         longer that 1 MB; we only buffer up maximum 16 kB.
2606  
2607         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
2608         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
2609         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
2610         assume there might be unused bytes.
2611  
2612         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
2613         client-out-of-mechs, it is handled in process_reject(). Move check
2614         for max failures to send_rejected(), as it's a server-only thing.
2615
2616         * dbus/dbus-auth.c: Factor out protocol reply code into functions
2617         send_auth(), send_data(), send_rejected(), send_error(),
2618         send_ok(), send_begin() and send_cancel().
2619
2620 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
2621
2622         Remove base64 encoding, replace with hex encoding. Original patch
2623         from trow@ximian.com, added error handling.
2624
2625         * dbus/dbus-string.c (_dbus_string_base64_encode)
2626         (_dbus_string_base64_decode): Remove.
2627         (_dbus_string_hex_decode): Add end_return argument so we can
2628         distinguish between OOM and invalid hex encoding.
2629         (_dbus_string_test): Remove base64 tests and add test case for
2630         invalid hex.
2631
2632         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
2633         Replace base64 with hex.
2634
2635         * test/data/auth/invalid-hex-encoding.auth-script: New test case
2636         for invalid hex encoded data in auth protocol.
2637
2638 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2639
2640         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
2641         leak.
2642
2643 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
2644
2645         * mono/dbus-sharp.dll.config.in: Added for GAC
2646         * mono/dbus-sharp.snk: Added for GAC
2647         * mono/Assembly.cs.in: Added for GAC
2648         * mono/Makefile.am: Changes for GAC installation        
2649         * configure.in: Added refs for dbus-sharp.dll.config.in and
2650         Assembly.cs.in. More fixes for mono testing
2651         * mono/example/Makefile.am: Changed var to CSC
2652         * Makefile.am: Changed flag name to DBUS_USE_CSC
2653
2654 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
2655
2656         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
2657         * mono/doc/*: Added documentation framework
2658         * configure.in: Added monodoc check
2659         * README: Added description of mono configure flags
2660
2661 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
2662
2663         * doc/dbus-specification.xml: Added a "Required" column to the 
2664         header fields table and changed the "zero or more" verbage in
2665         the above paragraph to read "The header must contain the required 
2666         named header fields and zero or more of the optional named header 
2667         fields".
2668         * test/data/invalid-messages/*.message: Added the required PATH 
2669         named header field to the tests so that they don't fail on 
2670         'Missing path field'
2671
2672 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
2673
2674         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
2675         the stack by implicitly defining variable and parameter types and
2676         removing the hack of defining C pointers as python objects and later
2677         casting them.
2678
2679 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
2680
2681         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
2682
2683 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
2684
2685         * mono/DBusType/Dict.cs: Handle empty dicts
2686         * mono/DBusType/Array.cs: Handle empty arrays
2687         * mono/Arguments.cs: Handle empty arguments
2688
2689 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
2690
2691         * dbus-sharp.pc.in: Modified to include include Libs and Requires
2692         field
2693
2694 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
2695
2696         * test/data/valid-messages/standard-*.message: Update message
2697         test scripts to new header field names.
2698
2699 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
2700
2701         * test/break-loader.c (randomly_do_n_things): tracked down buffer
2702         overflow to times_we_did_each_thing array which would chop off the
2703         first character of the failure_dir string. Increased the size of
2704         the array to 7 to reflect the number of random mutation functions
2705         we have.
2706
2707 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
2708
2709         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
2710         unix_server->watch here, it is unreffed in disconnect.
2711         (_dbus_server_new_for_tcp_socket): convert NULL host to
2712         "localhost" here so we don't append NULL to address.
2713         
2714         * dbus/dbus-server.c (_dbus_server_test): Add test case for
2715         various addresses, including tcp with no explicit host.
2716
2717 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2718
2719         * dbus/dbus-message.c (decode_header_data, decode_string_field):
2720         fix incorrect setting of .name_offset in the HeaderField (it was
2721         off by two bytes, positioned right after the name and typecode)
2722
2723         * bus/bus.c (bus_context_new, bus_context_unref): test before
2724         calling dbus_server_free_data_slot and _dbus_user_database_unref
2725         in case of an error.
2726
2727         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
2728         by libdbus-gtool.
2729
2730 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
2731
2732         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
2733         _dbus_poll() instead of select().
2734
2735 2004-04-15  Jon Trowbridge  <trow@ximian.com>
2736
2737         * bus/main.c (signal_handler): Reload the configuration files
2738         on SIGHUP.
2739         (main): Set up our SIGHUP handler.
2740
2741         * bus/bus.c (struct BusContext): Store the config file, user and
2742         fork flag in the BusContext.
2743         (process_config_first_time_only): Added.  Contains the code
2744         (previously in bus_context_new) for setting up the BusContext from
2745         the BusConfigParser that should only be run the first time the
2746         config files are read.
2747         (process_config_every_time): Added.  Contains the code (previously
2748         in bus_context_new) for setting up the BusContext from the
2749         BusConfigParser that should be run every time the config files are
2750         read.
2751         (load_config): Added.  Builds a BusConfigParser from the config
2752         files and passes the resulting structure off to
2753         process_config_first_time_only (assuming this is the first time)
2754         and process_config_every_time.
2755         (bus_context_new): All of the config-related code has been moved
2756         to process_config_first_time_only and process_config_every_time.
2757         Now this function just does the non-config-related initializations
2758         and calls load_config.
2759         (bus_context_reload_config): Added.
2760
2761 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2762
2763         * bus/driver.c (bus_driver_handle_get_service_owner):
2764         implement a GetServiceOwner method.
2765         * doc/dbus-specification.xml: document it.
2766         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
2767         
2768         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
2769         implement, using the bus GetServiceOwner method.
2770
2771         * test/glib/test-dbus-glib.c:
2772         use dbus_gproxy_new_for_service_owner so that we can receive the
2773         signal. 
2774
2775 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
2776
2777         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2778         dbus/dbus-message.c, dbus/dbus-protocol.h
2779         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
2780
2781         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
2782         dbus/dbus-message.c, dbus/dbus-protocol.h
2783         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
2784
2785         * dbus/dbus-internals.c (_dbus_header_field_to_string):
2786         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
2787         DBUS_HEADER_FIELD_SENDER resolves to "sender"
2788
2789         * doc/dbus-specification.xml (Header Fields Table):
2790         s/SERVICE/DESTINATION
2791         s/SENDER_SERVICE/SENDER
2792
2793
2794 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2795
2796         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
2797         a few seconds.
2798
2799 2004-04-13  Michael Meeks  <michael@ximian.com>
2800
2801         * glib/dbus-gobject.c (handle_introspect): split out
2802         (introspect_properties): this.
2803         (handle_introspect): implement this.
2804
2805         * test/glib/Makefile.am: use the absolute path so the bus
2806         daemon's chdir ("/") doesn't kill us dead.
2807
2808         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
2809
2810 2004-04-12  Jon Trowbridge  <trow@ximian.com>
2811
2812         * bus/config-parser.c (struct BusConfigParser): Added
2813         included_files field.
2814         (seen_include): Added.  Checks whether or not a file has already
2815         been included by any parent BusConfigParser.
2816         (bus_config_parser_new): Copy the parent's included_files.
2817         (include_file): Track which files have been included, and fail on
2818         circular inclusions.
2819         (process_test_valid_subdir): Changed printf to report if we are
2820         testing valid or invalid conf files.
2821         (all_are_equiv): Changed printf to be a bit clearer about
2822         what we are actually doing.
2823         (bus_config_parser_test): Test invalid configuration files.
2824
2825 2004-04-09  Jon Trowbridge  <trow@ximian.com>
2826
2827         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
2828         argument.  If non-null, the newly-constructed BusConfigParser will
2829         be initialized with the parent's BusLimits instead of the default
2830         values.
2831         (include_file): When including a config file, pass in
2832         the current parser as the parent and then copy the BusLimits
2833         from the included BusConfigParser pack to the current parser.
2834         (process_test_valid_subdir): Renamed from process_test_subdir.
2835         (process_test_equiv_subdir): Added.  Walks through a directory,
2836         descending into each subdirectory and loading the config files
2837         it finds there.  If any subdirectory contains two config files
2838         that don't produce identical BusConfigParser structs, fail.
2839         For now, the BusConfigParser's BusPolicies are not compared.
2840         (bus_config_parser_test): Call both process_test_valid_subdir and
2841         process_test_equiv_subdir.
2842
2843         * bus/config-loader-libxml.c (bus_config_load): Take a parent
2844         argument and pass it along to the call to bus_config_parser_new.
2845         Also made a few small changes to allow this code to compile.
2846
2847         * bus/config-loader-expat.c (bus_config_load): Take a parent
2848         argument and pass it along to the call to bus_config_parser_new.
2849
2850         * bus/bus.c (bus_context_new): Load the config file
2851         with a NULL parent argument.
2852
2853 2004-03-29  Michael Meeks  <michael@ximian.com>
2854
2855         * glib/dbus-gobject.c (introspect_properties): split
2856         out, fix mangled 'while' flow control.
2857         (introspect_signals): implement.
2858         (handle_introspect): update.
2859
2860 2004-03-29  Michael Meeks  <michael@ximian.com>
2861
2862         * glib/dbus-gobject.c (set_object_property): split out / 
2863         re-work, use the property type, and not the message type(!)
2864         (get_object_property): ditto.
2865
2866         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
2867         (dbus_gvalue_marshal): make this code re-usable, needed
2868         for signals too, also on both proxy and server side.
2869         Re-write for more efficiency / readability.
2870
2871 2004-03-29  Michael Meeks  <michael@ximian.com>
2872
2873         * dbus/dbus-message.c
2874         (dbus_message_new_error_printf): impl.
2875
2876         * dbus/dbus-connection.c
2877         (dbus_connection_unregister_object_path): fix warning.
2878
2879         * configure.in: fix no-mono-installed situation.
2880
2881 2004-03-27  Havoc Pennington  <hp@redhat.com>
2882
2883         Patch from Timo Teräs:
2884         
2885         * tools/dbus-send.c (main): if --print-reply, assume type is
2886         method call; support boolean type args
2887         
2888         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
2889         bunch of memleak and logic bugs
2890         
2891 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
2892
2893         * mono/Arguments.cs:
2894         * mono/Introspector.cs:
2895         * mono/Handler.cs:
2896         * mono/InterfaceProxy.cs:
2897         * mono/Message.cs
2898         * mono/ProxyBuilder.cs:
2899         * mono/Service.cs:
2900         Added InterfaceProxy class to avoid building proxies for every
2901         object.
2902
2903         * dbus-message.h:
2904         * dbus-message.c (dbus_message_append_args_valist)
2905         (dbus_message_iter_get_object_path)
2906         (dbus_message_iter_get_object_path_array)
2907         (dbus_message_iter_append_object_path)
2908         (dbus_message_iter_append_object_path_array):
2909         Added object_path iter functions to handle OBJECT_PATH arguments
2910         
2911 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
2912
2913         First checkin of mono bindings.
2914         * configure.in:
2915         * Makefile.am:
2916         Build stuff for the bindings
2917         * dbus-sharp.pc.in: Added for pkgconfig
2918         
2919 2004-03-21  Havoc Pennington  <hp@redhat.com>
2920
2921         * test/test-service.c (main): remove debug spew
2922
2923 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2924
2925         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
2926         arrays
2927
2928         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
2929         (dbus_message_iter_init_array_iterator)
2930         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
2931         indicate whether the iterator is empty
2932
2933         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
2934         warnings
2935
2936 2004-03-19  Havoc Pennington  <hp@redhat.com>
2937
2938         * NEWS: 0.21 updates
2939
2940         * configure.in: 0.21
2941
2942         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
2943         
2944         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
2945         you don't need pyrex to make dist
2946
2947         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
2948         sources; run moc
2949         
2950 2004-03-18  Richard Hult  <richard@imendio.com>
2951
2952         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
2953         (dbus_message_set_auto_activation): Add doxygen docs.
2954
2955 2004-03-16  Richard Hult  <richard@imendio.com>
2956
2957         * bus/activation.c: (bus_activation_service_created),
2958         (bus_activation_send_pending_auto_activation_messages),
2959         (bus_activation_activate_service):
2960         * bus/activation.h:
2961         * bus/dispatch.c: (bus_dispatch),
2962         (check_nonexistent_service_auto_activation),
2963         (check_service_auto_activated),
2964         (check_segfault_service_auto_activation),
2965         (check_existent_service_auto_activation), (bus_dispatch_test):
2966         * bus/driver.c: (bus_driver_handle_activate_service):
2967         * bus/services.c: (bus_registry_acquire_service):
2968         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
2969         (dbus_message_get_auto_activation):
2970         * dbus/dbus-message.h:
2971         * dbus/dbus-protocol.h: Implement auto-activation.
2972         
2973         * doc/dbus-specification.xml: Add auto-activation to the spec.
2974
2975 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2976
2977         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
2978         fix a bug with CUSTOM types.
2979
2980         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
2981         a unit test for this bug (used to fail).
2982
2983 2004-03-12  Mikael Hallendal  <micke@imendio.com>
2984
2985         * bus/activation.c:
2986         (babysitter_watch_callback): notify all pending activations waiting for
2987           the same exec that the activation failed.
2988         (bus_activation_activate_service): shortcut the activation if we 
2989           already waiting for the same executable to start up.
2990
2991 2004-03-12  Mikael Hallendal  <micke@imendio.com>
2992
2993         * bus/activation.c: 
2994         - Added service file reloading. 
2995           Each service files directory is kept in an hash table in 
2996           BusActivation and each BusActivationEntry knows what .service-file it
2997           was read from. So when you try to activate a service the bus will 
2998           check if it's been updated, removed or if new .service-files has 
2999           been installed.
3000         - Test code at the bottom for the service file reloading.
3001         * bus/test-main.c: (main):
3002         * bus/test.h:
3003         - added service reloading test.
3004         * dbus/dbus-sysdeps.c: 
3005         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
3006
3007 2004-03-08  Michael Meeks  <michael@ximian.com>
3008
3009         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
3010         bail immediately if disconnected, to avoid busy loop.
3011
3012         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
3013         cleanup cut/paste/inefficiency.
3014
3015 2004-03-01  David Zeuthen  <david@fubar.dk>
3016
3017         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
3018         bug where args were used twice. This bug resulted in a segfault
3019         on a Debian/PPC system when starting the messagebus daemon. Include
3020         dbus-sysdeps.h for DBUS_VA_COPY
3021
3022         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
3023
3024         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
3025         appropriate va_copy implementation. From GLib
3026         
3027 2004-02-24  Joe Shaw  <joe@ximian.com>
3028
3029         * bus/services.c (bus_registry_acquire_service): We need to pass
3030         in the service name to dbus_set_error() to prevent a crash.
3031
3032 2003-12-26  Anders Carlsson  <andersca@gnome.org>
3033
3034         * AUTHORS: Reveal my True identity.
3035
3036 2003-12-17  Mikael Hallendal  <micke@imendio.com>
3037
3038         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
3039         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
3040
3041 2003-12-13  Mikael Hallendal  <micke@imendio.com>
3042
3043         * doc/TODO: Added not about better error check of configuration files.
3044
3045 2003-12-02  Richard Hult  <richard@imendio.com>
3046
3047         * Update AFL version to 2.0 throughout the source files to reflect
3048         the update that was done a while ago.
3049
3050 2003-12-02  Richard Hult  <richard@imendio.com>
3051
3052         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
3053         wrote_dict_key to FALSE on the iter that the dict is appended to,
3054         just like when appending other types. Fixes a bug where a dict
3055         couldn't be put inside a dict.
3056         (dbus_message_iter_append_dict_key): Fix typo in warning message.
3057         (message_iter_test, _dbus_message_test): Add test case for dict
3058         inside dict.
3059
3060 2003-12-01  David Zeuthen  <david@fubar.dk>
3061
3062         * python/dbus.py: Add the actual message when calling the reciever
3063         of a signal such that parameters can be inspected. Add the method
3064         remove_signal_receiver
3065         
3066 2003-11-26  Mikael Hallendal  <micke@imendio.com>
3067
3068         * bus/*.[ch]:
3069         * dbus/*.[ch]:
3070         * glib/*.[ch]: Made ref functions return the pointer
3071
3072 2003-11-25  Zack Rusin  <zack@kde.org>
3073
3074         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
3075
3076         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
3077         wrappers,
3078
3079         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
3080         the Integrator and to better fit with the server,
3081
3082 2003-11-24  Zack Rusin  <zack@kde.org>
3083
3084         * qt/connection.h, qt/connection.cpp: removing initDbus method since
3085         the integrator handles it now
3086
3087         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
3088         since QTimer wasn't really meant to be used the way DBusTimeout is
3089
3090 2003-11-24  Zack Rusin  <zack@kde.org>
3091
3092         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
3093         Integrator class which integrates D-BUS with the Qt event loop,
3094
3095         * qt/connection.h, qt/connection.cpp: Move all the code which
3096         was dealing with D-BUS integration to the Integrator class,
3097         and start using Integrator,
3098
3099 2003-11-23  Zack Rusin  <zack@kde.org>
3100
3101         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
3102         wrapper
3103
3104         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
3105         switching namespaces to DBusQt, reworking the class,
3106
3107         * Makefile.cvs: switching dependencies so that it matches KDE 
3108         schematics,
3109         
3110         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
3111         the library
3112
3113 2003-11-19  Havoc Pennington  <hp@redhat.com>
3114
3115         * NEWS: update
3116
3117         * configure.in: bump version to 0.20
3118
3119         * configure.in (have_qt): add yet another place to look for qt
3120         (someone hand trolltech a .pc file...)
3121
3122 2003-11-01  Havoc Pennington  <hp@redhat.com>
3123
3124         * doc/dbus-specification.xml: add state machine docs on the auth
3125         protocol; just a first draft, I'm sure it's wrong.      
3126
3127 2003-10-28  David Zeuthen  <david@fubar.dk>
3128
3129         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
3130         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
3131         
3132 2003-10-28  Havoc Pennington  <hp@redhat.com>
3133
3134         * dbus/dbus-message.c (get_next_field): delete unused function
3135
3136 2003-10-28  Havoc Pennington  <hp@redhat.com>
3137
3138         * bus/expirelist.c (do_expiration_with_current_time): detect
3139         failure of the expire_func due to OOM
3140
3141         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
3142
3143         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
3144         NoReply error that's now created by the bus when the service exits
3145
3146 2003-10-28  Havoc Pennington  <hp@redhat.com>
3147
3148         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
3149         tests for set_path, set_interface, set_member, etc.
3150
3151         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
3152
3153         * dbus/dbus-message.c (set_string_field): always just delete and
3154         re-append the field; accept NULL for deletion
3155         (re_align_fields_recurse): reimplement
3156         
3157 2003-10-26  Havoc Pennington  <hp@redhat.com>
3158
3159         * dbus/dbus-connection.c: fix docs to properly describe the
3160         disconnected message
3161         (_dbus_connection_notify_disconnected): remove this function; 
3162         we can't synchronously add the disconnected message, we have to 
3163         do it after we've queued any remaining real messages
3164         (_dbus_connection_get_dispatch_status_unlocked): queue the
3165         disconnect message only if the transport has finished queueing all
3166         its real messages and is disconnected.
3167         (dbus_connection_disconnect): update the dispatch status here
3168
3169 2003-10-22  Havoc Pennington  <hp@redhat.com>
3170
3171         * bus/bus.c (bus_context_check_security_policy): fix up assertion
3172
3173         * bus/connection.c (bus_transaction_send_from_driver): set the
3174         destination to the connection's base service
3175
3176 2003-10-20  Havoc Pennington  <hp@redhat.com>
3177
3178         hmm, make check is currently not passing.
3179         
3180         * doc/dbus-specification.xml: add requirement that custom type
3181         names follow the same rules as interface names.
3182
3183         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
3184         duplication and allow 'c' to be 'custom'; dict is now 'm' for
3185         'map'
3186
3187         * doc/dbus-specification.xml: update type codes to match
3188         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
3189         CUSTOM. Add type OBJECT_PATH to the spec.
3190
3191 2003-10-17  Havoc Pennington  <hp@redhat.com>
3192
3193         * bus/driver.c (create_unique_client_name): use "." as separator
3194         in base service names instead of '-'
3195
3196         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
3197         byte at the end of the string
3198
3199         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
3200         optimization macros since string validation seems to be a slow
3201         point.
3202         
3203         * doc/dbus-specification.xml: restrict valid
3204         service/interface/member/error names. Add test suite code for the
3205         name validation.
3206
3207         * dbus/dbus-string.c: limit service/interface/member/error names 
3208         to [0-9][A-Z][a-z]_
3209
3210         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
3211         format arg to verbose spew
3212
3213         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
3214         memory, return instead of g_error
3215
3216         * test/test-service.c (path_message_func): support emitting a
3217         signal on request
3218
3219         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
3220         activation bus type if DBUS_BUS_ACTIVATION was set; default to
3221         assuming the activation bus was the session bus so that services
3222         started manually will still register.
3223         (init_connections_unlocked): fix so that in OOM situation we get
3224         the same semantics when retrying the function
3225         
3226         * test/test-service.c (main): change to use path registration, to
3227         test those codepaths; register with DBUS_BUS_ACTIVATION rather
3228         than DBUS_BUS_SESSION
3229
3230 2003-10-16  Havoc Pennington  <hp@redhat.com>
3231
3232         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
3233
3234         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
3235         coverage of the tests
3236         (coverage-report.txt): don't move the .da and .bbg files around
3237
3238 2003-10-16  Havoc Pennington  <hp@redhat.com>
3239
3240         * bus/bus.c (struct BusContext): remove struct field I didn't mean
3241         to put there
3242
3243 2003-10-16  Havoc Pennington  <hp@redhat.com>
3244
3245         * bus/connection.c (bus_pending_reply_expired): either cancel or
3246         execute, not both
3247         (bus_connections_check_reply): use unlink, not remove_link, as we
3248         don't want to free the link; fixes double free mess
3249
3250         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
3251         where no reply was received
3252
3253         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
3254         fix a refcount leak
3255
3256         * bus/signals.c (match_rule_matches): add special cases for the
3257         bus driver, so you can match on sender/destination for it.
3258
3259         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
3260         DBUS_PRINT_BACKTRACE is set
3261
3262         * dbus/dbus-internals.c: add pid to assertion failure messages
3263
3264         * dbus/dbus-connection.c: add message type code to the debug spew
3265
3266         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
3267         sender=foo not service=foo
3268
3269         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
3270         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
3271         DBUS_ACTIVATION_ADDRESS instead
3272
3273         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
3274         DBUS_SYSTEM_BUS_ADDRESS if appropriate
3275
3276         * bus/bus.c (bus_context_new): handle OOM copying bus type into
3277         context struct
3278
3279         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
3280         (dbus_message_iter_get_object_path_array): new function (half
3281         finished, disabled for the moment)
3282         
3283         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
3284         DBUS_MESSAGE_TYPE_ERROR
3285
3286         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
3287         avoid redirecting stderr to /dev/null
3288         (babysit): close stdin if not doing the "exit_with_session" thing
3289
3290         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
3291         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
3292         stdout/stdin, so things don't get confused
3293         
3294         * bus/system.conf.in: fix to allow replies, I modified .conf
3295         instead of .conf.in again.
3296
3297 2003-10-14  David Zeuthen  <david@fubar.dk>
3298
3299         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
3300         argtype to arg_type when raising unknown arg type exception.
3301         Changed type list to reflect the changes in dbus-protocol.h so 
3302         the bindings actually work.
3303
3304 2003-10-14  Havoc Pennington  <hp@redhat.com>
3305
3306         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
3307         to have a bug keeping it from outputting the .da files sometimes
3308         (string_get_string): don't append garbage nul bytes to the string.
3309
3310 2003-10-15  Seth Nickell  <seth@gnome.org>
3311
3312         * python/Makefile.am:
3313
3314         Include dbus_h_wrapper.h in the dist tarball.
3315
3316 2003-10-14  Havoc Pennington  <hp@redhat.com>
3317
3318         * bus/bus.c (bus_context_check_security_policy): revamp this to
3319         work more sanely with new policy-based requested reply setup
3320
3321         * bus/connection.c (bus_transaction_send_from_driver): set bus
3322         driver messages as no reply
3323
3324         * bus/policy.c (bus_client_policy_check_can_receive): handle a
3325         requested_reply attribute on allow/deny rules
3326
3327         * bus/system.conf: add <allow requested_reply="true"/>
3328
3329         * bus/driver.c (bus_driver_handle_message): fix check for replies
3330         sent to the bus driver, which was backward. How did this ever work
3331         at all though? I think I'm missing something.
3332
3333         * dbus/dbus-message.c (decode_header_data): require error and
3334         method return messages to have a reply serial field to be valid
3335         (_dbus_message_loader_queue_messages): break up this function;
3336         validate that reply serial and plain serial are nonzero; 
3337         clean up the OOM/error handling.
3338         (get_uint_field): don't return -1 from this
3339         (dbus_message_create_header): fix signed/unsigned bug
3340
3341         * bus/connection.c (bus_connections_expect_reply): save serial of
3342         the incoming message, not reply serial
3343
3344 2003-10-14  Havoc Pennington  <hp@redhat.com>
3345
3346         * bus/connection.c: implement pending reply tracking using
3347         BusExpireList
3348
3349         * bus/bus.c (bus_context_check_security_policy): verify that a
3350         reply is pending in order to allow a reply to be sent. Deny 
3351         messages of unknown type.
3352
3353         * bus/dbus-daemon-1.1.in: update to mention new resource limits
3354
3355         * bus/bus.c (bus_context_get_max_replies_per_connection): new
3356         (bus_context_get_reply_timeout): new
3357
3358 2003-10-13  Seth Nickell  <seth@gnome.org>
3359
3360         * python/Makefile.am:
3361
3362         Pass "make distcheck": remove a couple files from DIST_FILES
3363         that weren't included in the final version.
3364
3365 2003-10-12  Havoc Pennington  <hp@pobox.com>
3366
3367         Added test code that 1) starts an actual bus daemon and 2) uses
3368         DBusGProxy; fixed bugs that were revealed by the test. Lots 
3369         more testing possible, but this is the basic framework.
3370         
3371         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
3372         empty proxy lists from the proxy list hash
3373
3374         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
3375         couple of return_if_fail checks
3376
3377         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
3378         to allocate, so everything is cleared to NULL as it should be.
3379
3380         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
3381         source as data to dbus_connection_set_timeout_functions() as the 
3382         timeout functions expected
3383
3384         * test/glib/run-test.sh: add a little script to start up a message
3385         bus and run tests using it
3386
3387         * tools/dbus-launch.1: updates
3388
3389         * tools/dbus-launch.c (main): add --config-file option
3390
3391         * tools/dbus-launch.c (main): remove confusing else if (runprog)
3392         that could never be reached.
3393
3394         * dbus/dbus-message.c (dbus_message_new_method_return) 
3395         (dbus_message_new_error, dbus_message_new_signal): set the
3396         no-reply-expected flag on all these. Redundant, but may
3397         as well be consistent.
3398
3399 2003-10-11  Havoc Pennington  <hp@pobox.com>
3400
3401         * test/decode-gcov.c (function_solve_graph): make broken block
3402         graph a nonfatal error since it seems to be broken. Need to debug
3403         this.
3404
3405         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
3406         can't just check type > INVALID < LAST anymore
3407
3408         * dbus/dbus-message.c (dbus_message_get_signature): new function
3409         (dbus_message_has_signature): new function
3410         (struct DBusMessage): add signature field (right now it isn't sent
3411         over the wire, just generated on the fly)
3412         (dbus_message_copy): copy the signature, and init strings to
3413         proper length to avoid some reallocs
3414         (dbus_message_iter_init_array_iterator): return void, since it
3415         can't fail
3416         (dbus_message_iter_init_dict_iterator): return void since it can't fail
3417         (_dbus_message_loader_queue_messages): add silly temporary hack to
3418         fill in message->signature on load
3419
3420         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
3421         characters, so they are relatively human-readable.
3422
3423 2003-10-11  Havoc Pennington  <hp@pobox.com>
3424
3425         * dbus/dbus-message.c (_dbus_message_test): add more test
3426         coverage, but #if 0 for now since they uncover a bug 
3427         not fixed yet; I think in re_align_field_recurse()
3428         (re_align_field_recurse): add FIXME about broken assertion
3429
3430         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
3431
3432         * bus/connection.c: share a couple code bits with expirelist.c
3433
3434         * bus/expirelist.h, bus/expirelist.c: implement a generic
3435         expire-items-after-N-seconds facility, was going to share between
3436         expiring connections and replies, decided not to use for expiring
3437         connections for now.
3438
3439         * COPYING: include AFL 2.0 (still need to change all the file headers)
3440
3441 2003-10-09  Havoc Pennington  <hp@redhat.com>
3442
3443         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
3444         gcc 3.3. Not that we do anything about it yet.
3445
3446         * bus/signals.c (bus_match_rule_parse): impose max length on the
3447         match rule text
3448
3449         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
3450
3451 2003-10-09  Havoc Pennington  <hp@redhat.com>
3452
3453         Make matching rules theoretically work (add parser).
3454         
3455         * bus/bus.c (bus_context_check_security_policy): fix up to handle
3456         the case where destination is explicitly specified as bus driver
3457         and someone else is eavesdropping.
3458         
3459         * bus/policy.c (bus_client_policy_check_can_receive): fix up
3460         definition of eavesdropping and assertion
3461
3462         * tools/dbus-send.c (main): use dbus_message_type_from_string
3463
3464         * bus/signals.c (bus_match_rule_parse): implement
3465
3466         * dbus/dbus-message.c (dbus_message_type_from_string): new
3467
3468         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
3469
3470 2003-10-02  Havoc Pennington  <hp@pobox.com>
3471
3472         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
3473         dbus_gproxy_oneway_call
3474
3475         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
3476         (dbus_server_setup_with_g_main): fix to allow calling them more
3477         than once on the same args
3478         (dbus_bus_get_with_g_main): new function
3479
3480 2003-10-02  Havoc Pennington  <hp@redhat.com>
3481
3482         * doc/dbus-tutorial.xml: write some stuff
3483
3484 2003-09-29  Havoc Pennington  <hp@pobox.com>
3485
3486         * configure.in: split checks for Doxygen from XML docs, check for
3487         xmlto
3488
3489         * doc/Makefile.am: XML-ify all the docs, and add a blank
3490         dbus-tutorial.xml
3491
3492 2003-09-29  Havoc Pennington  <hp@pobox.com>
3493
3494         * Merge dbus-object-names branch. To see the entire patch 
3495         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
3496         it's huuuuge though.
3497         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
3498         
3499 2003-09-28  Havoc Pennington  <hp@pobox.com>
3500
3501         * HACKING: update to reflect new server
3502
3503 2003-09-26  Seth Nickell  <seth@gnome.org>
3504
3505         * python/dbus.py:
3506         * python/examples/example-signals.py:
3507
3508         Start implementing some notions of signals. The API
3509         is really terrible, but they sort of work (with the
3510         exception of being able to filter by service, and to
3511         transmit signals *as* a particular service). Need to
3512         figure out how to make messages come from the service
3513         we registered :-(
3514         
3515         * python/dbus_bindings.pyx.in:
3516
3517         Removed duplicate message_handler callbacks.
3518         
3519 2003-09-25  Havoc Pennington  <hp@redhat.com>
3520
3521         * bus/session.conf.in: fix my mess
3522
3523 2003-09-25  Havoc Pennington  <hp@pobox.com>
3524
3525         * bus/session.conf.in: fix security policy, reported by Seth Nickell
3526
3527 2003-09-25  Seth Nickell  <seth@gnome.org>
3528
3529         * python/examples/example-service.py:
3530
3531         Johan notices complete wrong code in example-service, but
3532         completely wrong in a way that works exactly the same (!).
3533         Johan is confused, how could this possibly work? Example
3534         code fails to serve purpose of making things clear.
3535         Seth fixes.
3536
3537 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
3538
3539         * doc/dbus-specification.sgml: don't require header fields
3540         to be 4-byte aligned and specify that fields should be
3541         distinguished from padding by the fact that zero is not
3542         a valid field name.
3543         
3544         * doc/TODO: remove re-alignment item and add item to doc
3545         the OBJECT_PATH type.
3546         
3547         * dbus/dbus-message.c:
3548         (HeaderField): rename the original member to value_offset
3549         and introduce a name_offset member to keep track of where
3550         the field actually begins.
3551         (adjust_field_offsets): remove.
3552         (append_int_field), (append_uint_field),
3553         (append_string_field): don't align the start of the header
3554         field to a 4-byte boundary.
3555         (get_next_field): impl finding the next marhsalled field
3556         after a given field.
3557         (re_align_field_recurse): impl re-aligning a number of
3558         already marshalled fields.
3559         (delete_field): impl deleting a field of any type and
3560         re-aligning any following fields.
3561         (delete_int_or_uint_field), (delete_string_field): remove.
3562         (set_int_field), (set_uint_field): no need to re-check
3563         that we have the correct type for the field.
3564         (set_string_field): ditto and impl re-aligning any
3565         following fields.
3566         (decode_header_data): update to take into account that
3567         the fields aren't 4-byte aligned any more and the new
3568         way to distinguish padding from header fields. Also,
3569         don't exit when there is too much header padding.
3570         (process_test_subdir): print the directory.
3571         (_dbus_message_test): add test to make sure a following
3572         field is re-aligned correctly after field deletion.
3573         
3574         * dbus/dbus-string.[ch]:
3575         (_dbus_string_insert_bytes): rename from insert_byte and
3576         allow the insert of multiple bytes.
3577         (_dbus_string_test): test inserting multiple bytes.
3578
3579         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
3580         warning note to docs about having to re-align any
3581         marshalled values following the string.
3582         
3583         * dbus/dbus-message-builder.c:
3584         (append_string_field), (_dbus_message_data_load):
3585         don't align the header field.
3586         
3587         * dbus/dbus-auth.c: (process_test_subdir): print the
3588         directory.
3589         
3590         * test/break-loader.c: (randomly_add_one_byte): upd. for
3591         insert_byte change.
3592         
3593         * test/data/invalid-messages/bad-header-field-alignment.message:
3594         new test case.
3595         
3596         * test/data/valid-messages/unknown-header-field.message: shove
3597         a dict in the unknown field.
3598
3599 2003-09-25  Seth Nickell  <seth@gnome.org>
3600
3601         * python/dbus.py:
3602         * python/dbus_bindings.pyx.in:
3603
3604         Handle return values.
3605         
3606         * python/examples/example-client.py:
3607         * python/examples/example-service.py:
3608
3609         Pass back return values from the service to the client.
3610         
3611 2003-09-24  Seth Nickell  <seth@gnome.org>
3612
3613         * python/dbus.py:
3614
3615         Connect Object methods (when you are sharing an object) up... pass
3616         in a list of methods to be shared. Sharing all the methods just
3617         worked out too weird. You can now create nice Services over the
3618         DBus in Python. :-)
3619         
3620         * python/dbus_bindings.pyx.in:
3621
3622         Keep references to user_data tuples passed into C functions so 
3623         Python doesn't garbage collect on us.
3624
3625         Implement MethodReturn and Error subclasses of Message for creating
3626         DBusMessage's of those types.
3627         
3628         * python/examples/example-client.py:
3629         * python/examples/example-service.py:
3630
3631         Simple example code showing both how create DBus services and objects,
3632         and how to use them.
3633
3634 2003-09-23  Havoc Pennington  <hp@pobox.com>
3635
3636         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
3637
3638 2003-09-23  Havoc Pennington  <hp@redhat.com>
3639
3640         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
3641         (dbus_gproxy_disconnect_signal): implement
3642         (dbus_gproxy_manager_remove_signal_match): implement
3643         (dbus_gproxy_manager_add_signal_match): implement
3644         (dbus_gproxy_oneway_call): implement
3645
3646 2003-09-23  Havoc Pennington  <hp@pobox.com>
3647
3648         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
3649         subclass. This means dropping the transparent thread safety of the
3650         proxy; you now need a separate proxy per-thread, or your own
3651         locking on the proxy. Probably right anyway.
3652         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
3653
3654 2003-09-22  Havoc Pennington  <hp@redhat.com>
3655
3656         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
3657
3658 2003-09-21  Seth Nickell  <seth@gnome.org>
3659
3660         First checkin of the Python bindings.
3661         
3662         * python/.cvsignore:
3663         * python/Makefile.am:
3664         * python/dbus_bindings.pyx.in:
3665         * python/dbus_h_wrapper.h:
3666
3667         Pieces for Pyrex to operate on, building a dbus_bindings.so
3668         python module for low-level access to the DBus APIs.
3669         
3670         * python/dbus.py:
3671
3672         High-level Python module for accessing DBus objects.
3673
3674         * configure.in:
3675         * Makefile.am:
3676
3677         Build stuff for the python bindings.
3678
3679         * acinclude.m4:
3680
3681         Extra macro needed for finding the Python C header files.
3682
3683 2003-09-21  Havoc Pennington  <hp@pobox.com>
3684
3685         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
3686         implementing the proxy manager, didn't get very far.
3687
3688         * dbus/dbus-bus.c (dbus_bus_add_match): new
3689         (dbus_bus_remove_match): new
3690
3691         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
3692         path_name argument; adjust the other not-yet-implemented 
3693         gproxy constructors to be what I think they should be.
3694
3695 2003-09-21  Havoc Pennington  <hp@pobox.com>
3696
3697         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
3698         by default for message bus connections.
3699
3700         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
3701         exit_on_disconnect flag is set and we process the disconnected
3702         signal.
3703         (dbus_connection_set_exit_on_disconnect): new function
3704
3705 2003-09-21  Havoc Pennington  <hp@pobox.com>
3706
3707         Get matching rules mostly working in the bus; only actually
3708         parsing the rule text remains. However, the client side of
3709         "signal connections" hasn't been started, this patch is only the
3710         bus side.
3711         
3712         * dbus/dispatch.c: fix for the matching rules changes
3713         
3714         * bus/driver.c (bus_driver_handle_remove_match)
3715         (bus_driver_handle_add_match): send an ack reply from these
3716         method calls
3717
3718         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
3719         arguments, reported by Seth Nickell
3720
3721         * bus/config-parser.c (append_rule_from_element): support
3722         eavesdrop=true|false attribute on policies so match rules 
3723         can be prevented from snooping on the system bus.
3724
3725         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
3726         and "destination" in attribute names; fix some docs bugs; 
3727         add eavesdrop=true|false attribute
3728
3729         * bus/driver.c (bus_driver_handle_add_match)
3730         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
3731         messages
3732
3733         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
3734         rid of broadcast service concept, signals are just always broadcast
3735
3736         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
3737         mostly implement matching rules stuff (currently only exposed as signal
3738         connections)
3739
3740 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
3741
3742         * doc/dbus-specification.sgml: Change the header field name
3743         to be an enum and update the rest of the spec to reference
3744         the fields using the conventinal name.
3745
3746         * dbus/dbus-protocol.h: update to reflect the spec.
3747
3748         * doc/TODO: add item to remove the 4 byte alignment requirement.
3749         
3750         * dbus/dbus-message.c: Remove the code to generalise the
3751         header/body length and serial number header fields as named
3752         header fields so we can reference field names using the 
3753         protocol values.
3754         (append_int_field), (append_uint_field), (append_string_field):
3755         Append the field name as a byte rather than four chars.
3756         (delete_int_or_uint_field), (delete_string_field): reflect the
3757         fact that the field name and typecode now occupy 4 bytes instead
3758         of 8.
3759         (decode_string_field), (decode_header_data): update to reflect
3760         protocol changes and move the field specific encoding from
3761         decode_string_field() back into decode_header_data().
3762         
3763         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
3764         Add utility to aid debugging.
3765         
3766         * dbus/dbus-message-builder.c:
3767         (append_string_field), (_dbus_message_data_load): Update to
3768         reflect protocol changes; Change the FIELD_NAME directive
3769         to HEADER_FIELD and allow it to take the field's conventional
3770         name rather than the actual value.
3771         
3772         * test/data/*/*.message: Update to use HEADER_FIELD instead
3773         of FIELD_NAME; Always align the header on an 8 byte boundary
3774         *before* updating the header length.
3775
3776 2003-09-15  Havoc Pennington  <hp@pobox.com>
3777
3778         * dbus/dbus-pending-call.c: add the get/set object data
3779         boilerplate as for DBusConnection, etc. Use generic object data
3780         for the notify callback.
3781
3782         * glib/dbus-gparser.c (parse_node): parse child nodes
3783
3784         * tools/dbus-viewer.c: more hacking on the dbus-viewer
3785         
3786         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
3787         contain functions shared between the convenience lib and the
3788         installed lib
3789
3790         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
3791         -export-symbols-regex to the GLib library
3792
3793         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
3794         fix the locking in here, and add a default handler for
3795         Introspect() that just returns sub-nodes.
3796
3797 2003-09-14  Havoc Pennington  <hp@pobox.com>
3798
3799         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
3800         rather than gfoo consistent
3801
3802         * glib/dbus-gproxy.h: delete for now, move contents to
3803         dbus-glib.h, because the include files don't work right since we
3804         aren't in the dbus/ subdir.
3805         
3806         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
3807         (dbus_gproxy_end_call): finish
3808         (dbus_gproxy_begin_call): finish
3809
3810         * glib/dbus-gmain.c (dbus_set_g_error): new
3811
3812         * glib/dbus-gobject.c (handle_introspect): include information
3813         about child nodes in the introspection
3814
3815         * dbus/dbus-connection.c (dbus_connection_list_registered): new
3816         function to help in implementation of introspection
3817
3818         * dbus/dbus-object-tree.c
3819         (_dbus_object_tree_list_registered_and_unlock): new function
3820
3821 2003-09-12  Havoc Pennington  <hp@pobox.com>
3822
3823         * glib/dbus-gidl.h: add common base class for all the foo_info
3824         types
3825
3826         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
3827         similar to kdcop
3828
3829         * test/Makefile.am: try test srcdir -ef . in addition to test
3830         srcdir = ., one of them should work (yeah lame)
3831         
3832         * glib/Makefile.am: build the "idl" parser stuff as a convenience
3833         library
3834         
3835         * glib/dbus-gparser.h: make description_load routines return
3836         NodeInfo* not Parser*
3837
3838         * Makefile.am (SUBDIRS): build test dir after all library dirs
3839
3840         * configure.in: add GTK+ detection
3841
3842 2003-09-07  Havoc Pennington  <hp@pobox.com>
3843
3844         * Make Doxygen contented.
3845
3846 2003-09-07  Havoc Pennington  <hp@pobox.com>
3847
3848         * doc/dbus-specification.sgml: more updates
3849
3850 2003-09-06  Havoc Pennington  <hp@pobox.com>
3851
3852         * doc/dbus-specification.sgml: partial updates
3853
3854         * bus/dbus-daemon-1.1.in: fix the config file docs for the
3855         zillionth time; hopefully I edited the right file this time.
3856
3857         * bus/config-parser.c (append_rule_from_element): support
3858         send_type, send_path, receive_type, receive_path
3859
3860         * bus/policy.c: add message type and path to the list of things
3861         that can be "firewalled"
3862
3863 2003-09-06  Havoc Pennington  <hp@pobox.com>
3864
3865         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
3866         (dbus_connection_register_object_path): make this not handle
3867         messages to paths below the given path
3868
3869 2003-09-03  Havoc Pennington  <hp@pobox.com>
3870
3871         * test/glib/Makefile.am: add this with random glib-linked test
3872         programs
3873
3874         * glib/Makefile.am: remove the random test programs from here,
3875         leave only the unit tests
3876
3877         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
3878         uscore/javacaps conversion, and fix     
3879         (get_object_property, set_object_property): change to .NET
3880         convention for mapping props to methods, set_FooBar/get_FooBar, 
3881         since one language has such a convention we may as well copy it. 
3882         Plus real methods in either getFooBar or get_foo_bar style won't 
3883         collide with this convention.
3884
3885 2003-09-01  Havoc Pennington  <hp@pobox.com>
3886
3887         * glib/dbus-gparser.c: implement
3888
3889         * glib/dbus-gobject.c: start implementing skeletons support
3890
3891         * configure.in: when disabling checks/assert, also define
3892         G_DISABLE_ASSERT and G_DISABLE_CHECKS
3893
3894 2003-09-01  Havoc Pennington  <hp@pobox.com>
3895
3896         * glib/Makefile.am: rearrange a bunch of files and get "make
3897         check" framework set up
3898
3899 2003-08-31  Havoc Pennington  <hp@pobox.com>
3900
3901         * fix build with --disable-tests
3902
3903 2003-08-30  Havoc Pennington  <hp@pobox.com>
3904
3905         * dbus/dbus-connection.c: purge DBusMessageHandler
3906
3907         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
3908         use callbacks everywhere
3909
3910 2003-08-30  Havoc Pennington  <hp@pobox.com>
3911
3912         * test/data/valid-config-files/system.d/test.conf: change to 
3913         root for the user so warnings don't get printed
3914
3915         * dbus/dbus-message.c: add dbus_message_get_path,
3916         dbus_message_set_path
3917         
3918         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
3919         dispatching to a path
3920
3921         * dbus/dbus-string.c (_dbus_string_validate_path): add
3922
3923         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
3924         (_dbus_marshal_object_path): implement
3925
3926         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
3927         to contain the path to the target object
3928         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
3929         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
3930
3931 2003-08-30  Havoc Pennington  <hp@pobox.com>
3932
3933         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
3934
3935 2003-08-29  Havoc Pennington  <hp@pobox.com>
3936
3937         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
3938         registered
3939         (struct DBusObjectSubtree): shrink this
3940         a lot, since we may have a lot of them
3941         (_dbus_object_tree_free_all_unlocked): implement
3942         (_dbus_object_tree_dispatch_and_unlock): implement
3943
3944 2003-08-29  Havoc Pennington  <hp@pobox.com>
3945
3946         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
3947
3948 2003-08-28  Havoc Pennington  <hp@pobox.com>
3949
3950         purge DBusObjectID
3951         
3952         * dbus/dbus-connection.c: port to no ObjectID, create a
3953         DBusObjectTree, rename ObjectTree to ObjectPath in public API
3954
3955         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
3956         everything except UnregisterFunction and MessageFunction
3957         
3958         * dbus/dbus-marshal.c: port away from DBusObjectID, 
3959         add DBUS_TYPE_OBJECT_PATH
3960         
3961         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
3962         dbus/dbus-objectid.[hc]: remove these, we are moving to 
3963         path-based object IDs
3964
3965 2003-08-25  Havoc Pennington  <hp@pobox.com>
3966
3967         Just noticed that dbus_message_test is hosed, I wonder when I
3968         broke that. I thought make check was passing earlier...
3969         
3970         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
3971         container tree, will replace most of dbus-object-registry
3972
3973         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
3974         screwup
3975
3976 2003-08-19  Havoc Pennington  <hp@pobox.com>
3977
3978         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
3979         (dbus_message_is_error): fix this function
3980
3981         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
3982         match
3983
3984         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
3985         reflect clarified man page
3986         (bus_client_policy_check_can_send): ditto
3987         
3988         * bus/session.conf.in: fixup
3989
3990         * bus/system.conf.in: fixup
3991
3992 2003-08-18  Havoc Pennington  <hp@redhat.com>
3993
3994         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
3995
3996         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3997         dumb bug created earlier (wrong order of args to
3998         decode_header_data())
3999         
4000         * tools/dbus-send.c: port
4001
4002         * tools/dbus-print-message.c (print_message): port
4003
4004         * test/data/*messages: port all messages over
4005         
4006         * dbus/dbus-message-builder.c: support including 
4007         message type
4008         
4009         * bus/driver.c: port over
4010         
4011         * bus/dispatch.c: port over to new stuff
4012
4013         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4014         rename disconnect signal to "Disconnected"
4015
4016 2003-08-17  Havoc Pennington  <hp@pobox.com>
4017
4018         This doesn't compile yet, but syncing up so I can hack on it from
4019         work. What are branches for if not broken code? ;-)
4020         
4021         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
4022         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
4023         DBUS_HEADER_FIELD_ERROR_NAME
4024         
4025         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
4026         for the interface+member pairs
4027         (string_hash): change to use g_str_hash algorithm
4028         (find_direct_function, find_string_function): refactor these to
4029         share most code.
4030         
4031         * dbus/dbus-message.c: port all of this over to support 
4032         interface/member fields instead of name field
4033
4034         * dbus/dbus-object-registry.c: port over
4035         
4036         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
4037         from _dbus_string_validate_name
4038
4039         * bus/dbus-daemon-1.1: change file format for the 
4040         <deny>/<allow> stuff to match new message naming scheme
4041
4042         * bus/policy.c: port over
4043
4044         * bus/config-parser.c: parse new format
4045         
4046 2003-08-16  Havoc Pennington  <hp@pobox.com>
4047
4048         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
4049         broken assertion
4050
4051         * glib/dbus-gproxy.c: some hacking
4052
4053 2003-08-15  Havoc Pennington  <hp@redhat.com>
4054
4055         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
4056
4057         * dbus/dbus-connection.c
4058         (dbus_connection_send_with_reply_and_block): factor out internals;
4059         change to convert any error replies to DBusError instead of 
4060         returning them as a message
4061
4062 2003-08-15  Havoc Pennington  <hp@pobox.com>
4063
4064         * dbus/dbus-connection.c, 
4065         dbus/dbus-pending-call.c: Finish the pending call stuff
4066
4067 2003-08-14  Havoc Pennington  <hp@redhat.com>
4068
4069         * dbus/dbus-pending-call.c: start on new object that will replace
4070         DBusMessageHandler and ReplyHandlerData for tracking outstanding
4071         replies
4072
4073         * dbus/dbus-gproxy.c: start on proxy object used to communicate
4074         with remote interfaces
4075
4076         * dbus/dbus-gidl.c: do the boring boilerplate in here
4077         
4078 2003-08-12  Havoc Pennington  <hp@pobox.com>
4079
4080         * bus/dispatch.c (bus_dispatch): make this return proper 
4081         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
4082
4083         * dbus/dbus-errors.c (dbus_set_error): use
4084         _dbus_string_append_printf_valist
4085
4086         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
4087         (_dbus_string_append_printf): new
4088
4089         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
4090         UNKNOWN_METHOD
4091
4092         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
4093         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
4094         message is unhandled.
4095
4096 2003-08-11  Havoc Pennington  <hp@pobox.com>
4097
4098         * bus/test.c (client_disconnect_handler): change to return
4099         HANDLED (would have been REMOVE_MESSAGE)
4100
4101         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
4102         HANDLED/NOT_YET_HANDLED instead of
4103         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
4104         should be used.
4105
4106 2003-08-10  Havoc Pennington  <hp@pobox.com>
4107
4108         * tools/dbus-send.c (main): add --type argument, for now
4109         supporting only method_call and signal types.
4110
4111         * tools/dbus-print-message.c: print message type
4112
4113         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4114         init connection->objects
4115
4116         * doc/dbus-specification.sgml: fix sgml
4117
4118         * bus/*.c: port over to object-instance API changes
4119
4120         * test/test-service.c: ditto
4121         
4122         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
4123         name, we will have to fix up the rest of the code to also handle
4124         this
4125         (dbus_message_new): generic message-creation call
4126         (set_string_field): allow appending name field
4127
4128 2003-08-06  Havoc Pennington  <hp@pobox.com>
4129
4130         * dbus/dbus-object-registry.c: implement signal connection 
4131         and dispatch
4132
4133         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
4134
4135         * dbus/dbus-internals.c (_dbus_memdup): new function
4136
4137 2003-08-02  Havoc Pennington  <hp@pobox.com>
4138
4139         * dbus/dbus-message.c (dbus_message_get_no_reply)
4140         (dbus_message_set_no_reply): add these and remove
4141         set_is_error/get_is_error
4142
4143         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
4144         remove the ERROR flag, since there's now an ERROR type
4145
4146 2003-08-01  Havoc Pennington  <hp@pobox.com>
4147
4148         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
4149         implement
4150
4151         * dbus/dbus-message.c (dbus_message_get_type): new function
4152
4153         * doc/dbus-specification.sgml: add "type" byte to messages
4154
4155 2003-08-01  Havoc Pennington  <hp@pobox.com>
4156
4157         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
4158         a message type enum to distinguish kinds of message
4159         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
4160         that need not be replied to
4161
4162 2003-08-01  Havoc Pennington  <hp@pobox.com>
4163
4164         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
4165         (unpack_8_octets): fix no-64-bit-int bug
4166
4167         * dbus/dbus-object-registry.c (validate_id): validate the 
4168         connection ID bits, not just the instance ID.
4169
4170         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
4171         the connection-global 33 bits of the object ID
4172
4173         * dbus/dbus-object-registry.c (info_from_entry): fill in 
4174         object ID in the new way
4175
4176         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
4177         define server/client/instance bits.
4178
4179 2003-07-30  Havoc Pennington  <hp@pobox.com>
4180
4181         * dbus/dbus-connection.c (dbus_connection_register_object): fix
4182         build
4183
4184 2003-07-13  Havoc Pennington  <hp@pobox.com>
4185
4186         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
4187         fields to DBusObjectVTable and DBusObjectInfo
4188
4189 2003-07-12  Havoc Pennington  <hp@pobox.com>
4190
4191         * dbus/dbus-object-registry.c: implement unit test,
4192         fix bugs discovered in process
4193
4194         * dbus/dbus-connection.c: remove handler_table and
4195         register_handler(), add DBusObjectRegistry usage
4196
4197         * dbus/dbus-objectid.c (dbus_object_id_is_null)
4198         (dbus_object_id_set_null): new functions
4199
4200 2003-07-08  Havoc Pennington  <hp@pobox.com>
4201
4202         * dbus/dbus-object.c: implement some of this
4203
4204         * dbus/dbus-object-registry.c
4205         (_dbus_object_registry_add_and_unlock): fill in the object_id out
4206         param
4207         (_dbus_object_registry_new): handle OOM
4208
4209 2003-07-08  Havoc Pennington  <hp@pobox.com>
4210
4211         * dbus/dbus-object.h: sketch out an API for registering objects
4212         with a connection, that allows us to use as little as 24 bytes
4213         per object and lets application code represent an object in 
4214         any conceivable way.
4215
4216         * dbus/dbus-object-registry.c: implement the hard bits of the
4217         DBusConnection aspect of object API. Not yet wired up.
4218         
4219 2003-07-06  Havoc Pennington  <hp@pobox.com>
4220
4221         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
4222         (_dbus_marshal_object_id): new
4223         (_dbus_demarshal_object_id): new
4224         (_dbus_marshal_get_arg_end_pos): support object ID type, and
4225         consolidate identical switch cases. Don't conditionalize handling
4226         of DBUS_TYPE_UINT64, need to handle the type always.
4227         (_dbus_marshal_validate_arg): consolidate identical cases, and
4228         handle DBUS_TYPE_OBJECT_ID
4229
4230         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
4231
4232         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
4233
4234 2003-09-28  Havoc Pennington  <hp@pobox.com>
4235
4236         * real 0.13 release
4237
4238 2003-09-28  Havoc Pennington  <hp@pobox.com>
4239
4240         * doc/Makefile.am (dbus-specification.html): testing a funky hack
4241         to work with Debian db2html
4242
4243 2003-09-28  Havoc Pennington  <hp@pobox.com>
4244
4245         * configure.in: 0.13
4246
4247         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
4248         stylesheet-images for benefit of Debian
4249         
4250         Change back to using filesystem-linked sockets for the system
4251         bus, so only root can create the default system bus address.
4252         
4253         * bus/system.conf.in: change to use
4254         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4255
4256         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
4257         from here.
4258
4259         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
4260         here, and AC_DEFINE DBUS_SYSTEM_PATH
4261
4262 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
4263
4264         * doc/TODO:
4265         * doc/busconfig.dtd:
4266         Add busconfig DTD.
4267         
4268 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
4269
4270         * doc/dbus-specification.sgml:
4271         Add activation reply values.
4272         
4273 2003-08-05  Havoc Pennington  <hp@redhat.com>
4274
4275         * configure.in: 0.12
4276
4277 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
4278
4279         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
4280         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
4281         (add_watch), (remove_watch), (create_source):
4282         Refcount fds, fixes some reentrancy issues.
4283         
4284 2003-07-30  Havoc Pennington  <hp@redhat.com>
4285
4286         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
4287         bus address to be abstract if we have abstract sockets
4288
4289         * NEWS: update
4290
4291 2003-07-28  Havoc Pennington  <hp@redhat.com>
4292
4293         * bus/messagebus.in: fix to avoid processname/servicename 
4294         confusion, from Michael Kearey
4295         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
4296         
4297 2003-07-23  Havoc Pennington  <hp@pobox.com>
4298
4299         * dbus/dbus-message.c (dbus_message_iter_get_named): 
4300         fix from Andy Hanton to remove broken "+1"
4301
4302 2003-07-16  Havoc Pennington  <hp@pobox.com>
4303
4304         * tools/dbus-launch.c (babysit): close stdout/stderr in the
4305         babysitter process, as suggested by Thomas Leonard, so 
4306         an "eval `dbus-launch --exit-with-session`" will actually 
4307         return
4308
4309 2003-07-16  Havoc Pennington  <hp@pobox.com>
4310
4311         * configure.in: print out EXPANDED_* variables in the summary at
4312         the end; clean up the code that computes EXPANDED_ variables and
4313         get the ones using exec_prefix right. Should make things work
4314         when you build without --prefix
4315
4316 2003-06-29  Havoc Pennington  <hp@pobox.com>
4317
4318         * mono/Test.cs (class Test): fire up a main loop and run it
4319
4320         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
4321         done once, the app has to do it
4322
4323 2003-06-26  Havoc Pennington  <hp@pobox.com>
4324
4325         * mono/Connection.cs: set up connection with the glib main loop
4326
4327 2003-07-01  Havoc Pennington  <hp@redhat.com>
4328
4329         * doc/dbus-specification.sgml: clarify the format of a type code,
4330         change suggested by Jim Blandy
4331
4332 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
4333
4334         * doc/Makefile.am:
4335         * tools/Makefile.am: Don't assume srcdir == builddir.
4336
4337         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
4338         the allocated block.
4339         (_dbus_memory_test): New function.
4340         * dbus/dbus-test.h: Add _dbus_memory_test ().
4341         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
4342
4343         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
4344         of %c%c%c%c.
4345         (dbus_message_new): Remove obsolete @todo.
4346
4347         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
4348         (_dbus_marshal_set_uint64): Fix comment.
4349
4350         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
4351         hardcode FIELD_REPLY_SERIAL.
4352
4353         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
4354         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
4355
4356         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
4357         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
4358
4359 2003-06-24  Havoc Pennington  <hp@pobox.com>
4360
4361         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
4362
4363 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
4364
4365         * configure.in:
4366         * gcj/.cvsignore:
4367         * gcj/Hello.java:
4368         * gcj/Makefile.am:
4369         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
4370         * gcj/org/.cvsignore:
4371         * gcj/org/Makefile.am:
4372         * gcj/org/freedesktop/.cvsignore:
4373         * gcj/org/freedesktop/Makefile.am:
4374         * gcj/org/freedesktop/dbus/.cvsignore:
4375         * gcj/org/freedesktop/dbus/Makefile.am:
4376         * gcj/org/freedesktop/dbus/Message.java: (Message),
4377         (Message.Message):
4378         * gcj/org/freedesktop/dbus/natMessage.cc:
4379         Fix the build system.
4380
4381 2003-06-22  Havoc Pennington  <hp@pobox.com>
4382
4383         * mono/Connection.cs: add more bindings
4384
4385         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
4386         more than once.
4387
4388 2003-06-22  Havoc Pennington  <hp@pobox.com>
4389
4390         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
4391         Start wrapping more stuff.
4392
4393 2003-06-22  Havoc Pennington  <hp@pobox.com>
4394
4395         * mono/Message.cs: implement Message.Wrap() that ensures we only
4396         have a single C# wrapper per DBusMessage, assuming it works which
4397         it probably doesn't.
4398
4399         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
4400         (dbus_message_free_data_slot): new
4401         (dbus_message_set_data): new
4402         (dbus_message_get_data): new
4403
4404 2003-06-22  Havoc Pennington  <hp@pobox.com>
4405
4406         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
4407         (_dbus_data_slot_allocator_alloc): rework these to keep a
4408         reference count on each slot and automatically manage a global
4409         slot ID variable passed in by address
4410
4411         * bus/bus.c: convert to new dataslot API
4412
4413         * dbus/dbus-bus.c: convert to new dataslot API
4414
4415         * dbus/dbus-connection.c: convert to new dataslot API
4416
4417         * dbus/dbus-server.c: convert to new dataslot API
4418
4419         * glib/dbus-gmain.c: ditto
4420
4421         * bus/test.c: ditto
4422
4423         * bus/connection.c: ditto
4424
4425 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
4426
4427         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
4428         after the gcj checks so that the correct configuration tags
4429         will be added to libtool.
4430
4431         * dbus-glib-1.pc.in: No need to specify any includes since
4432         dbus-1.pc.in has those.
4433
4434 2003-06-22  Havoc Pennington  <hp@pobox.com>
4435
4436         * mono/*, gcj/*, configure.in, Makefile.am:
4437         Check in makefiles and subdirs for mono and gcj bindings.
4438         Neither binding actually exists, just trying to get through
4439         all the build and other boring bits.
4440
4441 2003-06-21  Philip Blundell  <philb@gnu.org>
4442
4443         * tools/dbus-monitor.1: Updated.
4444
4445         * tools/dbus-send.1: Likewise.
4446
4447 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
4448
4449         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
4450         for hangup and error after checking read so we won't discard
4451         pending data if both hangup and read are set.
4452
4453 2003-06-19  Philip Blundell  <philb@gnu.org>
4454
4455         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
4456
4457         * tools/dbus-send.c: Accept both --system and --session.
4458
4459         * tools/dbus-monitor.c: Same here.
4460
4461 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
4462
4463         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
4464         from C++ (Patch by Miloslav Trmac).
4465
4466 2003-06-15  Joe Shaw  <joe@assbarn.com>
4467
4468         * configure.in: Check for socklen_t.
4469
4470         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
4471
4472         * test/test-segfault.c: Add #include <sys/time.h>
4473
4474         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
4475         dbus-launch needs it.
4476
4477 2003-06-09  Havoc Pennington  <hp@redhat.com>
4478
4479         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
4480         SUN_LEN, it breaks abstract socket usage
4481
4482         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
4483         starts of lines.
4484
4485 2003-06-04  Havoc Pennington  <hp@pobox.com>
4486
4487         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
4488         using unix:abstract=/foo, and when listening in a tmpdir
4489         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
4490
4491         * dbus/dbus-transport.c (_dbus_transport_open): support
4492         unix:abstract=/foo
4493
4494         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
4495         support abstract sockets
4496
4497         * dbus/dbus-transport-unix.c
4498         (_dbus_transport_new_for_domain_socket): support abstract sockets
4499
4500         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
4501         toggle as an argument, implement abstract namespace support
4502         (_dbus_listen_unix_socket): ditto
4503
4504         * configure.in: add --enable-abstract-sockets and implement
4505         a configure check for autodetection of the right value.
4506
4507 2003-06-01  Havoc Pennington  <hp@pobox.com>
4508
4509         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
4510         in /tmp (though on Linux this will end up being useless,
4511         when we add abstract namespace support)
4512
4513         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
4514         subst'ing it
4515
4516 2003-05-28  Colin Walters  <walters@verbum.org>
4517
4518         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
4519
4520 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
4521
4522         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
4523
4524 2003-05-17  Colin Walters  <walters@gnu.org>
4525
4526         * tools/dbus-send.c: Don't exit with an error code if --help was
4527         passed.  Default to using the session bus instead of the system
4528         one.
4529
4530         * tools/dbus-launch.c: Ditto.
4531
4532         * tools/dbus-monitor.c: Ditto.
4533
4534         * tools/dbus-send.1: Update with new arguments.
4535
4536         * tools/dbus-launch.c: Emit code to export variables.  New
4537         arguments -s and -c to specify shell syntax, and a bit of code to
4538         autodetect syntax.  Also, allow specifying a program to run.
4539
4540         * tools/dbus-launch.1: Update with new arguments.
4541
4542         * tools/dbus-send.1: Ditto.
4543
4544         * tools/dbus-monitor.1: Ditto.
4545
4546 2003-05-17  Havoc Pennington  <hp@pobox.com>
4547
4548         * bus/config-parser.c (merge_included): merge in policies from
4549         child configuration file.
4550
4551         * bus/policy.c (bus_policy_merge): function to merge two policies
4552         together
4553
4554 2003-05-16  Havoc Pennington  <hp@redhat.com>
4555
4556         * dbus/dbus-connection.c: disable verbose lock spew
4557
4558         * tools/dbus-send.c: add --print-reply command line option
4559
4560         * tools/dbus-print-message.h (print_message): new util function
4561         shared by dbus-send and dbus-monitor
4562
4563         * tools/dbus-monitor.c (handler_func): exit on disconnect
4564
4565         * dbus/dbus-transport-unix.c (do_reading): if the transport is
4566         disconnected, don't try to use the read_watch
4567
4568         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
4569         so we can find this bug more easily
4570
4571 2003-05-16  Havoc Pennington  <hp@redhat.com>
4572
4573         * bus/policy.c (free_rule_list_func): avoid a crash when passed
4574         NULL as DBusHashTable is annoyingly likely to do.
4575
4576 2003-05-16  Colin Walters  <walters@verbum.org>
4577
4578         * tools/dbus-monitor.c: Add --session argument and usage()
4579         function.
4580
4581         * tools/dbus-monitor.1: Update with new --session arg.
4582
4583         * bus/Makefile.am (install-data-hook): Create
4584         $(libdir)/dbus-1.0/services so that the session bus is happy.
4585
4586 2003-05-15  Havoc Pennington  <hp@redhat.com>
4587
4588         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
4589         on non-x86. ifdef's are evil.
4590
4591 2003-05-15  Havoc Pennington  <hp@redhat.com>
4592
4593         * configure.in: 0.11
4594
4595         * NEWS: update
4596
4597         * bus/Makefile.am (initddir): apparently we are supposed to put
4598         init scripts in /etc/rc.d/init.d not /etc/init.d
4599
4600         * bus/Makefile.am: remove the "you must --enable-tests to make
4601         check" as it broke distcheck
4602
4603         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
4604
4605 2003-05-13  James Willcox  <jwillcox@gnome.org>
4606
4607         * configure.in:
4608         * bus/activation.c: (bus_activation_service_created),
4609         (bus_activation_activate_service):
4610         * bus/driver.c: (bus_driver_send_service_deleted),
4611         (bus_driver_send_service_created), (bus_driver_send_service_lost),
4612         (bus_driver_send_service_acquired),
4613         (bus_driver_send_welcome_message),
4614         (bus_driver_handle_list_services):
4615         * bus/session.conf.in:
4616         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
4617         (dbus_bus_service_exists), (dbus_bus_activate_service):
4618         * dbus/dbus-bus.h:
4619
4620         Add some convenience API which lets you activate a service, and did a
4621         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
4622         and dbus_message_get_args()
4623
4624 2003-05-11  Havoc Pennington  <hp@pobox.com>
4625
4626         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
4627         calling _dbus_marshal_validate_arg() for every byte in a byte
4628         array, etc.
4629
4630         * dbus/dbus-message-handler.c: use atomic reference counting to
4631         reduce number of locks slightly; the global lock in here sucks
4632
4633         * dbus/dbus-connection.c
4634         (_dbus_connection_update_dispatch_status_and_unlock): variant of
4635         update_dispatch_status that can be called with lock held; then use
4636         in a couple places to reduce locking/unlocking
4637         (dbus_connection_send): hold the lock over the whole function
4638         instead of acquiring it twice.
4639
4640         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
4641
4642         * bus/connection.c (bus_connections_setup_connection): fix access
4643         to already-freed memory.
4644
4645         * dbus/dbus-connection.c: keep a little cache of linked list
4646         nodes, to avoid using the global linked list alloc lock in the
4647         normal send-message case. Instead we just use the connection lock
4648         that we already have to take.
4649
4650         * dbus/dbus-list.c (_dbus_list_find_last): new function
4651
4652         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
4653         change to use a struct for the atomic type; fix docs,
4654         they return value before increment, not after increment.
4655
4656         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
4657         (_dbus_string_append_8_aligned): new functions to try to
4658         microoptimize this operation.
4659         (reallocate_for_length): break this out of set_length(), to
4660         improve profile info, and also so we can consider inlining the
4661         set_length() part.
4662
4663         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
4664         strings with some preallocation, cuts down on our calls to realloc
4665         a fair bit. Though if we can get the "move entire string to empty
4666         string" optimization below to kick in here, it would be better.
4667
4668         * dbus/dbus-string.c (_dbus_string_move): just call
4669         _dbus_string_move_len
4670         (_dbus_string_move_len): add a special case for moving
4671         an entire string into an empty string; we can just
4672         swap the string data instead of doing any reallocs.
4673         (_dbus_string_init_preallocated): new function
4674
4675 2003-05-11  Havoc Pennington  <hp@pobox.com>
4676
4677         Write a "test-profile" that does echo client-server with threads;
4678         profile reveals lock contention, memcpy/realloc of buffers, and
4679         UTF-8 validation as hot spots. 20% of lock contention eliminated
4680         with dbus_atomic_inc/dec implementation on x86.  Much remaining
4681         contention is global mempool locks for GList and DBusList.
4682
4683         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
4684         x86 implementation
4685
4686         * dbus/dbus-connection.c (struct DBusConnection): use
4687         dbus_atomic_t for the reference count
4688
4689         * dbus/dbus-message.c (struct DBusMessage): declare
4690         dbus_atomic_t values as volatile
4691
4692         * configure.in: code to detect ability to use atomic integer
4693         operations in assembly, from GLib patch
4694
4695         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
4696         time, tired of it being wrong in threads and forked processes
4697
4698         * glib/test-profile.c: a little program to bounce messages back
4699         and forth between threads and eat CPU
4700
4701         * dbus/dbus-connection.c: add debug spew macros for debugging
4702         thread locks; include config.h at top; fix deadlock in
4703         dbus_connection_flush()
4704
4705 2003-05-08  Havoc Pennington  <hp@pobox.com>
4706
4707         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
4708         data from getting written, and there wasn't a good reason to
4709         use _exit really.
4710
4711         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
4712         dbus_verbose lines in test coverage
4713         (main): add list of functions sorted by # of untested blocks
4714         to the coverage report
4715
4716         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
4717
4718         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
4719
4720         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
4721         extend test coverage
4722
4723         * test/data/auth/cancel.auth-script: test canceling an
4724         authentication
4725
4726         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
4727         aren't used. in CVS history if we end up needing them.
4728
4729 2003-05-04  Havoc Pennington  <hp@pobox.com>
4730
4731         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
4732         unit test
4733
4734         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
4735         function, which assumed length was in # of strings, not bytes
4736
4737         * dbus/dbus-message.c (_dbus_message_test): add tests for some
4738         missing coverage
4739
4740         * dbus/dbus-connection.c
4741         (_dbus_connection_queue_received_message): disable function for
4742         now, we are only using it in test mode
4743
4744         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4745         remove a mistaken FIXME
4746
4747 2003-05-04  Havoc Pennington  <hp@pobox.com>
4748
4749         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
4750         unlock mutex on successful return, patch from Anders Gustafsson
4751
4752 2003-05-04  Havoc Pennington  <hp@pobox.com>
4753
4754         * dbus-glib-1.pc.in (Requires): fix dependencies, from
4755         Anders Gustafsson
4756
4757 2003-05-04  Havoc Pennington  <hp@pobox.com>
4758
4759         * tools/dbus-launch.c: implement
4760
4761         * bus/main.c (main), bus/bus.c (bus_context_new):
4762         implement --print-pid and --fork
4763
4764 2003-05-03  Havoc Pennington  <hp@redhat.com>
4765
4766         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
4767         the address had no value, and add to test suite. Fix and
4768         regression test from Miloslav Trmac
4769
4770 2003-05-03  Havoc Pennington  <hp@pobox.com>
4771
4772         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
4773         watch is invalid when handled
4774
4775         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
4776         dbus-launch utility to launch the bus from a shell script.  Didn't
4777         actually implement dbus-launch yet, it's just a placeholder still.
4778
4779 2003-05-03  Havoc Pennington  <hp@pobox.com>
4780
4781         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
4782         daemon; also documents daemon config file, so replaces
4783         doc/config-file.txt. Corrected some stuff from config-file.txt in
4784         the process of moving it.
4785
4786 2003-05-03  Havoc Pennington  <hp@pobox.com>
4787
4788         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
4789         add some man pages
4790
4791 2003-05-03  Colin Walters  <walters@verbum.org>
4792
4793         * dbus/dbus-sysdeps.c (fill_user_info): Test against
4794         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
4795
4796         * Makefile.am: Update to use new .pc versioning scheme.
4797
4798 2003-05-02  Havoc Pennington  <hp@redhat.com>
4799
4800         * bus/system.conf.in: allow send/receive to/from message bus
4801         service
4802
4803 2003-04-30  Havoc Pennington  <hp@redhat.com>
4804
4805         * configure.in: print a note when building with unit tests and
4806         without assertions
4807
4808 2003-04-30  Havoc Pennington  <hp@redhat.com>
4809
4810         * Makefile.am: add a check-local that complains if you didn't
4811         configure with --enable-tests
4812
4813 2003-04-29  Havoc Pennington  <hp@redhat.com>
4814
4815         * glib/dbus-gmain.c: docs cleanups
4816
4817         * dbus/dbus-types.h: add docs on int64 types
4818
4819         * dbus/dbus-memory.c: fix docs to avoid putting private API in
4820         public API docs section
4821
4822 2003-04-29  Havoc Pennington  <hp@redhat.com>
4823
4824         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
4825         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
4826         parallel install API version, not with the D-BUS package version.
4827
4828         * HACKING: move some of README over here
4829
4830         * README: updates, and document API/ABI policy
4831
4832         * configure.in: reindentation
4833
4834 2003-04-29  Havoc Pennington  <hp@redhat.com>
4835
4836         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
4837         to use this library" to be sure people have the right
4838         expectations.
4839
4840 2003-04-28  Havoc Pennington  <hp@redhat.com>
4841
4842         * configure.in: add --enable-docs which by default is auto yes if
4843         doxygen and db2html found, no otherwise; but can be forced on/off
4844
4845         * doc/Makefile.am: conditionalize whether to build docs on
4846         --enable-docs
4847
4848 2003-04-28  Havoc Pennington  <hp@redhat.com>
4849
4850         * configure.in: 0.10
4851
4852         * NEWS: update
4853
4854         * bus/system.conf.in: add <includedir>system.d</includedir>
4855
4856         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
4857         username was provided but not uid
4858
4859         * bus/config-parser.c (struct BusConfigParser): keep track of
4860         whether the parser is toplevel or was included; change some
4861         of the error handling if it's included.
4862
4863 2003-04-27  Havoc Pennington  <hp@pobox.com>
4864
4865         Unbreak my code...
4866
4867         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
4868         report correct status if we finish processing authentication
4869         inside this function.
4870
4871         * bus/activation.c (try_send_activation_failure): use
4872         bus_transaction_send_error_reply
4873
4874         * bus/connection.c (bus_connection_get_groups): return an error
4875         explaining the problem
4876
4877         * bus/bus.c (bus_context_check_security_policy): implement
4878         restriction here that inactive connections can only send the
4879         hello message. Also, allow bus driver to send anything to
4880         any recipient.
4881
4882         * bus/connection.c (bus_connection_complete): create the
4883         BusClientPolicy here instead of on-demand.
4884         (bus_connection_get_policy): don't return an error
4885
4886         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
4887         sender field in message being replied to
4888
4889         * bus/bus.c (bus_context_check_security_policy): fix silly typo
4890         causing it to return FALSE always
4891
4892         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
4893         we checked sender rather than destination
4894
4895 2003-04-25  Havoc Pennington  <hp@redhat.com>
4896
4897         test suite is slightly hosed at the moment, will fix soon
4898
4899         * bus/connection.c (bus_connections_expire_incomplete): fix to
4900         properly disable the timeout when required
4901         (bus_connection_set_name): check whether we can remove incomplete
4902         connections timeout after we complete each connection.
4903
4904         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
4905         probably still broken.
4906
4907         * bus/services.c (bus_registry_acquire_service): implement max
4908         number of services owned, and honor allow/deny rules on which
4909         services a connection can own.
4910
4911         * bus/connection.c (bus_connection_get_policy): report errors here
4912
4913         * bus/activation.c: implement limit on number of pending
4914         activations
4915
4916 2003-04-25  Havoc Pennington  <hp@redhat.com>
4917
4918         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
4919         where we used >= 0 instead of != DBUS_UID_UNSET.
4920
4921 2003-04-25  Havoc Pennington  <hp@redhat.com>
4922
4923         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
4924         were toggled without add/remove, fix from Anders Gustafsson
4925
4926 2003-04-24  Havoc Pennington  <hp@redhat.com>
4927
4928         * test/data/valid-config-files/basic.conf: add <limit> tags to
4929         this test
4930
4931         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
4932         <limit> tag in configuration file.
4933
4934 2003-04-24  Havoc Pennington  <hp@redhat.com>
4935
4936         * bus/dispatch.c: somehow missed some name_is
4937
4938         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
4939         (_dbus_timeout_set_interval): new
4940
4941         * bus/connection.c (bus_connections_setup_connection): record time
4942         when each connection is first set up, and expire them after the
4943         auth timeout passes.
4944
4945 2003-04-24  Havoc Pennington  <hp@redhat.com>
4946
4947         * dbus/dbus-message.c (dbus_message_name_is): rename
4948         (dbus_message_service_is): rename
4949         (dbus_message_sender_is): rename
4950         (dbus_message_get_service): rename
4951
4952 2003-04-24  Havoc Pennington  <hp@redhat.com>
4953
4954         * configure.in: add --enable-checks
4955
4956         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
4957
4958         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
4959         to use thread locks.
4960         (_dbus_connection_handler_destroyed_locked): move some private
4961         functions into proper docs group
4962
4963         * dbus/dbus-internals.h: add _dbus_return_if_fail,
4964         _dbus_return_val_if_fail
4965
4966         Throughout: use dbus_return_if_fail
4967
4968 2003-04-23  James Willcox  <jwillcox@gnome.org>
4969
4970         * glib/dbus-glib.h:
4971         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
4972         (dbus_connection_setup_with_g_main),
4973         (dbus_server_setup_with_g_main):
4974         * glib/test-dbus-glib.c: (main):
4975         * glib/test-thread-client.c: (main):
4976         * glib/test-thread-server.c: (new_connection_callback), (main):
4977         * tools/dbus-monitor.c: (main):
4978
4979         Added a GMainContext argument to dbus_connection_setup_with_g_main()
4980         and dbus_server_setup_with_g_main().
4981
4982 2003-04-20  Havoc Pennington  <hp@pobox.com>
4983
4984         * doc/dbus-specification.sgml: document the restrictions on
4985         message and service names
4986
4987 2003-04-22  Havoc Pennington  <hp@redhat.com>
4988
4989         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
4990         support, and do some code cleanups to share more code and
4991         speed up array marshal/demarshal.
4992
4993         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
4994
4995         * configure.in: generate dbus-arch-deps.h
4996
4997         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
4998         64-bit typecodes
4999
5000 2003-04-22  Havoc Pennington  <hp@redhat.com>
5001
5002         * test/data/valid-messages/opposite-endian.message: fix test
5003         to use proper type for rply field
5004
5005         * test/data/invalid-messages: add tests for below validation
5006
5007         * dbus/dbus-message.c (decode_header_data): validate field types,
5008         and validate that named fields are valid names
5009         (decode_name_field): consider messages in the
5010         org.freedesktop.Local. namespace to be invalid.
5011
5012         * dbus/dbus-string.c (_dbus_string_validate_name): new
5013
5014 2003-04-19  Havoc Pennington  <hp@pobox.com>
5015
5016         * bus/driver.c (bus_driver_handle_hello): check limits and
5017         return an error if they are exceeded.
5018
5019         * bus/connection.c: maintain separate lists of active and inactive
5020         connections, and a count of each. Maintain count of completed
5021         connections per user. Implement code to check connection limits.
5022
5023         * dbus/dbus-list.c (_dbus_list_unlink): export
5024
5025         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
5026         number of bytes in the message queue for a connection
5027
5028 2003-04-18  Havoc Pennington  <hp@pobox.com>
5029
5030         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
5031
5032         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
5033         memleaks
5034
5035         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
5036         on realloc be sure to update the pointer in the keyring
5037
5038         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
5039         offset to avoid writing to unallocated memory
5040
5041         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
5042         try the next mechanism, so we properly handle OOM
5043
5044         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
5045         on OOM.
5046         (_dbus_keyring_new): fix OOM bug
5047         (_dbus_keyring_new_homedir): always set error; impose a maximum
5048         number of keys we'll load from the file, mostly to speed up the
5049         test suite and make its OOM checks more useful, but also for
5050         general sanity.
5051
5052         * dbus/dbus-auth.c (process_error_server): reject authentication
5053         if we get an error from the client
5054         (process_cancel): on cancel, send REJECTED, per the spec
5055         (process_error_client): send CANCEL if we get an error from the
5056         server.
5057
5058 2003-04-18  Havoc Pennington  <hp@pobox.com>
5059
5060         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
5061         debug spew
5062
5063         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
5064         handling problem
5065
5066         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
5067         about DBUS_TEST_HOMEDIR once
5068
5069         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
5070         the environment
5071
5072         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
5073         config file so we test the right thing
5074
5075         Throughout: assorted docs improvements
5076
5077 2003-04-18  Havoc Pennington  <hp@pobox.com>
5078
5079         * glib/dbus-gmain.c: adapt to watch changes
5080
5081         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
5082
5083         * dbus/dbus-server.h: remove dbus_server_handle_watch
5084
5085         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
5086
5087         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
5088         like DBusTimeout, so we don't need dbus_connection_handle_watch
5089         etc.
5090
5091 2003-04-17  Havoc Pennington  <hp@redhat.com>
5092
5093         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
5094         database usage so it all goes via the DBusUserDatabase cache.
5095
5096 2003-04-17  Havoc Pennington  <hp@redhat.com>
5097
5098         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
5099         there was an OOM watch we skipped, we always return TRUE so we
5100         iterate again to have a look at it again. Fixes test suite hang.
5101         Code rearrangement also lets us lose some memset and only iterate
5102         over callbacks once.
5103
5104         * bus/driver.c (bus_driver_handle_message): sense of test for
5105         reply was backward
5106
5107 2003-04-16  Havoc Pennington  <hp@pobox.com>
5108
5109         * doc/dbus-specification.sgml: make spec say serials are unsigned
5110
5111         * dbus/dbus-message.h: change message serials to unsigned
5112
5113         * dbus/dbus-connection.c: adapt to message serials being unsigned
5114
5115 2003-04-15  Havoc Pennington  <hp@pobox.com>
5116
5117         * bus/bus.c: create and keep around a shared DBusUserDatabase
5118         object.
5119
5120         * bus/connection.c (bus_connection_get_groups): don't cache
5121         groups for user in the connection object, since user database
5122         object now does that.
5123
5124 2003-04-16  Havoc Pennington  <hp@redhat.com>
5125
5126         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
5127         list of size counters
5128         (_dbus_message_loader_putback_message_link): put back a popped link
5129
5130         * dbus/dbus-connection.c
5131         (dbus_connection_set_max_live_messages_size): rename
5132         max_received_size
5133         (dbus_connection_get_outgoing_size): get size of outgoing
5134         queue
5135         (_dbus_connection_set_connection_counter): remove this cruft
5136
5137 2003-04-14  Havoc Pennington  <hp@redhat.com>
5138
5139         * dbus/dbus-userdb.c: user database abstraction, mostly to get
5140         caching, but at some point we might want to be able to use a
5141         different database.
5142
5143         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
5144         SHA1 conf file to test the sha1 auth mechanism, since the regular
5145         test always uses EXTERNAL when available.
5146
5147         * configure.in,
5148         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
5149         add conf file that requires use of sha1 auth
5150
5151 2003-04-13  Havoc Pennington  <hp@pobox.com>
5152
5153         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
5154         from Philip Blundell to send messages and monitor them.
5155
5156 2003-04-13  Havoc Pennington  <hp@pobox.com>
5157
5158         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
5159         callbacks
5160
5161         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
5162         users
5163
5164         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5165         fix to only recover unused bytes if we're already authenticated
5166         (_dbus_transport_get_is_authenticated): fix to still mark us
5167         authenticated if there are unused bytes.
5168
5169         * bus/dispatch.c: implement security policy checking
5170
5171         * bus/connection.c (bus_transaction_send_from_driver): new
5172
5173         * bus/bus.c (bus_context_check_security_policy): new
5174
5175         * bus/dispatch.c (send_service_nonexistent_error): delete this,
5176         now we just set the DBusError and it gets converted to an error
5177         reply.
5178
5179         * bus/connection.c (allow_user_function): enable code using actual
5180         data from the config file
5181
5182         * bus/policy.c (list_allows_user): handle wildcard rules for
5183         user/group connection perms
5184
5185 2003-04-13  Havoc Pennington  <hp@pobox.com>
5186
5187         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
5188
5189         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
5190
5191         * bus/policy.c (bus_policy_append_mandatory_rule)
5192         (bus_policy_append_default_rule, bus_policy_append_user_rule)
5193         (bus_policy_append_group_rule): new functions
5194
5195 2003-04-12  Havoc Pennington  <hp@pobox.com>
5196
5197         * bus/config-parser.c (bus_config_parser_new): fix a memleak
5198
5199         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
5200         the pid/gid/uid, just for paranoia.
5201
5202         * test/break-loader.c (randomly_do_n_things): find a byte
5203         containing a type code, and randomly change it to a different
5204         type code.
5205
5206 2003-04-12  Havoc Pennington  <hp@pobox.com>
5207
5208         * bus/policy.h: change BusPolicy to be the thing from the config
5209         file, and rename old BusPolicy to BusClientPolicy
5210
5211         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
5212         match change in how policy works
5213
5214         * dbus/dbus-internals.h: mark assert_not_reached as
5215         __attribute((noreturn))__
5216
5217 2003-04-11  Havoc Pennington  <hp@redhat.com>
5218
5219         * doc/dbus-specification.sgml: fix a spot with the wrong name for
5220         the broadcast service. Use boolean return for ServiceExists.
5221
5222 2003-04-11  Havoc Pennington  <hp@redhat.com>
5223
5224         * configure.in: add another directory to look for qt in.
5225
5226 2003-04-11  Havoc Pennington  <hp@redhat.com>
5227
5228         * AUTHORS: add Colin Walters
5229
5230 2003-04-11  Havoc Pennington  <hp@redhat.com>
5231
5232         * NEWS: update
5233
5234         * configure.in: 0.9
5235
5236 2003-04-11  Havoc Pennington  <hp@redhat.com>
5237
5238         * bus/messagebus.in: remove pid file when stopping the
5239         message bus, since the bus won't have privileges to remove it
5240         itself.
5241
5242 2003-04-11  Havoc Pennington  <hp@redhat.com>
5243
5244         * bus/bus.c (bus_context_new): move credentials change after
5245         creating pidfile
5246
5247 2003-04-11  Havoc Pennington  <hp@pobox.com>
5248
5249         * test/decode-gcov.c: add "below average functions" to the
5250         coverage report, and change how some of the code works.
5251
5252         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
5253         not in the coverage stats.
5254
5255         * test/test-service.c (main): use _dbus_verbose not fprintf in a
5256         couple places so running the test suite doesn't result in megaspam.
5257
5258 2003-04-11  Havoc Pennington  <hp@pobox.com>
5259
5260         * bus/dispatch.c (check_existent_service_activation): accept a no
5261         memory error in a place we didn't before
5262
5263         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
5264         in case the first one failed," since the test suite is less
5265         broken now.
5266
5267 2003-04-10  Havoc Pennington  <hp@pobox.com>
5268
5269         * bus/dispatch.c (check_segfault_service_activation): add test
5270         for launching an executable that just crashes.
5271
5272         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
5273         don't leave a million cores. We'll see how portable this is.
5274
5275 2003-04-10  Havoc Pennington  <hp@pobox.com>
5276
5277         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
5278         the possible parent failures before we fork, so that we don't
5279         fail to create a babysitter after creating the child.
5280
5281         * bus/activation.c (bus_activation_activate_service): kill child
5282         if we don't successfully complete the activation.
5283
5284 2003-04-10  Havoc Pennington  <hp@redhat.com>
5285
5286         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
5287         the connection if it's disconnected
5288
5289         * bus/activation.c (bus_activation_service_created): use new
5290         transaction features to roll back removal of pending activation if
5291         we don't successfully create the service after all. Don't remove
5292         pending activation if the function fails.
5293
5294         * dbus/dbus-list.c (_dbus_list_insert_before_link)
5295         (_dbus_list_insert_after_link): new code to facilitate
5296         services.c fixes
5297
5298         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
5299         new functionality, so we can preallocate the ability to insert
5300         into a hash table.
5301
5302         * bus/connection.c (bus_transaction_add_cancel_hook): new function
5303         allowing us to put custom hooks in a transaction to be used for
5304         cancelling said transaction
5305
5306         * doc/dbus-specification.sgml: add some discussion of secondary
5307         service owners, and disallow zero-length service names
5308
5309         * bus/services.c (bus_registry_acquire_service): new function,
5310         splits out part of bus_driver_handle_acquire_service() and fixes
5311         a bug where we didn't remove the service doing the acquiring
5312         from the secondary queue if we failed to remove the current owner
5313         from the front of the queue.
5314
5315 2003-04-10  Alexander Larsson  <alexl@redhat.com>
5316
5317         * doc/dbus-specification.sgml:
5318         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
5319
5320 2003-04-10  Alexander Larsson  <alexl@redhat.com>
5321
5322         * bus/.cvsignore:
5323         * glib/.cvsignore:
5324         * test/.cvsignore:
5325         Added files to cvsignore
5326
5327         * dbus/dbus-message.h:
5328         * dbus/dbus-message.c: (dbus_message_iter_get_named):
5329         Make get_named() take two out argument and return a boolean.
5330         (dbus_message_iter_get_args_valist):
5331         Update usage of get_named().
5332         (dbus_message_iter_append_byte):
5333         Fix typo
5334         (dbus_message_iter_append_named)
5335         Fix typo
5336         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
5337         More tests.
5338
5339 2003-04-10  Alexander Larsson  <alexl@redhat.com>
5340
5341         * dbus/dbus-marshal.[ch]:
5342         Add array_type_pos argument to _dbus_marshal_validate_arg.
5343         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
5344
5345         * dbus/dbus-message.[ch]:
5346         Multi-dimensional arrays have full type specification in the
5347         outermost array. Iter code re-arranged to handle this.
5348         Added some more iter tests.
5349
5350         * doc/dbus-specification.sgml:
5351         Add me to authors.
5352         Remove old FIXME.
5353         Update new array encoding description.
5354         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
5355
5356         * test/data/invalid-messages/array-with-mixed-types.message:
5357         * test/data/valid-messages/array-of-array-of-uint32.message:
5358         Change to the new array format.
5359
5360         * test/data/invalid-messages/too-short-dict.message:
5361         Fix bug in test.
5362
5363         * test/data/valid-messages/recursive-types.message:
5364         Fix up and extend test.
5365
5366 2003-04-10  Havoc Pennington  <hp@pobox.com>
5367
5368         * bus/dispatch.c: lots of fixes
5369
5370         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
5371         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
5372         that was crack, broke the test service.
5373
5374         * dbus/dbus-transport.c (_dbus_transport_open): fix error
5375         handling to avoid piling up errors if we get a failure on the
5376         first address.
5377
5378         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
5379         pid in assertion failures.
5380
5381         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
5382         to some fixed size of file descriptor array. Don't return TRUE
5383         anytime a timeout exists, that led to lots of busy loop silliness
5384         in the tests.
5385
5386 2003-04-09  Havoc Pennington  <hp@redhat.com>
5387
5388         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
5389         I'd checked this in earlier but hadn't.
5390
5391 2003-04-09  Havoc Pennington  <hp@redhat.com>
5392
5393         * bus/dispatch.c (bus_dispatch_test): get a bit further through
5394         the activation test (man this is getting old!)
5395
5396 2003-04-09  Havoc Pennington  <hp@redhat.com>
5397
5398         * test/test-utils.c: use dispatch status function to fix this up
5399
5400         * bus/connection.c (connection_watch_callback): don't dispatch
5401         from here
5402         (connection_timeout_callback): don't dispatch from here
5403         (bus_connections_setup_connection): set the dispatch status function
5404         (bus_connection_disconnected): unset it
5405
5406         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
5407         used to add a connection to be dispatched
5408         (_dbus_loop_iterate): do the dispatching at the end of each
5409         iteration
5410
5411         * dbus/dbus-connection.c
5412         (dbus_connection_set_dispatch_status_function): new function
5413         allowing us to fix up main loop usage
5414         (_dbus_connection_last_unref): free all the various function
5415         user data
5416         (dbus_connection_dispatch): call the DispatchStatusFunction
5417         whenever this function returns
5418         (dbus_connection_handle_watch): call DispatchStatusFunction
5419         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
5420         (reply_handler_timeout): call DispatchStatusFunction
5421         (dbus_connection_flush): call DispatchStatusFunction
5422
5423 2003-04-09  Havoc Pennington  <hp@redhat.com>
5424
5425         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
5426         a memory leak
5427
5428         * bus/dispatch.c (check_service_activated): fix bug in test
5429
5430         * dbus/dbus-mainloop.c (check_timeout): fix this up
5431
5432         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
5433         verbose output so we can sort out output from different processes,
5434         e.g. in the activation case.
5435
5436 2003-04-08  Colin Walters  <walters@gnu.org>
5437
5438         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
5439         the pid file.
5440         (bus_context_new): Set it.
5441         (bus_context_unref): Use it to delete the pid file.
5442
5443 2003-04-08  Havoc Pennington  <hp@redhat.com>
5444
5445         * test/data/invalid-messages/array-with-mixed-types.message:
5446         regression test that fails for the moment
5447
5448         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
5449         tests for convenience
5450
5451         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
5452         array of nil, it broke things.
5453
5454         * test/data/invalid-messages/array-of-nil.message: regression test
5455
5456         * test/data/valid-messages/array-of-array-of-uint32.message:
5457         happened to write this so added it to suite
5458
5459 2003-04-08  Havoc Pennington  <hp@redhat.com>
5460
5461         * bus/driver.c (bus_driver_handle_acquire_service): init
5462         retval/reply before checking name
5463
5464         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
5465         recursion depth argument
5466
5467         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
5468         in the public struct for future extension
5469
5470         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
5471         typo
5472
5473         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
5474         message
5475
5476         * doc/dbus-specification.sgml: fix typo
5477
5478 2003-04-08  Alexander Larsson  <alexl@redhat.com>
5479
5480         Implemented recursive types, named types and new-style iters
5481
5482         * bus/driver.c:
5483         * glib/test-thread-client.c: (thread_func):
5484         * glib/test-thread-server.c: (handle_test_message):
5485         * test/test-service.c: (handle_echo):
5486         Update to new api
5487
5488         * dbus/Makefile.am:
5489         * dbus/dbus-dict.c:
5490         * dbus/dbus-dict.h:
5491         * dbus/dbus.h
5492         Remove DBusDict
5493
5494         * dbus/dbus-internals.c: (_dbus_type_to_string):
5495         Update for new types.
5496
5497         * dbus/dbus-marshal.[ch]:
5498         Implement recursive types and the new marshalling format.
5499         Remove hardcoded dict marshalling.
5500         Marshal named types.
5501
5502         * dbus/dbus-message-builder.c:
5503         Add BYTE_ARRAY.
5504         Remove references to old types
5505
5506         * dbus/dbus-message.[ch]:
5507         New non-refcounted iter API that supports recursive iters.
5508         Use iters for appending, including support for recursive
5509         iters.
5510         Add byte and named type support.
5511         Update everything to new marshalling formats.
5512         Add tests for new API.
5513
5514         * dbus/dbus-protocol.h:
5515         Remove old array types.
5516         Add types: BYTE, ARRAY, DICT, NAMED
5517
5518         * dbus/dbus-string.c:
5519         * dbus/dbus-sysdeps.c:
5520         Make parse_double locale safe.
5521
5522         * dbus/dbus-test-main.c:
5523         Call setlocale.
5524
5525         * dbus/dbus-test.c:
5526         Kill dict test
5527
5528         * doc/dbus-specification.sgml:
5529         Update spec
5530
5531         * test/data/incomplete-messages/missing-body.message:
5532         * test/data/invalid-messages/bad-boolean.message:
5533         * test/data/invalid-messages/bad-boolean-array.message:
5534         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
5535         * test/data/invalid-messages/boolean-has-no-value.message-raw:
5536         * test/data/invalid-messages/too-short-dict.message:
5537         * test/data/valid-messages/dict-simple.message:
5538         * test/data/valid-messages/dict.message:
5539         * test/data/valid-messages/emptiness.message:
5540         * test/data/valid-messages/lots-of-arguments.message:
5541         * test/data/valid-messages/no-padding.message:
5542         * test/data/valid-messages/recursive-types.message:
5543         Add missing NAME fields
5544         Fix up dicts & arrays
5545
5546         * test/data/invalid-messages/dict-with-nil-value.message:
5547         Removed, this is not invalid anymore.
5548
5549         * test/data/valid-messages/recursive-types.message:
5550         Add new test for deeply recursive types.
5551
5552 2003-04-07  Havoc Pennington  <hp@pobox.com>
5553
5554         * bus/driver.c (bus_driver_handle_acquire_service): return an
5555         error if you try to acquire a service that starts with ':'
5556
5557 2003-04-07  Havoc Pennington  <hp@redhat.com>
5558
5559         * doc/dbus-specification.sgml: require that base service names
5560         start with ':' and that the base service is created/deleted
5561         as first and last things a connection does on the bus
5562
5563         * bus/dispatch.c (check_existent_service_activation): lots more
5564         work on the activation test; it doesn't fully pass yet...
5565
5566         * test/test-service.c (main): fix so we don't memleak the
5567         connection to the message bus
5568         (filter_func): accept a message asking us to exit
5569
5570 2003-04-06  Havoc Pennington  <hp@pobox.com>
5571
5572         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
5573         from Colin Walters
5574
5575         * configure.in: fixes to Qt detection from Colin Walters
5576
5577         * doc/Makefile.am: Only remove generated docbook dirs if they
5578         exist, from Colin Walters
5579
5580         * dbus/dbus-bus.c: change how we set well-known connections to
5581         NULL, so that it works if a single connection is stored in
5582         two well-known array slots.
5583
5584         * test/Makefile.am: remove a lot of stuff that isn't immediately
5585         useful, it's in CVS history if we want it.
5586
5587         * test/test-service.c: use dbus-mainloop instead of that
5588         watch.[hc] crack
5589
5590 2003-04-06  Havoc Pennington  <hp@pobox.com>
5591
5592         * dbus/Makefile.am: split lists of sources into stuff that goes in
5593         the library, util functions that go in the lib and are also used
5594         elsewhere, and util functions that are used in tests/daemon but
5595         don't go in the lib.
5596
5597         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
5598         here so it can be used in test binaries also
5599
5600 2003-04-06  Havoc Pennington  <hp@pobox.com>
5601
5602         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
5603         here in the parent process, so we can return an error if it
5604         fails. Also, move some of the code into the child so the parent
5605         is less hosed if we fail midway through.
5606
5607         * bus/bus.c (bus_context_new): move pidfile detection further up
5608         in the function, before we start overwriting sockets and such.
5609
5610         * bus/messagebus.in: adjust this a bit, not sure if it will work.
5611
5612         * configure.in: add --with-system-pid-file and --with-system-socket
5613
5614 2003-04-06  Colin Walters  <walters@verbum.org>
5615
5616         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
5617
5618         * bus/system.conf.in: Declare a pidfile.
5619
5620         * bus/bus.c (bus_context_new): Test for an existing pid file, and
5621         create one (if appropriate).
5622
5623         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
5624         (struct BusConfigParser) [pidfile]: New.
5625         (element_type_to_name, merge_included, start_busconfig_child)
5626         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
5627         (bus_config_parser_unref): Free it.
5628         (bus_config_parser_get_pidfile): New function.
5629
5630         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
5631
5632         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
5633
5634         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
5635
5636         * dbus/dbus-sysdeps.h: Prototype it.
5637
5638 2003-04-06  Havoc Pennington  <hp@pobox.com>
5639
5640         * bus/bus.c (bus_context_new): print the address in here, rather
5641         than in main(), because we need to do it before forking the daemon
5642
5643         * bus/dispatch.c (send_service_nonexistent_error): set the sender
5644         on the service nonexistent error
5645
5646         * bus/driver.c (bus_driver_handle_acquire_service): set the
5647         sender on the AcquireService reply
5648
5649         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
5650         server also listen on a UNIX socket so services can connect to it.
5651
5652 2003-04-06  Havoc Pennington  <hp@pobox.com>
5653
5654         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
5655         so it detects deadlocks and also we actually init threads when
5656         debugging.
5657
5658 2003-04-06  Havoc Pennington  <hp@pobox.com>
5659
5660         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
5661         save the domain socket name, and unlink it when we disconnect the
5662         server. Means that at least when we exit normally, we won't leave
5663         a bunch of junk in /tmp
5664
5665         * dbus/dbus-transport-unix.c
5666         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
5667         memory management). (I was making a real change here but then
5668         didn't)
5669
5670 2003-04-06  Havoc Pennington  <hp@pobox.com>
5671
5672         * bus/bus.c (bus_context_new): fix wrong handling of
5673         server_data_slot_unref() in the error case.
5674
5675         * dbus/dbus-internals.h (_dbus_assert): change so it passes
5676         "(condition) != 0" to _dbus_real_assert so that
5677         "_dbus_assert (pointer)" doesn't cause a warning
5678
5679         * bus/main.c (main): accept --print-address option to print out
5680         the message bus address
5681
5682         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
5683
5684         * dbus/dbus-transport.c (_dbus_transport_open): special error for
5685         "tmpdir" option to unix: address on client side
5686
5687         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
5688         to unix: address
5689
5690         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
5691         we can use to create sockets in the test suite.
5692
5693         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
5694         cleanly. To be used for testing.
5695
5696         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
5697
5698         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
5699
5700         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
5701         handle trying to call this when there's no servers active
5702
5703 2003-04-05  Havoc Pennington  <hp@pobox.com>
5704
5705         * NEWS: update
5706
5707         * configure.in: 0.8
5708
5709 2003-04-05  Havoc Pennington  <hp@pobox.com>
5710
5711         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
5712         crash on startup. Need to get "try starting the daemon"
5713         in the test suite I guess. ;-)
5714
5715         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
5716         tracked the number of open connections; it's better done in
5717         application-specific code as you want it to span all servers etc.
5718
5719 2003-04-05  Havoc Pennington  <hp@pobox.com>
5720
5721         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
5722         patch from Colin Walters
5723
5724 2003-04-05  Havoc Pennington  <hp@pobox.com>
5725
5726         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
5727         reality; in fact multiple mechanisms are allowed.
5728
5729         * dbus/dbus-internals.c (_dbus_real_assert)
5730         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
5731         _dbus_assert_not_reached() into functions, so that they don't show
5732         up in basic block counts for test coverage, and don't use up as
5733         much disk space. Does mean slower execution speed though, so
5734         assumes --disable-asserts is the normal production case.
5735
5736 2003-04-05  Havoc Pennington  <hp@pobox.com>
5737
5738         * test/Makefile.am (dist-hook): also dist *.in files
5739
5740         * NEWS: update
5741
5742         * configure.in: 0.7
5743
5744 2003-04-05  Havoc Pennington  <hp@pobox.com>
5745
5746         * dbus/dbus-string.c: docs warning
5747
5748         * dbus/dbus-spawn.c: missing docs
5749
5750         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
5751
5752 2003-04-05  Havoc Pennington  <hp@pobox.com>
5753
5754         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
5755         magic from GLib
5756
5757         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
5758         to -1 once we've reaped the babysitter
5759         (_dbus_babysitter_handle_watch): do as much work as we can, not
5760         just one go of it
5761
5762         * bus/activation.c: add code using DBusBabysitter so that we
5763         handle it when a service fails to start up properly.
5764         (bus_activation_service_created): don't remove the activation
5765         entries as we go, just let them get removed when we free the pending
5766         activation. Unref reply messages after sending them.
5767
5768 2003-04-05  Havoc Pennington  <hp@pobox.com>
5769
5770         * test/decode-gcov.c (main): print per-directory stats in the report
5771
5772         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
5773
5774 2003-04-05  Havoc Pennington  <hp@pobox.com>
5775
5776         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
5777
5778         * test/decode-gcov.c: hack up a little program to suck data
5779         out of gcov files. Yes this is sort of silly.
5780
5781         * configure.in: define something in config.h and do an
5782         AM_CONDITIONAL when gcov is enabled
5783
5784 2003-04-04  Havoc Pennington  <hp@redhat.com>
5785
5786         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
5787         return a "babysitter" object that is used to monitor the status of
5788         the spawned process and reap it when required.
5789
5790         * test/test-segfault.c, test/test-exit.c,
5791         test/test-sleep-forever.c: binaries that do various lame things,
5792         used in the test suite.
5793
5794         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
5795
5796 2003-04-03  Havoc Pennington  <hp@pobox.com>
5797
5798         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
5799         in preparation for modifying it, dbus-sysdeps is getting
5800         a bit unmanageable.
5801
5802 2003-04-03  Havoc Pennington  <hp@redhat.com>
5803
5804         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
5805         have multiple ones
5806
5807         * bus/*.[hc]: adapt to mainloop change
5808
5809 2003-04-03  Havoc Pennington  <hp@redhat.com>
5810
5811         * bus/activation.c (load_directory): fix up memleaks
5812         (bus_activation_entry_free): free the entry
5813
5814         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
5815         we get one from the message bus; fix memleaks.
5816
5817         * dbus/dbus-message.c (dbus_set_error_from_message): new function
5818
5819 2003-04-03  Havoc Pennington  <hp@pobox.com>
5820
5821         * bus/config-parser.c (bus_config_parser_unref): free
5822         list of mechanisms, bug discovered by test suite enhancements
5823         (putting system.conf and session.conf into suite)
5824
5825         * test/Makefile.am, test/test-service.c: add placeholder for a
5826         test service that we'll activate as part of test suite. Doesn't
5827         do anything yet.
5828
5829         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
5830         setting NULL value, and use system malloc not dbus_malloc()
5831         when we have unavoidable memleakage.
5832
5833         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
5834         didn't work, and support DBUS_BUS_ACTIVATION.
5835
5836         * bus/activation.c (child_setup): pass our well-known bus type to
5837         the child
5838
5839         * bus/config-parser.c: support <type> to specify well-known type
5840
5841         * doc/dbus-specification.sgml: document the env variables to
5842         locate well-known buses and find service activator
5843
5844 2003-04-02  Havoc Pennington  <hp@redhat.com>
5845
5846         * test/Makefile.am (all-local): add a rule to copy tests to
5847         builddir, so we can have generated tests. Use this to remove the
5848         silly hack for testing system.conf and session.conf. Will use this
5849         shortly to generate .service files pointing to test binaries.
5850
5851 2003-04-02  Havoc Pennington  <hp@redhat.com>
5852
5853         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
5854         current alloc and needed new length, not max of the doubled
5855         allocation and needed new length. Also, when building tests,
5856         don't do the double-allocation stuff, just realloc every time.
5857
5858 2003-04-02  Havoc Pennington  <hp@redhat.com>
5859
5860         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
5861         in error messages
5862         (_dbus_string_get_dirname): new
5863         (_dbus_sysdeps_test): new
5864         (_dbus_directory_open): include dirnames in error messages
5865
5866         * bus/config-parser.c: interpret <include> and <includedir> and
5867         <servicedir> relative to config file location if the given
5868         filename is not absolute.
5869
5870         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
5871
5872 2003-04-02  Havoc Pennington  <hp@redhat.com>
5873
5874         * bus/connection.c (bus_transaction_send_error_reply): set sender
5875         service for the error, and unref the reply on success
5876
5877         * bus/activation.c: convert to use BusTransaction so OOM can be
5878         handled correctly
5879         (bus_activation_service_created): set sender of the message
5880
5881 2003-04-01  Havoc Pennington  <hp@redhat.com>
5882
5883         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
5884         <includedir> (at least mostly)
5885
5886         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
5887         first, then the user ID
5888
5889 2003-04-01  Havoc Pennington  <hp@pobox.com>
5890
5891         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
5892         function
5893
5894         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
5895
5896         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
5897
5898         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
5899         socket 0777, and unlink any existing socket.
5900
5901         * bus/bus.c (bus_context_new): change our UID/GID and fork if
5902         the configuration file so specifies; set up auth mechanism
5903         restrictions
5904
5905         * bus/config-parser.c (bus_config_parser_content): add support
5906         for <fork> option and fill in code for <auth>
5907
5908         * bus/system.conf.in: add <fork/> to default configuration,
5909         and limit auth mechanisms to EXTERNAL
5910
5911         * doc/config-file.txt (Elements): add <fork>
5912
5913         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
5914         (_dbus_change_identity): new function
5915
5916 2003-03-31  Havoc Pennington  <hp@redhat.com>
5917
5918         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
5919         (_dbus_listen_unix_socket): fix off-by-one error in null
5920         termination spotted by Nalin
5921
5922 2003-03-31  Havoc Pennington  <hp@redhat.com>
5923
5924         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
5925         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
5926         having a real home directory available.
5927
5928 2003-03-31  Havoc Pennington  <hp@redhat.com>
5929
5930         * bus/Makefile.am (install-data-hook): create /var/run/dbus
5931
5932         * bus/messagebus.in: add init script for Red Hat /etc/init.d
5933
5934         * configure.in: add support for specifying a style of init script
5935         to install
5936
5937 2003-03-31  Havoc Pennington  <hp@redhat.com>
5938
5939         Fix some annoying DBusString API and fix all affected code.
5940
5941         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
5942         max_length argument
5943         (_dbus_string_get_data): change to return string instead of using
5944         an out param
5945         (_dbus_string_get_const_data): ditto
5946         (_dbus_string_get_data_len): ditto
5947         (_dbus_string_get_const_data_len): ditto
5948
5949 2003-03-31  Havoc Pennington  <hp@redhat.com>
5950
5951         * bus/main.c (main): fix up the command line arguments to be nicer
5952
5953 2003-03-31  Havoc Pennington  <hp@redhat.com>
5954
5955         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
5956         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
5957         final location that lands in the config file
5958
5959         * bus/config-loader-expat.c (bus_config_load): fix type of
5960         XML_Parser variable
5961
5962         * doc/TODO: remove TODO item for dbus_bus_get()
5963
5964         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
5965
5966 2003-03-31  Havoc Pennington  <hp@pobox.com>
5967
5968         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
5969         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
5970         argument since they are always client side
5971
5972         * dbus/dbus-server.c (dbus_server_get_address): new function
5973
5974         * bus/main.c (main): take the configuration file as an argument.
5975
5976         * test/data/valid-config-files/debug-allow-all.conf: new file to
5977         use with dispatch.c tests for example
5978
5979         * bus/test-main.c (main): require test data dir
5980
5981         * bus/bus.c (bus_context_new): change this to take a
5982         configuration file name as argument
5983
5984         * doc/config-file.txt (Elements): add <servicedir>
5985
5986         * bus/system.conf, bus/session.conf: new files
5987
5988         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
5989         well-known socket if none set
5990
5991         * configure.in: create system.conf and session.conf
5992
5993 2003-03-30  Havoc Pennington  <hp@pobox.com>
5994
5995         * bus/config-parser.c: hacking
5996
5997         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
5998         to shut down, since it could cause weirdness with the DBusList
5999         lock
6000
6001         * dbus/dbus-list.c (_dbus_list_test): add tests for the
6002         link-oriented stack routines
6003         (alloc_link): free the mempool if the first alloc from it fails
6004
6005         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
6006
6007         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
6008         from GLib
6009         (_dbus_string_skip_white): new
6010
6011         * doc/config-file.txt (Elements): add <includedir>
6012
6013 2003-03-28  Havoc Pennington  <hp@pobox.com>
6014
6015         * dbus/dbus-string.c (_dbus_string_copy_data_len)
6016         (_dbus_string_copy_data): new functions
6017
6018 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
6019
6020         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
6021         * dbus/dbus-bus.h:
6022         Add dbus_bus_get.
6023
6024         * dbus/dbus-memory.c:
6025         Fix a doc comment.
6026
6027 2003-03-28  Havoc Pennington  <hp@pobox.com>
6028
6029         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
6030         I think it may have just been superstition. Not sure.
6031
6032         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
6033         failures that were not being handled.
6034
6035         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
6036
6037         * dbus/dbus-memory.c: add ability to set number of mallocs in a
6038         row that will fail on out-of-memory.
6039
6040         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
6041         function for testing out-of-memory handling.
6042
6043         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
6044         allocation functions, they do map exactly to the expat ones.
6045
6046 2003-03-27  Havoc Pennington  <hp@redhat.com>
6047
6048         * bus/config-loader-libxml.c (bus_config_load): add another error
6049         check
6050
6051 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
6052
6053         * doc/TODO:
6054         Add note about automatic service activation.
6055
6056         * doc/dbus-specification.sgml:
6057         Rename the specification and clarify a few things.
6058
6059 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
6060
6061         * Doxyfile.in:
6062         * dbus/dbus-address.c:
6063         * dbus/dbus-dict.c:
6064         * dbus/dbus-marshal.c:
6065         * dbus/dbus-server-debug-pipe.c:
6066         * dbus/dbus-transport-unix.c:
6067         Fix documentation warnings.
6068
6069 2003-03-26  Havoc Pennington  <hp@pobox.com>
6070
6071         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
6072         after every test so it's quick and easy to see which leaked, and
6073         so we test multiple dbus_shutdown() calls
6074
6075         * configure.in: change configure.in XML stuff to also support
6076         expat
6077
6078         * config-loader-libxml.c: some hacking
6079
6080         * config-loader-expat.c: some hacking
6081
6082         * config-parser.c: some hacking, plus tests
6083
6084 2003-03-25  Havoc Pennington  <hp@redhat.com>
6085
6086         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
6087
6088         * configure.in: add --with-xml option to specify XML library,
6089         right now only libxml is supported.
6090
6091         * bus/config-loader-libxml.c, config-parser.c: sync some minor
6092         nonworking code between home and work, still just stubs
6093
6094 2003-03-24  Havoc Pennington  <hp@redhat.com>
6095
6096         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
6097         file
6098
6099         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
6100         NULL argument for "message" if the error is a well-known one,
6101         fill in a generic message in this case.
6102
6103         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
6104         favor of DBusError
6105
6106         * bus/test.c (bus_test_flush_bus): add
6107
6108         * bus/policy.c (bus_policy_test): test code stub
6109
6110 2003-03-24  Havoc Pennington  <hp@pobox.com>
6111
6112         * bus/connection.c (bus_connections_setup_connection): set up
6113         the "can this user connect" function, but it always returns
6114         TRUE until we have a config file parser so we can have a config
6115         file that allows connections.
6116
6117 2003-03-23  Havoc Pennington  <hp@pobox.com>
6118
6119         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
6120         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
6121         the mutex, so we can check for proper memory management
6122         and OOM handling.
6123
6124         * dbus/dbus-dataslot.c: remove the mutex from
6125         DBusDataSlotAllocator and lock it manually when using it,
6126         to simplify fitting it into the global slots framework.
6127
6128         * dbus/dbus-threads.c (init_static_locks): rework how we're
6129         handling global locks so they are easily shut down.
6130
6131         * bus/policy.c (bus_policy_append_rule): fix
6132
6133         * bus/test-main.c (main): check for memleaks
6134
6135         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
6136         test suite check for memleaks
6137
6138         * dbus/dbus-memory.c: add support in test mode for tracking
6139         number of outstanding blocks
6140
6141 2003-03-23  Havoc Pennington  <hp@pobox.com>
6142
6143         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
6144         policies code
6145
6146         * dbus/dbus-hash.h: add ULONG hash keys
6147
6148         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
6149         (_dbus_get_group_id): new function
6150
6151 2003-03-20  Havoc Pennington  <hp@redhat.com>
6152
6153         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
6154         new function
6155         (dbus_connection_get_unix_user): new function
6156
6157 2003-03-20  Havoc Pennington  <hp@pobox.com>
6158
6159         * bus/connection.c (bus_connection_send_oom_error): assert that
6160         message has a sender
6161         (connection_execute_transaction): ditto
6162         (bus_connection_preallocate_oom_error): fix to set the sender, and
6163         set recipient to the destination service, not the bus driver
6164
6165         * bus/policy.c: hacking
6166
6167         * dbus/dbus-message.c (dbus_message_service_is): new function
6168         (dbus_message_sender_is): new
6169
6170 2003-03-19  Havoc Pennington  <hp@redhat.com>
6171
6172         * bus/policy.c: start sketching code for policy restrictions on
6173         what connections can do.
6174
6175 2003-03-18  Havoc Pennington  <hp@redhat.com>
6176
6177         * doc/TODO: some notes on high-level todo items. Little nitpick
6178         stuff is all in @todo, so no need to add it here.
6179
6180         * doc/config-file.txt: some notes on how config file might look
6181
6182 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
6183
6184         * configure.in: 0.6
6185
6186         * NEWS: Update.
6187
6188 2003-03-17  Havoc Pennington  <hp@redhat.com>
6189
6190         * dbus/dbus-internals.h: add gcc attributes so that
6191         our printf-style functions warn on bad arguments to
6192         format
6193
6194         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
6195         format bug
6196
6197         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
6198         printf format bug
6199
6200 2003-03-17  Havoc Pennington  <hp@redhat.com>
6201
6202         * bus/test-main.c (main): make it print something as it runs
6203         so make check doesn't look stuck
6204
6205         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
6206         from CVS, now obsolete
6207
6208 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
6209
6210         * bus/dispatch.c: (bus_dispatch):
6211         Refetch the service name since it may have been reallocated
6212         when dbus_message_set_sender was called.
6213
6214         * dbus/dbus-sysdeps.c: (_dbus_accept):
6215         Add address and address length variables and use them to stop
6216         valgrind from complaining.
6217
6218 2003-03-17  Havoc Pennington  <hp@pobox.com>
6219
6220         All tests pass, no memleaks, no valgrind complaints.
6221
6222         * bus/test.c: refcount handler_slot
6223
6224         * bus/connection.c (bus_connections_new): refcount
6225         connection_data_slot
6226
6227         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
6228         bytes so that auth scripts pass.
6229
6230         * bus/dispatch.c: init message_handler_slot so it gets allocated
6231         properly
6232
6233         * bus/dispatch.c (message_handler_slot_ref): fix memleak
6234
6235         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
6236         dealloc server_pipe_hash when no longer used for benefit of
6237         leak checking
6238
6239         * dbus/dbus-auth.c (process_command): memleak fix
6240
6241         * bus/dispatch.c (check_hello_message): memleak fix
6242
6243 2003-03-16  Havoc Pennington  <hp@pobox.com>
6244
6245         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
6246
6247 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
6248
6249         * bus/activation.c (bus_activation_activate_service): Append
6250         the pending activation entry to the list of pending activations.
6251
6252 2003-03-16  Havoc Pennington  <hp@pobox.com>
6253
6254         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
6255         connections
6256
6257         * dbus/dbus-address.c (create_entry): fix OOM handling when
6258         failing to alloc entry->method
6259
6260 2003-03-16  Havoc Pennington  <hp@pobox.com>
6261
6262         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
6263         the watch
6264
6265         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6266         add some missing dbus_set_result
6267
6268         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
6269         alloc the DBusMessageHandler
6270
6271         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
6272         the transport here, since we call this from the finalizer; it
6273         resulted in a double-finalize.
6274
6275         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
6276         where we tried to use transport->connection that was NULL,
6277         happened when transport was disconnected early on due to OOM
6278
6279         * bus/*.c: adapt to handle OOM for watches/timeouts
6280
6281         * dbus/dbus-transport-unix.c: port to handle OOM during
6282         watch handling
6283
6284         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
6285         reference to unused bytes instead of a copy
6286
6287         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
6288         out of memory
6289
6290         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
6291         FALSE on OOM
6292
6293         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
6294         of memory
6295
6296 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
6297
6298         * doc/dbus-specification.sgml:
6299         Document reply message for ActivateService.
6300
6301 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
6302
6303         * bus/activation.c: (bus_pending_activation_entry_free),
6304         (bus_pending_activation_free), (bus_activation_new),
6305         (bus_activation_unref), (bus_activation_service_created),
6306         (bus_activation_activate_service):
6307         * bus/activation.h:
6308         * bus/bus.c: (bus_context_new):
6309         * bus/desktop-file.c: (new_section):
6310         * bus/driver.c: (bus_driver_send_service_deleted),
6311         (bus_driver_handle_activate_service):
6312         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
6313         * bus/services.h:
6314         * dbus/dbus-connection.c:
6315         (dbus_connection_send_with_reply_and_block):
6316         * dbus/dbus-message.c: (dbus_message_append_args_valist):
6317         * dbus/dbus-protocol.h:
6318         Make activation work better. Now pending activations will be queued
6319         and the daemon won't try to activate services that are already registered.
6320
6321 2003-03-16  Havoc Pennington  <hp@pobox.com>
6322
6323         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
6324         connection data
6325
6326         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
6327         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
6328
6329 2003-03-16  Havoc Pennington  <hp@pobox.com>
6330
6331         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
6332         this. always run the test suite before commit...
6333
6334         * bus/*: adapt to DBusConnection API changes
6335
6336         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
6337         requires renaming stuff to avoid dbus_connection_dispatch name
6338         conflict.
6339
6340         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
6341         function
6342
6343         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
6344         separate from _dbus_message_loader_return_buffer()
6345
6346         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
6347         this, because it's now always broken to use; the number of
6348         messages in queue vs. the number still buffered by the message
6349         loader is undefined/meaningless. Should use
6350         dbus_connection_get_dispatch_state().
6351         (dbus_connection_dispatch): rename from
6352         dbus_connection_dispatch_message
6353
6354 2003-03-16  Havoc Pennington  <hp@pobox.com>
6355
6356         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
6357         implementation
6358
6359 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
6360
6361         * dbus/dbus-connection.c:
6362         (dbus_connection_send_with_reply_and_block):
6363         Decrease connection->n_incoming when removing an entry
6364         from the list.
6365         * dbus/dbus-dict.c: (dbus_dict_entry_free),
6366         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6367         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6368         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
6369         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
6370         (dbus_dict_get_byte_array):
6371         Handle NULL arrays and strings. Also add support for byte arrays.
6372
6373         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
6374         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
6375         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6376         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6377         (_dbus_demarshal_dict), (demarshal_and_validate_len),
6378         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
6379         * dbus/dbus-marshal.h:
6380         Add support for marshalling and demarshalling empty arrays and strings.
6381
6382         * dbus/dbus-message.c: (dbus_message_append_args_valist),
6383         (dbus_message_append_string_array),
6384         (dbus_message_iter_get_boolean),
6385         (dbus_message_iter_get_boolean_array),
6386         (dbus_message_iter_get_int32_array),
6387         (dbus_message_iter_get_uint32_array),
6388         (dbus_message_iter_get_double_array),
6389         (dbus_message_iter_get_byte_array),
6390         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
6391         (check_message_handling):
6392         Add support for getting empty arrays and dicts.
6393
6394         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
6395         Don't do any validation at all for now, that's better than just checking
6396         for ASCII.
6397
6398         * test/data/valid-messages/emptiness.message:
6399         New test message with lots of empty arrays.
6400
6401 2003-03-16  Havoc Pennington  <hp@pobox.com>
6402
6403         * dbus/dbus-connection.c
6404         (_dbus_connection_queue_received_message_link): new function that
6405         can't fail due to OOM
6406
6407         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
6408         new function pops a message together with a list link
6409         containing it.
6410
6411         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
6412         message queuing functions to avoid needing to alloc memory
6413
6414 2003-03-16  Havoc Pennington  <hp@pobox.com>
6415
6416         Oops - test code was only testing failure of around 30 of the
6417         mallocs in the test path, but it turns out there are 500+
6418         mallocs. I believe this was due to misguided linking setup such
6419         that there was one copy of dbus_malloc etc. in the daemon and one
6420         in the shared lib, and only daemon mallocs were tested. In any
6421         case, the test case now tests all 500+ mallocs, and doesn't pass
6422         yet, though there are lots of fixes in this patch.
6423
6424         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
6425         this so that it doesn't need to allocate memory, since it
6426         has no way of indicating failure due to OOM (and would be
6427         annoying if it did).
6428
6429         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
6430
6431         * bus/Makefile.am: rearrange to create two self-contained
6432         libraries, to avoid having libraries with overlapping symbols.
6433         that was resulting in weirdness, e.g. I'm pretty sure there
6434         were two copies of global static variables.
6435
6436         * dbus/dbus-internals.c: move the malloc debug stuff to
6437         dbus-memory.c
6438
6439         * dbus/dbus-list.c (free_link): free list mempool if it becomes
6440         empty.
6441
6442         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
6443
6444         * dbus/dbus-address.c (dbus_parse_address): free list nodes
6445         on failure.
6446
6447         * bus/dispatch.c (bus_dispatch_add_connection): free
6448         message_handler_slot when no longer using it, so
6449         memory leak checkers are happy for the test suite.
6450
6451         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
6452
6453         * bus/bus.c (new_connection_callback): disconnect in here if
6454         bus_connections_setup_connection fails.
6455
6456         * bus/connection.c (bus_connections_unref): fix to free the
6457         connections
6458         (bus_connections_setup_connection): if this fails, don't
6459         disconnect the connection, just be sure there are no side
6460         effects.
6461
6462         * dbus/dbus-string.c (undo_alignment): unbreak this
6463
6464         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
6465         leaking
6466         (_dbus_auth_new): fix the order in which we free strings
6467         on OOM failure
6468
6469         * bus/connection.c (bus_connection_disconnected): fix to
6470         not send ServiceDeleted multiple times in case of memory
6471         allocation failure
6472
6473         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
6474         get the base service name
6475         (dbus_bus_register_client): don't return base service name,
6476         instead store it on the DBusConnection and have an accessor
6477         function for it.
6478         (dbus_bus_register_client): rename dbus_bus_register()
6479
6480         * bus/dispatch.c (check_hello_message): verify that other
6481         connections on the bus also got the correct results, not
6482         just the one sending hello
6483
6484 2003-03-15  Havoc Pennington  <hp@pobox.com>
6485
6486         Make it pass the Hello handling test including all OOM codepaths.
6487         Now to do other messages...
6488
6489         * bus/services.c (bus_service_remove_owner): fix crash when
6490         removing owner from an empty list of owners
6491         (bus_registry_ensure): don't leave service in the list of
6492         a connection's owned services if we fail to put the service
6493         in the hash table.
6494
6495         * bus/connection.c (bus_connection_preallocate_oom_error): set
6496         error flag on the OOM error.
6497
6498         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
6499         handle _dbus_transport_set_connection failure
6500
6501         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
6502         to create watches up front and simply enable/disable them as
6503         needed.
6504         (unix_connection_set): this can now fail on OOM
6505
6506         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
6507         of enabling/disabling a watch or timeout.
6508
6509         * bus/loop.c (bus_loop_iterate): don't touch disabled
6510         watches/timeouts
6511
6512         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
6513
6514 2003-03-15  Havoc Pennington  <hp@pobox.com>
6515
6516         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
6517         write useful test code, after all that futzing around ;-)
6518
6519         Test does not yet pass because we can't handle OOM in
6520         _dbus_transport_messages_pending (basically,
6521         dbus_connection_preallocate_send() does not prealloc the write
6522         watch). To fix this, I think we need to add new stuff to
6523         set_watch_functions, namely a SetEnabled function so we can alloc
6524         the watch earlier, then enable it later.
6525
6526         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
6527         dbus-memory.c to the convenience lib
6528
6529         * bus/test.c: rename some static functions to keep them clearly
6530         distinct from stuff in connection.c. Handle client disconnection.
6531
6532 2003-03-14  Havoc Pennington  <hp@pobox.com>
6533
6534         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
6535         transport, tests more of the real codepath. Set up clients
6536         with bus_setup_debug_client.
6537
6538         * bus/test.c (bus_setup_debug_client): function to set up debug
6539         "clients" on the main loop
6540
6541         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
6542         support
6543
6544         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
6545         server type
6546
6547         * dbus/dbus-server-debug.c: support a debug server based on pipes
6548
6549         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
6550         (_dbus_close): new function
6551
6552         * configure.in: check for socketpair
6553
6554 2003-03-14  Havoc Pennington  <hp@redhat.com>
6555
6556         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
6557         cheesy hack
6558
6559         * dbus/dbus-transport-debug.c: rework this a good bit to be
6560         less complicated. hopefully still works.
6561
6562         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
6563         manually
6564
6565         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
6566         after running it
6567
6568         * dbus/dbus-message.c (dbus_message_copy): rename from
6569         dbus_message_new_from_message, fix it up to copy
6570         all the message fields, add test case
6571
6572         * bus/dispatch.c (bus_dispatch_test): add some more test code,
6573         not quite passing yet
6574
6575 2003-03-14  Havoc Pennington  <hp@pobox.com>
6576
6577         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
6578         until no work remains" in test code. (the large diff here
6579         is just code movement, no actual changes)
6580
6581         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
6582         1, no point waiting around for test code.
6583         (_dbus_server_debug_accept_transport): unref the timeout
6584         after adding it (right?)
6585
6586         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
6587
6588 2003-03-13  Havoc Pennington  <hp@redhat.com>
6589
6590         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
6591         out of memory
6592
6593         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
6594         of memory
6595
6596         * dbus/dbus-connection.h: Make AddWatchFunction and
6597         AddTimeoutFunction return a bool so they can fail on out-of-memory
6598
6599         * bus/bus.c (bus_context_new): set up timeout handlers
6600
6601         * bus/connection.c (bus_connections_setup_connection): set up
6602         timeout handlers
6603
6604         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
6605         can fail
6606
6607         * bus/bus.c (bus_context_new): adapt to changes
6608
6609         * bus/connection.c: adapt to changes
6610
6611         * test/watch.c: adapt to DBusWatch changes
6612
6613         * bus/dispatch.c (bus_dispatch_test): started adding this but
6614         didn't finish
6615
6616 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
6617
6618         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
6619
6620 2003-03-13  Havoc Pennington  <hp@pobox.com>
6621
6622         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
6623         set up a test framework as for the library
6624
6625 2003-03-12  Havoc Pennington  <hp@pobox.com>
6626
6627         Throughout: purge global variables, introduce BusActivation,
6628         BusConnections, BusRegistry, etc. objects instead.
6629
6630         * bus/bus.h, bus/bus.c: introduce BusContext as a global
6631         message bus object
6632
6633         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
6634         going to redo this a bit differently I think
6635
6636 2003-03-12  Havoc Pennington  <hp@redhat.com>
6637
6638         Mega-patch that gets the message bus daemon initially handling
6639         out-of-memory. Work still needed. Also lots of random
6640         moving stuff to DBusError instead of ResultCode.
6641
6642         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
6643
6644         * dbus/dbus-connection.c
6645         (dbus_connection_send_with_reply_and_block): use DBusError
6646
6647         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
6648         DBusResultCode
6649
6650         * dbus/dbus-connection.c (dbus_connection_send): drop the result
6651         code here, as the only failure possible is OOM.
6652
6653         * bus/connection.c (bus_connection_disconnect):
6654         rename bus_connection_disconnected as it's a notification only
6655
6656         * bus/driver.c (bus_driver_handle_acquire_service): don't free
6657         "name" on get_args failure, should be done by get_args;
6658         don't disconnect client for bad args, just return an error.
6659         (bus_driver_handle_service_exists): ditto
6660
6661         * bus/services.c (bus_services_list): NULL-terminate returned array
6662
6663         * bus/driver.c (bus_driver_send_service_lost)
6664         (bus_driver_send_service_acquired): send messages from driver to a
6665         specific client to the client's unique name, not to the broadcast
6666         service.
6667
6668         * dbus/dbus-message.c (decode_header_data): reject messages that
6669         contain no name field
6670         (_dbus_message_get_client_serial): rename to
6671         dbus_message_get_serial and make public
6672         (_dbus_message_set_serial): rename from set_client_serial
6673         (_dbus_message_set_reply_serial): make public
6674         (_dbus_message_get_reply_serial): make public
6675
6676         * bus/connection.c (bus_connection_foreach): allow stopping
6677         iteration by returning FALSE from foreach function.
6678
6679         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
6680         (dbus_connection_free_preallocated_send)
6681         (dbus_connection_preallocate_send): new API for sending a message
6682         without possibility of malloc failure.
6683         (dbus_connection_send_message): rename to just
6684         dbus_connection_send (and same for whole function family)
6685
6686         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
6687
6688         * dbus/dbus-sysdeps.c (_dbus_exit): new function
6689
6690         * bus/activation.c: handle/return errors
6691
6692         * dbus/dbus-errors.h: add more DBUS_ERROR #define
6693
6694         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
6695         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
6696         (_dbus_result_from_errno): move to this file
6697
6698 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
6699
6700         * dbus/dbus-marshal.c:
6701         (_dbus_marshal_set_string):
6702         Take a length argument so we can marshal the correct string
6703         length.
6704
6705         (_dbus_marshal_dict), (_dbus_demarshal_dict),
6706         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
6707         (_dbus_marshal_test):
6708         * dbus/dbus-marshal.h:
6709         Add support for marshalling and demarshalling dicts.
6710
6711         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
6712         Add support for TYPE DICT.
6713
6714         * dbus/dbus-message.c: (set_string_field):
6715         Adjust header padding.
6716
6717         (dbus_message_append_args_valist), (dbus_message_append_dict),
6718         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
6719         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
6720         (check_message_handling), (check_have_valid_message):
6721         * dbus/dbus-message.h:
6722         Add functions for setting and getting dicts.
6723
6724         * dbus/dbus-protocol.h:
6725         Add DBUS_TYPE_DICT.
6726
6727         * dbus/dbus.h:
6728         Add dbus-dict.h
6729
6730         * doc/dbus-specification.sgml:
6731         Add information about how dicts are marshalled.
6732
6733         * test/data/invalid-messages/dict-with-nil-value.message:
6734         * test/data/invalid-messages/too-short-dict.message:
6735         * test/data/valid-messages/dict-simple.message:
6736         * test/data/valid-messages/dict.message:
6737         Add sample messages containing dicts.
6738
6739 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
6740
6741         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
6742
6743 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
6744
6745         * dbus/Makefile.am:
6746         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6747         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
6748         (dbus_dict_set_int32), (dbus_dict_set_uint32),
6749         (dbus_dict_set_double), (dbus_dict_set_string),
6750         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
6751         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
6752         (dbus_dict_set_string_array), (_dbus_dict_test):
6753         * dbus/dbus-dict.h:
6754         Fix according to comments from Havoc.
6755
6756 2003-03-06  Michael Meeks  <michael@server.home>
6757
6758         * configure.in: if we don't have kde-config, disable have_qt.
6759
6760 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
6761
6762         * dbus/Makefile.am:
6763         Add dbus-dict.[ch]
6764
6765         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
6766         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
6767         (dbus_dict_remove), (dbus_dict_get_value_type),
6768         (dbus_dict_get_keys), (dbus_dict_put_boolean),
6769         (dbus_dict_put_int32), (dbus_dict_put_uint32),
6770         (dbus_dict_put_double), (dbus_dict_put_string),
6771         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
6772         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
6773         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
6774         (dbus_dict_get_int32), (dbus_dict_get_uint32),
6775         (dbus_dict_get_double), (dbus_dict_get_string),
6776         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
6777         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
6778         (dbus_dict_get_string_array), (_dbus_dict_test):
6779         * dbus/dbus-dict.h:
6780         Add DBusDict implementation
6781
6782         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
6783         * dbus/dbus-test.h:
6784         Add _dbus_dict_test
6785
6786 2003-03-04  Havoc Pennington  <hp@pobox.com>
6787
6788         * test/data/auth/*: adapt to changes
6789
6790         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
6791         USERID_BASE64 and change USERNAME_BASE64 to put in username not
6792         userid
6793
6794         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
6795         more stuff from being in a context name, to make the protocol
6796         simpler to deal with
6797
6798         * dbus/dbus-errors.c (dbus_error_has_name): new function
6799         (dbus_error_is_set): new function
6800
6801         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
6802         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
6803
6804         * dbus/dbus-connection.c (dbus_connection_flush): also read
6805         messages during a flush operation
6806
6807         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
6808
6809 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
6810
6811         * configure.in: Check for gethostbyname on Solaris.
6812
6813         * dbus/dbus-transport.c: (_dbus_transport_open):
6814         Remove duplicate "tcp" entry.
6815
6816         * doc/dbus-specification.sgml:
6817         Clarify some things.
6818
6819 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
6820
6821         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
6822         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
6823         (_dbus_keyring_test):
6824         * dbus/dbus-md5.c: (_dbus_md5_compute):
6825         * dbus/dbus-sha.c: (_dbus_sha_compute):
6826         Plug memory leaks.
6827
6828 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
6829
6830         * README: Add some things.
6831
6832 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
6833
6834         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
6835         after case DBUS_TYPE_BOOELAN.
6836
6837 2003-03-02  Havoc Pennington  <hp@pobox.com>
6838
6839         * test/break-loader.c (randomly_set_extreme_ints): add test that
6840         sets really huge and small integers
6841
6842         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
6843         that length of boolean array fits in the string, and that
6844         string has room for boolean value in single-bool case.
6845
6846         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
6847         optional value to "ALIGN" command which is what to fill the
6848         alignment with.
6849
6850         * test/data/valid-messages/no-padding.message: add regression
6851         test for the message padding problem
6852
6853 2003-03-02  Havoc Pennington  <hp@pobox.com>
6854
6855         * dbus/dbus-message.c (decode_header_data): fix to always init
6856         message_padding, from Benjamin Dauvergne
6857
6858 2003-03-02  Havoc Pennington  <hp@pobox.com>
6859
6860         * configure.in: 0.5
6861
6862         * NEWS: Update.
6863
6864 2003-03-01  Joe Shaw  <joe@assbarn.com>
6865
6866         * configure.in: Check for "struct cmsgcred" and try to access its
6867         members for BSD-like unices.
6868
6869         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
6870         _dbus_read_credentials_unix_socket().
6871         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
6872         read() for reading the credential byte off the unix socket.  Use
6873         struct cmsgcred on systems that support it.
6874
6875 2003-02-27  Alexander Larsson  <alexl@redhat.com>
6876
6877         * glib/Makefile.am:
6878         * configure.in:
6879         Make gthreads-2.0 dependency optional. Don't build thread test if
6880         its not found.
6881
6882 2003-02-27  Havoc Pennington  <hp@pobox.com>
6883
6884         * dbus/dbus-connection.c
6885         (dbus_connection_send_message_with_reply_and_block): fix doh!
6886         doh! doh! bug that resulted in never removing a reply from the
6887         queue, no wonder we called get_reply_serial so much ;-)
6888
6889         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
6890         and client serial instead of demarshaling them every time
6891
6892 2003-02-27  Havoc Pennington  <hp@pobox.com>
6893
6894         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
6895         more inlined, using dbus-string-private.h, speeds things up
6896         substantially
6897
6898         * dbus/dbus-string.c (_dbus_string_free): apply align offset
6899         when freeing the string
6900         (_dbus_string_steal_data): fix for align offset
6901         (undo_alignment): new function
6902
6903 2003-02-26  Havoc Pennington  <hp@redhat.com>
6904
6905         All kinds of audit fixes from Owen, plus initial attempt to
6906         handle unaligned memory returned from malloc.
6907
6908         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
6909         leave room for align_offset and nul byte
6910         (fixup_alignment): function to track an align_offset and
6911         ensure real->str is aligned
6912         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
6913         to allow a nul byte plus align offset
6914         (_dbus_string_lock): fix overflow issue
6915         (_dbus_string_init_const_len): add assertions on sanity of len,
6916         assign allocated to be ALLOCATION_PADDING larger than len
6917         (set_length): fixup the overflow handling
6918         (_dbus_string_get_data_len): fix overflow in assertion
6919         (open_gap): detect overflow in size of gap to be opened
6920         (_dbus_string_lengthen): add overflow check
6921         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
6922         (_dbus_string_append): add overflow check
6923         (_dbus_string_append_unichar): overflow
6924         (_dbus_string_delete): fix overflow in assertion
6925         (_dbus_string_copy_len): overflow in assertion
6926         (_dbus_string_replace_len): overflows in assertions
6927         (_dbus_string_find): change to implement in terms of
6928         _dbus_string_find_to
6929         (_dbus_string_find_to): assorted fixage
6930         (_dbus_string_equal_c_str): assert c_str != NULL,
6931         fix logic so the function works
6932         (_dbus_string_ends_with_c_str): fix overflow thingy
6933         (_dbus_string_base64_encode): overflow fix
6934         (_dbus_string_validate_ascii): overflow
6935         (_dbus_string_validate_nul): overflow
6936
6937 2003-02-26  Havoc Pennington  <hp@redhat.com>
6938
6939         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
6940
6941 2003-02-26  Alexander Larsson  <alexl@redhat.com>
6942
6943         * configure.in:
6944         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
6945
6946         * dbus/dbus-connection.c:
6947         * dbus/dbus-connection.h:
6948         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
6949         Add dbus_connection_set_wakeup_main_function and use it when queueing
6950         incoming and outgoing messages.
6951
6952
6953         * dbus/dbus-dataslot.c:
6954         Threadsafe usage of DBusDataSlotAllocator
6955
6956         * dbus/dbus-message.c: (dbus_message_get_args_iter):
6957         dbus_new can fail.
6958
6959         * dbus/dbus-server-unix.c:
6960         Add todo comment
6961
6962         * glib/dbus-gmain.c:
6963         Implement the new wakeup functions for glib.
6964
6965         * glib/Makefile.am:
6966         * glib/test-thread-client.c:
6967         * glib/test-thread-server.c:
6968         * glib/test-thread.h:
6969         Initial cut at some thread test code. Not really done yet.
6970
6971 2003-02-26  Havoc Pennington  <hp@pobox.com>
6972
6973         * dbus/dbus-connection.c
6974         (dbus_connection_send_message_with_reply_and_block): fix crash
6975         where we ref'd the outgoing message instead of the returned reply
6976
6977         * dbus/dbus-transport-unix.c (do_authentication): check read watch
6978         at the end of this function, so if we didn't need to read for
6979         authentication, we reinstall it for receiving messages
6980
6981         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
6982         a NULL sender for peer-to-peer case
6983
6984         * dbus/dbus-transport-unix.c (check_read_watch): handle
6985         !authenticated case correctly
6986
6987         * glib/dbus-gmain.c: add support for DBusServer
6988
6989         * dbus/dbus-server.c: add data slot support
6990
6991         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
6992         return values and handle errors
6993
6994         * dbus/dbus-dataslot.c: factor out the data slot stuff from
6995         DBusConnection
6996
6997         * Doxyfile.in (INPUT): add glib subdir
6998
6999         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
7000         setup_with_g_main instead of hookup_with_g_main; write docs
7001
7002 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
7003
7004         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
7005         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7006         * dbus/dbus-message.c: (dbus_message_append_boolean),
7007         (dbus_message_append_boolean_array),
7008         (dbus_message_get_args_valist), (_dbus_message_test):
7009         * dbus/dbus-message.h:
7010         * doc/dbus-specification.sgml:
7011         Various fixes as pointed out by Havoc.
7012
7013         * test/data/invalid-messages/bad-boolean-array.message:
7014         * test/data/invalid-messages/bad-boolean.message:
7015         Add invalid boolean value test cases.
7016
7017 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
7018
7019         * dbus/dbus-internals.c: (_dbus_type_to_string):
7020         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7021         (_dbus_marshal_validate_arg):
7022         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7023         * dbus/dbus-message.c: (dbus_message_append_args_valist),
7024         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
7025         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
7026         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
7027         (dbus_message_iter_get_double),
7028         (dbus_message_iter_get_boolean_array), (message_iter_test):
7029         * dbus/dbus-message.h:
7030         * dbus/dbus-protocol.h:
7031         * doc/dbus-specification.sgml:
7032         * test/data/valid-messages/lots-of-arguments.message:
7033         Add support for boolean and boolean array types.
7034
7035 2003-02-23  Havoc Pennington  <hp@pobox.com>
7036
7037         * dbus/dbus-keyring.c: finish most of this implementation and
7038         simple unit test
7039
7040         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7041         these barf if the error isn't cleared to NULL
7042
7043         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
7044         (_dbus_create_directory): new function
7045
7046         * dbus/dbus-errors.c (dbus_set_error): fix warning
7047
7048         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
7049         (_dbus_string_hex_decode): new function
7050         (test_hex_roundtrip): test code
7051
7052         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
7053
7054         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
7055
7056         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
7057         the save-to-temp/rename trick to atomically write the new file
7058         (_dbus_string_parse_uint): new function
7059
7060 2003-02-22  Havoc Pennington  <hp@pobox.com>
7061
7062         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
7063
7064 2003-02-22  Havoc Pennington  <hp@pobox.com>
7065
7066         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
7067         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
7068
7069         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7070
7071         * dbus/test/data/sha-1: add US government test suite for SHA-1
7072
7073 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
7074
7075         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7076         Make string arrays NULL-terminated.
7077
7078         * dbus/dbus-memory.c: (dbus_free_string_array):
7079         * dbus/dbus-memory.h:
7080         New function for freeing NULL-terminated string arrays.
7081
7082         * dbus/dbus-message-builder.c: (append_quoted_string),
7083         (_dbus_message_data_load):
7084         Add support for array types.
7085
7086         * dbus/dbus-message.c: (check_message_handling):
7087         Add more types as test cases.
7088
7089         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
7090         (_dbus_string_parse_double):
7091         Add the start offset to the end offset.
7092
7093         * test/data/valid-messages/lots-of-arguments.message:
7094         New test message with lots of arguments.
7095
7096 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
7097
7098         * dbus/dbus-message.c: (dbus_message_append_nil),
7099         (dbus_message_append_int32), (dbus_message_append_uint32),
7100         (dbus_message_append_double), (dbus_message_append_string),
7101         (dbus_message_append_int32_array),
7102         (dbus_message_append_uint32_array),
7103         (dbus_message_append_double_array),
7104         (dbus_message_append_byte_array),
7105         (dbus_message_append_string_array):
7106         Fix all out-of-memory handling in these functions.
7107
7108 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
7109
7110         * dbus/dbus-message.c: (dbus_message_append_nil):
7111         Fix a silly.
7112
7113 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
7114
7115         * dbus/dbus-message.c: (dbus_message_append_args_valist),
7116         (dbus_message_append_nil), (dbus_message_append_int32_array),
7117         (dbus_message_append_uint32_array),
7118         (dbus_message_append_double_array),
7119         (dbus_message_append_byte_array),
7120         (dbus_message_append_string_array), (dbus_message_get_args_valist),
7121         (dbus_message_iter_get_int32_array),
7122         (dbus_message_iter_get_uint32_array),
7123         (dbus_message_iter_get_double_array),
7124         (dbus_message_iter_get_byte_array),
7125         (dbus_message_iter_get_string_array):
7126
7127         * dbus/dbus-message.h:
7128         Add functions for appending and getting arrays.
7129
7130 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
7131
7132         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
7133         element size at least 8 bytes, fixes mempool tests on
7134         64-bit machines.
7135
7136 2003-02-20  Alexander Larsson  <alexl@redhat.com>
7137
7138         * dbus/dbus-transport-unix.c (unix_do_iteration):
7139         Unlock the connection mutex during a blocking select call.
7140         Add todo about how we need a way to wake up the select.
7141
7142         * dbus/dbus-connection-internal.h:
7143         * dbus/dbus-connection.c:
7144         Add _dbus_connection_lock and _dbus_connection_unlock.
7145
7146 2003-02-19  Havoc Pennington  <hp@pobox.com>
7147
7148         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
7149         Doxyfile.in, not Doxyfile
7150
7151         * dbus/dbus-keyring.c: do some hacking on this
7152
7153         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
7154
7155         * dbus/dbus-errors.c (dbus_set_error_const): do not call
7156         dbus_error_init
7157         (dbus_set_error): remove dbus_error_init, check for message ==
7158         NULL *before* we sprintf into it, and add @todo about including
7159         system headers in this file
7160
7161         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
7162
7163         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
7164
7165         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
7166         get various bits of user information based on either username
7167         or user ID
7168         (_dbus_homedir_from_username): new function
7169
7170 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
7171
7172         * configure.in:
7173         Add check for nonposix getpwnam_r
7174
7175         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
7176         Align the pool element size to a sizeof (void *) boundary.
7177
7178         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
7179         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
7180         General Solaris fixes.
7181
7182         * test/data/valid-messages/simplest-manual.message:
7183         Explicitly state that we want little-endian packing.
7184
7185 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
7186
7187         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7188
7189         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
7190         Added to create a transport connecting using a tcp/ip socket.
7191
7192         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
7193         to a tcp socket at given host and port.
7194         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
7195         hostname and port.
7196
7197         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
7198
7199         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
7200         Added to create a server listening on a TCP/IP socket.
7201
7202 2003-02-19  Havoc Pennington  <hp@pobox.com>
7203
7204         Throughout: mop up all the Doxygen warnings and undocumented
7205         stuff.
7206
7207         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
7208         to search any paths.
7209
7210         * dbus/dbus-threads.c: move global mutex initializers to
7211         dbus-internals.h, multiple prototypes was confusing doxygen
7212         besides being kind of ugly
7213
7214         * Doxyfile (PREDEFINED): have Doxygen define
7215         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
7216         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
7217         (do not abuse the feature! it's for stuff like the autogenerated
7218         macros in dbus-md5.c, not just for things you don't feel like
7219         documenting...)
7220
7221 2003-02-18  Havoc Pennington  <hp@pobox.com>
7222
7223         * dbus/dbus-string.c (_dbus_string_zero): new function
7224
7225         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
7226         wrap it in some dbus-friendly API
7227
7228         * dbus/dbus-types.h: add 16-bit types
7229
7230 2003-02-18  Joe Shaw  <joe@assbarn.com>
7231
7232         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
7233         credentials from our currently running process.
7234         (get_word): Fix a buglet where we were copying the entire length
7235         instead of relative to our position.
7236
7237         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
7238         keys on the stack... it's 640k of data.
7239
7240         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
7241         read the credentials byte off the socket, even if we don't have
7242         SO_PEERCRED.
7243         (_dbus_poll): Implement poll() using select() for systems which
7244         don't have it.
7245
7246         * glib/test-dbus-glib.c (main): Print out an error if no
7247         parameters are given.
7248
7249         * test/data/auth/fallback.auth-script: Added.  Tests that a client
7250         can fallback to a secondary auth mechanism if the first fails.
7251
7252 2003-02-18  Havoc Pennington  <hp@pobox.com>
7253
7254         * AUTHORS: add Alex
7255
7256 2003-02-17  Havoc Pennington  <hp@pobox.com>
7257
7258         * doc/dbus-specification.sgml: lots of cosmetic
7259         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
7260         env variable to DBUS_BUS_ADDRESS, s/client/application/,
7261         s/server/bus/ (except in authentication section). Add a section
7262         "Message Bus Message Routing"
7263
7264 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
7265
7266         Release 0.4
7267
7268         * NEWS: Update
7269
7270 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
7271
7272         * doc/dbus-specification.sgml:
7273         Specification updates.
7274
7275 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
7276
7277         * bus/activation.c: (bus_activation_init), (child_setup),
7278         (bus_activation_activate_service):
7279         * bus/activation.h:
7280         * bus/main.c: (main):
7281         Set DBUS_ADDRESS environment variable.
7282
7283         * dbus/dbus-errors.c: (dbus_set_error):
7284         Don't use va_copy since that's a C99 feature.
7285
7286         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
7287         (_dbus_spawn_async):
7288         * dbus/dbus-sysdeps.h:
7289         Add child_setup_func to _dbus_spawn_async.
7290
7291         * doc/dbus-specification.sgml:
7292         Update specification.
7293
7294         * test/spawn-test.c: (setup_func), (main):
7295         Fix test.
7296
7297 2003-02-17  Alexander Larsson  <alexl@redhat.com>
7298
7299         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
7300         Added todo.
7301
7302 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
7303
7304         * doc/.cvsignore:
7305         * doc/Makefile.am:
7306         * doc/dbus-test-plan.sgml:
7307         Add test plan document.
7308
7309         * test/Makefile.am:
7310         Fix distcheck.
7311
7312 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
7313
7314         * dbus/dbus-message.c: (decode_header_data),
7315         (_dbus_message_loader_return_buffer):
7316         Set the header padding amount when loading a message.
7317
7318 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
7319
7320         * bus/dispatch.c: (send_one_message):
7321         Only send broadcast messages to registered connections.
7322
7323         * dbus/dbus-message.c: (dbus_message_name_is):
7324         * dbus/dbus-message.h:
7325         New convenience function.
7326
7327         * dbus/dbus-transport-debug.c: (do_reading):
7328         Only dispatch one message per run.
7329
7330         * test/Makefile.am:
7331         * test/bus-test.c: (new_connection_callback), (die),
7332         (test_hello_client1_handler), (test_hello_client2_handler),
7333         (test_hello_replies), (main):
7334
7335         * test/bus-test-loop.[ch]:
7336         Add these.
7337
7338 2003-02-16  Havoc Pennington  <hp@pobox.com>
7339
7340         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7341         backward conditional
7342
7343 2003-02-16  Alexander Larsson  <alexl@redhat.com>
7344
7345         * dbus/dbus-connection.c:
7346         Implement sent_message_with_reply. (with_reply_and block is still
7347         busted).
7348         Made dispatch_message not lose message if OOM.
7349
7350         * dbus/dbus-errors.h:
7351         Add NoReply error (for reply timeouts).
7352
7353 2003-02-16  Alexander Larsson  <alexl@redhat.com>
7354
7355         * dbus/dbus-hash.c (_dbus_hash_table_unref):
7356         Actually free keys and values when destroying hashtable.
7357
7358 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
7359
7360         * dbus/dbus-auth.c: (client_try_next_mechanism):
7361         Plug a leak.
7362
7363         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
7364         Return TRUE if there's no thread implementation around.
7365
7366         * glib/dbus-gmain.c: (free_source),
7367         (dbus_connection_hookup_with_g_main):
7368         Make sure to remove the GSource when the connection is finalized.
7369
7370 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
7371
7372         * bus/dispatch.c: (bus_dispatch_message_handler):
7373         * dbus/dbus-errors.h:
7374         Return an error if someone tries to send a message to a service
7375         that doesn't exist.
7376
7377 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
7378
7379         * bus/activation.c: (load_directory), (bus_activation_init),
7380         (bus_activation_activate_service):
7381         * bus/activation.h:
7382         * bus/driver.c:
7383         (bus_driver_handle_activate_service), (bus_driver_handle_message):
7384         More work on the activation handling.
7385
7386         * dbus/dbus-errors.h:
7387         Add some error messages
7388
7389         * dbus/dbus-message.c: (dbus_message_new_error_reply):
7390         * dbus/dbus-message.h:
7391         New function that creates an error message.
7392
7393         * dbus/dbus-protocol.h:
7394         Add ACTIVATE_SERVER message.
7395
7396         * dbus/dbus-server-unix.c: (unix_handle_watch),
7397         (_dbus_server_new_for_domain_socket):
7398         Call _dbus_fd_set_close_on_exec.
7399
7400         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
7401         (_dbus_spawn_async), (_dbus_disable_sigpipe),
7402         (_dbus_fd_set_close_on_exec):
7403         * dbus/dbus-sysdeps.h:
7404         Add _dbus_fd_set_close_on exec function. Also add function that checks
7405         that all open fds are set to close-on-exec and warns otherwise.
7406
7407         * dbus/dbus-transport-unix.c:
7408         (_dbus_transport_new_for_domain_socket):
7409         Call _dbus_fd_set_close_on_exec.
7410
7411 2003-02-16  Havoc Pennington  <hp@pobox.com>
7412
7413         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
7414         allow people to avoid setting SIGPIPE to SIG_IGN
7415         (_dbus_connection_new_for_transport): disable SIGPIPE unless
7416         we've been asked not to
7417
7418 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
7419
7420         * dbus/dbus-list.c: (_dbus_list_append_link),
7421         (_dbus_list_prepend_link):
7422         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
7423         (dbus_realloc):
7424         Warning fixes.
7425
7426 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
7427
7428         * bus/Makefile.am:
7429         * bus/activation.c: (bus_activation_entry_free),
7430         (add_desktop_file_entry), (load_directory), (bus_activation_init):
7431         * bus/activation.h:
7432         * bus/main.c: (main):
7433         Add simple activation support, doesn't work yet though.
7434
7435 2003-02-15   Zack Rusin  <zack@kde.org>
7436
7437         * qt/dbus-qthread.cpp:  small casting fix
7438
7439 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
7440
7441         * dbus/dbus-errors.c: (dbus_set_error):
7442         * dbus/dbus-errors.h:
7443         Add a few errors and make dbus_set_error void.
7444
7445         * dbus/dbus-sysdeps.c:
7446         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
7447         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
7448         * dbus/dbus-sysdeps.h:
7449         Add _dbus_spawn_async.
7450
7451         * test/spawn-test.c: (main):
7452         Test for _dbus_spawn_async.
7453
7454 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
7455
7456         * dbus/dbus-internals.h:
7457         Fix build without tests.
7458
7459         * dbus/dbus-list.c: (alloc_link):
7460         Fix a segfault when a malloc fails.
7461
7462         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
7463         (dbus_malloc0), (dbus_realloc):
7464         Add support for malloc debugging.
7465
7466 2003-02-15  Alexander Larsson  <alexl@redhat.com>
7467
7468         * dbus/dbus-threads.c:
7469         * dbus/dbus-threads.h:
7470         Add condvars. Remove static mutext from API.
7471         Implement static mutexes by initializing them from threads_init.
7472
7473         * glib/dbus-gthread.c:
7474         * qt/dbus-qthread.cpp:
7475         Update with the thread api changes.
7476
7477
7478         * dbus/dbus-list.c:
7479         * dbus/dbus-list.h:
7480         Turn StaticMutex into normal mutex + init function.
7481         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
7482         _dbus_list_append_link, _dbus_list_prepend_link
7483
7484
7485         * dbus/dbus-sysdeps.c:
7486         * dbus/dbus-sysdeps.h:
7487         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
7488         _dbus_atomic_dec. Only slow fallback implementation at the moment.
7489
7490         * dbus/dbus-protocol.h:
7491         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
7492
7493         * dbus/dbus-message.c:
7494         Make ref/unref atomic.
7495         Fix some docs.
7496
7497         * dbus/dbus-connection-internal.h:
7498         * dbus/dbus-connection.c:
7499         * dbus/dbus-connection.h:
7500         Make threadsafe.
7501         Change _peek to _borrow,_return & _steal_borrowed.
7502         Change disconnect callback to event.
7503         Make dbus_connection_dispatch_messages reentrant.
7504
7505         * dbus/dbus-transport.c:
7506         Don't ref the connection on calls to the transport
7507         implementation.
7508
7509         * dbus/dbus-message-handler.c:
7510         Make threadsafe.
7511
7512         * glib/dbus-gmain.c:
7513         Don't use peek_message anymore
7514
7515         * test/Makefile.am:
7516         * test/debug-thread.c:
7517         * test/debug-thread.h:
7518         Simple thread implementation that asserts() on deadlocks in
7519         single-threaded code.
7520
7521         * test/bus-test.c:
7522         (main) Call debug_threads_init.
7523
7524         * test/watch.c:
7525         Use disconnect message instead of disconnect callback.
7526
7527         * bus/connection.c:
7528         * bus/connection.h:
7529         Don't call dbus_connection_set_disconnect_function. Instead export
7530         bus_connection_disconnect.
7531
7532         * bus/dispatch.c:
7533         Call bus_connection_disconnect when we get a disconnected message.
7534
7535 2003-02-15  Havoc Pennington  <hp@pobox.com>
7536
7537         * dbus/dbus-message.c (dbus_message_new): fool around with the
7538         docs
7539
7540 2003-02-14  Havoc Pennington  <hp@pobox.com>
7541
7542         * dbus/dbus-mempool.c: fail if the debug functions so indicate
7543
7544         * dbus/dbus-memory.c: fail if the debug functions indicate we
7545         should
7546
7547         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
7548         (_dbus_decrement_fail_alloc_counter): debug functions to
7549         simulate memory allocation failures
7550
7551 2003-02-14  Havoc Pennington  <hp@pobox.com>
7552
7553         * dbus/dbus-errors.h (struct DBusError): add a word of padding
7554         to DBusError
7555
7556 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7557
7558         * bus/driver.c: (bus_driver_handle_hello):
7559         * bus/driver.h:
7560         * bus/services.c: (bus_service_lookup):
7561         Reorder message sending so we get a more sane order.
7562
7563         * test/bus-test.c: (message_handler):
7564         Fix tyop.
7565
7566 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7567
7568         * bus/driver.c: (bus_driver_send_service_deleted),
7569         (bus_driver_send_service_created), (bus_driver_send_service_lost),
7570         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7571         (bus_driver_send_welcome_message),
7572         (bus_driver_handle_list_services),
7573         (bus_driver_handle_acquire_service),
7574         (bus_driver_handle_service_exists):
7575         * dbus/dbus-bus.c: (dbus_bus_register_client),
7576         (dbus_bus_acquire_service), (dbus_bus_service_exists):
7577         * dbus/dbus-errors.c: (dbus_result_to_string):
7578         * dbus/dbus-errors.h:
7579         * dbus/dbus-message.c: (dbus_message_append_args),
7580         (dbus_message_append_args_valist), (dbus_message_get_args),
7581         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
7582         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
7583         (dbus_message_iter_get_byte_array),
7584         (dbus_message_iter_get_string_array), (message_iter_test),
7585         (check_message_handling), (_dbus_message_test):
7586         * dbus/dbus-message.h:
7587         * test/bus-test.c: (main):
7588         Change fields to arguments in messages, so that they won't be
7589         confused with header fields.
7590
7591         * glib/test-dbus-glib.c: (main):
7592         Remove append_fields from hello message.
7593
7594 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7595
7596         * dbus/dbus-errors.c:
7597         * dbus/dbus-message.c:
7598         * dbus/dbus-string.c:
7599         Documentation fixes.
7600
7601 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7602
7603         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
7604         (remove_timeout):
7605         Implement support for timeouts in dbus-glib.
7606
7607 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7608
7609         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7610         * dbus/dbus-message.c: (process_test_subdir):
7611         * test/break-loader.c: (find_breaks_based_on):
7612         Plug some memory leaks.
7613
7614 2003-02-13  Richard Hult  <rhult@codefactory.se>
7615
7616         * bus/main.c: Fix build.
7617
7618         * dbus/dbus-errors.h:
7619         * dbus/dbus-errors.c: Fix copyright for Anders.
7620
7621 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7622
7623         * bus/Makefile.am:
7624         Add utils.[ch]
7625
7626         * bus/connection.c: (bus_connection_foreach):
7627         Fix a warning.
7628
7629         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
7630         (unescape_string), (new_section), (parse_section_start),
7631         (parse_key_value), (report_error), (bus_desktop_file_load),
7632         (bus_desktop_file_get_string):
7633         * bus/desktop-file.h:
7634         Use DBusError for error reporting.
7635
7636         * bus/dispatch.c: (send_one_message),
7637         (bus_dispatch_message_handler):
7638         * bus/driver.c: (bus_driver_send_service_deleted),
7639         (bus_driver_send_service_created), (bus_driver_send_service_lost),
7640         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
7641         (bus_driver_send_welcome_message),
7642         (bus_driver_handle_list_services),
7643         (bus_driver_handle_acquire_service),
7644         (bus_driver_handle_service_exists):
7645         * bus/loop.c: (bus_loop_run):
7646         * bus/main.c:
7647         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
7648
7649         * bus/utils.c: (bus_wait_for_memory):
7650         * bus/utils.h:
7651         New files with general utility functions.
7652
7653         * dbus/dbus-internals.h:
7654         Remove _DBUS_HANDLE_OOM.
7655
7656 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7657
7658         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
7659         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
7660         * dbus/dbus-errors.h:
7661         Add DBusError structure.
7662
7663 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7664
7665         * test/data/valid-messages/standard-acquire-service.message:
7666         * test/data/valid-messages/standard-hello.message:
7667         * test/data/valid-messages/standard-list-services.message:
7668         * test/data/valid-messages/standard-service-exists.message:
7669         Add some standard messages.
7670
7671 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7672
7673         * bus/driver.c: (bus_driver_send_welcome_message),
7674         (bus_driver_handle_list_services),
7675         (bus_driver_handle_acquire_service),
7676         (bus_driver_handle_service_exists), (bus_driver_handle_message):
7677         Update for API changes in libdbus.
7678
7679         * dbus/dbus-message.c: (dbus_message_new_reply):
7680         * dbus/dbus-message.h:
7681         Remove the name argument. The spec states that replies shouldn't
7682         have a name.
7683
7684 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
7685
7686         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
7687         (report_error), (bus_desktop_file_load), (lookup_section),
7688         (lookup_line), (bus_desktop_file_get_raw),
7689         (bus_desktop_file_get_string):
7690         * bus/desktop-file.h:
7691         Some fixes, and new functions for getting a key value from a section.
7692
7693 2003-02-13  Havoc Pennington  <hp@pobox.com>
7694
7695         * test/data/auth/fail-after-n-attempts.auth-script: new test
7696
7697         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
7698         reject the client.
7699
7700 2003-02-13  Havoc Pennington  <hp@pobox.com>
7701
7702         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
7703         dbus_credentials_match were backward
7704
7705         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
7706         NO_CREDENTIALS and ROOT_CREDENTIALS
7707
7708         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
7709         into here. Never process more commands after we've reached an
7710         end state; store further data as unused bytes.
7711
7712         * test/data/auth/*: add more auth tests
7713
7714         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
7715         command to match exact string and EXPECT_UNUSED to match unused
7716         bytes
7717
7718         * test/Makefile.am (dist-hook): fix to dist all the test stuff
7719
7720 2003-02-12  Havoc Pennington  <hp@pobox.com>
7721
7722         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
7723         \r off of popped lines
7724
7725         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
7726         scripts
7727
7728         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
7729         SEND, append \r\n
7730
7731 2003-02-12  Havoc Pennington  <hp@pobox.com>
7732
7733         * dbus/Makefile.am: remove break-loader from the build, since it
7734         moved.
7735
7736         * configure.in: add --enable-gcov to turn on coverage profiling
7737         flags and disable optimization
7738
7739 2003-02-10  Havoc Pennington  <hp@pobox.com>
7740
7741         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
7742         initial cut at test framework for DBusAuth from laptop.
7743         Doesn't quite work yet but it compiles and I need to get
7744         it off the 266mhz laptop. ;-)
7745
7746         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
7747         fix a memleak in error case
7748
7749 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
7750
7751         * bus/Makefile.am:
7752         * bus/desktop-file.c:
7753         * bus/desktop-file.h:
7754         Add a desktop file parser.
7755
7756 2003-02-11  Zack Rusin  <zack@kde.org>
7757
7758         * qt/message.[h|cpp]: sample implementation
7759         of the KDE wrapper for DBusMessage
7760
7761 2003-02-09  Zack Rusin  <zack@kde.org>
7762
7763         * test/bus-test.c: make_it_compile
7764         * doc/dbus-specification.sgml: minimal semantic fix
7765
7766 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
7767
7768         Release 0.3
7769
7770         * NEWS: Update
7771
7772 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
7773
7774         * dbus/Makefile.am:
7775         * dbus/dbus-break-loader.c:
7776         * test/Makefile.am:
7777         * test/break-loader.c:
7778         Move dbus-break-loader to test/ and rename it to break-loader.
7779
7780 2003-02-02  Havoc Pennington  <hp@pobox.com>
7781
7782         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
7783         for code to manage cookies in your home directory
7784
7785         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
7786
7787         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
7788         to authenticate, then disconnect the client.
7789
7790 2003-02-03  Alexander Larsson  <alexl@redhat.com>
7791
7792         * dbus/dbus-message.c (dbus_message_append_fields):
7793         Correct docs.
7794
7795 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
7796
7797         * doc/dbus-specification.sgml:
7798         Update address format section.
7799
7800 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
7801
7802         * test/Makefile.am:
7803         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
7804         (message_handler), (new_connection_callback), (loop_quit),
7805         (loop_run), (main):
7806         Add bus test.
7807
7808 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
7809
7810         * bus/driver.c: (bus_driver_handle_service_exists):
7811         Simplify the code a bit.
7812
7813         * dbus/dbus-bus.c: (dbus_bus_service_exists):
7814         Fix a silly.
7815
7816 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
7817
7818         * bus/Makefile.am:
7819         Add libdbus-daemon.la and link to it.
7820
7821 2003-02-01  James Willcox  <jwillcox@gnome.org>
7822
7823         * bus/driver.c: (bus_driver_handle_own_service):
7824         Actually include the service reply code in the message.
7825
7826 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
7827
7828         * bus/driver.c: (bus_driver_handle_service_exists):
7829         Don't unref the incoming message.
7830
7831 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
7832
7833         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
7834
7835 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
7836
7837         * dbus/dbus-server.c: (dbus_server_listen):
7838         * dbus/dbus-transport.c: (_dbus_transport_open):
7839         ifdef out the calls to the debug transport and server.
7840
7841 2003-02-02  Alexander Larsson  <alexl@redhat.com>
7842
7843         * dbus/dbus-watch.c (dbus_watch_get_flags):
7844         Add note in the docs that ERROR or HANGUP won't be returned
7845         and are assumed always on.
7846
7847         * glib/dbus-gmain.c (add_watch):
7848         Always add IO_ERR | IO_HUP
7849
7850         * dbus/dbus-message.h:
7851         Add semicolon after dbus_message_iter_get_string_array().
7852         Makes qt code build again
7853
7854 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
7855
7856         * bus/driver.c: (create_unique_client_name),
7857         (bus_driver_handle_hello):
7858         Don't take a name, just use a numeric id to identify
7859         each client.
7860
7861         * dbus/Makefile.am:
7862         * dbus/dbus-bus.c: (dbus_bus_register_client),
7863         (dbus_bus_acquire_service), (dbus_bus_service_exists):
7864         * dbus/dbus-bus.h:
7865         Add new convenience functions for communicating with the bus.
7866
7867         * dbus/dbus-message.h:
7868
7869         * dbus/dbus-protocol.h:
7870         Fix a typo.
7871
7872 2003-02-01  Alexander Larsson  <alexl@redhat.com>
7873
7874         * dbus/dbus-message.c (dbus_message_append_fields):
7875         Add some more doc comments.
7876
7877 2003-02-01  Havoc Pennington  <hp@pobox.com>
7878
7879         * dbus/dbus-break-loader.c (randomly_modify_length): change
7880         a 4-byte value in the message as if it were a length
7881
7882         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
7883         execute bit on saved files
7884
7885 2003-02-01  Havoc Pennington  <hp@pobox.com>
7886
7887         * dbus/dbus-break-loader.c (main): new program to find messages
7888         that break the loader.
7889
7890         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
7891         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
7892
7893         * dbus/dbus-string.c (_dbus_string_set_byte): new
7894
7895 2003-01-31  Havoc Pennington  <hp@pobox.com>
7896
7897         * dbus/dbus-message.c: refactor the test code to be more general,
7898         in preparation for writing a "randomly permute test cases to
7899         try to break the loader" program.
7900
7901 2003-01-31  Havoc Pennington  <hp@pobox.com>
7902
7903         * doc/dbus-specification.sgml: work on the specification
7904
7905         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
7906         the protocol version of the message.
7907
7908         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
7909         no longer specifies that.
7910         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
7911         1/2/3/4)
7912
7913         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
7914         "break" for DBUS_TYPE_NIL, remove @todo
7915
7916 2003-01-31  Havoc Pennington  <hp@pobox.com>
7917
7918         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
7919         just set_is_error/get_is_error as this is a commonly-used
7920         function, and write docs.
7921
7922 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
7923
7924         * dbus/dbus-address.c: (dbus_address_entry_free):
7925         Free key and value lists.
7926
7927         * dbus/dbus-internals.c: (_dbus_type_to_string):
7928         Add the types we didn't have.
7929
7930         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7931         (_dbus_marshal_validate_arg):
7932         Add NIL types.
7933
7934         * dbus/dbus-message.c: (dbus_message_set_sender):
7935         Remove todo about being able to set sender to NULL.
7936
7937         (dbus_message_set_is_error_reply),
7938         (dbus_message_get_is_error_reply):
7939         * dbus/dbus-message.h:
7940         New functions.
7941
7942         * dbus/dbus-protocol.h:
7943         Add error reply flag.
7944
7945         * test/data/valid-messages/opposite-endian.message:
7946         Add NIL type to test.
7947
7948 2003-01-31  Havoc Pennington  <hp@pobox.com>
7949
7950         * doc/dbus-specification.sgml: fully specify the header.  Add
7951         flags and major protocol version, and change header/body len to
7952         unsigned.
7953
7954         * dbus/dbus-message-builder.c (append_saved_length): append length
7955         as uint32
7956
7957         * dbus/dbus-message.c (dbus_message_create_header): change header
7958         length and body length to unsigned. Add the new fields from the
7959         spec
7960         (_dbus_message_loader_return_buffer): unsigned header/body len
7961
7962 2003-01-30  Havoc Pennington  <hp@pobox.com>
7963
7964         * dbus/dbus-auth.c: rework to use only REJECTED, no
7965         MECHANISMS
7966
7967         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
7968         use REJECTED, suggested by Mark McLoughlin
7969
7970 2003-01-30  Havoc Pennington  <hp@pobox.com>
7971
7972         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
7973         a better way to report errors here. e.g.  "unix address lacks
7974         path" or something. also "no such file" when the path doesn't
7975         exist, etc.
7976
7977         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
7978         leaking list nodes
7979         (dbus_parse_address): add @todo about documenting address format,
7980         and allowing , and ; to be escaped
7981
7982 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
7983
7984         * dbus/Makefile.am:
7985         Add dbus-address.[ch]
7986
7987         * dbus/dbus-address.c: (dbus_address_entry_free),
7988         (dbus_address_entries_free), (create_entry),
7989         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
7990         (dbus_parse_address), (_dbus_address_test):
7991         * dbus/dbus-address.h:
7992         New files for dealing with address parsing.
7993
7994         * dbus/dbus-connection.c:
7995         Document timeout functions.
7996
7997         * dbus/dbus-message.c:
7998         Document dbus_message_new_from_message.
7999
8000         * dbus/dbus-server-debug.c:
8001         Document.
8002
8003         * dbus/dbus-server.c: (dbus_server_listen):
8004         Parse address and use correct server implementation.
8005
8006         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
8007         * dbus/dbus-string.h:
8008         New function with test.
8009
8010         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
8011         * dbus/dbus-test.h:
8012         Add address tests.
8013
8014         * dbus/dbus-transport-debug.c:
8015         Document.
8016
8017         * dbus/dbus-transport.c: (_dbus_transport_open):
8018         Parse address and use correct transport implementation.
8019
8020 2003-01-30  Havoc Pennington  <hp@pobox.com>
8021
8022         * dbus/dbus-message.c: use message->byte_order instead of
8023         DBUS_COMPILER_BYTE_ORDER throughout.
8024         (dbus_message_create_header): pad header to align the
8025         start of the body of the message to 8-byte boundary
8026
8027         * dbus/dbus-marshal.h: make all the demarshalers take const
8028         DBusString arguments.
8029
8030         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
8031         validate message args here, so we don't have to do slow validation
8032         later, and so we catch bad messages as they are incoming. Also add
8033         better checks on header_len and body_len. Also fill in
8034         message->byte_order
8035
8036         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
8037         implemented properly)
8038         (_dbus_string_validate_nul): new function to check all-nul
8039
8040         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
8041         get_arg_end_pos and remove all validation
8042         (_dbus_marshal_validate_arg): actually do validation here.
8043
8044 2003-01-29  Havoc Pennington  <hp@pobox.com>
8045
8046         * dbus/dbus-message.c (check_message_handling): fix assertion
8047         failure on set_client_serial
8048
8049 2003-01-28  Havoc Pennington  <hp@pobox.com>
8050
8051         * dbus/dbus-server-debug.c: Add doc section comments
8052
8053         * dbus/dbus-transport-debug.c: add doc section comments
8054
8055 2003-01-28  Havoc Pennington  <hp@redhat.com>
8056
8057         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
8058         the reverse order from how I had it
8059         (_dbus_string_base64_encode): reverse encoding order. I was
8060         basically byteswapping everything during encoding.
8061
8062 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
8063
8064         * dbus/dbus-connection-internal.h:
8065         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
8066         (_dbus_connection_remove_timeout):
8067         Add functions for adding and removing timeouts.
8068
8069         * dbus/dbus-message.c: (dbus_message_new_from_message):
8070         Add new function that takes a message and creates an exact
8071         copy of it, but with the refcount set to 1.
8072         (check_message_handling):
8073         Fix build error.
8074
8075         * dbus/dbus-server-protected.h:
8076         * dbus/dbus-server.c: (_dbus_server_init_base),
8077         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
8078         (dbus_server_set_timeout_functions):
8079         (_dbus_server_remove_timeout):
8080         New functions so that a server can add and remove timeouts.
8081
8082         (dbus_server_listen):
8083         Add commented out call to dbus_server_debug_new.
8084
8085         * dbus/dbus-timeout.c: (_dbus_timeout_new):
8086         Actually set the handler, doh.
8087
8088         * dbus/dbus-transport.c: (_dbus_transport_open):
8089         Add commented out call to dbus_transport_debug_client_new.
8090
8091         * dbus/Makefile.am:
8092         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
8093
8094 2003-01-28  Havoc Pennington  <hp@pobox.com>
8095
8096         * dbus/dbus-message.c (check_message_handling): function to check
8097         on the loaded message, iterates over it etc.
8098
8099 2003-01-28  Havoc Pennington  <hp@pobox.com>
8100
8101         * test/Makefile.am (dist-hook): fix make distdir
8102
8103         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
8104
8105 2003-01-27  Havoc Pennington  <hp@pobox.com>
8106
8107         * dbus/dbus-mempool.c (time_for_size): replace printf with
8108         _dbus_verbose
8109
8110         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
8111         empty lines; fix the SAVE_LENGTH stuff to be
8112         START_LENGTH/END_LENGTH so it actually works; couple other
8113         bugfixes
8114
8115         * test/Makefile.am (dist-hook): add dist-hook for .message files
8116
8117         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
8118         can be constant or locked.
8119         (_dbus_string_free): allow freeing a const string as
8120         documented/intended
8121
8122         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
8123
8124         * dbus/dbus-test-main.c (main): take an argument which is the
8125         directory containing test data
8126
8127         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
8128         argument to this and load all the messages in test/data/
8129         checking that they can be loaded or not loaded as appropriate.
8130
8131 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
8132
8133         * bus/dispatch.c: (bus_dispatch_message_handler):
8134         Dispatch messages sent to services.
8135
8136         * bus/driver.c: (bus_driver_send_service_deleted),
8137         (bus_driver_send_service_created), (bus_driver_send_service_lost),
8138         (bus_driver_send_service_acquired):
8139         Add helper functions for sending service related messages.
8140
8141         (bus_driver_send_welcome_message):
8142         Send HELLO_REPLY instead of WELCOME.
8143
8144         (bus_driver_handle_list_services):
8145         Send LIST_SERVICES_REPLY instead of SERVICES.
8146
8147         (bus_driver_handle_own_service),
8148         (bus_driver_handle_service_exists):
8149         New message handlers.
8150
8151         (bus_driver_handle_message):
8152         Invoke new message handlers.
8153
8154         (bus_driver_remove_connection):
8155         Don't remove any services here since that's done automatically
8156         by bus_service_remove_owner now.
8157
8158         * bus/driver.h:
8159         New function signatures.
8160
8161         * bus/services.c: (bus_service_add_owner):
8162         Send ServiceAcquired message if we're the only primary owner.
8163
8164         (bus_service_remove_owner):
8165         Send ServiceAcquired/ServiceLost messages.
8166
8167         (bus_service_set_prohibit_replacement),
8168         (bus_service_get_prohibit_replacement):
8169         Functions for setting prohibit replacement.
8170
8171         (bus_service_has_owner):
8172         New function that checks if a connection is in the owner queue of
8173         a certain service.
8174
8175         * bus/services.h:
8176         Add new function signatures.
8177
8178         * dbus/dbus-list.c: (_dbus_list_test):
8179         Add tests for _dbus_list_remove_last and traversing the list backwards.
8180
8181         * dbus/dbus-list.h:
8182         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
8183         go any further, so return NULL then.
8184
8185         * dbus/dbus-protocol.h:
8186         Add new messages, service flags and service replies.
8187
8188 2003-01-26  Havoc Pennington  <hp@pobox.com>
8189
8190         * dbus/dbus-message-builder.c: implement, completely untested.
8191
8192         * test/data/*: add data to be used in testing.
8193         ".message" files are our simple loadable text format.
8194         ".message-raw" will be binary dumps of messages.
8195
8196         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
8197
8198 2003-01-26  Havoc Pennington  <hp@pobox.com>
8199
8200         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
8201
8202         * dbus/dbus-errors.c (dbus_result_to_string): add
8203         file errors
8204
8205         * dbus/dbus-message-builder.c: new file, will contain code to load
8206         up messages from files. Not implemented yet.
8207
8208 2003-01-26  Havoc Pennington  <hp@pobox.com>
8209
8210         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
8211         the sender by setting to NULL
8212
8213 2003-01-26  Havoc Pennington  <hp@pobox.com>
8214
8215         The unit tests pass, but otherwise untested.  If it breaks, the
8216         tests should have been better. ;-)
8217
8218         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
8219         the connection.
8220
8221         * dbus/dbus-message.c: redo everything so we maintain
8222         message->header as the only copy of the various fields.
8223         This avoids the possibility of out-of-memory in some cases,
8224         for example dbus_message_lock() can't run out of memory anymore,
8225         and avoids extra copying. Figured I may as well go ahead and do
8226         this since it was busted for dbus_message_lock to not return
8227         failure on OOM, and dbus_message_write_header was totally
8228         unchecked for OOM. Also fixed some random other bugs.
8229
8230         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
8231         that strings are nul-terminated. Also, end_pos can be equal
8232         to string length just not greater than, I think.
8233         (_dbus_marshal_set_int32): new function
8234         (_dbus_marshal_set_uint32): new function
8235         (_dbus_marshal_set_string): new function
8236
8237         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
8238         a warning, init timeout_list to NULL
8239         (dbus_connection_send_message): don't use uninitialized variable
8240         "serial"
8241
8242         * dbus/dbus-string.c (_dbus_string_replace_len): new function
8243
8244 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
8245
8246         * bus/driver.c: (bus_driver_handle_hello),
8247         (bus_driver_send_welcome_message):
8248         Plug leaks
8249
8250 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
8251
8252         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
8253         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8254         (dbus_connection_unref):
8255         * dbus/dbus-marshal.c: (_dbus_marshal_test):
8256         * dbus/dbus-message.c: (dbus_message_unref),
8257         Plug memory leaks.
8258
8259         (dbus_message_get_fields):
8260         Remove debugging printout.
8261
8262         (_dbus_message_loader_return_buffer):
8263         Don't store the header string.
8264
8265         (_dbus_message_test):
8266         Plug leaks.
8267
8268 2003-01-26  Richard Hult  <rhult@codefactory.se>
8269
8270         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
8271         the file descriptor list, since it can change under us.
8272
8273 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
8274
8275         * glib/dbus-gmain.c: (dbus_connection_prepare),
8276         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
8277         (remove_watch), (dbus_connection_hookup_with_g_main):
8278         Rewrite the glib handling to use its own GSource instead of a
8279         GIOChannel so we can catch messages put in the queue while waiting
8280         for a reply.
8281
8282 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
8283
8284         * bus/Makefile.am:
8285         * bus/connection.c: (connection_disconnect_handler),
8286         (connection_watch_callback), (bus_connection_setup):
8287         * bus/dispatch.c: (send_one_message),
8288         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
8289         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
8290         * bus/dispatch.h:
8291         * bus/driver.c: (bus_driver_send_service_deleted),
8292         (bus_driver_send_service_created), (bus_driver_handle_hello),
8293         (bus_driver_send_welcome_message),
8294         (bus_driver_handle_list_services), (bus_driver_remove_connection),
8295         (bus_driver_handle_message):
8296         * bus/driver.h:
8297         Refactor code, put the message dispatching in its own file. Use
8298         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
8299         is disconnected.
8300
8301 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
8302
8303         * dbus/dbus-internals.h:
8304         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
8305
8306         * dbus/dbus-message.c: (dbus_message_get_sender):
8307         * dbus/dbus-message.h:
8308         Implement dbus_message_get_sender.
8309
8310         * dbus/dbus-protocol.h:
8311         Add message and service defines.
8312
8313 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
8314
8315         * dbus/dbus-connection.c: (dbus_connection_send_message):
8316         * dbus/dbus-message-internal.h:
8317         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
8318         (dbus_message_write_header):
8319         Remove _dbus_messag_unlock and don't set the client serial on a
8320         message if one already exists.
8321
8322 2003-01-24  Havoc Pennington  <hp@pobox.com>
8323
8324         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
8325         list_pool
8326
8327         * bus/driver.c (bus_driver_handle_list_services): fix a leak
8328         on OOM
8329
8330 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
8331
8332         * dbus/dbus-list.c: (alloc_link), (free_link):
8333         Use a memory pool for the links.
8334
8335 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
8336
8337         * bus/connection.c: (bus_connection_foreach):
8338         * bus/connection.h:
8339         Add new bus_connection_foreach function.
8340
8341         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
8342         Add function that broadcasts a message to all clients.
8343
8344         (bus_driver_send_service_created), (bus_driver_handle_hello),
8345         (bus_driver_send_welcome_message),
8346         (bus_driver_handle_list_services), (bus_driver_message_handler):
8347         Implement functions that take care of listing services, and notifying
8348         clients when new services are created.
8349
8350         * bus/services.c: (bus_services_list):
8351         * bus/services.h:
8352         Add new function that returns an array of strings with the currently
8353         registered services.
8354
8355         * glib/dbus-glib.h:
8356         * glib/dbus-gmain.c:
8357         Update copyright year.
8358
8359 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
8360
8361         * dbus/dbus-connection.c: (dbus_connection_send_message):
8362         Unlock the message in case it was sent earlier.
8363
8364         (dbus_connection_send_message_with_reply_and_block):
8365         Remove the reply message from the list.
8366
8367         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
8368         Set array_len and new_pos correctly.
8369
8370         (_dbus_marshal_test):
8371         Remove debug output.
8372
8373         * dbus/dbus-message-internal.h:
8374         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
8375         New function that returns the reply serial.
8376
8377         (_dbus_message_unlock):
8378         New function that unlocks a message and resets its header.
8379
8380         (dbus_message_append_string_array),
8381         (dbus_message_get_fields_valist),
8382         (dbus_message_iter_get_field_type),
8383         (dbus_message_iter_get_string_array),
8384         (dbus_message_get_fields),
8385         (dbus_message_append_fields_valist):
8386         Handle string arrays.
8387
8388         (dbus_message_set_sender):
8389         Make this function public since the bus daemon needs it.
8390
8391         (decode_header_data):
8392         Set the reply serial to -1 initially.
8393
8394         * dbus/dbus-message.h:
8395         Add dbus_message_set_sender.
8396
8397 2003-01-24  Havoc Pennington  <hp@pobox.com>
8398
8399         * doc/dbus-specification.sgml: add some stuff
8400
8401 2003-01-22  Havoc Pennington  <hp@pobox.com>
8402
8403         * doc/dbus-specification.sgml: Start to document the protocol.
8404
8405 2003-01-22  Havoc Pennington  <hp@pobox.com>
8406
8407         * dbus/dbus-connection.c
8408         (dbus_connection_send_message_with_reply_and_block): add some @todo
8409
8410         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
8411
8412 2003-01-21  Havoc Pennington  <hp@pobox.com>
8413
8414         (patch untested because can't compile)
8415
8416         * bus/driver.c (create_unique_client_name): make this function
8417         never recycle client names. Also, caller should initialize
8418         the DBusString.
8419
8420         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
8421
8422 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
8423
8424         * dbus/dbus-marshal.c: (_dbus_marshal_double),
8425         (_dbus_marshal_int32), (_dbus_marshal_uint32),
8426         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
8427         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
8428         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
8429         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
8430         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
8431         * dbus/dbus-marshal.h:
8432         * dbus/dbus-protocol.h:
8433         Add support for marshalling and demarshalling integer, double
8434         and string arrays.
8435
8436 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
8437
8438         * bus/Makefile.am:
8439         Add driver.[ch]
8440
8441         * bus/connection.c: (connection_disconnect_handler):
8442         Remove the connection from the bus driver's list.
8443
8444         (connection_watch_callback): Dispatch messages.
8445
8446         (free_connection_data): Free connection name.
8447
8448         (bus_connection_setup): Add connection to the bus driver's list.
8449         (bus_connection_remove_owned_service):
8450         (bus_connection_set_name), (bus_connection_get_name):
8451         Add functions for setting and getting the connection's name.
8452
8453         * bus/connection.h:
8454         Add function headers.
8455
8456         * bus/driver.c: (create_unique_client_name),
8457         (bus_driver_handle_hello_message),
8458         (bus_driver_send_welcome_message), (bus_driver_message_handler),
8459         (bus_driver_add_connection), (bus_driver_remove_connection):
8460         * bus/driver.h:
8461         * bus/main.c:
8462         * bus/services.c: (bus_service_free):
8463         * bus/services.h:
8464         New file that handles communication and registreation with the bus
8465         itself.
8466
8467 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
8468
8469         * dbus/dbus-connection.c: (dbus_connection_send_message):
8470         Add a new client_serial parameter.
8471
8472         (dbus_connection_send_message_with_reply):
8473         Remove a @todo since we've implemented the blocking function.
8474
8475         (dbus_connection_send_message_with_reply_and_block):
8476         New function that sends a message and waits for a reply and
8477         then returns the reply.
8478
8479         * dbus/dbus-connection.h:
8480         Add new functions.
8481
8482         * dbus/dbus-errors.c: (dbus_result_to_string):
8483         * dbus/dbus-errors.h:
8484         Add new DBUS_RESULT.
8485
8486         * dbus/dbus-message-internal.h:
8487         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
8488         (_dbus_message_set_sender), (dbus_message_write_header),
8489         (dbus_message_new_reply), (decode_header_data),
8490         (_dbus_message_loader_return_buffer), (_dbus_message_test):
8491         * dbus/dbus-message.h:
8492         Add new functions that set the reply serial and sender.
8493         Also marshal and demarshal them correctly and add test.
8494
8495         * dbus/dbus-protocol.h:
8496         Add new DBUS_MESSAGE_TYPE_SENDER.
8497
8498         * glib/dbus-glib.h:
8499         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
8500         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
8501         (dbus_connection_hookup_with_g_main):
8502         * glib/test-dbus-glib.c: (main):
8503         Rewrite to use GIOChannel and remove the GSource crack.
8504
8505         * test/echo-client.c: (main):
8506         * test/watch.c: (check_messages):
8507         Update for changed APIs
8508
8509 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
8510
8511         * dbus/Makefile.am: Add dbus-timeout.[cħ]
8512
8513         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
8514         Create a DBusTimeoutList.
8515         (dbus_connection_set_timeout_functions): Add new function to
8516         set timeout callbacks
8517
8518         * dbus/dbus-connection.h: Add public DBusTimeout API.
8519
8520         * dbus/dbus-message.c: (dbus_message_get_service):
8521         * dbus/dbus-message.h:  New function.
8522
8523         * dbus/dbus-server.c: Fix small doc typo.
8524
8525         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
8526
8527 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
8528
8529         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
8530         of the string, just as long as specified.
8531
8532 2003-01-19  Havoc Pennington  <hp@pobox.com>
8533
8534         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
8535         new function
8536
8537         * dbus/dbus-server.c (dbus_server_set_max_connections)
8538         (dbus_server_get_max_connections, dbus_server_get_n_connections):
8539         keep track of current number of connections, and add API for
8540         setting a max (but haven't implemented enforcing the max yet)
8541
8542 2003-01-18  Havoc Pennington  <hp@pobox.com>
8543
8544         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
8545         reading/writing if read_watch != NULL or write_watch != NULL.
8546
8547         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
8548         the message loader code to actually load message->header and
8549         message->body into the newly-created message.
8550
8551         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
8552         in OOM case
8553
8554         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
8555         (dbus_connection_get_max_message_size)
8556         (dbus_connection_set_max_live_messages_size)
8557         (dbus_connection_get_max_live_messages_size): implement some
8558         resource limitation functions
8559
8560         * dbus/dbus-resources.c: new file implementing some of the
8561         resource limits stuff
8562
8563         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
8564         missing docs, add @todo to handle OOM etc.
8565
8566         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
8567         docs
8568
8569 2003-01-18  Havoc Pennington  <hp@pobox.com>
8570
8571         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
8572         connection if it hasn't been already.
8573
8574         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
8575         replace with DisconnectFunction.
8576
8577 2003-01-18  Havoc Pennington  <hp@pobox.com>
8578
8579         Building --disable-verbose-mode --disable-asserts --disable-tests
8580         cuts the library from 112K to 45K or so
8581
8582         * configure.in: check for varargs macro support,
8583         add --enable-verbose-mode, --enable-asserts.
8584
8585         * dbus/dbus-internals.h (_dbus_assert): support
8586         DBUS_DISABLE_ASSERT
8587         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
8588
8589 2003-01-18  Havoc Pennington  <hp@pobox.com>
8590
8591         * dbus/dbus-test.c: include config.h so that tests actually run
8592
8593         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
8594         so the failure mode when that assumption fails will be plenty
8595         obvious.
8596
8597 2003-01-18  Havoc Pennington  <hp@pobox.com>
8598
8599         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
8600
8601         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
8602         the distribution
8603
8604         * test/Makefile.am: don't use special variable "TESTS" for echo-*
8605         since we don't want to use those in make check
8606
8607 2003-01-15  Havoc Pennington  <hp@redhat.com>
8608
8609         Release 0.2
8610
8611         * NEWS: update
8612
8613 2003-01-15  Havoc Pennington  <hp@redhat.com>
8614
8615         * test/Makefile.am: fix so that test source code ends up in the
8616         distribution on make distcheck
8617
8618 2003-01-15  Havoc Pennington  <hp@redhat.com>
8619
8620         Release 0.1.
8621
8622         * NEWS: update
8623
8624 2003-01-15  Havoc Pennington  <hp@redhat.com>
8625
8626         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
8627         fix build when --disable-tests
8628
8629         * Makefile.am (EXTRA_DIST): put HACKING in here
8630
8631         * HACKING: document procedure for making a tarball release.
8632
8633 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
8634
8635         * bus/connection.c: (connection_error_handler),
8636         (bus_connection_setup):
8637         * bus/main.c: (main):
8638         Make sure that the DBusConnectionData struct is NULLed
8639         out to prevent a segfault.
8640
8641         * dbus/dbus-errors.c: (dbus_result_to_string):
8642         * dbus/dbus-errors.h:
8643         * dbus/dbus-message.c: (dbus_message_get_fields),
8644         (dbus_message_get_fields_valist), (_dbus_message_test):
8645         * dbus/dbus-message.h:
8646         Make dbus_message_get_fields return a result code so we can
8647         track invalid fields as well as oom.
8648
8649 2003-01-11  Havoc Pennington  <hp@pobox.com>
8650
8651         * configure.in: change --enable-test/--enable-ansi action-if-given
8652         to enable_foo=$enableval instead of enable_foo=yes
8653
8654 2003-01-08  Havoc Pennington  <hp@pobox.com>
8655
8656         * dbus/dbus-string.c (_dbus_string_align_length): new function
8657
8658         * dbus/dbus-test-main.c: move main() for test app here
8659         * dbus/dbus-test.c
8660         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
8661         symbol to run tests, because dbus-test isn't in the main
8662         library
8663
8664         Code review nitpicks.
8665
8666         * dbus/dbus-message.c (dbus_message_write_header): add newlines
8667         for people with narrow emacs ;-). Assert client_serial was filled
8668         in. Assert message->name != NULL.
8669         (dbus_message_append_fields): have "first_field_type" arg separate
8670         from va list, needed for C++ binding that also uses varargs IIRC
8671         and helps with type safety
8672         (dbus_message_new): add @todo about using DBusString to store
8673         service/name internally
8674         (dbus_message_new): don't leak ->service and ->name on OOM later
8675         in the function
8676         (dbus_message_unref): free the service name
8677         (dbus_message_get_fields): same change to varargs
8678         i.e. first_field_type
8679         (_dbus_message_loader_return_buffer): assert that the message data
8680         is aligned (if not it's a bug in our code). Put in verbose griping
8681         about why we set corrupted = TRUE.
8682         (decode_header_data): add FIXME that char* is evil.  Was going to
8683         add FIXME about evil locale-specific string.h strncmp, but just
8684         switched to wacky string-as-uint32 optimization. Move check for
8685         "no room for field name" above get_const_data_len() to avoid
8686         assertion failure in get_const_data_len if we have trailing 2
8687         bytes or the like. Check for service and name fields being
8688         provided twice. Don't leak service/name on error. Require field
8689         names to be aligned to 4 bytes.
8690
8691         * dbus/dbus-marshal.c: move byte swap stuff to header
8692         (_dbus_pack_int32): uscore-prefix
8693         (_dbus_unpack_int32): uscore-prefix
8694         (_dbus_unpack_uint32): export
8695         (_dbus_demarshal_string): add @todo complaining about use of
8696         memcpy()
8697         (_dbus_marshal_get_field_end_pos): add @todo about bad error
8698         handling allowing corrupt data to go unchecked
8699
8700 2003-01-08  Havoc Pennington  <hp@redhat.com>
8701
8702         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
8703         to the select() as needed for authentication. (should be using
8704         _dbus_poll() not select, but for another day)
8705
8706         * dbus/dbus.h: include dbus/dbus-protocol.h
8707
8708 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
8709
8710         * dbus/Makefile.am (dbusinclude_HEADERS): Install
8711         dbus-connection.h
8712
8713 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
8714
8715         * dbus/dbus-internals.c: (_dbus_type_to_string):
8716         New function that returns a string describing a type.
8717
8718         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
8719         * dbus/dbus-marshal.h:
8720         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
8721         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
8722         (dbus_message_iter_get_byte_array):
8723         * dbus/dbus-message.h:
8724         Add new convenience functions for appending and getting message fields.
8725         Also add demarshalling routines for byte arrays.
8726
8727 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
8728
8729         * dbus/dbus-connection-internal.h:
8730         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
8731         (_dbus_connection_get_next_client_serial),
8732         (dbus_connection_send_message):
8733         * dbus/dbus-internals.h:
8734         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
8735         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
8736         (_dbus_marshal_uint32), (_dbus_demarshal_double),
8737         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
8738         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
8739         (_dbus_verbose_bytes), (_dbus_marshal_test):
8740         * dbus/dbus-marshal.h:
8741         * dbus/dbus-message-internal.h:
8742         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
8743         (dbus_message_write_header), (_dbus_message_lock),
8744         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
8745         (dbus_message_get_name), (dbus_message_append_int32),
8746         (dbus_message_append_uint32), (dbus_message_append_double),
8747         (dbus_message_append_string), (dbus_message_append_byte_array),
8748         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
8749         (dbus_message_iter_unref), (dbus_message_iter_has_next),
8750         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
8751         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
8752         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
8753         (decode_header_data), (_dbus_message_loader_return_buffer),
8754         (message_iter_test), (_dbus_message_test):
8755         * dbus/dbus-message.h:
8756         * dbus/dbus-protocol.h:
8757         * dbus/dbus-test.c: (main):
8758         * dbus/dbus-test.h:
8759         * glib/test-dbus-glib.c: (message_handler), (main):
8760         * test/echo-client.c: (main):
8761         * test/watch.c: (check_messages):
8762         Make messages sendable and receivable for real.
8763
8764 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
8765
8766         * dbus/dbus-marshal.c: (_dbus_marshal_double),
8767         (_dbus_marshal_string), (_dbus_marshal_byte_array):
8768         * dbus/dbus-message.c: (dbus_message_append_int32),
8769         (dbus_message_append_uint32), (dbus_message_append_double),
8770         (dbus_message_append_string), (dbus_message_append_byte_array):
8771         Handle OOM restoration.
8772
8773 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
8774
8775         * dbus/dbus-marshal.c: (_dbus_marshal_string),
8776         (_dbus_demarshal_string), (_dbus_marshal_test):
8777         * dbus/dbus-marshal.h:
8778         * dbus/dbus-message.c: (dbus_message_get_name),
8779         Document these functions.
8780
8781         (dbus_message_append_int32), (dbus_message_append_uint32),
8782         (dbus_message_append_double), (dbus_message_append_string),
8783         (dbus_message_append_byte_array):
8784         * dbus/dbus-message.h:
8785         Add functions for adding message fields of different types.
8786
8787         * dbus/dbus-protocol.h:
8788         Add the different types.
8789
8790 2003-01-05  Havoc Pennington  <hp@pobox.com>
8791
8792         * bus/connection.c: implement routines for handling connections,
8793         first thing is keeping a list of owned services on each connection
8794         and setting up watches etc.
8795
8796         * bus/services.c: implement a mapping from service names to lists
8797         of connections
8798
8799         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
8800
8801         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
8802         to use static mutexes for global data
8803
8804         * dbus/dbus-connection.c (dbus_connection_set_data): add new
8805         collection of functions to set/get application-specific data
8806         on the DBusConnection.
8807
8808 2003-01-04  Havoc Pennington  <hp@pobox.com>
8809
8810         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
8811         (_dbus_poll): new function
8812
8813         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
8814         copied from GLib
8815
8816         * bus/loop.c: initial code for the daemon main loop
8817
8818 2003-01-04  Havoc Pennington  <hp@pobox.com>
8819
8820         * test/watch.c (error_handler): make it safe if the error handler
8821         is called multiple times (if we s/error handler/disconnect
8822         handler/ we should just guarantee it's called only once)
8823
8824         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
8825         error handler on disconnect (it's quite possible we should
8826         just change the error handler to a "disconnect handler," I'm
8827         not sure we have any other meaningful errors)
8828
8829         * configure.in: check for getpwnam_r
8830
8831         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
8832         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
8833         mechanism as in SASL spec, using socket credentials
8834
8835         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
8836         (_dbus_send_credentials_unix_socket): new function
8837
8838         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
8839         dbus_accept()
8840         (_dbus_write): only check errno if <0 returned
8841         (_dbus_write_two): ditto
8842
8843 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
8844
8845         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
8846         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
8847         (_dbus_marshal_test):
8848         * dbus/dbus-marshal.h:
8849         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
8850         to _dbus_marshal_utf8_string. Also fix some tests.
8851
8852 2002-12-28  Harri Porten  <porten@kde.org>
8853
8854         * configure.in: added check for C++ compiler and a very cheesy
8855         check for the Qt integration
8856
8857         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
8858
8859         * qt/Makefile.am: added
8860
8861         * qt/.cvsignore: added
8862
8863         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
8864         latter, added #ifdef QT_THREAD_SUPPORT guard.
8865
8866         * dbus/Makefile.am: added missing headers for make dist
8867
8868 2002-12-28  Kristian Rietveld  <kris@gtk.org>
8869
8870         * dbus/Makefile.am: fixup export-symbols-regex.
8871
8872 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
8873
8874         * acinclude.m4: Add this file and put the
8875         PKG_CHECK_MODULE macro in it.
8876
8877 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
8878
8879         * dbus/dbus-marshal.c: (_dbus_marshal_string),
8880         (_dbus_demarshal_double), (_dbus_demarshal_int32),
8881         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8882         (_dbus_marshal_test):
8883         Make the demarshalling routines align the pos argument.
8884         Add string marshalling tests and fix the obvious bugs
8885         discovered.
8886
8887 2002-12-26  Havoc Pennington  <hp@pobox.com>
8888
8889         * dbus/dbus-auth.c: fixes fixes fixes
8890
8891         * dbus/dbus-transport-unix.c: wire up support for
8892         encoding/decoding data on the wire
8893
8894         * dbus/dbus-auth.c (_dbus_auth_encode_data)
8895         (_dbus_auth_decode_data): append to target string
8896         instead of nuking it.
8897
8898 2002-12-26  Havoc Pennington  <hp@pobox.com>
8899
8900         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
8901         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
8902         doh
8903
8904         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
8905         avoid swap_bytes() overhead (ignoring possible assembly stuff for
8906         now). Main point is because I wanted unpack_uint32 to implement
8907         _dbus_verbose_bytes
8908         (_dbus_verbose_bytes): new function
8909
8910         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
8911
8912         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
8913         mechanism to handle a corrupt message stream
8914         (_dbus_message_loader_new): fix preallocation to only prealloc,
8915         not prelengthen
8916
8917         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
8918         (_dbus_string_test): enhance tests for copy/move and fix the
8919         functions
8920
8921         * dbus/dbus-transport-unix.c: Hold references in more places to
8922         avoid reentrancy problems
8923
8924         * dbus/dbus-transport.c: ditto
8925
8926         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
8927         leak reference count in no-message case
8928
8929         * test/watch.c (do_mainloop): handle adding/removing watches
8930         during iteration over the watches. Also, ref the connection/server
8931         stored on a watch, so we don't try to mangle a destroyed one.
8932
8933         * dbus/dbus-transport-unix.c (do_authentication): perform
8934         authentication
8935
8936         * dbus/dbus-auth.c (get_state): add a state
8937         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
8938         (_dbus_auth_get_unused_bytes): append the unused bytes
8939         to the passed in string, rather than prepend
8940
8941         * dbus/dbus-transport.c (_dbus_transport_init_base): create
8942         the auth conversation DBusAuth
8943
8944         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
8945         (_dbus_transport_new_for_domain_socket): when creating a
8946         transport, pass in whether it's a client-side or server-side
8947         transport so we know which DBusAuth to create
8948
8949 2002-12-03  Havoc Pennington  <hp@pobox.com>
8950
8951         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
8952         _after_ finalizing the derived members
8953         (unix_connection_set): unref watch if we fail to add it
8954
8955         * dbus/dbus-connection.c (dbus_connection_unref): delete the
8956         transport first, so that the connection owned by the
8957         transport will be valid as the transport finalizes.
8958
8959         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
8960         if necessary, and remove watches from the connection.
8961
8962         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
8963
8964 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
8965
8966         * dbus/dbus-marshal.c: (_dbus_marshal_string),
8967         (_dbus_demarshal_double), (_dbus_demarshal_int32),
8968         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
8969         (_dbus_marshal_test):
8970         * dbus/dbus-marshal.h:
8971         Add string marshal functions and have the demarshal functions
8972         return the new position.
8973
8974 2002-12-25  Havoc Pennington  <hp@pobox.com>
8975
8976         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
8977         it is a simple protocol that just maps directly to SASL.
8978
8979         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
8980         initial implementation, not actually used yet.
8981
8982         * dbus/dbus-string.c (_dbus_string_find): new function
8983         (_dbus_string_equal): new function
8984         (_dbus_string_base64_encode): new function
8985         (_dbus_string_base64_decode): new function
8986
8987 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
8988
8989         * dbus/Makefile.am:
8990         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
8991         (_dbus_marshal_int32), (_dbus_marshal_uint32),
8992         (_dbus_demarshal_double), (_dbus_demarshal_int32),
8993         (_dbus_demarshal_uint32), (_dbus_marshal_test):
8994         * dbus/dbus-marshal.h:
8995         * dbus/dbus-protocol.h:
8996         * dbus/dbus-test.c: (main):
8997         * dbus/dbus-test.h:
8998         Add un-optimized marshalling/demarshalling routines.
8999
9000 2002-12-25  Harri Porten  <porten@kde.org>
9001
9002         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
9003
9004 2002-12-24  Zack Rusin  <zack@kde.org>
9005
9006         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
9007         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
9008         main loop stuff
9009
9010 2002-12-24  Havoc Pennington  <hp@pobox.com>
9011
9012         * glib/dbus-gthread.c: fix include
9013
9014         * glib/dbus-glib.h: rename DBusMessageHandler for now.
9015         I think glib API needs to change, though, as you don't
9016         want to use DBusMessageFunction, you want to use the
9017         DBusMessageHandler object. Probably
9018         dbus_connection_open_with_g_main_loop()
9019         and dbus_connection_setup_g_main_loop() or something like that
9020         (but think of better names...) that just create a connection
9021         that has watch/timeout functions etc. already set up.
9022
9023         * dbus/dbus-connection.c
9024         (dbus_connection_send_message_with_reply): new function just to
9025         show how the message handler helps us deal with replies.
9026
9027         * dbus/dbus-list.c (_dbus_list_remove_last): new function
9028
9029         * dbus/dbus-string.c (_dbus_string_test): free a string that
9030         wasn't
9031
9032         * dbus/dbus-hash.c: use memory pools for the hash entries
9033         (rebuild_table): be more paranoid about overflow, and
9034         shrink table when we can
9035         (_dbus_hash_test): reduce number of sprintfs and write
9036         valid C89. Add tests for case where we grow and then
9037         shrink the hash table.
9038
9039         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
9040
9041         * dbus/dbus-connection.c (dbus_connection_register_handler)
9042         (dbus_connection_unregister_handler): new functions
9043
9044         * dbus/dbus-message.c (dbus_message_get_name): new
9045
9046         * dbus/dbus-list.c: fix docs typo
9047
9048         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
9049         an object representing a handler for messages.
9050
9051 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
9052
9053         * glib/dbus-glib.h:
9054         * glib/dbus-gthread.c: (dbus_gthread_init):
9055         Don't use the gdbus prefix for public functions.
9056
9057 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
9058
9059         * Makefile.am:
9060         * configure.in:
9061         Add GLib checks and fixup .pc files
9062
9063         * glib/Makefile.am:
9064         * glib/dbus-glib.h:
9065         * glib/dbus-gmain.c: (gdbus_connection_prepare),
9066         (gdbus_connection_check), (gdbus_connection_dispatch),
9067         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
9068         (dbus_connection_gsource_new):
9069         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
9070         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
9071         * glib/test-dbus-glib.c: (message_handler), (main):
9072         Add GLib support.
9073
9074 2002-12-15  Harri Porten  <porten@kde.org>
9075
9076         * autogen.sh: check for libtoolize before attempting to use it
9077
9078         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
9079         struct.
9080
9081         * .cvsignore: ignore more stamp files
9082
9083         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
9084
9085         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
9086         without make install.
9087
9088 2002-12-15  Havoc Pennington  <hp@pobox.com>
9089
9090         * dbus/dbus-threads.c: add thread stubs that a higher library
9091         layer can fill in. e.g. the GLib wrapper might fill them in with
9092         GThread stuff. We still need to use this thread API to
9093         thread-safe-ize the library.
9094
9095 2002-12-12  Havoc Pennington  <hp@pobox.com>
9096
9097         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
9098         below new interfaces and include fewer system headers.
9099
9100         * dbus/dbus-sysdeps.c (_dbus_read): new function
9101         (_dbus_write): new function
9102         (_dbus_write_two): new function
9103         (_dbus_connect_unix_socket): new function
9104         (_dbus_listen_unix_socket): new function
9105
9106         * dbus/dbus-message-internal.h: change interfaces to use
9107         DBusString
9108
9109 2002-12-11  Havoc Pennington  <hp@pobox.com>
9110
9111         * dbus/dbus-types.h: add dbus_unichar
9112
9113         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
9114
9115         * dbus/dbus-connection.c (dbus_connection_send_message): return
9116         TRUE on success
9117
9118         * dbus/dbus-transport.c: include dbus-watch.h
9119
9120         * dbus/dbus-connection.c: include dbus-message-internal.h
9121
9122         * HACKING: add file with coding guidelines stuff.
9123
9124         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
9125         handling here, for security purposes (as in vsftpd). Not actually
9126         using this class yet.
9127
9128         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
9129         system/libc usage here, as in vsftpd, for ease of auditing (and
9130         should also simplify portability). Haven't actually moved all the
9131         system/libc usage into here yet.
9132
9133 2002-11-25  Havoc Pennington  <hp@pobox.com>
9134
9135         * dbus/dbus-internals.c (_dbus_verbose): fix to not
9136         always print the first verbose message.
9137
9138 2002-11-24  Havoc Pennington  <hp@pobox.com>
9139
9140         * test/echo-client.c, test/echo-server.c: cheesy test
9141         clients.
9142
9143         * configure.in (AC_CHECK_FUNCS): check for writev
9144
9145         * dbus/dbus-message.c (_dbus_message_get_network_data): new
9146         function
9147
9148         * dbus/dbus-list.c (_dbus_list_foreach): new function
9149
9150         * dbus/dbus-internals.c (_dbus_verbose): new function
9151
9152         * dbus/dbus-server.c, dbus/dbus-server.h: public object
9153         representing a server that listens for connections.
9154
9155         * dbus/.cvsignore: create
9156
9157         * dbus/dbus-errors.h, dbus/dbus-errors.c:
9158         public API for reporting errors
9159
9160         * dbus/dbus-connection.h, dbus/dbus-connection.c:
9161         public object representing a connection that
9162         sends/receives messages. (Same object used for
9163         both client and server.)
9164
9165         * dbus/dbus-transport.h, dbus/dbus-transport.c:
9166         Basic abstraction for different kinds of stream
9167         that we might read/write messages from.
9168
9169 2002-11-23  Havoc Pennington  <hp@pobox.com>
9170
9171         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
9172         _DBUS_INT_MAX
9173
9174         * dbus/dbus-test.c (main): add list test, and include
9175         dbus-test.h as intended
9176
9177         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
9178         (_dbus_hash_table_remove_int): return value indicates
9179         whether the entry existed to remove
9180
9181         * dbus/dbus-list.c: add linked list utility class,
9182         with docs and tests
9183
9184         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
9185         array sometimes.
9186
9187 2002-11-23  Havoc Pennington  <hp@pobox.com>
9188
9189         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
9190         DBUS_END_DECLS to nothing, that should fix this once and for all
9191
9192         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
9193
9194         * dbus/dbus-message.c, dbus/dbus-hash.c:
9195         add some missing @brief
9196
9197 2002-11-23  Havoc Pennington  <hp@pobox.com>
9198
9199         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
9200         to avoid confusing Doxygen
9201
9202         * dbus/dbus-hash.c: @} not }@
9203
9204         * dbus/dbus-message.c (struct DBusMessage): split out
9205         internals docs
9206
9207 2002-11-23  Havoc Pennington  <hp@pobox.com>
9208
9209         * configure.in: pile on more warning flags if using gcc
9210
9211         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
9212         to document static functions
9213
9214         * configure.in: add summary to end of configure so it
9215         looks nice and attractive
9216
9217         * dbus/dbus-hash.c: finish implementation and write unit
9218         tests and docs
9219
9220         * configure.in: add --enable-tests to enable unit tests
9221
9222         * dbus/dbus-test.c: test program to run unit tests
9223         for all files in dbus/*, initially runs a test for
9224         dbus-hash.c
9225
9226         * dbus/dbus-internals.h: file to hold some internal utility stuff
9227
9228 2002-11-22  Havoc Pennington  <hp@redhat.com>
9229
9230         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
9231         "ported" away from Tcl
9232
9233         * dbus/dbus-types.h: header for types such as dbus_bool_t
9234
9235 2002-11-22  Havoc Pennington  <hp@redhat.com>
9236
9237         * dbus/dbus.h: fixups for doc warnings
9238
9239         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
9240         macros
9241         (QUIET): make it quiet so we can see warnings
9242
9243         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
9244
9245 2002-11-22  Havoc Pennington  <hp@redhat.com>
9246
9247         * Makefile.am: include "Doxyfile" target in all-local
9248
9249         * configure.in: generate the Doxyfile
9250
9251         * Doxyfile.in: move Doxyfile here, so we can use
9252         configure to generate a Doxyfile with the right
9253         version number etc.
9254
9255 2002-11-22  Havoc Pennington  <hp@redhat.com>
9256
9257         * dbus/dbus-message.c: move inline docs into .c file
9258
9259         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
9260         so all docs are under doc/
9261         (MAN_EXTENSION): generate man pages. Use extension
9262         ".3dbus" which matches ".3qt" on my system,
9263         I guess this is OK, I don't know really.
9264         (FILE_PATTERNS): look for .c files not .h, makes sense
9265         for plain C I think
9266
9267 2002-11-22  Havoc Pennington  <hp@pobox.com>
9268
9269         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
9270         because any app can be a server, and any app can be a client,
9271         the bus is a special kind of server.
9272
9273 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
9274
9275         * Doxyfile : adding. Still needs Makefile rules to be generated
9276         automatically (just run "doxygen" in the toplevel dir for now to
9277         generate docs)
9278
9279         * dbus/dbus-message.h : Adding sample docs (javadoc since
9280         resembles gtk-doc a little more)
9281
9282         * dbus/dbus.h : Adding sample docs
9283
9284 2002-11-21  Havoc Pennington  <hp@redhat.com>
9285
9286         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
9287         so we can allow ourselves to include files directly,
9288         instead of having to use dbus.h
9289
9290         * dbus/dbus.h: fill in
9291
9292         * dbus/dbus-message.h: sketch out a sample header file.
9293         Include griping if you include it directly instead of
9294         via dbus.h
9295
9296         * dbus/dbus-macros.h: new file with macros for extern "C",
9297         TRUE/FALSE, NULL, etc.
9298
9299         * doc/file-boilerplate.c: put include guards in here
9300
9301 2002-11-21  Havoc Pennington  <hp@redhat.com>
9302
9303         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
9304
9305         * COPYING: include the GPL as well, and license code
9306         under both AFL and GPL.
9307
9308 2002-11-21  Havoc Pennington  <hp@redhat.com>
9309
9310         * acconfig.h: get rid of this
9311
9312         * autogen.sh (run_configure): add --no-configure option
9313
9314         * configure.in: remove AC_ARG_PROGRAM to make
9315         autoconf complain less. add AC_PREREQ.
9316         add AC_DEFINE third arg.
9317
9318 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
9319
9320         * doc/Makefile.am:
9321         Fix references so we can distcheck.
9322
9323 2002-11-21  Havoc Pennington  <hp@redhat.com>
9324
9325         * Initial module creation
9326