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