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