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