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