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