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