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