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