* doc/dbus-specification.xml: document ServiceOwnerChanged signal.
[platform/upstream/dbus.git] / ChangeLog
1 2004-09-24  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2
3         * doc/dbus-specification.xml: document ServiceOwnerChanged
4         signal.
5         
6         * bus/driver.c, bus/driver.h, bus/services.c: Use
7         ServiceOwnerChanged signal instead of ServiceCreated and
8         ServiceDeleted.
9         
10         * bus/dispatch.c: update testcase for the new signal.
11
12 2004-09-20  Jon Trowbridge  <trow@ximian.com>
13
14         Patch from Nat Friedman <nat@novell.com>
15
16         * mono/Makefile.am: A number of small build fixes to allow "make
17         distcheck" to succeed.
18
19         * mono/example/Makefile.am: "make distcheck" fixes.
20
21         * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
22         key in @srcdir@.
23
24         * test/Makefile.am: "make distcheck" fixes.
25
26 2004-09-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
27
28         * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
29
30         * doc/busconfig.dtd: update the DTD for the at_console attribute.
31
32         * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
33         messages after the first one (bug #1389).
34         
35         * bus/dispatch.c (check_double_hello_message): add a test case for
36         the double hello message bug.
37         (check_existent_service_activation): fix check of spawning error.
38         
39 2004-09-16  David Zeuthen  <david@fubar.dk>
40
41         * python/dbus_bindings.pyx.in: Add support for int64 and uint64
42
43 2004-09-12  David Zeuthen  <david@fubar.dk>
44
45         Patch from Kay Sievers <kay.sievers@vrfy.org>
46
47         * bus/bus.c (bus_context_new):
48         * bus/bus.h:
49         * bus/main.c (usage)
50         (main):
51         Add commandline option --nofork to override configuration file
52         setting.
53
54 2004-09-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
55
56         * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
57         compilers don't like it (bug #974).
58
59 2004-09-04  Harald Fernengel  <harry@kdevelop.org>
60
61         * qt/connection.*: Applied patch by Jérôme Lodewyck
62         <lodewyck@clipper.ens.fr> to integrate an existing
63         connection into the Qt eventloop
64
65 2004-08-30  Jon Trowbridge  <trow@ximian.com>
66
67         * mono/BusDriver.cs: Added.  This is a class for interacting with
68         the org.freedesktop.DBus service.
69
70         * mono/Message.cs: Added a mechanism to expose the message that is
71         currently being dispatched via the static Message.Current
72         property.  Added Message.Sender and Message.Destination
73         properties.
74
75         * mono/Handler.cs: Expose the dispatched message via
76         Message.Current when handling method calls.
77
78         * mono/Service.cs: Expose the dispatched message via
79         Message.Current when handling signal emissions.
80         
81         * mono/Connection.cs: Bind dbus_bus_get_base_service via the
82         Connection.BaseService property.
83
84 2004-08-28  Havoc Pennington  <hp@redhat.com>
85
86         * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
87
88         More fixes from Steve Grubb
89         
90         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
91         (_dbus_listen_tcp_socket): fix fd leak
92
93         * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
94         EINTR to a bit lower in the code
95
96 2004-08-26  Jon Trowbridge  <trow@ximian.com>
97
98         * bus/driver.c (bus_driver_handle_service_exists): Respond with
99         TRUE if we are inquiring about the existence of the built-in
100         org.freedesktop.DBus service.
101
102 2004-08-25  John Palmieri  <johnp@redhat.com>
103         * bus/config-parser.c:
104         (struct PolicyType): Add POLICY_CONSOLE
105         (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
106         (start_busconfig_child): Sets up console element when
107         <policy at_console=""> is encountered in a policy file
108         (append_rule_from_element): Convert console elements to console
109         rules.
110
111         * bus/policy.c: 
112         (bus_policy_create_client_policy): Add console rules to the client
113         policy based on if the client is at the console
114         (bus_policy_append_console_rule): New function for adding a
115         console rule to a policy
116         (bus_policy_merge): Handle console rule merging
117
118         * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
119         where we check for console user files
120         
121         * dbus/dbus-sysdeps.c:
122         (_dbus_file_exists): New function which checks if the given
123         file exists
124         (_dbus_user_at_console): New function which does the system
125         specific process of checking if the user is at the console
126
127         * dbus/dbus-userdb.c:
128         (_dbus_is_console_user): New function converts a UID to user name
129         and then calls the system specific _dbus_user_at_console to 
130         see if the user is at the console and therefor a console user
131
132 2004-08-25  Olivier Andrieu  <oliv__a@users.sourceforge.net>
133
134         * bus/config-parser.c (set_limit):
135         * bus/dbus-daemon-1.1.in:
136         * test/data/valid-config-files/many-rules.conf: set the
137         max_match_rules_per_connection limt from the config file. 
138
139         * doc/busconfig.dtd: update the DTD.
140
141         * bus/driver.c: remove some unused variables.
142
143 2004-08-24  Mikael Hallendal  <micke@imendio.com>
144
145         * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since 
146         it's been replaced by dbus_g_bus_get
147
148 2004-08-23  Colin Walters  <walters@redhat.com>
149
150         Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
151
152         * bus/selinux.h: Prototype bus_selinux_get_policy_root.
153
154         * bus/selinux.c: Create a thread for policy reload notification.
155         (bus_selinux_get_policy_root): Implement.
156
157         * bus/config-parser.c (start_busconfig_child)
158         (bus_config_parser_content): Support SELinux-root relative
159         inclusion.
160
161         * configure.in <HAVE_SELINUX>: Add -lpthread.
162         
163         * bus/test-main.c (test_pre_hook, test_post_hook): New.
164         (test_post_hook): Move memory checking into here.
165         (test_pre_hook, test_post_hook): Move SELinux checks in
166         here, but conditional on a DBUS_TEST_SELINUX environment
167         variable.  Unfortunately we can't run the SELinux checks
168         as a normal user, since they won't have any permissions
169         for /selinux.  So this will have to be tested manually
170         for now, until we have virtualization for most of
171         libselinux.
172         
173 2004-08-23  Havoc Pennington  <hp@redhat.com>
174
175         * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
176         drop supplementary groups, suggested by Steve Grubb
177
178 2004-08-20  Colin Walters  <walters@redhat.com>
179
180         * bus/config-parser.c (start_busconfig_child): Remove some unused
181         variables.
182         
183         * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
184         warning.
185
186 2004-08-17  Joe Shaw  <joeshaw@novell.com>
187
188         * configure.in: If --enable-mono is passed in, if we can't find
189         mono error out.
190
191         * mono/Makefile.am: Use /gacutil to install assemblies into the
192         GAC and not /root.
193
194 2004-08-12  Havoc Pennington  <hp@redhat.com>
195
196         * NEWS: update for 0.22
197
198         * configure.in: release 0.22
199
200 2004-08-11  Colin Walters  <walters@redhat.com>
201
202         * tools/dbus-send.c (main, usage): Add --reply-timeout
203         argument.
204
205 2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
206
207         * bus/bus.c (process_config_first_time_only): get rid of an unused
208         DBusError that was causing a memoy leak (bug #989).
209
210         * dbus/dbus-keyring.c, dbus/dbus-message.c:
211         fix compilation on Solaris/Forte C (bug #974)
212
213         * bus/main.c (main): plug two minuscule memleaks.
214
215 2004-08-10  Havoc Pennington  <hp@redhat.com>
216
217         * doc/dbus-tutorial.xml: add some more info on GLib bindings
218
219 2004-08-09  Havoc Pennington  <hp@redhat.com>
220
221         * COPYING: switch to Academic Free License version 2.1 instead of
222         2.0, to resolve complaints about patent termination clause.
223
224 2004-07-31  John (J5) Palmieri  <johnp@redhat.com>
225
226         * README: added documentation for the --enable-python 
227         configure switch.
228
229 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
230
231         * bus/config-parser.c (bus_config_parser_new): fix an invalid
232         _unref in the SELinux support.
233
234         * doc/busconfig.dtd: update DTD for SELinux support.
235
236         * bus/config-loader-libxml.c: fix error handler and parser
237         initialisation/cleanup. OOM test now works with libxml2 HEAD.
238
239         * configure.in: remove the warning about libxml2.
240
241         * dbus/dbus-bus.c: silence doxygen warning.
242
243 2004-07-31  Colin Walters  <walters@redhat.com>
244
245         * configure.in: Move #error in SELinux check to its own line.
246
247 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
248
249         * dbus/dbus-internals.h (_DBUS_SET_OOM):
250         * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
251         dbus_error_set.
252
253         * bus/dispatch.c (check_send_exit_to_service): fix the test case,
254         broken by the change in the _SET_OOM macros.
255
256 2004-07-31  Colin Walters  <walters@redhat.com>
257
258         * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
259         BUS_SET_OOM.
260
261 2004-07-31  Colin Walters  <walters@redhat.com>
262
263         * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
264         to correctly detect DBUS__ACQUIRE_SVC.  Also add an
265         AC_MSG_CHECKING.
266
267 2004-07-24  Havoc Pennington  <hp@redhat.com>
268
269         SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
270
271         * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
272         functionality
273
274         * configure.in: add --enable-selinux
275         
276         * bus/policy.c (bus_policy_merge): add FIXME to a comment
277
278         * bus/main.c (main): initialize and shut down selinux
279
280         * bus/connection.c: store SELinux ID on each connection, to avoid 
281         repeated getting of the string context and converting it into 
282         an ID
283
284         * bus/bus.c (bus_context_get_policy): new accessor, though it
285         isn't used
286         (bus_context_check_security_policy): check whether the security
287         context of sender connection can send to the security context of
288         recipient connection
289
290         * bus/config-parser.c: add parsing for <selinux> and <associate>
291         
292         * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
293         implement dbus_connection_get_unix_fd()
294
295         * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
296         function, used by the selinux stuff
297         
298 2004-07-29  Olivier Andrieu  <oliv__a@users.sourceforge.net>
299
300         * bus/config-loader-libxml.c: complete the implementation of
301         libxml backend for config file loader. Doesn't work with full OOM
302         test yet. 
303         
304         * configure.in: change error when selecting libxml into a warning.
305         
306         * test/data/invalid-config-files: add two non-well-formed XML
307         files. 
308         
309         * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
310         
311         * dbus/dbus-transport-unix.c (unix_handle_watch): do not
312         disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
313         be necessary to read all the buffer. (bug #894)
314
315         * bus/activation.c (bus_activation_activate_service): fix a
316         potential assertion failure (bug #896). Small optimization in the
317         case of auto-activation messages.
318
319         * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
320         add test case for byte-through-vararg bug (#901). patch by Kimmo
321         Hämäläinen. 
322
323 2004-07-28  Anders Carlsson  <andersca@gnome.org>
324
325         * python/dbus.py:
326         * python/dbus_bindings.pyx.in:
327         Add dbus.init_gthreads (), allow emit_signal to pass
328         arguments to the signal.
329         
330 2004-07-24  Havoc Pennington  <hp@redhat.com>
331
332         * AUTHORS: add some people, not really comprehensively, let me
333         know if I missed you
334
335 2004-07-24  Havoc Pennington  <hp@redhat.com>
336
337         * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
338         Owen
339
340         * test/Makefile.am (DIST_SUBDIRS): here also
341
342 2004-07-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
343
344         * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
345         breaking build on Solaris, reported by Farhad Saberi on the ML.
346
347         * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
348         va_arg invocation to account for integer promotion in the case of
349         DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
350
351         * bus/services.c (bus_service_remove_owner): fix bug #902, use
352         _dbus_list_get_first_link, not _dbus_list_get_first.
353
354         * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
355
356         * dbus/dbus-object-tree.c (free_subtree_recurse): always null
357         handler functions so that the asserts in _dbus_object_subtree_unref
358         do not fail.
359
360         * dbus/dbus-transport-unix.c (do_reading):
361         _dbus_transport_queue_messages return value is of type
362         dbus_bool_t, not DBusDispatchStatus.
363         
364 2004-07-19  David Zeuthen  <david@fubar.dk>
365
366         * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
367
368         * bus/dispatch.c:
369         (check_get_connection_unix_user): Debug says GetProperty; but the
370         method is called GetConnectionUnixUser
371         (check_get_connection_unix_process_id): New function
372         (bus_dispatch_test): Actually call check_get_connection_unix_user();
373         also call check_get_connection_unix_process_id()
374         
375         * bus/driver.c:
376         (bus_driver_handle_get_connection_unix_process_id): New function,
377         handles GetConnectionUnixProcessID on the org.freedesktop.DBus
378         interface
379         
380         * dbus/dbus-auth.c:
381         (handle_server_data_external_mech): Set pid from the credentials
382         obtained from the socket
383         
384         * dbus/dbus-connection.c:
385         (dbus_connection_get_unix_process_id): New function
386         
387         * dbus/dbus-connection.h: 
388         Add prototype for dbus_connection_get_unix_process_id
389         
390         * dbus/dbus-transport.c:
391         (_dbus_transport_get_unix_process_id): New function
392         
393         * dbus/dbus-transport.h:
394         Add prototype for _dbus_transport_get_unix_process_id
395         
396 2004-07-19  Olivier Andrieu  <oliv__a@users.sourceforge.net>
397
398         * dbus/dbus-message.c: Message counter fix, patch by Christian
399         Hammond <chipx86@gnupdate.org>
400
401 2004-07-18  Seth Nickell  <seth@gnome.org>
402
403         * python/dbus.py:
404         * python/dbus_bindings.pyx.in:
405         * python/tests/test-client.py:
406
407         Add dbus.ByteArray and dbus_bindings.ByteArray
408         types so that byte streams can be passed back.
409
410         Give jdahlin the heaps of credit that are so
411         rightfully his.
412         
413 2004-07-12  Seth Nickell  <seth@gnome.org>
414
415         * python/dbus.py:
416
417         Add message argument to the default object_method_handler
418         function.
419         
420         * python/dbus_bindings.pyx.in:
421
422         Automatically return NIL when passed an empty list
423         (we can't pass back a list since lists are typed
424         and we don't have any idea what type the the client
425         intended the list to be... :-( )
426         
427 2004-07-10  Seth Nickell  <seth@gnome.org>
428
429         * python/examples/Makefile.am:
430
431         Fix distcheck breakage caused by new examples.
432
433 2004-07-10  Seth Nickell  <seth@gnome.org>
434
435         * python/dbus.py:
436
437         Add "message" argument to service-side dbus.Object
438         methods. This will break existing services written
439         using the python bindings, but will allow extraction
440         of all the message information (e.g. who its from).
441
442         Add improved "object oriented" signal handling/emission.
443         
444         * python/examples/example-service.py:
445
446         Nix this example.
447         
448         * python/examples/example-signal-emitter.py:
449         * python/examples/example-signal-recipient.py:
450
451         Two new examples that show how to emit and receive
452         signals using the new APIs.
453         
454         * python/examples/example-signals.py:
455         * python/examples/gconf-proxy-service.py:
456         * python/examples/gconf-proxy-service2.py:
457
458         Add "message" argument to service methods.
459
460 2004-06-28  Kay Sievers <kay.sievers@vrfy.org>
461
462         * bus/driver.c (bus_driver_handle_get_connection_unix_user)
463         * dbus/bus.c (dbus_bus_get_unix_user)
464         * doc/dbus-specification.xml: implement GetConnectionUnixUser
465         method of org.freedesktop.DBus interface.
466
467         * bus/dispatch.c: test case
468
469 2004-06-23  John (J5) Palmieri  <johnp@redhat.com>
470
471         * python/Makefile.am: switched include directory from glib/ to dbus/
472         since dbus-glib.h moved
473  
474 2004-06-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
475
476         * configure.in: prevent building the gcj stuff and libxml loader
477         since they are broken.
478
479 2004-06-20  Havoc Pennington  <hp@redhat.com>
480
481         * dbus/dbus-glib-error-enum.h: autogenerate the GError enum 
482         codes from the dbus error names
483         
484         * glib/dbus-glib.h: move to subdir dbus/ since it's included 
485         as dbus/dbus-glib.h and that breakage is now visible due to 
486         including dbus/dbus-glib.h in dbus-glib-lowlevel.h
487         
488         * glib/dbus-glib.h: s/gproxy/g_proxy/
489
490         * dbus/dbus-shared.h: new header to hold stuff shared with
491         binding APIs
492         
493         * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
494         than dbus-errors.h
495
496         * glib/dbus-glib.h (dbus_set_g_error): move to
497         dbus-glib-lowlevel.h
498
499         * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
500         of stuff to enable this
501
502         * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
503
504         * a bunch of other changes with the same basic "separate glib 
505         bindings from dbus.h" theme
506         
507 2004-06-10  Owen Fraser-Green  <owen@discobabe.net>
508
509         * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
510
511         * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
512
513 2004-06-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
514
515         * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
516         the reply value of the ServiceExists message.
517
518 2004-06-07  John (J5) Palmieri  <johnp@redhat.com>
519
520         * python/dbus_bindings.pyx.in: No longer need to parse path
521         elements and pass them as arrays of strings.  The C API now
522         accepts plain path strings.
523         (_build_parsed_path): removed 
524
525 2004-06-07  Havoc Pennington  <hp@redhat.com>
526
527         * doc/TODO: remove auto-activation item since it's done; sort
528         items by importance/milestone
529
530 2004-06-07  Havoc Pennington  <hp@redhat.com>
531
532         * dbus/dbus-message-builder.c (_dbus_message_data_load): append
533         random signature when using REQUIRED_FIELDS (this hack won't work
534         in the long term)
535
536         * dbus/dbus-message.c: change the signature to be a header field,
537         instead of message->signature special-case string. Incremental
538         step forward. Then we can fix up code to send the signature in the
539         message, then fix up code to validate said signature, then fix up
540         code to not put the typecodes inline, etc.
541         (load_one_message): don't make up the signature after the fact
542         (decode_header_data): require signature field for the known
543         message types
544
545         * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
546
547         * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
548
549 2004-06-07  Owen Fraser-Green  <owen@discobabe.net>
550
551         * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
552
553         * mono/Handler.cs: Updated to follow new path argument for
554         (un-)registering objects.
555
556         * mono/example/Makefile.am:
557         * mono/Makefile.am:
558         * configure.in: Bumped required version for mono and use new -pkg
559         syntax for deps
560
561 2004-06-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
562
563         * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
564         registration functions take the path argument as char* instead of
565         char**.
566
567         * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
568         split off the path decompostion part of
569         _dbus_demarshal_object_path. Some misc. fixes to silence compiler
570         warnings. 
571
572         * glib/dbus-gobject.c, test/test-service.c: update accordingly.
573         
574 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
575  
576         * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
577         machine approach.  A state is implemented as a function that
578         handles incoming events as specified for that state.
579         
580         * doc/dbus-specification.xml: Update auth protocol state machine
581         specification to match implementation.  Remove some leftover
582         base64 examples.
583
584 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
585
586         * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
587         dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
588         quiet doxygen.
589
590         * Doxyfile.in: remove deprecated options.
591
592         * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
593         glib/test-thread.h, glib/test-thread-client.c,
594         glib/test-thread-server.c, glib/test-profile.c,
595         glib/test-dbus-glib.c: remove these unused files.
596
597 2004-06-01  Olivier Andrieu  <oliv__a@users.sourceforge.net>
598
599         * dbus/dbus-object-tree.c
600         (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
601         non-fallback handlers (bug #684).
602         (_dbus_object_subtree_new): initialize invoke_as_fallback field.
603         (find_subtree_recurse): report wether the returned subtree is an
604         exact match or a "fallback" match higher up in the tree.
605         (object_tree_test_iteration): update test case.
606
607 2004-06-01  Seth Nickell  <seth@gnome.org>
608
609         * python/dbus_bindings.pyx.in:
610         * python/tests/test-client.py:
611
612         Round off basic type support. Add dicts (yay!), and 
613         remaining array types.
614
615         Make MessageIter more general so it works for dicts too.
616
617         Mark all loop variables as C integers.
618         
619 2004-05-31  Havoc Pennington  <hp@redhat.com>
620
621         * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
622         "in" before "out"
623
624         * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
625
626         * glib/dbus-glib-tool.c (main): set up to have a --self-test
627         option that runs the tests, and start filling in some code
628         including for starters just dumping the interfaces to stdout
629
630         * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
631
632         * test/data/valid-introspection-files/lots-of-types.xml: test of
633         an example introspection file
634
635         * glib/dbus-gparser.c (parser_check_doctype): doctype should be
636         "node" (I think...)
637
638 2004-05-31  Seth Nickell  <seth@gnome.org>
639
640         * python/dbus_bindings.pyx.in:
641         * python/tests/test-client.py:
642
643         Test Suite: 1
644         Python Bindings: 0
645
646         Fix string array memory trashing bug... oops...
647
648 2004-05-30  Seth Nickell  <seth@gnome.org>
649
650         * python/dbus.py:
651
652         Add a nicer-but-less-flexible alternate API for handling 
653         calls to virtual objects in dbus.ObjectTree.
654
655         Screw up the argument order to the dbus.Object constructor
656         for consistency with dbus.ObjectTree (and to make dbus_methods
657         optional for future extension)
658         
659         * python/examples/Makefile.am:
660         * python/examples/gconf-proxy-service.py:
661         * python/examples/gconf-proxy-service2.py:
662
663         Alternate implementation of gconf-proxy-service using the
664         nicer dbus.ObjectTree API.
665         
666         * python/examples/example-service.py:
667         * python/tests/test-server.py
668
669         Reverse the argument order to deal with dbus.Object constructor
670         changes.
671         
672 2004-05-30  Seth Nickell  <seth@gnome.org>
673
674         * python/examples/example-client.py:
675         * python/examples/example-service.py:
676
677         Take it back. Lists seem to work but they're broken
678         in the test suite. Make the base examples use
679         lists (works fine).
680
681 2004-05-30  Seth Nickell  <seth@gnome.org>
682
683         * python/dbus_bindings.pyx.in:
684         * python/tests/test-client.py:
685
686         Add some more tests and fix errors that crop up.
687         Unfortunately, currently it seems like marshalling
688         and unmarshalling of lists is completely broken :-(
689
690 2004-05-30  Seth Nickell  <seth@gnome.org>
691
692         * python/dbus_bindings.pyx.in:
693
694         Add support for ObjectPath type.
695
696         * python/dbus.py:
697
698         Refactor message handling code to a common function.
699         
700         * python/tests/test-client.py:
701         * python/tests/test-server.py:
702
703         Add tests that check to make sure values of all types
704         can be echoed from a service w/o mangling.
705         
706 2004-05-29  Seth Nickell  <seth@gnome.org>
707
708         * python/dbus.py:
709
710         Add ObjectTree class which allows implementation
711         of trees of "virtual" objects. Basically the python
712         wrapper for "register_fallback".
713         
714         * python/examples/Makefile.am
715         * python/examples/gconf-proxy-client.py:
716         * python/examples/gconf-proxy-service.py:
717
718         Implement a simple GConf proxy service that supports
719         get/set on string and int GConf keys using the ObjectTree.
720         
721 2004-05-29  Seth Nickell  <seth@gnome.org>
722
723         * python/dbus.py:
724         * python/examples/example-client.py:
725         * python/examples/example-service.py:
726         * python/examples/list-system-services.py:
727
728         Add SessionBus, SystemBus and ActivationBus classes
729         so you don't need to know the special little BUS_TYPE
730         flag.
731         
732 2004-05-29  Havoc Pennington  <hp@redhat.com>
733
734         * bus/config-parser.c (process_test_valid_subdir): temporarily
735         stop testing config parser OOM handling, since expat has issues
736         http://freedesktop.org/pipermail/dbus/2004-May/001153.html
737
738         * bus/dbus-daemon-1.1.in: change requested_reply to
739         send_requested_reply/receive_requested_reply so we can send the
740         replies, not just receive them.
741
742         * bus/config-parser.c: parse the new
743         send_requested_reply/receive_requested_reply
744
745         * bus/policy.c (bus_client_policy_check_can_send): add
746         requested_reply argument and use it
747
748         * bus/bus.c (bus_context_check_security_policy): pass through
749         requested_reply status to message send check
750
751         * bus/system.conf.in: adapt to requested_reply change
752         
753 2004-05-28  Havoc Pennington  <hp@redhat.com>
754
755         * test/glib/test-service-glib.c (main): remove unused variable
756
757         * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
758
759         * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
760         from the enum, no longer in use.
761
762         * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
763         works right.
764
765         * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
766         whether error_name passed in is a valid error name.
767
768 2004-05-28  John (J5) Palmieri  <johnp@redhat.com>
769
770         * dbus/dbus-message.c (dbus_message_get_args): Added support for
771         OBJECT_PATH and OBJECT_PATH_ARRAY
772
773 2004-05-28  Seth Nickell  <seth@gnome.org>
774
775         * python/examples/Makefile.am:
776
777         Forget to add Makefile.am. Do not pass go.
778
779 2004-05-28  Michael Meeks  <michael@ximian.com>
780
781         * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): 
782         fix no int64 case.
783
784         * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
785
786         * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
787         (_dbus_message_iter_get_basic_type_array): impl.
788         drastically simplify ~all relevant _get methods to use these.
789         (_dbus_message_iter_append_basic_array),
790         (dbus_message_iter_append_basic): impl
791         drastically simplify ~all relevant _append methods to use these.
792
793         * dbus/dbus-message-builder.c (parse_basic_type) 
794         (parse_basic_array, lookup_basic_type): impl.
795         (_dbus_message_data_load): prune scads of duplicate /
796         cut & paste coding.
797
798         * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) 
799         (_dbus_demarshal_basic_type): implement,
800         (demarshal_and_validate_len/arg): beef up debug.
801         (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
802
803 2004-05-27  Seth Nickell  <seth@gnome.org>
804
805         * configure.in:
806         * python/Makefile.am:
807
808         Include the example python apps in the tarball.
809         
810         * python/examples/list-system-services.py
811
812         Add a python new example that fetches the list of services
813         from the system bus.
814         
815 2004-05-27  Seth Nickell  <seth@gnome.org>
816
817         * python/dbus.py:
818         * python/dbus_bindings.pyx.in:
819
820         Fix failure to notify that a signal was not handled,
821         resulted in hung functions.
822         
823 2004-05-25  Colin Walters  <walters@redhat.com>
824
825         * tools/dbus-monitor.c (main): Monitor all types of messages.
826
827 2004-05-23  Owen Fraser-Green  <owen@discobabe.net>
828
829         * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
830         which unregisters the object path and disposes the handler.
831
832 2004-05-23  Kristian Høgsberg  <krh@redhat.com>
833  
834         Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
835          
836         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
837         operands to && so we call dbus_message_iter_next () for the last
838         argument also.
839
840 2004-05-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
841
842         * dbus/dbus-object-tree.c
843         (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
844         children even if the requested path isn't registered.
845         (object_tree_test_iteration): test object_tree_list_registered.
846
847         * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
848         it to 0.
849         
850 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
851
852         * doc/TODO: Remove resolved items.
853
854         * bus/expirelist.h (struct BusExpireList): remove unused n_items
855         field.
856         
857         * bus/connection.c (bus_connections_expect_reply): Enforce the
858         per-connection limit on pending replies.
859         
860         Patch from Jon Trowbridge <trow@ximian.com>:
861  
862         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
863         up a watch that triggers a config reload when one end of the pipe
864         becomes readable.
865         (signal_handler): Instead of doing the config reload in our SIGHUP
866         handler, just write to the reload pipe and let the associated
867         watch handle the reload when control returns to the main loop.
868  
869         * bus/driver.c (bus_driver_handle_reload_config): Added.
870         Implements a ReloadConfig method for requesting a configuration
871         file reload via the bus driver.
872  
873 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
874
875         * HACKING: Updated release instructions concerning the wiki page.
876
877 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
878
879         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
880         filter against auth->allowed_mechs; we only add allowed mechs in
881         record_mechanisms().
882  
883         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
884         ALLOWED_MECHS to auth-script format so we can set the list of
885         allowed mechanisms.
886  
887         * data/auth/client-out-of-mechanisms.auth-script: New test to
888         check client disconnects when it is out of mechanisms to try.
889  
890         * dbus/dbus-auth.c (process_command): Remove check for lines
891         longer that 1 MB; we only buffer up maximum 16 kB.
892  
893         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
894         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
895         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
896         assume there might be unused bytes.
897  
898         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
899         client-out-of-mechs, it is handled in process_reject(). Move check
900         for max failures to send_rejected(), as it's a server-only thing.
901
902         * dbus/dbus-auth.c: Factor out protocol reply code into functions
903         send_auth(), send_data(), send_rejected(), send_error(),
904         send_ok(), send_begin() and send_cancel().
905
906 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
907
908         Remove base64 encoding, replace with hex encoding. Original patch
909         from trow@ximian.com, added error handling.
910
911         * dbus/dbus-string.c (_dbus_string_base64_encode)
912         (_dbus_string_base64_decode): Remove.
913         (_dbus_string_hex_decode): Add end_return argument so we can
914         distinguish between OOM and invalid hex encoding.
915         (_dbus_string_test): Remove base64 tests and add test case for
916         invalid hex.
917
918         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
919         Replace base64 with hex.
920
921         * test/data/auth/invalid-hex-encoding.auth-script: New test case
922         for invalid hex encoded data in auth protocol.
923
924 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
925
926         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
927         leak.
928
929 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
930
931         * mono/dbus-sharp.dll.config.in: Added for GAC
932         * mono/dbus-sharp.snk: Added for GAC
933         * mono/Assembly.cs.in: Added for GAC
934         * mono/Makefile.am: Changes for GAC installation        
935         * configure.in: Added refs for dbus-sharp.dll.config.in and
936         Assembly.cs.in. More fixes for mono testing
937         * mono/example/Makefile.am: Changed var to CSC
938         * Makefile.am: Changed flag name to DBUS_USE_CSC
939
940 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
941
942         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
943         * mono/doc/*: Added documentation framework
944         * configure.in: Added monodoc check
945         * README: Added description of mono configure flags
946
947 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
948
949         * doc/dbus-specification.xml: Added a "Required" column to the 
950         header fields table and changed the "zero or more" verbage in
951         the above paragraph to read "The header must contain the required 
952         named header fields and zero or more of the optional named header 
953         fields".
954         * test/data/invalid-messages/*.message: Added the required PATH 
955         named header field to the tests so that they don't fail on 
956         'Missing path field'
957
958 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
959
960         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
961         the stack by implicitly defining variable and parameter types and
962         removing the hack of defining C pointers as python objects and later
963         casting them.
964
965 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
966
967         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
968
969 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
970
971         * mono/DBusType/Dict.cs: Handle empty dicts
972         * mono/DBusType/Array.cs: Handle empty arrays
973         * mono/Arguments.cs: Handle empty arguments
974
975 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
976
977         * dbus-sharp.pc.in: Modified to include include Libs and Requires
978         field
979
980 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
981
982         * test/data/valid-messages/standard-*.message: Update message
983         test scripts to new header field names.
984
985 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
986
987         * test/break-loader.c (randomly_do_n_things): tracked down buffer
988         overflow to times_we_did_each_thing array which would chop off the
989         first character of the failure_dir string. Increased the size of
990         the array to 7 to reflect the number of random mutation functions
991         we have.
992
993 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
994
995         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
996         unix_server->watch here, it is unreffed in disconnect.
997         (_dbus_server_new_for_tcp_socket): convert NULL host to
998         "localhost" here so we don't append NULL to address.
999         
1000         * dbus/dbus-server.c (_dbus_server_test): Add test case for
1001         various addresses, including tcp with no explicit host.
1002
1003 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1004
1005         * dbus/dbus-message.c (decode_header_data, decode_string_field):
1006         fix incorrect setting of .name_offset in the HeaderField (it was
1007         off by two bytes, positioned right after the name and typecode)
1008
1009         * bus/bus.c (bus_context_new, bus_context_unref): test before
1010         calling dbus_server_free_data_slot and _dbus_user_database_unref
1011         in case of an error.
1012
1013         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
1014         by libdbus-gtool.
1015
1016 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
1017
1018         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
1019         _dbus_poll() instead of select().
1020
1021 2004-04-15  Jon Trowbridge  <trow@ximian.com>
1022
1023         * bus/main.c (signal_handler): Reload the configuration files
1024         on SIGHUP.
1025         (main): Set up our SIGHUP handler.
1026
1027         * bus/bus.c (struct BusContext): Store the config file, user and
1028         fork flag in the BusContext.
1029         (process_config_first_time_only): Added.  Contains the code
1030         (previously in bus_context_new) for setting up the BusContext from
1031         the BusConfigParser that should only be run the first time the
1032         config files are read.
1033         (process_config_every_time): Added.  Contains the code (previously
1034         in bus_context_new) for setting up the BusContext from the
1035         BusConfigParser that should be run every time the config files are
1036         read.
1037         (load_config): Added.  Builds a BusConfigParser from the config
1038         files and passes the resulting structure off to
1039         process_config_first_time_only (assuming this is the first time)
1040         and process_config_every_time.
1041         (bus_context_new): All of the config-related code has been moved
1042         to process_config_first_time_only and process_config_every_time.
1043         Now this function just does the non-config-related initializations
1044         and calls load_config.
1045         (bus_context_reload_config): Added.
1046
1047 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1048
1049         * bus/driver.c (bus_driver_handle_get_service_owner):
1050         implement a GetServiceOwner method.
1051         * doc/dbus-specification.xml: document it.
1052         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
1053         
1054         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
1055         implement, using the bus GetServiceOwner method.
1056
1057         * test/glib/test-dbus-glib.c:
1058         use dbus_gproxy_new_for_service_owner so that we can receive the
1059         signal. 
1060
1061 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
1062
1063         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1064         dbus/dbus-message.c, dbus/dbus-protocol.h
1065         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
1066
1067         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
1068         dbus/dbus-message.c, dbus/dbus-protocol.h
1069         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
1070
1071         * dbus/dbus-internals.c (_dbus_header_field_to_string):
1072         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
1073         DBUS_HEADER_FIELD_SENDER resolves to "sender"
1074
1075         * doc/dbus-specification.xml (Header Fields Table):
1076         s/SERVICE/DESTINATION
1077         s/SENDER_SERVICE/SENDER
1078
1079
1080 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1081
1082         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
1083         a few seconds.
1084
1085 2004-04-13  Michael Meeks  <michael@ximian.com>
1086
1087         * glib/dbus-gobject.c (handle_introspect): split out
1088         (introspect_properties): this.
1089         (handle_introspect): implement this.
1090
1091         * test/glib/Makefile.am: use the absolute path so the bus
1092         daemon's chdir ("/") doesn't kill us dead.
1093
1094         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
1095
1096 2004-04-12  Jon Trowbridge  <trow@ximian.com>
1097
1098         * bus/config-parser.c (struct BusConfigParser): Added
1099         included_files field.
1100         (seen_include): Added.  Checks whether or not a file has already
1101         been included by any parent BusConfigParser.
1102         (bus_config_parser_new): Copy the parent's included_files.
1103         (include_file): Track which files have been included, and fail on
1104         circular inclusions.
1105         (process_test_valid_subdir): Changed printf to report if we are
1106         testing valid or invalid conf files.
1107         (all_are_equiv): Changed printf to be a bit clearer about
1108         what we are actually doing.
1109         (bus_config_parser_test): Test invalid configuration files.
1110
1111 2004-04-09  Jon Trowbridge  <trow@ximian.com>
1112
1113         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
1114         argument.  If non-null, the newly-constructed BusConfigParser will
1115         be initialized with the parent's BusLimits instead of the default
1116         values.
1117         (include_file): When including a config file, pass in
1118         the current parser as the parent and then copy the BusLimits
1119         from the included BusConfigParser pack to the current parser.
1120         (process_test_valid_subdir): Renamed from process_test_subdir.
1121         (process_test_equiv_subdir): Added.  Walks through a directory,
1122         descending into each subdirectory and loading the config files
1123         it finds there.  If any subdirectory contains two config files
1124         that don't produce identical BusConfigParser structs, fail.
1125         For now, the BusConfigParser's BusPolicies are not compared.
1126         (bus_config_parser_test): Call both process_test_valid_subdir and
1127         process_test_equiv_subdir.
1128
1129         * bus/config-loader-libxml.c (bus_config_load): Take a parent
1130         argument and pass it along to the call to bus_config_parser_new.
1131         Also made a few small changes to allow this code to compile.
1132
1133         * bus/config-loader-expat.c (bus_config_load): Take a parent
1134         argument and pass it along to the call to bus_config_parser_new.
1135
1136         * bus/bus.c (bus_context_new): Load the config file
1137         with a NULL parent argument.
1138
1139 2004-03-29  Michael Meeks  <michael@ximian.com>
1140
1141         * glib/dbus-gobject.c (introspect_properties): split
1142         out, fix mangled 'while' flow control.
1143         (introspect_signals): implement.
1144         (handle_introspect): update.
1145
1146 2004-03-29  Michael Meeks  <michael@ximian.com>
1147
1148         * glib/dbus-gobject.c (set_object_property): split out / 
1149         re-work, use the property type, and not the message type(!)
1150         (get_object_property): ditto.
1151
1152         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
1153         (dbus_gvalue_marshal): make this code re-usable, needed
1154         for signals too, also on both proxy and server side.
1155         Re-write for more efficiency / readability.
1156
1157 2004-03-29  Michael Meeks  <michael@ximian.com>
1158
1159         * dbus/dbus-message.c
1160         (dbus_message_new_error_printf): impl.
1161
1162         * dbus/dbus-connection.c
1163         (dbus_connection_unregister_object_path): fix warning.
1164
1165         * configure.in: fix no-mono-installed situation.
1166
1167 2004-03-27  Havoc Pennington  <hp@redhat.com>
1168
1169         Patch from Timo Teräs:
1170         
1171         * tools/dbus-send.c (main): if --print-reply, assume type is
1172         method call; support boolean type args
1173         
1174         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
1175         bunch of memleak and logic bugs
1176         
1177 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
1178
1179         * mono/Arguments.cs:
1180         * mono/Introspector.cs:
1181         * mono/Handler.cs:
1182         * mono/InterfaceProxy.cs:
1183         * mono/Message.cs
1184         * mono/ProxyBuilder.cs:
1185         * mono/Service.cs:
1186         Added InterfaceProxy class to avoid building proxies for every
1187         object.
1188
1189         * dbus-message.h:
1190         * dbus-message.c (dbus_message_append_args_valist)
1191         (dbus_message_iter_get_object_path)
1192         (dbus_message_iter_get_object_path_array)
1193         (dbus_message_iter_append_object_path)
1194         (dbus_message_iter_append_object_path_array):
1195         Added object_path iter functions to handle OBJECT_PATH arguments
1196         
1197 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
1198
1199         First checkin of mono bindings.
1200         * configure.in:
1201         * Makefile.am:
1202         Build stuff for the bindings
1203         * dbus-sharp.pc.in: Added for pkgconfig
1204         
1205 2004-03-21  Havoc Pennington  <hp@redhat.com>
1206
1207         * test/test-service.c (main): remove debug spew
1208
1209 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1210
1211         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
1212         arrays
1213
1214         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
1215         (dbus_message_iter_init_array_iterator)
1216         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
1217         indicate whether the iterator is empty
1218
1219         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
1220         warnings
1221
1222 2004-03-19  Havoc Pennington  <hp@redhat.com>
1223
1224         * NEWS: 0.21 updates
1225
1226         * configure.in: 0.21
1227
1228         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
1229         
1230         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
1231         you don't need pyrex to make dist
1232
1233         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
1234         sources; run moc
1235         
1236 2004-03-18  Richard Hult  <richard@imendio.com>
1237
1238         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
1239         (dbus_message_set_auto_activation): Add doxygen docs.
1240
1241 2004-03-16  Richard Hult  <richard@imendio.com>
1242
1243         * bus/activation.c: (bus_activation_service_created),
1244         (bus_activation_send_pending_auto_activation_messages),
1245         (bus_activation_activate_service):
1246         * bus/activation.h:
1247         * bus/dispatch.c: (bus_dispatch),
1248         (check_nonexistent_service_auto_activation),
1249         (check_service_auto_activated),
1250         (check_segfault_service_auto_activation),
1251         (check_existent_service_auto_activation), (bus_dispatch_test):
1252         * bus/driver.c: (bus_driver_handle_activate_service):
1253         * bus/services.c: (bus_registry_acquire_service):
1254         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
1255         (dbus_message_get_auto_activation):
1256         * dbus/dbus-message.h:
1257         * dbus/dbus-protocol.h: Implement auto-activation.
1258         
1259         * doc/dbus-specification.xml: Add auto-activation to the spec.
1260
1261 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
1262
1263         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
1264         fix a bug with CUSTOM types.
1265
1266         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
1267         a unit test for this bug (used to fail).
1268
1269 2004-03-12  Mikael Hallendal  <micke@imendio.com>
1270
1271         * bus/activation.c:
1272         (babysitter_watch_callback): notify all pending activations waiting for
1273           the same exec that the activation failed.
1274         (bus_activation_activate_service): shortcut the activation if we 
1275           already waiting for the same executable to start up.
1276
1277 2004-03-12  Mikael Hallendal  <micke@imendio.com>
1278
1279         * bus/activation.c: 
1280         - Added service file reloading. 
1281           Each service files directory is kept in an hash table in 
1282           BusActivation and each BusActivationEntry knows what .service-file it
1283           was read from. So when you try to activate a service the bus will 
1284           check if it's been updated, removed or if new .service-files has 
1285           been installed.
1286         - Test code at the bottom for the service file reloading.
1287         * bus/test-main.c: (main):
1288         * bus/test.h:
1289         - added service reloading test.
1290         * dbus/dbus-sysdeps.c: 
1291         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
1292
1293 2004-03-08  Michael Meeks  <michael@ximian.com>
1294
1295         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
1296         bail immediately if disconnected, to avoid busy loop.
1297
1298         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
1299         cleanup cut/paste/inefficiency.
1300
1301 2004-03-01  David Zeuthen  <david@fubar.dk>
1302
1303         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
1304         bug where args were used twice. This bug resulted in a segfault
1305         on a Debian/PPC system when starting the messagebus daemon. Include
1306         dbus-sysdeps.h for DBUS_VA_COPY
1307
1308         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
1309
1310         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
1311         appropriate va_copy implementation. From GLib
1312         
1313 2004-02-24  Joe Shaw  <joe@ximian.com>
1314
1315         * bus/services.c (bus_registry_acquire_service): We need to pass
1316         in the service name to dbus_set_error() to prevent a crash.
1317
1318 2003-12-26  Anders Carlsson  <andersca@gnome.org>
1319
1320         * AUTHORS: Reveal my True identity.
1321
1322 2003-12-17  Mikael Hallendal  <micke@imendio.com>
1323
1324         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
1325         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
1326
1327 2003-12-13  Mikael Hallendal  <micke@imendio.com>
1328
1329         * doc/TODO: Added not about better error check of configuration files.
1330
1331 2003-12-02  Richard Hult  <richard@imendio.com>
1332
1333         * Update AFL version to 2.0 throughout the source files to reflect
1334         the update that was done a while ago.
1335
1336 2003-12-02  Richard Hult  <richard@imendio.com>
1337
1338         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
1339         wrote_dict_key to FALSE on the iter that the dict is appended to,
1340         just like when appending other types. Fixes a bug where a dict
1341         couldn't be put inside a dict.
1342         (dbus_message_iter_append_dict_key): Fix typo in warning message.
1343         (message_iter_test, _dbus_message_test): Add test case for dict
1344         inside dict.
1345
1346 2003-12-01  David Zeuthen  <david@fubar.dk>
1347
1348         * python/dbus.py: Add the actual message when calling the reciever
1349         of a signal such that parameters can be inspected. Add the method
1350         remove_signal_receiver
1351         
1352 2003-11-26  Mikael Hallendal  <micke@imendio.com>
1353
1354         * bus/*.[ch]:
1355         * dbus/*.[ch]:
1356         * glib/*.[ch]: Made ref functions return the pointer
1357
1358 2003-11-25  Zack Rusin  <zack@kde.org>
1359
1360         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
1361
1362         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
1363         wrappers,
1364
1365         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
1366         the Integrator and to better fit with the server,
1367
1368 2003-11-24  Zack Rusin  <zack@kde.org>
1369
1370         * qt/connection.h, qt/connection.cpp: removing initDbus method since
1371         the integrator handles it now
1372
1373         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
1374         since QTimer wasn't really meant to be used the way DBusTimeout is
1375
1376 2003-11-24  Zack Rusin  <zack@kde.org>
1377
1378         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
1379         Integrator class which integrates D-BUS with the Qt event loop,
1380
1381         * qt/connection.h, qt/connection.cpp: Move all the code which
1382         was dealing with D-BUS integration to the Integrator class,
1383         and start using Integrator,
1384
1385 2003-11-23  Zack Rusin  <zack@kde.org>
1386
1387         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
1388         wrapper
1389
1390         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
1391         switching namespaces to DBusQt, reworking the class,
1392
1393         * Makefile.cvs: switching dependencies so that it matches KDE 
1394         schematics,
1395         
1396         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
1397         the library
1398
1399 2003-11-19  Havoc Pennington  <hp@redhat.com>
1400
1401         * NEWS: update
1402
1403         * configure.in: bump version to 0.20
1404
1405         * configure.in (have_qt): add yet another place to look for qt
1406         (someone hand trolltech a .pc file...)
1407
1408 2003-11-01  Havoc Pennington  <hp@redhat.com>
1409
1410         * doc/dbus-specification.xml: add state machine docs on the auth
1411         protocol; just a first draft, I'm sure it's wrong.      
1412
1413 2003-10-28  David Zeuthen  <david@fubar.dk>
1414
1415         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
1416         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
1417         
1418 2003-10-28  Havoc Pennington  <hp@redhat.com>
1419
1420         * dbus/dbus-message.c (get_next_field): delete unused function
1421
1422 2003-10-28  Havoc Pennington  <hp@redhat.com>
1423
1424         * bus/expirelist.c (do_expiration_with_current_time): detect
1425         failure of the expire_func due to OOM
1426
1427         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
1428
1429         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
1430         NoReply error that's now created by the bus when the service exits
1431
1432 2003-10-28  Havoc Pennington  <hp@redhat.com>
1433
1434         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
1435         tests for set_path, set_interface, set_member, etc.
1436
1437         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
1438
1439         * dbus/dbus-message.c (set_string_field): always just delete and
1440         re-append the field; accept NULL for deletion
1441         (re_align_fields_recurse): reimplement
1442         
1443 2003-10-26  Havoc Pennington  <hp@redhat.com>
1444
1445         * dbus/dbus-connection.c: fix docs to properly describe the
1446         disconnected message
1447         (_dbus_connection_notify_disconnected): remove this function; 
1448         we can't synchronously add the disconnected message, we have to 
1449         do it after we've queued any remaining real messages
1450         (_dbus_connection_get_dispatch_status_unlocked): queue the
1451         disconnect message only if the transport has finished queueing all
1452         its real messages and is disconnected.
1453         (dbus_connection_disconnect): update the dispatch status here
1454
1455 2003-10-22  Havoc Pennington  <hp@redhat.com>
1456
1457         * bus/bus.c (bus_context_check_security_policy): fix up assertion
1458
1459         * bus/connection.c (bus_transaction_send_from_driver): set the
1460         destination to the connection's base service
1461
1462 2003-10-20  Havoc Pennington  <hp@redhat.com>
1463
1464         hmm, make check is currently not passing.
1465         
1466         * doc/dbus-specification.xml: add requirement that custom type
1467         names follow the same rules as interface names.
1468
1469         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
1470         duplication and allow 'c' to be 'custom'; dict is now 'm' for
1471         'map'
1472
1473         * doc/dbus-specification.xml: update type codes to match
1474         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
1475         CUSTOM. Add type OBJECT_PATH to the spec.
1476
1477 2003-10-17  Havoc Pennington  <hp@redhat.com>
1478
1479         * bus/driver.c (create_unique_client_name): use "." as separator
1480         in base service names instead of '-'
1481
1482         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
1483         byte at the end of the string
1484
1485         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
1486         optimization macros since string validation seems to be a slow
1487         point.
1488         
1489         * doc/dbus-specification.xml: restrict valid
1490         service/interface/member/error names. Add test suite code for the
1491         name validation.
1492
1493         * dbus/dbus-string.c: limit service/interface/member/error names 
1494         to [0-9][A-Z][a-z]_
1495
1496         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
1497         format arg to verbose spew
1498
1499         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
1500         memory, return instead of g_error
1501
1502         * test/test-service.c (path_message_func): support emitting a
1503         signal on request
1504
1505         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
1506         activation bus type if DBUS_BUS_ACTIVATION was set; default to
1507         assuming the activation bus was the session bus so that services
1508         started manually will still register.
1509         (init_connections_unlocked): fix so that in OOM situation we get
1510         the same semantics when retrying the function
1511         
1512         * test/test-service.c (main): change to use path registration, to
1513         test those codepaths; register with DBUS_BUS_ACTIVATION rather
1514         than DBUS_BUS_SESSION
1515
1516 2003-10-16  Havoc Pennington  <hp@redhat.com>
1517
1518         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
1519
1520         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
1521         coverage of the tests
1522         (coverage-report.txt): don't move the .da and .bbg files around
1523
1524 2003-10-16  Havoc Pennington  <hp@redhat.com>
1525
1526         * bus/bus.c (struct BusContext): remove struct field I didn't mean
1527         to put there
1528
1529 2003-10-16  Havoc Pennington  <hp@redhat.com>
1530
1531         * bus/connection.c (bus_pending_reply_expired): either cancel or
1532         execute, not both
1533         (bus_connections_check_reply): use unlink, not remove_link, as we
1534         don't want to free the link; fixes double free mess
1535
1536         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
1537         where no reply was received
1538
1539         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
1540         fix a refcount leak
1541
1542         * bus/signals.c (match_rule_matches): add special cases for the
1543         bus driver, so you can match on sender/destination for it.
1544
1545         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
1546         DBUS_PRINT_BACKTRACE is set
1547
1548         * dbus/dbus-internals.c: add pid to assertion failure messages
1549
1550         * dbus/dbus-connection.c: add message type code to the debug spew
1551
1552         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
1553         sender=foo not service=foo
1554
1555         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
1556         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
1557         DBUS_ACTIVATION_ADDRESS instead
1558
1559         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
1560         DBUS_SYSTEM_BUS_ADDRESS if appropriate
1561
1562         * bus/bus.c (bus_context_new): handle OOM copying bus type into
1563         context struct
1564
1565         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
1566         (dbus_message_iter_get_object_path_array): new function (half
1567         finished, disabled for the moment)
1568         
1569         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
1570         DBUS_MESSAGE_TYPE_ERROR
1571
1572         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
1573         avoid redirecting stderr to /dev/null
1574         (babysit): close stdin if not doing the "exit_with_session" thing
1575
1576         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
1577         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
1578         stdout/stdin, so things don't get confused
1579         
1580         * bus/system.conf.in: fix to allow replies, I modified .conf
1581         instead of .conf.in again.
1582
1583 2003-10-14  David Zeuthen  <david@fubar.dk>
1584
1585         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
1586         argtype to arg_type when raising unknown arg type exception.
1587         Changed type list to reflect the changes in dbus-protocol.h so 
1588         the bindings actually work.
1589
1590 2003-10-14  Havoc Pennington  <hp@redhat.com>
1591
1592         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
1593         to have a bug keeping it from outputting the .da files sometimes
1594         (string_get_string): don't append garbage nul bytes to the string.
1595
1596 2003-10-15  Seth Nickell  <seth@gnome.org>
1597
1598         * python/Makefile.am:
1599
1600         Include dbus_h_wrapper.h in the dist tarball.
1601
1602 2003-10-14  Havoc Pennington  <hp@redhat.com>
1603
1604         * bus/bus.c (bus_context_check_security_policy): revamp this to
1605         work more sanely with new policy-based requested reply setup
1606
1607         * bus/connection.c (bus_transaction_send_from_driver): set bus
1608         driver messages as no reply
1609
1610         * bus/policy.c (bus_client_policy_check_can_receive): handle a
1611         requested_reply attribute on allow/deny rules
1612
1613         * bus/system.conf: add <allow requested_reply="true"/>
1614
1615         * bus/driver.c (bus_driver_handle_message): fix check for replies
1616         sent to the bus driver, which was backward. How did this ever work
1617         at all though? I think I'm missing something.
1618
1619         * dbus/dbus-message.c (decode_header_data): require error and
1620         method return messages to have a reply serial field to be valid
1621         (_dbus_message_loader_queue_messages): break up this function;
1622         validate that reply serial and plain serial are nonzero; 
1623         clean up the OOM/error handling.
1624         (get_uint_field): don't return -1 from this
1625         (dbus_message_create_header): fix signed/unsigned bug
1626
1627         * bus/connection.c (bus_connections_expect_reply): save serial of
1628         the incoming message, not reply serial
1629
1630 2003-10-14  Havoc Pennington  <hp@redhat.com>
1631
1632         * bus/connection.c: implement pending reply tracking using
1633         BusExpireList
1634
1635         * bus/bus.c (bus_context_check_security_policy): verify that a
1636         reply is pending in order to allow a reply to be sent. Deny 
1637         messages of unknown type.
1638
1639         * bus/dbus-daemon-1.1.in: update to mention new resource limits
1640
1641         * bus/bus.c (bus_context_get_max_replies_per_connection): new
1642         (bus_context_get_reply_timeout): new
1643
1644 2003-10-13  Seth Nickell  <seth@gnome.org>
1645
1646         * python/Makefile.am:
1647
1648         Pass "make distcheck": remove a couple files from DIST_FILES
1649         that weren't included in the final version.
1650
1651 2003-10-12  Havoc Pennington  <hp@pobox.com>
1652
1653         Added test code that 1) starts an actual bus daemon and 2) uses
1654         DBusGProxy; fixed bugs that were revealed by the test. Lots 
1655         more testing possible, but this is the basic framework.
1656         
1657         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
1658         empty proxy lists from the proxy list hash
1659
1660         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
1661         couple of return_if_fail checks
1662
1663         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
1664         to allocate, so everything is cleared to NULL as it should be.
1665
1666         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
1667         source as data to dbus_connection_set_timeout_functions() as the 
1668         timeout functions expected
1669
1670         * test/glib/run-test.sh: add a little script to start up a message
1671         bus and run tests using it
1672
1673         * tools/dbus-launch.1: updates
1674
1675         * tools/dbus-launch.c (main): add --config-file option
1676
1677         * tools/dbus-launch.c (main): remove confusing else if (runprog)
1678         that could never be reached.
1679
1680         * dbus/dbus-message.c (dbus_message_new_method_return) 
1681         (dbus_message_new_error, dbus_message_new_signal): set the
1682         no-reply-expected flag on all these. Redundant, but may
1683         as well be consistent.
1684
1685 2003-10-11  Havoc Pennington  <hp@pobox.com>
1686
1687         * test/decode-gcov.c (function_solve_graph): make broken block
1688         graph a nonfatal error since it seems to be broken. Need to debug
1689         this.
1690
1691         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
1692         can't just check type > INVALID < LAST anymore
1693
1694         * dbus/dbus-message.c (dbus_message_get_signature): new function
1695         (dbus_message_has_signature): new function
1696         (struct DBusMessage): add signature field (right now it isn't sent
1697         over the wire, just generated on the fly)
1698         (dbus_message_copy): copy the signature, and init strings to
1699         proper length to avoid some reallocs
1700         (dbus_message_iter_init_array_iterator): return void, since it
1701         can't fail
1702         (dbus_message_iter_init_dict_iterator): return void since it can't fail
1703         (_dbus_message_loader_queue_messages): add silly temporary hack to
1704         fill in message->signature on load
1705
1706         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
1707         characters, so they are relatively human-readable.
1708
1709 2003-10-11  Havoc Pennington  <hp@pobox.com>
1710
1711         * dbus/dbus-message.c (_dbus_message_test): add more test
1712         coverage, but #if 0 for now since they uncover a bug 
1713         not fixed yet; I think in re_align_field_recurse()
1714         (re_align_field_recurse): add FIXME about broken assertion
1715
1716         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
1717
1718         * bus/connection.c: share a couple code bits with expirelist.c
1719
1720         * bus/expirelist.h, bus/expirelist.c: implement a generic
1721         expire-items-after-N-seconds facility, was going to share between
1722         expiring connections and replies, decided not to use for expiring
1723         connections for now.
1724
1725         * COPYING: include AFL 2.0 (still need to change all the file headers)
1726
1727 2003-10-09  Havoc Pennington  <hp@redhat.com>
1728
1729         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
1730         gcc 3.3. Not that we do anything about it yet.
1731
1732         * bus/signals.c (bus_match_rule_parse): impose max length on the
1733         match rule text
1734
1735         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
1736
1737 2003-10-09  Havoc Pennington  <hp@redhat.com>
1738
1739         Make matching rules theoretically work (add parser).
1740         
1741         * bus/bus.c (bus_context_check_security_policy): fix up to handle
1742         the case where destination is explicitly specified as bus driver
1743         and someone else is eavesdropping.
1744         
1745         * bus/policy.c (bus_client_policy_check_can_receive): fix up
1746         definition of eavesdropping and assertion
1747
1748         * tools/dbus-send.c (main): use dbus_message_type_from_string
1749
1750         * bus/signals.c (bus_match_rule_parse): implement
1751
1752         * dbus/dbus-message.c (dbus_message_type_from_string): new
1753
1754         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
1755
1756 2003-10-02  Havoc Pennington  <hp@pobox.com>
1757
1758         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
1759         dbus_gproxy_oneway_call
1760
1761         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
1762         (dbus_server_setup_with_g_main): fix to allow calling them more
1763         than once on the same args
1764         (dbus_bus_get_with_g_main): new function
1765
1766 2003-10-02  Havoc Pennington  <hp@redhat.com>
1767
1768         * doc/dbus-tutorial.xml: write some stuff
1769
1770 2003-09-29  Havoc Pennington  <hp@pobox.com>
1771
1772         * configure.in: split checks for Doxygen from XML docs, check for
1773         xmlto
1774
1775         * doc/Makefile.am: XML-ify all the docs, and add a blank
1776         dbus-tutorial.xml
1777
1778 2003-09-29  Havoc Pennington  <hp@pobox.com>
1779
1780         * Merge dbus-object-names branch. To see the entire patch 
1781         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
1782         it's huuuuge though.
1783         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
1784         
1785 2003-09-28  Havoc Pennington  <hp@pobox.com>
1786
1787         * HACKING: update to reflect new server
1788
1789 2003-09-26  Seth Nickell  <seth@gnome.org>
1790
1791         * python/dbus.py:
1792         * python/examples/example-signals.py:
1793
1794         Start implementing some notions of signals. The API
1795         is really terrible, but they sort of work (with the
1796         exception of being able to filter by service, and to
1797         transmit signals *as* a particular service). Need to
1798         figure out how to make messages come from the service
1799         we registered :-(
1800         
1801         * python/dbus_bindings.pyx.in:
1802
1803         Removed duplicate message_handler callbacks.
1804         
1805 2003-09-25  Havoc Pennington  <hp@redhat.com>
1806
1807         * bus/session.conf.in: fix my mess
1808
1809 2003-09-25  Havoc Pennington  <hp@pobox.com>
1810
1811         * bus/session.conf.in: fix security policy, reported by Seth Nickell
1812
1813 2003-09-25  Seth Nickell  <seth@gnome.org>
1814
1815         * python/examples/example-service.py:
1816
1817         Johan notices complete wrong code in example-service, but
1818         completely wrong in a way that works exactly the same (!).
1819         Johan is confused, how could this possibly work? Example
1820         code fails to serve purpose of making things clear.
1821         Seth fixes.
1822
1823 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
1824
1825         * doc/dbus-specification.sgml: don't require header fields
1826         to be 4-byte aligned and specify that fields should be
1827         distinguished from padding by the fact that zero is not
1828         a valid field name.
1829         
1830         * doc/TODO: remove re-alignment item and add item to doc
1831         the OBJECT_PATH type.
1832         
1833         * dbus/dbus-message.c:
1834         (HeaderField): rename the original member to value_offset
1835         and introduce a name_offset member to keep track of where
1836         the field actually begins.
1837         (adjust_field_offsets): remove.
1838         (append_int_field), (append_uint_field),
1839         (append_string_field): don't align the start of the header
1840         field to a 4-byte boundary.
1841         (get_next_field): impl finding the next marhsalled field
1842         after a given field.
1843         (re_align_field_recurse): impl re-aligning a number of
1844         already marshalled fields.
1845         (delete_field): impl deleting a field of any type and
1846         re-aligning any following fields.
1847         (delete_int_or_uint_field), (delete_string_field): remove.
1848         (set_int_field), (set_uint_field): no need to re-check
1849         that we have the correct type for the field.
1850         (set_string_field): ditto and impl re-aligning any
1851         following fields.
1852         (decode_header_data): update to take into account that
1853         the fields aren't 4-byte aligned any more and the new
1854         way to distinguish padding from header fields. Also,
1855         don't exit when there is too much header padding.
1856         (process_test_subdir): print the directory.
1857         (_dbus_message_test): add test to make sure a following
1858         field is re-aligned correctly after field deletion.
1859         
1860         * dbus/dbus-string.[ch]:
1861         (_dbus_string_insert_bytes): rename from insert_byte and
1862         allow the insert of multiple bytes.
1863         (_dbus_string_test): test inserting multiple bytes.
1864
1865         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1866         warning note to docs about having to re-align any
1867         marshalled values following the string.
1868         
1869         * dbus/dbus-message-builder.c:
1870         (append_string_field), (_dbus_message_data_load):
1871         don't align the header field.
1872         
1873         * dbus/dbus-auth.c: (process_test_subdir): print the
1874         directory.
1875         
1876         * test/break-loader.c: (randomly_add_one_byte): upd. for
1877         insert_byte change.
1878         
1879         * test/data/invalid-messages/bad-header-field-alignment.message:
1880         new test case.
1881         
1882         * test/data/valid-messages/unknown-header-field.message: shove
1883         a dict in the unknown field.
1884
1885 2003-09-25  Seth Nickell  <seth@gnome.org>
1886
1887         * python/dbus.py:
1888         * python/dbus_bindings.pyx.in:
1889
1890         Handle return values.
1891         
1892         * python/examples/example-client.py:
1893         * python/examples/example-service.py:
1894
1895         Pass back return values from the service to the client.
1896         
1897 2003-09-24  Seth Nickell  <seth@gnome.org>
1898
1899         * python/dbus.py:
1900
1901         Connect Object methods (when you are sharing an object) up... pass
1902         in a list of methods to be shared. Sharing all the methods just
1903         worked out too weird. You can now create nice Services over the
1904         DBus in Python. :-)
1905         
1906         * python/dbus_bindings.pyx.in:
1907
1908         Keep references to user_data tuples passed into C functions so 
1909         Python doesn't garbage collect on us.
1910
1911         Implement MethodReturn and Error subclasses of Message for creating
1912         DBusMessage's of those types.
1913         
1914         * python/examples/example-client.py:
1915         * python/examples/example-service.py:
1916
1917         Simple example code showing both how create DBus services and objects,
1918         and how to use them.
1919
1920 2003-09-23  Havoc Pennington  <hp@pobox.com>
1921
1922         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1923
1924 2003-09-23  Havoc Pennington  <hp@redhat.com>
1925
1926         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1927         (dbus_gproxy_disconnect_signal): implement
1928         (dbus_gproxy_manager_remove_signal_match): implement
1929         (dbus_gproxy_manager_add_signal_match): implement
1930         (dbus_gproxy_oneway_call): implement
1931
1932 2003-09-23  Havoc Pennington  <hp@pobox.com>
1933
1934         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1935         subclass. This means dropping the transparent thread safety of the
1936         proxy; you now need a separate proxy per-thread, or your own
1937         locking on the proxy. Probably right anyway.
1938         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1939
1940 2003-09-22  Havoc Pennington  <hp@redhat.com>
1941
1942         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1943
1944 2003-09-21  Seth Nickell  <seth@gnome.org>
1945
1946         First checkin of the Python bindings.
1947         
1948         * python/.cvsignore:
1949         * python/Makefile.am:
1950         * python/dbus_bindings.pyx.in:
1951         * python/dbus_h_wrapper.h:
1952
1953         Pieces for Pyrex to operate on, building a dbus_bindings.so
1954         python module for low-level access to the DBus APIs.
1955         
1956         * python/dbus.py:
1957
1958         High-level Python module for accessing DBus objects.
1959
1960         * configure.in:
1961         * Makefile.am:
1962
1963         Build stuff for the python bindings.
1964
1965         * acinclude.m4:
1966
1967         Extra macro needed for finding the Python C header files.
1968
1969 2003-09-21  Havoc Pennington  <hp@pobox.com>
1970
1971         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1972         implementing the proxy manager, didn't get very far.
1973
1974         * dbus/dbus-bus.c (dbus_bus_add_match): new
1975         (dbus_bus_remove_match): new
1976
1977         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1978         path_name argument; adjust the other not-yet-implemented 
1979         gproxy constructors to be what I think they should be.
1980
1981 2003-09-21  Havoc Pennington  <hp@pobox.com>
1982
1983         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1984         by default for message bus connections.
1985
1986         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1987         exit_on_disconnect flag is set and we process the disconnected
1988         signal.
1989         (dbus_connection_set_exit_on_disconnect): new function
1990
1991 2003-09-21  Havoc Pennington  <hp@pobox.com>
1992
1993         Get matching rules mostly working in the bus; only actually
1994         parsing the rule text remains. However, the client side of
1995         "signal connections" hasn't been started, this patch is only the
1996         bus side.
1997         
1998         * dbus/dispatch.c: fix for the matching rules changes
1999         
2000         * bus/driver.c (bus_driver_handle_remove_match)
2001         (bus_driver_handle_add_match): send an ack reply from these
2002         method calls
2003
2004         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
2005         arguments, reported by Seth Nickell
2006
2007         * bus/config-parser.c (append_rule_from_element): support
2008         eavesdrop=true|false attribute on policies so match rules 
2009         can be prevented from snooping on the system bus.
2010
2011         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
2012         and "destination" in attribute names; fix some docs bugs; 
2013         add eavesdrop=true|false attribute
2014
2015         * bus/driver.c (bus_driver_handle_add_match)
2016         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
2017         messages
2018
2019         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
2020         rid of broadcast service concept, signals are just always broadcast
2021
2022         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
2023         mostly implement matching rules stuff (currently only exposed as signal
2024         connections)
2025
2026 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
2027
2028         * doc/dbus-specification.sgml: Change the header field name
2029         to be an enum and update the rest of the spec to reference
2030         the fields using the conventinal name.
2031
2032         * dbus/dbus-protocol.h: update to reflect the spec.
2033
2034         * doc/TODO: add item to remove the 4 byte alignment requirement.
2035         
2036         * dbus/dbus-message.c: Remove the code to generalise the
2037         header/body length and serial number header fields as named
2038         header fields so we can reference field names using the 
2039         protocol values.
2040         (append_int_field), (append_uint_field), (append_string_field):
2041         Append the field name as a byte rather than four chars.
2042         (delete_int_or_uint_field), (delete_string_field): reflect the
2043         fact that the field name and typecode now occupy 4 bytes instead
2044         of 8.
2045         (decode_string_field), (decode_header_data): update to reflect
2046         protocol changes and move the field specific encoding from
2047         decode_string_field() back into decode_header_data().
2048         
2049         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
2050         Add utility to aid debugging.
2051         
2052         * dbus/dbus-message-builder.c:
2053         (append_string_field), (_dbus_message_data_load): Update to
2054         reflect protocol changes; Change the FIELD_NAME directive
2055         to HEADER_FIELD and allow it to take the field's conventional
2056         name rather than the actual value.
2057         
2058         * test/data/*/*.message: Update to use HEADER_FIELD instead
2059         of FIELD_NAME; Always align the header on an 8 byte boundary
2060         *before* updating the header length.
2061
2062 2003-09-15  Havoc Pennington  <hp@pobox.com>
2063
2064         * dbus/dbus-pending-call.c: add the get/set object data
2065         boilerplate as for DBusConnection, etc. Use generic object data
2066         for the notify callback.
2067
2068         * glib/dbus-gparser.c (parse_node): parse child nodes
2069
2070         * tools/dbus-viewer.c: more hacking on the dbus-viewer
2071         
2072         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
2073         contain functions shared between the convenience lib and the
2074         installed lib
2075
2076         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
2077         -export-symbols-regex to the GLib library
2078
2079         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
2080         fix the locking in here, and add a default handler for
2081         Introspect() that just returns sub-nodes.
2082
2083 2003-09-14  Havoc Pennington  <hp@pobox.com>
2084
2085         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
2086         rather than gfoo consistent
2087
2088         * glib/dbus-gproxy.h: delete for now, move contents to
2089         dbus-glib.h, because the include files don't work right since we
2090         aren't in the dbus/ subdir.
2091         
2092         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
2093         (dbus_gproxy_end_call): finish
2094         (dbus_gproxy_begin_call): finish
2095
2096         * glib/dbus-gmain.c (dbus_set_g_error): new
2097
2098         * glib/dbus-gobject.c (handle_introspect): include information
2099         about child nodes in the introspection
2100
2101         * dbus/dbus-connection.c (dbus_connection_list_registered): new
2102         function to help in implementation of introspection
2103
2104         * dbus/dbus-object-tree.c
2105         (_dbus_object_tree_list_registered_and_unlock): new function
2106
2107 2003-09-12  Havoc Pennington  <hp@pobox.com>
2108
2109         * glib/dbus-gidl.h: add common base class for all the foo_info
2110         types
2111
2112         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
2113         similar to kdcop
2114
2115         * test/Makefile.am: try test srcdir -ef . in addition to test
2116         srcdir = ., one of them should work (yeah lame)
2117         
2118         * glib/Makefile.am: build the "idl" parser stuff as a convenience
2119         library
2120         
2121         * glib/dbus-gparser.h: make description_load routines return
2122         NodeInfo* not Parser*
2123
2124         * Makefile.am (SUBDIRS): build test dir after all library dirs
2125
2126         * configure.in: add GTK+ detection
2127
2128 2003-09-07  Havoc Pennington  <hp@pobox.com>
2129
2130         * Make Doxygen contented.
2131
2132 2003-09-07  Havoc Pennington  <hp@pobox.com>
2133
2134         * doc/dbus-specification.sgml: more updates
2135
2136 2003-09-06  Havoc Pennington  <hp@pobox.com>
2137
2138         * doc/dbus-specification.sgml: partial updates
2139
2140         * bus/dbus-daemon-1.1.in: fix the config file docs for the
2141         zillionth time; hopefully I edited the right file this time.
2142
2143         * bus/config-parser.c (append_rule_from_element): support
2144         send_type, send_path, receive_type, receive_path
2145
2146         * bus/policy.c: add message type and path to the list of things
2147         that can be "firewalled"
2148
2149 2003-09-06  Havoc Pennington  <hp@pobox.com>
2150
2151         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
2152         (dbus_connection_register_object_path): make this not handle
2153         messages to paths below the given path
2154
2155 2003-09-03  Havoc Pennington  <hp@pobox.com>
2156
2157         * test/glib/Makefile.am: add this with random glib-linked test
2158         programs
2159
2160         * glib/Makefile.am: remove the random test programs from here,
2161         leave only the unit tests
2162
2163         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
2164         uscore/javacaps conversion, and fix     
2165         (get_object_property, set_object_property): change to .NET
2166         convention for mapping props to methods, set_FooBar/get_FooBar, 
2167         since one language has such a convention we may as well copy it. 
2168         Plus real methods in either getFooBar or get_foo_bar style won't 
2169         collide with this convention.
2170
2171 2003-09-01  Havoc Pennington  <hp@pobox.com>
2172
2173         * glib/dbus-gparser.c: implement
2174
2175         * glib/dbus-gobject.c: start implementing skeletons support
2176
2177         * configure.in: when disabling checks/assert, also define
2178         G_DISABLE_ASSERT and G_DISABLE_CHECKS
2179
2180 2003-09-01  Havoc Pennington  <hp@pobox.com>
2181
2182         * glib/Makefile.am: rearrange a bunch of files and get "make
2183         check" framework set up
2184
2185 2003-08-31  Havoc Pennington  <hp@pobox.com>
2186
2187         * fix build with --disable-tests
2188
2189 2003-08-30  Havoc Pennington  <hp@pobox.com>
2190
2191         * dbus/dbus-connection.c: purge DBusMessageHandler
2192
2193         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
2194         use callbacks everywhere
2195
2196 2003-08-30  Havoc Pennington  <hp@pobox.com>
2197
2198         * test/data/valid-config-files/system.d/test.conf: change to 
2199         root for the user so warnings don't get printed
2200
2201         * dbus/dbus-message.c: add dbus_message_get_path,
2202         dbus_message_set_path
2203         
2204         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
2205         dispatching to a path
2206
2207         * dbus/dbus-string.c (_dbus_string_validate_path): add
2208
2209         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
2210         (_dbus_marshal_object_path): implement
2211
2212         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
2213         to contain the path to the target object
2214         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
2215         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
2216
2217 2003-08-30  Havoc Pennington  <hp@pobox.com>
2218
2219         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
2220
2221 2003-08-29  Havoc Pennington  <hp@pobox.com>
2222
2223         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
2224         registered
2225         (struct DBusObjectSubtree): shrink this
2226         a lot, since we may have a lot of them
2227         (_dbus_object_tree_free_all_unlocked): implement
2228         (_dbus_object_tree_dispatch_and_unlock): implement
2229
2230 2003-08-29  Havoc Pennington  <hp@pobox.com>
2231
2232         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
2233
2234 2003-08-28  Havoc Pennington  <hp@pobox.com>
2235
2236         purge DBusObjectID
2237         
2238         * dbus/dbus-connection.c: port to no ObjectID, create a
2239         DBusObjectTree, rename ObjectTree to ObjectPath in public API
2240
2241         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
2242         everything except UnregisterFunction and MessageFunction
2243         
2244         * dbus/dbus-marshal.c: port away from DBusObjectID, 
2245         add DBUS_TYPE_OBJECT_PATH
2246         
2247         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
2248         dbus/dbus-objectid.[hc]: remove these, we are moving to 
2249         path-based object IDs
2250
2251 2003-08-25  Havoc Pennington  <hp@pobox.com>
2252
2253         Just noticed that dbus_message_test is hosed, I wonder when I
2254         broke that. I thought make check was passing earlier...
2255         
2256         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
2257         container tree, will replace most of dbus-object-registry
2258
2259         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
2260         screwup
2261
2262 2003-08-19  Havoc Pennington  <hp@pobox.com>
2263
2264         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
2265         (dbus_message_is_error): fix this function
2266
2267         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
2268         match
2269
2270         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
2271         reflect clarified man page
2272         (bus_client_policy_check_can_send): ditto
2273         
2274         * bus/session.conf.in: fixup
2275
2276         * bus/system.conf.in: fixup
2277
2278 2003-08-18  Havoc Pennington  <hp@redhat.com>
2279
2280         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
2281
2282         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
2283         dumb bug created earlier (wrong order of args to
2284         decode_header_data())
2285         
2286         * tools/dbus-send.c: port
2287
2288         * tools/dbus-print-message.c (print_message): port
2289
2290         * test/data/*messages: port all messages over
2291         
2292         * dbus/dbus-message-builder.c: support including 
2293         message type
2294         
2295         * bus/driver.c: port over
2296         
2297         * bus/dispatch.c: port over to new stuff
2298
2299         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2300         rename disconnect signal to "Disconnected"
2301
2302 2003-08-17  Havoc Pennington  <hp@pobox.com>
2303
2304         This doesn't compile yet, but syncing up so I can hack on it from
2305         work. What are branches for if not broken code? ;-)
2306         
2307         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
2308         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
2309         DBUS_HEADER_FIELD_ERROR_NAME
2310         
2311         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
2312         for the interface+member pairs
2313         (string_hash): change to use g_str_hash algorithm
2314         (find_direct_function, find_string_function): refactor these to
2315         share most code.
2316         
2317         * dbus/dbus-message.c: port all of this over to support 
2318         interface/member fields instead of name field
2319
2320         * dbus/dbus-object-registry.c: port over
2321         
2322         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
2323         from _dbus_string_validate_name
2324
2325         * bus/dbus-daemon-1.1: change file format for the 
2326         <deny>/<allow> stuff to match new message naming scheme
2327
2328         * bus/policy.c: port over
2329
2330         * bus/config-parser.c: parse new format
2331         
2332 2003-08-16  Havoc Pennington  <hp@pobox.com>
2333
2334         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
2335         broken assertion
2336
2337         * glib/dbus-gproxy.c: some hacking
2338
2339 2003-08-15  Havoc Pennington  <hp@redhat.com>
2340
2341         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
2342
2343         * dbus/dbus-connection.c
2344         (dbus_connection_send_with_reply_and_block): factor out internals;
2345         change to convert any error replies to DBusError instead of 
2346         returning them as a message
2347
2348 2003-08-15  Havoc Pennington  <hp@pobox.com>
2349
2350         * dbus/dbus-connection.c, 
2351         dbus/dbus-pending-call.c: Finish the pending call stuff
2352
2353 2003-08-14  Havoc Pennington  <hp@redhat.com>
2354
2355         * dbus/dbus-pending-call.c: start on new object that will replace
2356         DBusMessageHandler and ReplyHandlerData for tracking outstanding
2357         replies
2358
2359         * dbus/dbus-gproxy.c: start on proxy object used to communicate
2360         with remote interfaces
2361
2362         * dbus/dbus-gidl.c: do the boring boilerplate in here
2363         
2364 2003-08-12  Havoc Pennington  <hp@pobox.com>
2365
2366         * bus/dispatch.c (bus_dispatch): make this return proper 
2367         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
2368
2369         * dbus/dbus-errors.c (dbus_set_error): use
2370         _dbus_string_append_printf_valist
2371
2372         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
2373         (_dbus_string_append_printf): new
2374
2375         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
2376         UNKNOWN_METHOD
2377
2378         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
2379         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
2380         message is unhandled.
2381
2382 2003-08-11  Havoc Pennington  <hp@pobox.com>
2383
2384         * bus/test.c (client_disconnect_handler): change to return
2385         HANDLED (would have been REMOVE_MESSAGE)
2386
2387         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
2388         HANDLED/NOT_YET_HANDLED instead of
2389         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
2390         should be used.
2391
2392 2003-08-10  Havoc Pennington  <hp@pobox.com>
2393
2394         * tools/dbus-send.c (main): add --type argument, for now
2395         supporting only method_call and signal types.
2396
2397         * tools/dbus-print-message.c: print message type
2398
2399         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
2400         init connection->objects
2401
2402         * doc/dbus-specification.sgml: fix sgml
2403
2404         * bus/*.c: port over to object-instance API changes
2405
2406         * test/test-service.c: ditto
2407         
2408         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
2409         name, we will have to fix up the rest of the code to also handle
2410         this
2411         (dbus_message_new): generic message-creation call
2412         (set_string_field): allow appending name field
2413
2414 2003-08-06  Havoc Pennington  <hp@pobox.com>
2415
2416         * dbus/dbus-object-registry.c: implement signal connection 
2417         and dispatch
2418
2419         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
2420
2421         * dbus/dbus-internals.c (_dbus_memdup): new function
2422
2423 2003-08-02  Havoc Pennington  <hp@pobox.com>
2424
2425         * dbus/dbus-message.c (dbus_message_get_no_reply)
2426         (dbus_message_set_no_reply): add these and remove
2427         set_is_error/get_is_error
2428
2429         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
2430         remove the ERROR flag, since there's now an ERROR type
2431
2432 2003-08-01  Havoc Pennington  <hp@pobox.com>
2433
2434         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
2435         implement
2436
2437         * dbus/dbus-message.c (dbus_message_get_type): new function
2438
2439         * doc/dbus-specification.sgml: add "type" byte to messages
2440
2441 2003-08-01  Havoc Pennington  <hp@pobox.com>
2442
2443         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
2444         a message type enum to distinguish kinds of message
2445         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
2446         that need not be replied to
2447
2448 2003-08-01  Havoc Pennington  <hp@pobox.com>
2449
2450         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
2451         (unpack_8_octets): fix no-64-bit-int bug
2452
2453         * dbus/dbus-object-registry.c (validate_id): validate the 
2454         connection ID bits, not just the instance ID.
2455
2456         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
2457         the connection-global 33 bits of the object ID
2458
2459         * dbus/dbus-object-registry.c (info_from_entry): fill in 
2460         object ID in the new way
2461
2462         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
2463         define server/client/instance bits.
2464
2465 2003-07-30  Havoc Pennington  <hp@pobox.com>
2466
2467         * dbus/dbus-connection.c (dbus_connection_register_object): fix
2468         build
2469
2470 2003-07-13  Havoc Pennington  <hp@pobox.com>
2471
2472         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
2473         fields to DBusObjectVTable and DBusObjectInfo
2474
2475 2003-07-12  Havoc Pennington  <hp@pobox.com>
2476
2477         * dbus/dbus-object-registry.c: implement unit test,
2478         fix bugs discovered in process
2479
2480         * dbus/dbus-connection.c: remove handler_table and
2481         register_handler(), add DBusObjectRegistry usage
2482
2483         * dbus/dbus-objectid.c (dbus_object_id_is_null)
2484         (dbus_object_id_set_null): new functions
2485
2486 2003-07-08  Havoc Pennington  <hp@pobox.com>
2487
2488         * dbus/dbus-object.c: implement some of this
2489
2490         * dbus/dbus-object-registry.c
2491         (_dbus_object_registry_add_and_unlock): fill in the object_id out
2492         param
2493         (_dbus_object_registry_new): handle OOM
2494
2495 2003-07-08  Havoc Pennington  <hp@pobox.com>
2496
2497         * dbus/dbus-object.h: sketch out an API for registering objects
2498         with a connection, that allows us to use as little as 24 bytes
2499         per object and lets application code represent an object in 
2500         any conceivable way.
2501
2502         * dbus/dbus-object-registry.c: implement the hard bits of the
2503         DBusConnection aspect of object API. Not yet wired up.
2504         
2505 2003-07-06  Havoc Pennington  <hp@pobox.com>
2506
2507         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
2508         (_dbus_marshal_object_id): new
2509         (_dbus_demarshal_object_id): new
2510         (_dbus_marshal_get_arg_end_pos): support object ID type, and
2511         consolidate identical switch cases. Don't conditionalize handling
2512         of DBUS_TYPE_UINT64, need to handle the type always.
2513         (_dbus_marshal_validate_arg): consolidate identical cases, and
2514         handle DBUS_TYPE_OBJECT_ID
2515
2516         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
2517
2518         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
2519
2520 2003-09-28  Havoc Pennington  <hp@pobox.com>
2521
2522         * real 0.13 release
2523
2524 2003-09-28  Havoc Pennington  <hp@pobox.com>
2525
2526         * doc/Makefile.am (dbus-specification.html): testing a funky hack
2527         to work with Debian db2html
2528
2529 2003-09-28  Havoc Pennington  <hp@pobox.com>
2530
2531         * configure.in: 0.13
2532
2533         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
2534         stylesheet-images for benefit of Debian
2535         
2536         Change back to using filesystem-linked sockets for the system
2537         bus, so only root can create the default system bus address.
2538         
2539         * bus/system.conf.in: change to use
2540         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2541
2542         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
2543         from here.
2544
2545         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
2546         here, and AC_DEFINE DBUS_SYSTEM_PATH
2547
2548 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
2549
2550         * doc/TODO:
2551         * doc/busconfig.dtd:
2552         Add busconfig DTD.
2553         
2554 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
2555
2556         * doc/dbus-specification.sgml:
2557         Add activation reply values.
2558         
2559 2003-08-05  Havoc Pennington  <hp@redhat.com>
2560
2561         * configure.in: 0.12
2562
2563 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
2564
2565         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
2566         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
2567         (add_watch), (remove_watch), (create_source):
2568         Refcount fds, fixes some reentrancy issues.
2569         
2570 2003-07-30  Havoc Pennington  <hp@redhat.com>
2571
2572         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
2573         bus address to be abstract if we have abstract sockets
2574
2575         * NEWS: update
2576
2577 2003-07-28  Havoc Pennington  <hp@redhat.com>
2578
2579         * bus/messagebus.in: fix to avoid processname/servicename 
2580         confusion, from Michael Kearey
2581         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
2582         
2583 2003-07-23  Havoc Pennington  <hp@pobox.com>
2584
2585         * dbus/dbus-message.c (dbus_message_iter_get_named): 
2586         fix from Andy Hanton to remove broken "+1"
2587
2588 2003-07-16  Havoc Pennington  <hp@pobox.com>
2589
2590         * tools/dbus-launch.c (babysit): close stdout/stderr in the
2591         babysitter process, as suggested by Thomas Leonard, so 
2592         an "eval `dbus-launch --exit-with-session`" will actually 
2593         return
2594
2595 2003-07-16  Havoc Pennington  <hp@pobox.com>
2596
2597         * configure.in: print out EXPANDED_* variables in the summary at
2598         the end; clean up the code that computes EXPANDED_ variables and
2599         get the ones using exec_prefix right. Should make things work
2600         when you build without --prefix
2601
2602 2003-06-29  Havoc Pennington  <hp@pobox.com>
2603
2604         * mono/Test.cs (class Test): fire up a main loop and run it
2605
2606         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
2607         done once, the app has to do it
2608
2609 2003-06-26  Havoc Pennington  <hp@pobox.com>
2610
2611         * mono/Connection.cs: set up connection with the glib main loop
2612
2613 2003-07-01  Havoc Pennington  <hp@redhat.com>
2614
2615         * doc/dbus-specification.sgml: clarify the format of a type code,
2616         change suggested by Jim Blandy
2617
2618 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
2619
2620         * doc/Makefile.am:
2621         * tools/Makefile.am: Don't assume srcdir == builddir.
2622
2623         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
2624         the allocated block.
2625         (_dbus_memory_test): New function.
2626         * dbus/dbus-test.h: Add _dbus_memory_test ().
2627         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
2628
2629         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
2630         of %c%c%c%c.
2631         (dbus_message_new): Remove obsolete @todo.
2632
2633         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
2634         (_dbus_marshal_set_uint64): Fix comment.
2635
2636         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
2637         hardcode FIELD_REPLY_SERIAL.
2638
2639         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
2640         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
2641
2642         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
2643         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
2644
2645 2003-06-24  Havoc Pennington  <hp@pobox.com>
2646
2647         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
2648
2649 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
2650
2651         * configure.in:
2652         * gcj/.cvsignore:
2653         * gcj/Hello.java:
2654         * gcj/Makefile.am:
2655         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
2656         * gcj/org/.cvsignore:
2657         * gcj/org/Makefile.am:
2658         * gcj/org/freedesktop/.cvsignore:
2659         * gcj/org/freedesktop/Makefile.am:
2660         * gcj/org/freedesktop/dbus/.cvsignore:
2661         * gcj/org/freedesktop/dbus/Makefile.am:
2662         * gcj/org/freedesktop/dbus/Message.java: (Message),
2663         (Message.Message):
2664         * gcj/org/freedesktop/dbus/natMessage.cc:
2665         Fix the build system.
2666
2667 2003-06-22  Havoc Pennington  <hp@pobox.com>
2668
2669         * mono/Connection.cs: add more bindings
2670
2671         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
2672         more than once.
2673
2674 2003-06-22  Havoc Pennington  <hp@pobox.com>
2675
2676         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
2677         Start wrapping more stuff.
2678
2679 2003-06-22  Havoc Pennington  <hp@pobox.com>
2680
2681         * mono/Message.cs: implement Message.Wrap() that ensures we only
2682         have a single C# wrapper per DBusMessage, assuming it works which
2683         it probably doesn't.
2684
2685         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
2686         (dbus_message_free_data_slot): new
2687         (dbus_message_set_data): new
2688         (dbus_message_get_data): new
2689
2690 2003-06-22  Havoc Pennington  <hp@pobox.com>
2691
2692         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
2693         (_dbus_data_slot_allocator_alloc): rework these to keep a
2694         reference count on each slot and automatically manage a global
2695         slot ID variable passed in by address
2696
2697         * bus/bus.c: convert to new dataslot API
2698
2699         * dbus/dbus-bus.c: convert to new dataslot API
2700
2701         * dbus/dbus-connection.c: convert to new dataslot API
2702
2703         * dbus/dbus-server.c: convert to new dataslot API
2704
2705         * glib/dbus-gmain.c: ditto
2706
2707         * bus/test.c: ditto
2708
2709         * bus/connection.c: ditto
2710
2711 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
2712
2713         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
2714         after the gcj checks so that the correct configuration tags
2715         will be added to libtool.
2716
2717         * dbus-glib-1.pc.in: No need to specify any includes since
2718         dbus-1.pc.in has those.
2719
2720 2003-06-22  Havoc Pennington  <hp@pobox.com>
2721
2722         * mono/*, gcj/*, configure.in, Makefile.am:
2723         Check in makefiles and subdirs for mono and gcj bindings.
2724         Neither binding actually exists, just trying to get through
2725         all the build and other boring bits.
2726
2727 2003-06-21  Philip Blundell  <philb@gnu.org>
2728
2729         * tools/dbus-monitor.1: Updated.
2730
2731         * tools/dbus-send.1: Likewise.
2732
2733 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
2734
2735         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
2736         for hangup and error after checking read so we won't discard
2737         pending data if both hangup and read are set.
2738
2739 2003-06-19  Philip Blundell  <philb@gnu.org>
2740
2741         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
2742
2743         * tools/dbus-send.c: Accept both --system and --session.
2744
2745         * tools/dbus-monitor.c: Same here.
2746
2747 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
2748
2749         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
2750         from C++ (Patch by Miloslav Trmac).
2751
2752 2003-06-15  Joe Shaw  <joe@assbarn.com>
2753
2754         * configure.in: Check for socklen_t.
2755
2756         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
2757
2758         * test/test-segfault.c: Add #include <sys/time.h>
2759
2760         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
2761         dbus-launch needs it.
2762
2763 2003-06-09  Havoc Pennington  <hp@redhat.com>
2764
2765         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
2766         SUN_LEN, it breaks abstract socket usage
2767
2768         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
2769         starts of lines.
2770
2771 2003-06-04  Havoc Pennington  <hp@pobox.com>
2772
2773         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
2774         using unix:abstract=/foo, and when listening in a tmpdir
2775         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
2776
2777         * dbus/dbus-transport.c (_dbus_transport_open): support
2778         unix:abstract=/foo
2779
2780         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2781         support abstract sockets
2782
2783         * dbus/dbus-transport-unix.c
2784         (_dbus_transport_new_for_domain_socket): support abstract sockets
2785
2786         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
2787         toggle as an argument, implement abstract namespace support
2788         (_dbus_listen_unix_socket): ditto
2789
2790         * configure.in: add --enable-abstract-sockets and implement
2791         a configure check for autodetection of the right value.
2792
2793 2003-06-01  Havoc Pennington  <hp@pobox.com>
2794
2795         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
2796         in /tmp (though on Linux this will end up being useless,
2797         when we add abstract namespace support)
2798
2799         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
2800         subst'ing it
2801
2802 2003-05-28  Colin Walters  <walters@verbum.org>
2803
2804         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
2805
2806 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
2807
2808         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
2809
2810 2003-05-17  Colin Walters  <walters@gnu.org>
2811
2812         * tools/dbus-send.c: Don't exit with an error code if --help was
2813         passed.  Default to using the session bus instead of the system
2814         one.
2815
2816         * tools/dbus-launch.c: Ditto.
2817
2818         * tools/dbus-monitor.c: Ditto.
2819
2820         * tools/dbus-send.1: Update with new arguments.
2821
2822         * tools/dbus-launch.c: Emit code to export variables.  New
2823         arguments -s and -c to specify shell syntax, and a bit of code to
2824         autodetect syntax.  Also, allow specifying a program to run.
2825
2826         * tools/dbus-launch.1: Update with new arguments.
2827
2828         * tools/dbus-send.1: Ditto.
2829
2830         * tools/dbus-monitor.1: Ditto.
2831
2832 2003-05-17  Havoc Pennington  <hp@pobox.com>
2833
2834         * bus/config-parser.c (merge_included): merge in policies from
2835         child configuration file.
2836
2837         * bus/policy.c (bus_policy_merge): function to merge two policies
2838         together
2839
2840 2003-05-16  Havoc Pennington  <hp@redhat.com>
2841
2842         * dbus/dbus-connection.c: disable verbose lock spew
2843
2844         * tools/dbus-send.c: add --print-reply command line option
2845
2846         * tools/dbus-print-message.h (print_message): new util function
2847         shared by dbus-send and dbus-monitor
2848
2849         * tools/dbus-monitor.c (handler_func): exit on disconnect
2850
2851         * dbus/dbus-transport-unix.c (do_reading): if the transport is
2852         disconnected, don't try to use the read_watch
2853
2854         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
2855         so we can find this bug more easily
2856
2857 2003-05-16  Havoc Pennington  <hp@redhat.com>
2858
2859         * bus/policy.c (free_rule_list_func): avoid a crash when passed
2860         NULL as DBusHashTable is annoyingly likely to do.
2861
2862 2003-05-16  Colin Walters  <walters@verbum.org>
2863
2864         * tools/dbus-monitor.c: Add --session argument and usage()
2865         function.
2866
2867         * tools/dbus-monitor.1: Update with new --session arg.
2868
2869         * bus/Makefile.am (install-data-hook): Create
2870         $(libdir)/dbus-1.0/services so that the session bus is happy.
2871
2872 2003-05-15  Havoc Pennington  <hp@redhat.com>
2873
2874         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2875         on non-x86. ifdef's are evil.
2876
2877 2003-05-15  Havoc Pennington  <hp@redhat.com>
2878
2879         * configure.in: 0.11
2880
2881         * NEWS: update
2882
2883         * bus/Makefile.am (initddir): apparently we are supposed to put
2884         init scripts in /etc/rc.d/init.d not /etc/init.d
2885
2886         * bus/Makefile.am: remove the "you must --enable-tests to make
2887         check" as it broke distcheck
2888
2889         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2890
2891 2003-05-13  James Willcox  <jwillcox@gnome.org>
2892
2893         * configure.in:
2894         * bus/activation.c: (bus_activation_service_created),
2895         (bus_activation_activate_service):
2896         * bus/driver.c: (bus_driver_send_service_deleted),
2897         (bus_driver_send_service_created), (bus_driver_send_service_lost),
2898         (bus_driver_send_service_acquired),
2899         (bus_driver_send_welcome_message),
2900         (bus_driver_handle_list_services):
2901         * bus/session.conf.in:
2902         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2903         (dbus_bus_service_exists), (dbus_bus_activate_service):
2904         * dbus/dbus-bus.h:
2905
2906         Add some convenience API which lets you activate a service, and did a
2907         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2908         and dbus_message_get_args()
2909
2910 2003-05-11  Havoc Pennington  <hp@pobox.com>
2911
2912         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2913         calling _dbus_marshal_validate_arg() for every byte in a byte
2914         array, etc.
2915
2916         * dbus/dbus-message-handler.c: use atomic reference counting to
2917         reduce number of locks slightly; the global lock in here sucks
2918
2919         * dbus/dbus-connection.c
2920         (_dbus_connection_update_dispatch_status_and_unlock): variant of
2921         update_dispatch_status that can be called with lock held; then use
2922         in a couple places to reduce locking/unlocking
2923         (dbus_connection_send): hold the lock over the whole function
2924         instead of acquiring it twice.
2925
2926         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2927
2928         * bus/connection.c (bus_connections_setup_connection): fix access
2929         to already-freed memory.
2930
2931         * dbus/dbus-connection.c: keep a little cache of linked list
2932         nodes, to avoid using the global linked list alloc lock in the
2933         normal send-message case. Instead we just use the connection lock
2934         that we already have to take.
2935
2936         * dbus/dbus-list.c (_dbus_list_find_last): new function
2937
2938         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2939         change to use a struct for the atomic type; fix docs,
2940         they return value before increment, not after increment.
2941
2942         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2943         (_dbus_string_append_8_aligned): new functions to try to
2944         microoptimize this operation.
2945         (reallocate_for_length): break this out of set_length(), to
2946         improve profile info, and also so we can consider inlining the
2947         set_length() part.
2948
2949         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2950         strings with some preallocation, cuts down on our calls to realloc
2951         a fair bit. Though if we can get the "move entire string to empty
2952         string" optimization below to kick in here, it would be better.
2953
2954         * dbus/dbus-string.c (_dbus_string_move): just call
2955         _dbus_string_move_len
2956         (_dbus_string_move_len): add a special case for moving
2957         an entire string into an empty string; we can just
2958         swap the string data instead of doing any reallocs.
2959         (_dbus_string_init_preallocated): new function
2960
2961 2003-05-11  Havoc Pennington  <hp@pobox.com>
2962
2963         Write a "test-profile" that does echo client-server with threads;
2964         profile reveals lock contention, memcpy/realloc of buffers, and
2965         UTF-8 validation as hot spots. 20% of lock contention eliminated
2966         with dbus_atomic_inc/dec implementation on x86.  Much remaining
2967         contention is global mempool locks for GList and DBusList.
2968
2969         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2970         x86 implementation
2971
2972         * dbus/dbus-connection.c (struct DBusConnection): use
2973         dbus_atomic_t for the reference count
2974
2975         * dbus/dbus-message.c (struct DBusMessage): declare
2976         dbus_atomic_t values as volatile
2977
2978         * configure.in: code to detect ability to use atomic integer
2979         operations in assembly, from GLib patch
2980
2981         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2982         time, tired of it being wrong in threads and forked processes
2983
2984         * glib/test-profile.c: a little program to bounce messages back
2985         and forth between threads and eat CPU
2986
2987         * dbus/dbus-connection.c: add debug spew macros for debugging
2988         thread locks; include config.h at top; fix deadlock in
2989         dbus_connection_flush()
2990
2991 2003-05-08  Havoc Pennington  <hp@pobox.com>
2992
2993         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2994         data from getting written, and there wasn't a good reason to
2995         use _exit really.
2996
2997         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2998         dbus_verbose lines in test coverage
2999         (main): add list of functions sorted by # of untested blocks
3000         to the coverage report
3001
3002         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
3003
3004         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
3005
3006         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
3007         extend test coverage
3008
3009         * test/data/auth/cancel.auth-script: test canceling an
3010         authentication
3011
3012         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
3013         aren't used. in CVS history if we end up needing them.
3014
3015 2003-05-04  Havoc Pennington  <hp@pobox.com>
3016
3017         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
3018         unit test
3019
3020         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
3021         function, which assumed length was in # of strings, not bytes
3022
3023         * dbus/dbus-message.c (_dbus_message_test): add tests for some
3024         missing coverage
3025
3026         * dbus/dbus-connection.c
3027         (_dbus_connection_queue_received_message): disable function for
3028         now, we are only using it in test mode
3029
3030         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3031         remove a mistaken FIXME
3032
3033 2003-05-04  Havoc Pennington  <hp@pobox.com>
3034
3035         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
3036         unlock mutex on successful return, patch from Anders Gustafsson
3037
3038 2003-05-04  Havoc Pennington  <hp@pobox.com>
3039
3040         * dbus-glib-1.pc.in (Requires): fix dependencies, from
3041         Anders Gustafsson
3042
3043 2003-05-04  Havoc Pennington  <hp@pobox.com>
3044
3045         * tools/dbus-launch.c: implement
3046
3047         * bus/main.c (main), bus/bus.c (bus_context_new):
3048         implement --print-pid and --fork
3049
3050 2003-05-03  Havoc Pennington  <hp@redhat.com>
3051
3052         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
3053         the address had no value, and add to test suite. Fix and
3054         regression test from Miloslav Trmac
3055
3056 2003-05-03  Havoc Pennington  <hp@pobox.com>
3057
3058         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
3059         watch is invalid when handled
3060
3061         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
3062         dbus-launch utility to launch the bus from a shell script.  Didn't
3063         actually implement dbus-launch yet, it's just a placeholder still.
3064
3065 2003-05-03  Havoc Pennington  <hp@pobox.com>
3066
3067         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
3068         daemon; also documents daemon config file, so replaces
3069         doc/config-file.txt. Corrected some stuff from config-file.txt in
3070         the process of moving it.
3071
3072 2003-05-03  Havoc Pennington  <hp@pobox.com>
3073
3074         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
3075         add some man pages
3076
3077 2003-05-03  Colin Walters  <walters@verbum.org>
3078
3079         * dbus/dbus-sysdeps.c (fill_user_info): Test against
3080         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
3081
3082         * Makefile.am: Update to use new .pc versioning scheme.
3083
3084 2003-05-02  Havoc Pennington  <hp@redhat.com>
3085
3086         * bus/system.conf.in: allow send/receive to/from message bus
3087         service
3088
3089 2003-04-30  Havoc Pennington  <hp@redhat.com>
3090
3091         * configure.in: print a note when building with unit tests and
3092         without assertions
3093
3094 2003-04-30  Havoc Pennington  <hp@redhat.com>
3095
3096         * Makefile.am: add a check-local that complains if you didn't
3097         configure with --enable-tests
3098
3099 2003-04-29  Havoc Pennington  <hp@redhat.com>
3100
3101         * glib/dbus-gmain.c: docs cleanups
3102
3103         * dbus/dbus-types.h: add docs on int64 types
3104
3105         * dbus/dbus-memory.c: fix docs to avoid putting private API in
3106         public API docs section
3107
3108 2003-04-29  Havoc Pennington  <hp@redhat.com>
3109
3110         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
3111         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
3112         parallel install API version, not with the D-BUS package version.
3113
3114         * HACKING: move some of README over here
3115
3116         * README: updates, and document API/ABI policy
3117
3118         * configure.in: reindentation
3119
3120 2003-04-29  Havoc Pennington  <hp@redhat.com>
3121
3122         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
3123         to use this library" to be sure people have the right
3124         expectations.
3125
3126 2003-04-28  Havoc Pennington  <hp@redhat.com>
3127
3128         * configure.in: add --enable-docs which by default is auto yes if
3129         doxygen and db2html found, no otherwise; but can be forced on/off
3130
3131         * doc/Makefile.am: conditionalize whether to build docs on
3132         --enable-docs
3133
3134 2003-04-28  Havoc Pennington  <hp@redhat.com>
3135
3136         * configure.in: 0.10
3137
3138         * NEWS: update
3139
3140         * bus/system.conf.in: add <includedir>system.d</includedir>
3141
3142         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
3143         username was provided but not uid
3144
3145         * bus/config-parser.c (struct BusConfigParser): keep track of
3146         whether the parser is toplevel or was included; change some
3147         of the error handling if it's included.
3148
3149 2003-04-27  Havoc Pennington  <hp@pobox.com>
3150
3151         Unbreak my code...
3152
3153         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3154         report correct status if we finish processing authentication
3155         inside this function.
3156
3157         * bus/activation.c (try_send_activation_failure): use
3158         bus_transaction_send_error_reply
3159
3160         * bus/connection.c (bus_connection_get_groups): return an error
3161         explaining the problem
3162
3163         * bus/bus.c (bus_context_check_security_policy): implement
3164         restriction here that inactive connections can only send the
3165         hello message. Also, allow bus driver to send anything to
3166         any recipient.
3167
3168         * bus/connection.c (bus_connection_complete): create the
3169         BusClientPolicy here instead of on-demand.
3170         (bus_connection_get_policy): don't return an error
3171
3172         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
3173         sender field in message being replied to
3174
3175         * bus/bus.c (bus_context_check_security_policy): fix silly typo
3176         causing it to return FALSE always
3177
3178         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
3179         we checked sender rather than destination
3180
3181 2003-04-25  Havoc Pennington  <hp@redhat.com>
3182
3183         test suite is slightly hosed at the moment, will fix soon
3184
3185         * bus/connection.c (bus_connections_expire_incomplete): fix to
3186         properly disable the timeout when required
3187         (bus_connection_set_name): check whether we can remove incomplete
3188         connections timeout after we complete each connection.
3189
3190         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
3191         probably still broken.
3192
3193         * bus/services.c (bus_registry_acquire_service): implement max
3194         number of services owned, and honor allow/deny rules on which
3195         services a connection can own.
3196
3197         * bus/connection.c (bus_connection_get_policy): report errors here
3198
3199         * bus/activation.c: implement limit on number of pending
3200         activations
3201
3202 2003-04-25  Havoc Pennington  <hp@redhat.com>
3203
3204         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
3205         where we used >= 0 instead of != DBUS_UID_UNSET.
3206
3207 2003-04-25  Havoc Pennington  <hp@redhat.com>
3208
3209         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
3210         were toggled without add/remove, fix from Anders Gustafsson
3211
3212 2003-04-24  Havoc Pennington  <hp@redhat.com>
3213
3214         * test/data/valid-config-files/basic.conf: add <limit> tags to
3215         this test
3216
3217         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
3218         <limit> tag in configuration file.
3219
3220 2003-04-24  Havoc Pennington  <hp@redhat.com>
3221
3222         * bus/dispatch.c: somehow missed some name_is
3223
3224         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
3225         (_dbus_timeout_set_interval): new
3226
3227         * bus/connection.c (bus_connections_setup_connection): record time
3228         when each connection is first set up, and expire them after the
3229         auth timeout passes.
3230
3231 2003-04-24  Havoc Pennington  <hp@redhat.com>
3232
3233         * dbus/dbus-message.c (dbus_message_name_is): rename
3234         (dbus_message_service_is): rename
3235         (dbus_message_sender_is): rename
3236         (dbus_message_get_service): rename
3237
3238 2003-04-24  Havoc Pennington  <hp@redhat.com>
3239
3240         * configure.in: add --enable-checks
3241
3242         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
3243
3244         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
3245         to use thread locks.
3246         (_dbus_connection_handler_destroyed_locked): move some private
3247         functions into proper docs group
3248
3249         * dbus/dbus-internals.h: add _dbus_return_if_fail,
3250         _dbus_return_val_if_fail
3251
3252         Throughout: use dbus_return_if_fail
3253
3254 2003-04-23  James Willcox  <jwillcox@gnome.org>
3255
3256         * glib/dbus-glib.h:
3257         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
3258         (dbus_connection_setup_with_g_main),
3259         (dbus_server_setup_with_g_main):
3260         * glib/test-dbus-glib.c: (main):
3261         * glib/test-thread-client.c: (main):
3262         * glib/test-thread-server.c: (new_connection_callback), (main):
3263         * tools/dbus-monitor.c: (main):
3264
3265         Added a GMainContext argument to dbus_connection_setup_with_g_main()
3266         and dbus_server_setup_with_g_main().
3267
3268 2003-04-20  Havoc Pennington  <hp@pobox.com>
3269
3270         * doc/dbus-specification.sgml: document the restrictions on
3271         message and service names
3272
3273 2003-04-22  Havoc Pennington  <hp@redhat.com>
3274
3275         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
3276         support, and do some code cleanups to share more code and
3277         speed up array marshal/demarshal.
3278
3279         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
3280
3281         * configure.in: generate dbus-arch-deps.h
3282
3283         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
3284         64-bit typecodes
3285
3286 2003-04-22  Havoc Pennington  <hp@redhat.com>
3287
3288         * test/data/valid-messages/opposite-endian.message: fix test
3289         to use proper type for rply field
3290
3291         * test/data/invalid-messages: add tests for below validation
3292
3293         * dbus/dbus-message.c (decode_header_data): validate field types,
3294         and validate that named fields are valid names
3295         (decode_name_field): consider messages in the
3296         org.freedesktop.Local. namespace to be invalid.
3297
3298         * dbus/dbus-string.c (_dbus_string_validate_name): new
3299
3300 2003-04-19  Havoc Pennington  <hp@pobox.com>
3301
3302         * bus/driver.c (bus_driver_handle_hello): check limits and
3303         return an error if they are exceeded.
3304
3305         * bus/connection.c: maintain separate lists of active and inactive
3306         connections, and a count of each. Maintain count of completed
3307         connections per user. Implement code to check connection limits.
3308
3309         * dbus/dbus-list.c (_dbus_list_unlink): export
3310
3311         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
3312         number of bytes in the message queue for a connection
3313
3314 2003-04-18  Havoc Pennington  <hp@pobox.com>
3315
3316         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
3317
3318         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
3319         memleaks
3320
3321         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
3322         on realloc be sure to update the pointer in the keyring
3323
3324         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
3325         offset to avoid writing to unallocated memory
3326
3327         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
3328         try the next mechanism, so we properly handle OOM
3329
3330         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
3331         on OOM.
3332         (_dbus_keyring_new): fix OOM bug
3333         (_dbus_keyring_new_homedir): always set error; impose a maximum
3334         number of keys we'll load from the file, mostly to speed up the
3335         test suite and make its OOM checks more useful, but also for
3336         general sanity.
3337
3338         * dbus/dbus-auth.c (process_error_server): reject authentication
3339         if we get an error from the client
3340         (process_cancel): on cancel, send REJECTED, per the spec
3341         (process_error_client): send CANCEL if we get an error from the
3342         server.
3343
3344 2003-04-18  Havoc Pennington  <hp@pobox.com>
3345
3346         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
3347         debug spew
3348
3349         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
3350         handling problem
3351
3352         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
3353         about DBUS_TEST_HOMEDIR once
3354
3355         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
3356         the environment
3357
3358         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
3359         config file so we test the right thing
3360
3361         Throughout: assorted docs improvements
3362
3363 2003-04-18  Havoc Pennington  <hp@pobox.com>
3364
3365         * glib/dbus-gmain.c: adapt to watch changes
3366
3367         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
3368
3369         * dbus/dbus-server.h: remove dbus_server_handle_watch
3370
3371         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
3372
3373         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
3374         like DBusTimeout, so we don't need dbus_connection_handle_watch
3375         etc.
3376
3377 2003-04-17  Havoc Pennington  <hp@redhat.com>
3378
3379         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
3380         database usage so it all goes via the DBusUserDatabase cache.
3381
3382 2003-04-17  Havoc Pennington  <hp@redhat.com>
3383
3384         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
3385         there was an OOM watch we skipped, we always return TRUE so we
3386         iterate again to have a look at it again. Fixes test suite hang.
3387         Code rearrangement also lets us lose some memset and only iterate
3388         over callbacks once.
3389
3390         * bus/driver.c (bus_driver_handle_message): sense of test for
3391         reply was backward
3392
3393 2003-04-16  Havoc Pennington  <hp@pobox.com>
3394
3395         * doc/dbus-specification.sgml: make spec say serials are unsigned
3396
3397         * dbus/dbus-message.h: change message serials to unsigned
3398
3399         * dbus/dbus-connection.c: adapt to message serials being unsigned
3400
3401 2003-04-15  Havoc Pennington  <hp@pobox.com>
3402
3403         * bus/bus.c: create and keep around a shared DBusUserDatabase
3404         object.
3405
3406         * bus/connection.c (bus_connection_get_groups): don't cache
3407         groups for user in the connection object, since user database
3408         object now does that.
3409
3410 2003-04-16  Havoc Pennington  <hp@redhat.com>
3411
3412         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
3413         list of size counters
3414         (_dbus_message_loader_putback_message_link): put back a popped link
3415
3416         * dbus/dbus-connection.c
3417         (dbus_connection_set_max_live_messages_size): rename
3418         max_received_size
3419         (dbus_connection_get_outgoing_size): get size of outgoing
3420         queue
3421         (_dbus_connection_set_connection_counter): remove this cruft
3422
3423 2003-04-14  Havoc Pennington  <hp@redhat.com>
3424
3425         * dbus/dbus-userdb.c: user database abstraction, mostly to get
3426         caching, but at some point we might want to be able to use a
3427         different database.
3428
3429         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
3430         SHA1 conf file to test the sha1 auth mechanism, since the regular
3431         test always uses EXTERNAL when available.
3432
3433         * configure.in,
3434         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
3435         add conf file that requires use of sha1 auth
3436
3437 2003-04-13  Havoc Pennington  <hp@pobox.com>
3438
3439         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
3440         from Philip Blundell to send messages and monitor them.
3441
3442 2003-04-13  Havoc Pennington  <hp@pobox.com>
3443
3444         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
3445         callbacks
3446
3447         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
3448         users
3449
3450         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
3451         fix to only recover unused bytes if we're already authenticated
3452         (_dbus_transport_get_is_authenticated): fix to still mark us
3453         authenticated if there are unused bytes.
3454
3455         * bus/dispatch.c: implement security policy checking
3456
3457         * bus/connection.c (bus_transaction_send_from_driver): new
3458
3459         * bus/bus.c (bus_context_check_security_policy): new
3460
3461         * bus/dispatch.c (send_service_nonexistent_error): delete this,
3462         now we just set the DBusError and it gets converted to an error
3463         reply.
3464
3465         * bus/connection.c (allow_user_function): enable code using actual
3466         data from the config file
3467
3468         * bus/policy.c (list_allows_user): handle wildcard rules for
3469         user/group connection perms
3470
3471 2003-04-13  Havoc Pennington  <hp@pobox.com>
3472
3473         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
3474
3475         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
3476
3477         * bus/policy.c (bus_policy_append_mandatory_rule)
3478         (bus_policy_append_default_rule, bus_policy_append_user_rule)
3479         (bus_policy_append_group_rule): new functions
3480
3481 2003-04-12  Havoc Pennington  <hp@pobox.com>
3482
3483         * bus/config-parser.c (bus_config_parser_new): fix a memleak
3484
3485         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
3486         the pid/gid/uid, just for paranoia.
3487
3488         * test/break-loader.c (randomly_do_n_things): find a byte
3489         containing a type code, and randomly change it to a different
3490         type code.
3491
3492 2003-04-12  Havoc Pennington  <hp@pobox.com>
3493
3494         * bus/policy.h: change BusPolicy to be the thing from the config
3495         file, and rename old BusPolicy to BusClientPolicy
3496
3497         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
3498         match change in how policy works
3499
3500         * dbus/dbus-internals.h: mark assert_not_reached as
3501         __attribute((noreturn))__
3502
3503 2003-04-11  Havoc Pennington  <hp@redhat.com>
3504
3505         * doc/dbus-specification.sgml: fix a spot with the wrong name for
3506         the broadcast service. Use boolean return for ServiceExists.
3507
3508 2003-04-11  Havoc Pennington  <hp@redhat.com>
3509
3510         * configure.in: add another directory to look for qt in.
3511
3512 2003-04-11  Havoc Pennington  <hp@redhat.com>
3513
3514         * AUTHORS: add Colin Walters
3515
3516 2003-04-11  Havoc Pennington  <hp@redhat.com>
3517
3518         * NEWS: update
3519
3520         * configure.in: 0.9
3521
3522 2003-04-11  Havoc Pennington  <hp@redhat.com>
3523
3524         * bus/messagebus.in: remove pid file when stopping the
3525         message bus, since the bus won't have privileges to remove it
3526         itself.
3527
3528 2003-04-11  Havoc Pennington  <hp@redhat.com>
3529
3530         * bus/bus.c (bus_context_new): move credentials change after
3531         creating pidfile
3532
3533 2003-04-11  Havoc Pennington  <hp@pobox.com>
3534
3535         * test/decode-gcov.c: add "below average functions" to the
3536         coverage report, and change how some of the code works.
3537
3538         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
3539         not in the coverage stats.
3540
3541         * test/test-service.c (main): use _dbus_verbose not fprintf in a
3542         couple places so running the test suite doesn't result in megaspam.
3543
3544 2003-04-11  Havoc Pennington  <hp@pobox.com>
3545
3546         * bus/dispatch.c (check_existent_service_activation): accept a no
3547         memory error in a place we didn't before
3548
3549         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
3550         in case the first one failed," since the test suite is less
3551         broken now.
3552
3553 2003-04-10  Havoc Pennington  <hp@pobox.com>
3554
3555         * bus/dispatch.c (check_segfault_service_activation): add test
3556         for launching an executable that just crashes.
3557
3558         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
3559         don't leave a million cores. We'll see how portable this is.
3560
3561 2003-04-10  Havoc Pennington  <hp@pobox.com>
3562
3563         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
3564         the possible parent failures before we fork, so that we don't
3565         fail to create a babysitter after creating the child.
3566
3567         * bus/activation.c (bus_activation_activate_service): kill child
3568         if we don't successfully complete the activation.
3569
3570 2003-04-10  Havoc Pennington  <hp@redhat.com>
3571
3572         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
3573         the connection if it's disconnected
3574
3575         * bus/activation.c (bus_activation_service_created): use new
3576         transaction features to roll back removal of pending activation if
3577         we don't successfully create the service after all. Don't remove
3578         pending activation if the function fails.
3579
3580         * dbus/dbus-list.c (_dbus_list_insert_before_link)
3581         (_dbus_list_insert_after_link): new code to facilitate
3582         services.c fixes
3583
3584         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
3585         new functionality, so we can preallocate the ability to insert
3586         into a hash table.
3587
3588         * bus/connection.c (bus_transaction_add_cancel_hook): new function
3589         allowing us to put custom hooks in a transaction to be used for
3590         cancelling said transaction
3591
3592         * doc/dbus-specification.sgml: add some discussion of secondary
3593         service owners, and disallow zero-length service names
3594
3595         * bus/services.c (bus_registry_acquire_service): new function,
3596         splits out part of bus_driver_handle_acquire_service() and fixes
3597         a bug where we didn't remove the service doing the acquiring
3598         from the secondary queue if we failed to remove the current owner
3599         from the front of the queue.
3600
3601 2003-04-10  Alexander Larsson  <alexl@redhat.com>
3602
3603         * doc/dbus-specification.sgml:
3604         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
3605
3606 2003-04-10  Alexander Larsson  <alexl@redhat.com>
3607
3608         * bus/.cvsignore:
3609         * glib/.cvsignore:
3610         * test/.cvsignore:
3611         Added files to cvsignore
3612
3613         * dbus/dbus-message.h:
3614         * dbus/dbus-message.c: (dbus_message_iter_get_named):
3615         Make get_named() take two out argument and return a boolean.
3616         (dbus_message_iter_get_args_valist):
3617         Update usage of get_named().
3618         (dbus_message_iter_append_byte):
3619         Fix typo
3620         (dbus_message_iter_append_named)
3621         Fix typo
3622         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
3623         More tests.
3624
3625 2003-04-10  Alexander Larsson  <alexl@redhat.com>
3626
3627         * dbus/dbus-marshal.[ch]:
3628         Add array_type_pos argument to _dbus_marshal_validate_arg.
3629         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
3630
3631         * dbus/dbus-message.[ch]:
3632         Multi-dimensional arrays have full type specification in the
3633         outermost array. Iter code re-arranged to handle this.
3634         Added some more iter tests.
3635
3636         * doc/dbus-specification.sgml:
3637         Add me to authors.
3638         Remove old FIXME.
3639         Update new array encoding description.
3640         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
3641
3642         * test/data/invalid-messages/array-with-mixed-types.message:
3643         * test/data/valid-messages/array-of-array-of-uint32.message:
3644         Change to the new array format.
3645
3646         * test/data/invalid-messages/too-short-dict.message:
3647         Fix bug in test.
3648
3649         * test/data/valid-messages/recursive-types.message:
3650         Fix up and extend test.
3651
3652 2003-04-10  Havoc Pennington  <hp@pobox.com>
3653
3654         * bus/dispatch.c: lots of fixes
3655
3656         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
3657         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
3658         that was crack, broke the test service.
3659
3660         * dbus/dbus-transport.c (_dbus_transport_open): fix error
3661         handling to avoid piling up errors if we get a failure on the
3662         first address.
3663
3664         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
3665         pid in assertion failures.
3666
3667         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
3668         to some fixed size of file descriptor array. Don't return TRUE
3669         anytime a timeout exists, that led to lots of busy loop silliness
3670         in the tests.
3671
3672 2003-04-09  Havoc Pennington  <hp@redhat.com>
3673
3674         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
3675         I'd checked this in earlier but hadn't.
3676
3677 2003-04-09  Havoc Pennington  <hp@redhat.com>
3678
3679         * bus/dispatch.c (bus_dispatch_test): get a bit further through
3680         the activation test (man this is getting old!)
3681
3682 2003-04-09  Havoc Pennington  <hp@redhat.com>
3683
3684         * test/test-utils.c: use dispatch status function to fix this up
3685
3686         * bus/connection.c (connection_watch_callback): don't dispatch
3687         from here
3688         (connection_timeout_callback): don't dispatch from here
3689         (bus_connections_setup_connection): set the dispatch status function
3690         (bus_connection_disconnected): unset it
3691
3692         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
3693         used to add a connection to be dispatched
3694         (_dbus_loop_iterate): do the dispatching at the end of each
3695         iteration
3696
3697         * dbus/dbus-connection.c
3698         (dbus_connection_set_dispatch_status_function): new function
3699         allowing us to fix up main loop usage
3700         (_dbus_connection_last_unref): free all the various function
3701         user data
3702         (dbus_connection_dispatch): call the DispatchStatusFunction
3703         whenever this function returns
3704         (dbus_connection_handle_watch): call DispatchStatusFunction
3705         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
3706         (reply_handler_timeout): call DispatchStatusFunction
3707         (dbus_connection_flush): call DispatchStatusFunction
3708
3709 2003-04-09  Havoc Pennington  <hp@redhat.com>
3710
3711         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
3712         a memory leak
3713
3714         * bus/dispatch.c (check_service_activated): fix bug in test
3715
3716         * dbus/dbus-mainloop.c (check_timeout): fix this up
3717
3718         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
3719         verbose output so we can sort out output from different processes,
3720         e.g. in the activation case.
3721
3722 2003-04-08  Colin Walters  <walters@gnu.org>
3723
3724         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
3725         the pid file.
3726         (bus_context_new): Set it.
3727         (bus_context_unref): Use it to delete the pid file.
3728
3729 2003-04-08  Havoc Pennington  <hp@redhat.com>
3730
3731         * test/data/invalid-messages/array-with-mixed-types.message:
3732         regression test that fails for the moment
3733
3734         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
3735         tests for convenience
3736
3737         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
3738         array of nil, it broke things.
3739
3740         * test/data/invalid-messages/array-of-nil.message: regression test
3741
3742         * test/data/valid-messages/array-of-array-of-uint32.message:
3743         happened to write this so added it to suite
3744
3745 2003-04-08  Havoc Pennington  <hp@redhat.com>
3746
3747         * bus/driver.c (bus_driver_handle_acquire_service): init
3748         retval/reply before checking name
3749
3750         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
3751         recursion depth argument
3752
3753         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
3754         in the public struct for future extension
3755
3756         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
3757         typo
3758
3759         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
3760         message
3761
3762         * doc/dbus-specification.sgml: fix typo
3763
3764 2003-04-08  Alexander Larsson  <alexl@redhat.com>
3765
3766         Implemented recursive types, named types and new-style iters
3767
3768         * bus/driver.c:
3769         * glib/test-thread-client.c: (thread_func):
3770         * glib/test-thread-server.c: (handle_test_message):
3771         * test/test-service.c: (handle_echo):
3772         Update to new api
3773
3774         * dbus/Makefile.am:
3775         * dbus/dbus-dict.c:
3776         * dbus/dbus-dict.h:
3777         * dbus/dbus.h
3778         Remove DBusDict
3779
3780         * dbus/dbus-internals.c: (_dbus_type_to_string):
3781         Update for new types.
3782
3783         * dbus/dbus-marshal.[ch]:
3784         Implement recursive types and the new marshalling format.
3785         Remove hardcoded dict marshalling.
3786         Marshal named types.
3787
3788         * dbus/dbus-message-builder.c:
3789         Add BYTE_ARRAY.
3790         Remove references to old types
3791
3792         * dbus/dbus-message.[ch]:
3793         New non-refcounted iter API that supports recursive iters.
3794         Use iters for appending, including support for recursive
3795         iters.
3796         Add byte and named type support.
3797         Update everything to new marshalling formats.
3798         Add tests for new API.
3799
3800         * dbus/dbus-protocol.h:
3801         Remove old array types.
3802         Add types: BYTE, ARRAY, DICT, NAMED
3803
3804         * dbus/dbus-string.c:
3805         * dbus/dbus-sysdeps.c:
3806         Make parse_double locale safe.
3807
3808         * dbus/dbus-test-main.c:
3809         Call setlocale.
3810
3811         * dbus/dbus-test.c:
3812         Kill dict test
3813
3814         * doc/dbus-specification.sgml:
3815         Update spec
3816
3817         * test/data/incomplete-messages/missing-body.message:
3818         * test/data/invalid-messages/bad-boolean.message:
3819         * test/data/invalid-messages/bad-boolean-array.message:
3820         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
3821         * test/data/invalid-messages/boolean-has-no-value.message-raw:
3822         * test/data/invalid-messages/too-short-dict.message:
3823         * test/data/valid-messages/dict-simple.message:
3824         * test/data/valid-messages/dict.message:
3825         * test/data/valid-messages/emptiness.message:
3826         * test/data/valid-messages/lots-of-arguments.message:
3827         * test/data/valid-messages/no-padding.message:
3828         * test/data/valid-messages/recursive-types.message:
3829         Add missing NAME fields
3830         Fix up dicts & arrays
3831
3832         * test/data/invalid-messages/dict-with-nil-value.message:
3833         Removed, this is not invalid anymore.
3834
3835         * test/data/valid-messages/recursive-types.message:
3836         Add new test for deeply recursive types.
3837
3838 2003-04-07  Havoc Pennington  <hp@pobox.com>
3839
3840         * bus/driver.c (bus_driver_handle_acquire_service): return an
3841         error if you try to acquire a service that starts with ':'
3842
3843 2003-04-07  Havoc Pennington  <hp@redhat.com>
3844
3845         * doc/dbus-specification.sgml: require that base service names
3846         start with ':' and that the base service is created/deleted
3847         as first and last things a connection does on the bus
3848
3849         * bus/dispatch.c (check_existent_service_activation): lots more
3850         work on the activation test; it doesn't fully pass yet...
3851
3852         * test/test-service.c (main): fix so we don't memleak the
3853         connection to the message bus
3854         (filter_func): accept a message asking us to exit
3855
3856 2003-04-06  Havoc Pennington  <hp@pobox.com>
3857
3858         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3859         from Colin Walters
3860
3861         * configure.in: fixes to Qt detection from Colin Walters
3862
3863         * doc/Makefile.am: Only remove generated docbook dirs if they
3864         exist, from Colin Walters
3865
3866         * dbus/dbus-bus.c: change how we set well-known connections to
3867         NULL, so that it works if a single connection is stored in
3868         two well-known array slots.
3869
3870         * test/Makefile.am: remove a lot of stuff that isn't immediately
3871         useful, it's in CVS history if we want it.
3872
3873         * test/test-service.c: use dbus-mainloop instead of that
3874         watch.[hc] crack
3875
3876 2003-04-06  Havoc Pennington  <hp@pobox.com>
3877
3878         * dbus/Makefile.am: split lists of sources into stuff that goes in
3879         the library, util functions that go in the lib and are also used
3880         elsewhere, and util functions that are used in tests/daemon but
3881         don't go in the lib.
3882
3883         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3884         here so it can be used in test binaries also
3885
3886 2003-04-06  Havoc Pennington  <hp@pobox.com>
3887
3888         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3889         here in the parent process, so we can return an error if it
3890         fails. Also, move some of the code into the child so the parent
3891         is less hosed if we fail midway through.
3892
3893         * bus/bus.c (bus_context_new): move pidfile detection further up
3894         in the function, before we start overwriting sockets and such.
3895
3896         * bus/messagebus.in: adjust this a bit, not sure if it will work.
3897
3898         * configure.in: add --with-system-pid-file and --with-system-socket
3899
3900 2003-04-06  Colin Walters  <walters@verbum.org>
3901
3902         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3903
3904         * bus/system.conf.in: Declare a pidfile.
3905
3906         * bus/bus.c (bus_context_new): Test for an existing pid file, and
3907         create one (if appropriate).
3908
3909         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3910         (struct BusConfigParser) [pidfile]: New.
3911         (element_type_to_name, merge_included, start_busconfig_child)
3912         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3913         (bus_config_parser_unref): Free it.
3914         (bus_config_parser_get_pidfile): New function.
3915
3916         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3917
3918         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3919
3920         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3921
3922         * dbus/dbus-sysdeps.h: Prototype it.
3923
3924 2003-04-06  Havoc Pennington  <hp@pobox.com>
3925
3926         * bus/bus.c (bus_context_new): print the address in here, rather
3927         than in main(), because we need to do it before forking the daemon
3928
3929         * bus/dispatch.c (send_service_nonexistent_error): set the sender
3930         on the service nonexistent error
3931
3932         * bus/driver.c (bus_driver_handle_acquire_service): set the
3933         sender on the AcquireService reply
3934
3935         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3936         server also listen on a UNIX socket so services can connect to it.
3937
3938 2003-04-06  Havoc Pennington  <hp@pobox.com>
3939
3940         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3941         so it detects deadlocks and also we actually init threads when
3942         debugging.
3943
3944 2003-04-06  Havoc Pennington  <hp@pobox.com>
3945
3946         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3947         save the domain socket name, and unlink it when we disconnect the
3948         server. Means that at least when we exit normally, we won't leave
3949         a bunch of junk in /tmp
3950
3951         * dbus/dbus-transport-unix.c
3952         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3953         memory management). (I was making a real change here but then
3954         didn't)
3955
3956 2003-04-06  Havoc Pennington  <hp@pobox.com>
3957
3958         * bus/bus.c (bus_context_new): fix wrong handling of
3959         server_data_slot_unref() in the error case.
3960
3961         * dbus/dbus-internals.h (_dbus_assert): change so it passes
3962         "(condition) != 0" to _dbus_real_assert so that
3963         "_dbus_assert (pointer)" doesn't cause a warning
3964
3965         * bus/main.c (main): accept --print-address option to print out
3966         the message bus address
3967
3968         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3969
3970         * dbus/dbus-transport.c (_dbus_transport_open): special error for
3971         "tmpdir" option to unix: address on client side
3972
3973         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3974         to unix: address
3975
3976         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3977         we can use to create sockets in the test suite.
3978
3979         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3980         cleanly. To be used for testing.
3981
3982         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3983
3984         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3985
3986         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3987         handle trying to call this when there's no servers active
3988
3989 2003-04-05  Havoc Pennington  <hp@pobox.com>
3990
3991         * NEWS: update
3992
3993         * configure.in: 0.8
3994
3995 2003-04-05  Havoc Pennington  <hp@pobox.com>
3996
3997         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3998         crash on startup. Need to get "try starting the daemon"
3999         in the test suite I guess. ;-)
4000
4001         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
4002         tracked the number of open connections; it's better done in
4003         application-specific code as you want it to span all servers etc.
4004
4005 2003-04-05  Havoc Pennington  <hp@pobox.com>
4006
4007         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
4008         patch from Colin Walters
4009
4010 2003-04-05  Havoc Pennington  <hp@pobox.com>
4011
4012         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
4013         reality; in fact multiple mechanisms are allowed.
4014
4015         * dbus/dbus-internals.c (_dbus_real_assert)
4016         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
4017         _dbus_assert_not_reached() into functions, so that they don't show
4018         up in basic block counts for test coverage, and don't use up as
4019         much disk space. Does mean slower execution speed though, so
4020         assumes --disable-asserts is the normal production case.
4021
4022 2003-04-05  Havoc Pennington  <hp@pobox.com>
4023
4024         * test/Makefile.am (dist-hook): also dist *.in files
4025
4026         * NEWS: update
4027
4028         * configure.in: 0.7
4029
4030 2003-04-05  Havoc Pennington  <hp@pobox.com>
4031
4032         * dbus/dbus-string.c: docs warning
4033
4034         * dbus/dbus-spawn.c: missing docs
4035
4036         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
4037
4038 2003-04-05  Havoc Pennington  <hp@pobox.com>
4039
4040         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
4041         magic from GLib
4042
4043         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
4044         to -1 once we've reaped the babysitter
4045         (_dbus_babysitter_handle_watch): do as much work as we can, not
4046         just one go of it
4047
4048         * bus/activation.c: add code using DBusBabysitter so that we
4049         handle it when a service fails to start up properly.
4050         (bus_activation_service_created): don't remove the activation
4051         entries as we go, just let them get removed when we free the pending
4052         activation. Unref reply messages after sending them.
4053
4054 2003-04-05  Havoc Pennington  <hp@pobox.com>
4055
4056         * test/decode-gcov.c (main): print per-directory stats in the report
4057
4058         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
4059
4060 2003-04-05  Havoc Pennington  <hp@pobox.com>
4061
4062         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
4063
4064         * test/decode-gcov.c: hack up a little program to suck data
4065         out of gcov files. Yes this is sort of silly.
4066
4067         * configure.in: define something in config.h and do an
4068         AM_CONDITIONAL when gcov is enabled
4069
4070 2003-04-04  Havoc Pennington  <hp@redhat.com>
4071
4072         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
4073         return a "babysitter" object that is used to monitor the status of
4074         the spawned process and reap it when required.
4075
4076         * test/test-segfault.c, test/test-exit.c,
4077         test/test-sleep-forever.c: binaries that do various lame things,
4078         used in the test suite.
4079
4080         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
4081
4082 2003-04-03  Havoc Pennington  <hp@pobox.com>
4083
4084         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
4085         in preparation for modifying it, dbus-sysdeps is getting
4086         a bit unmanageable.
4087
4088 2003-04-03  Havoc Pennington  <hp@redhat.com>
4089
4090         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
4091         have multiple ones
4092
4093         * bus/*.[hc]: adapt to mainloop change
4094
4095 2003-04-03  Havoc Pennington  <hp@redhat.com>
4096
4097         * bus/activation.c (load_directory): fix up memleaks
4098         (bus_activation_entry_free): free the entry
4099
4100         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
4101         we get one from the message bus; fix memleaks.
4102
4103         * dbus/dbus-message.c (dbus_set_error_from_message): new function
4104
4105 2003-04-03  Havoc Pennington  <hp@pobox.com>
4106
4107         * bus/config-parser.c (bus_config_parser_unref): free
4108         list of mechanisms, bug discovered by test suite enhancements
4109         (putting system.conf and session.conf into suite)
4110
4111         * test/Makefile.am, test/test-service.c: add placeholder for a
4112         test service that we'll activate as part of test suite. Doesn't
4113         do anything yet.
4114
4115         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
4116         setting NULL value, and use system malloc not dbus_malloc()
4117         when we have unavoidable memleakage.
4118
4119         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
4120         didn't work, and support DBUS_BUS_ACTIVATION.
4121
4122         * bus/activation.c (child_setup): pass our well-known bus type to
4123         the child
4124
4125         * bus/config-parser.c: support <type> to specify well-known type
4126
4127         * doc/dbus-specification.sgml: document the env variables to
4128         locate well-known buses and find service activator
4129
4130 2003-04-02  Havoc Pennington  <hp@redhat.com>
4131
4132         * test/Makefile.am (all-local): add a rule to copy tests to
4133         builddir, so we can have generated tests. Use this to remove the
4134         silly hack for testing system.conf and session.conf. Will use this
4135         shortly to generate .service files pointing to test binaries.
4136
4137 2003-04-02  Havoc Pennington  <hp@redhat.com>
4138
4139         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
4140         current alloc and needed new length, not max of the doubled
4141         allocation and needed new length. Also, when building tests,
4142         don't do the double-allocation stuff, just realloc every time.
4143
4144 2003-04-02  Havoc Pennington  <hp@redhat.com>
4145
4146         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
4147         in error messages
4148         (_dbus_string_get_dirname): new
4149         (_dbus_sysdeps_test): new
4150         (_dbus_directory_open): include dirnames in error messages
4151
4152         * bus/config-parser.c: interpret <include> and <includedir> and
4153         <servicedir> relative to config file location if the given
4154         filename is not absolute.
4155
4156         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
4157
4158 2003-04-02  Havoc Pennington  <hp@redhat.com>
4159
4160         * bus/connection.c (bus_transaction_send_error_reply): set sender
4161         service for the error, and unref the reply on success
4162
4163         * bus/activation.c: convert to use BusTransaction so OOM can be
4164         handled correctly
4165         (bus_activation_service_created): set sender of the message
4166
4167 2003-04-01  Havoc Pennington  <hp@redhat.com>
4168
4169         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
4170         <includedir> (at least mostly)
4171
4172         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
4173         first, then the user ID
4174
4175 2003-04-01  Havoc Pennington  <hp@pobox.com>
4176
4177         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
4178         function
4179
4180         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
4181
4182         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
4183
4184         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
4185         socket 0777, and unlink any existing socket.
4186
4187         * bus/bus.c (bus_context_new): change our UID/GID and fork if
4188         the configuration file so specifies; set up auth mechanism
4189         restrictions
4190
4191         * bus/config-parser.c (bus_config_parser_content): add support
4192         for <fork> option and fill in code for <auth>
4193
4194         * bus/system.conf.in: add <fork/> to default configuration,
4195         and limit auth mechanisms to EXTERNAL
4196
4197         * doc/config-file.txt (Elements): add <fork>
4198
4199         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
4200         (_dbus_change_identity): new function
4201
4202 2003-03-31  Havoc Pennington  <hp@redhat.com>
4203
4204         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
4205         (_dbus_listen_unix_socket): fix off-by-one error in null
4206         termination spotted by Nalin
4207
4208 2003-03-31  Havoc Pennington  <hp@redhat.com>
4209
4210         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
4211         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
4212         having a real home directory available.
4213
4214 2003-03-31  Havoc Pennington  <hp@redhat.com>
4215
4216         * bus/Makefile.am (install-data-hook): create /var/run/dbus
4217
4218         * bus/messagebus.in: add init script for Red Hat /etc/init.d
4219
4220         * configure.in: add support for specifying a style of init script
4221         to install
4222
4223 2003-03-31  Havoc Pennington  <hp@redhat.com>
4224
4225         Fix some annoying DBusString API and fix all affected code.
4226
4227         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
4228         max_length argument
4229         (_dbus_string_get_data): change to return string instead of using
4230         an out param
4231         (_dbus_string_get_const_data): ditto
4232         (_dbus_string_get_data_len): ditto
4233         (_dbus_string_get_const_data_len): ditto
4234
4235 2003-03-31  Havoc Pennington  <hp@redhat.com>
4236
4237         * bus/main.c (main): fix up the command line arguments to be nicer
4238
4239 2003-03-31  Havoc Pennington  <hp@redhat.com>
4240
4241         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
4242         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
4243         final location that lands in the config file
4244
4245         * bus/config-loader-expat.c (bus_config_load): fix type of
4246         XML_Parser variable
4247
4248         * doc/TODO: remove TODO item for dbus_bus_get()
4249
4250         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
4251
4252 2003-03-31  Havoc Pennington  <hp@pobox.com>
4253
4254         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
4255         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
4256         argument since they are always client side
4257
4258         * dbus/dbus-server.c (dbus_server_get_address): new function
4259
4260         * bus/main.c (main): take the configuration file as an argument.
4261
4262         * test/data/valid-config-files/debug-allow-all.conf: new file to
4263         use with dispatch.c tests for example
4264
4265         * bus/test-main.c (main): require test data dir
4266
4267         * bus/bus.c (bus_context_new): change this to take a
4268         configuration file name as argument
4269
4270         * doc/config-file.txt (Elements): add <servicedir>
4271
4272         * bus/system.conf, bus/session.conf: new files
4273
4274         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
4275         well-known socket if none set
4276
4277         * configure.in: create system.conf and session.conf
4278
4279 2003-03-30  Havoc Pennington  <hp@pobox.com>
4280
4281         * bus/config-parser.c: hacking
4282
4283         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
4284         to shut down, since it could cause weirdness with the DBusList
4285         lock
4286
4287         * dbus/dbus-list.c (_dbus_list_test): add tests for the
4288         link-oriented stack routines
4289         (alloc_link): free the mempool if the first alloc from it fails
4290
4291         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
4292
4293         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
4294         from GLib
4295         (_dbus_string_skip_white): new
4296
4297         * doc/config-file.txt (Elements): add <includedir>
4298
4299 2003-03-28  Havoc Pennington  <hp@pobox.com>
4300
4301         * dbus/dbus-string.c (_dbus_string_copy_data_len)
4302         (_dbus_string_copy_data): new functions
4303
4304 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
4305
4306         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
4307         * dbus/dbus-bus.h:
4308         Add dbus_bus_get.
4309
4310         * dbus/dbus-memory.c:
4311         Fix a doc comment.
4312
4313 2003-03-28  Havoc Pennington  <hp@pobox.com>
4314
4315         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
4316         I think it may have just been superstition. Not sure.
4317
4318         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
4319         failures that were not being handled.
4320
4321         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
4322
4323         * dbus/dbus-memory.c: add ability to set number of mallocs in a
4324         row that will fail on out-of-memory.
4325
4326         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
4327         function for testing out-of-memory handling.
4328
4329         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
4330         allocation functions, they do map exactly to the expat ones.
4331
4332 2003-03-27  Havoc Pennington  <hp@redhat.com>
4333
4334         * bus/config-loader-libxml.c (bus_config_load): add another error
4335         check
4336
4337 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
4338
4339         * doc/TODO:
4340         Add note about automatic service activation.
4341
4342         * doc/dbus-specification.sgml:
4343         Rename the specification and clarify a few things.
4344
4345 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
4346
4347         * Doxyfile.in:
4348         * dbus/dbus-address.c:
4349         * dbus/dbus-dict.c:
4350         * dbus/dbus-marshal.c:
4351         * dbus/dbus-server-debug-pipe.c:
4352         * dbus/dbus-transport-unix.c:
4353         Fix documentation warnings.
4354
4355 2003-03-26  Havoc Pennington  <hp@pobox.com>
4356
4357         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
4358         after every test so it's quick and easy to see which leaked, and
4359         so we test multiple dbus_shutdown() calls
4360
4361         * configure.in: change configure.in XML stuff to also support
4362         expat
4363
4364         * config-loader-libxml.c: some hacking
4365
4366         * config-loader-expat.c: some hacking
4367
4368         * config-parser.c: some hacking, plus tests
4369
4370 2003-03-25  Havoc Pennington  <hp@redhat.com>
4371
4372         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
4373
4374         * configure.in: add --with-xml option to specify XML library,
4375         right now only libxml is supported.
4376
4377         * bus/config-loader-libxml.c, config-parser.c: sync some minor
4378         nonworking code between home and work, still just stubs
4379
4380 2003-03-24  Havoc Pennington  <hp@redhat.com>
4381
4382         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
4383         file
4384
4385         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
4386         NULL argument for "message" if the error is a well-known one,
4387         fill in a generic message in this case.
4388
4389         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
4390         favor of DBusError
4391
4392         * bus/test.c (bus_test_flush_bus): add
4393
4394         * bus/policy.c (bus_policy_test): test code stub
4395
4396 2003-03-24  Havoc Pennington  <hp@pobox.com>
4397
4398         * bus/connection.c (bus_connections_setup_connection): set up
4399         the "can this user connect" function, but it always returns
4400         TRUE until we have a config file parser so we can have a config
4401         file that allows connections.
4402
4403 2003-03-23  Havoc Pennington  <hp@pobox.com>
4404
4405         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
4406         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
4407         the mutex, so we can check for proper memory management
4408         and OOM handling.
4409
4410         * dbus/dbus-dataslot.c: remove the mutex from
4411         DBusDataSlotAllocator and lock it manually when using it,
4412         to simplify fitting it into the global slots framework.
4413
4414         * dbus/dbus-threads.c (init_static_locks): rework how we're
4415         handling global locks so they are easily shut down.
4416
4417         * bus/policy.c (bus_policy_append_rule): fix
4418
4419         * bus/test-main.c (main): check for memleaks
4420
4421         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
4422         test suite check for memleaks
4423
4424         * dbus/dbus-memory.c: add support in test mode for tracking
4425         number of outstanding blocks
4426
4427 2003-03-23  Havoc Pennington  <hp@pobox.com>
4428
4429         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
4430         policies code
4431
4432         * dbus/dbus-hash.h: add ULONG hash keys
4433
4434         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
4435         (_dbus_get_group_id): new function
4436
4437 2003-03-20  Havoc Pennington  <hp@redhat.com>
4438
4439         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
4440         new function
4441         (dbus_connection_get_unix_user): new function
4442
4443 2003-03-20  Havoc Pennington  <hp@pobox.com>
4444
4445         * bus/connection.c (bus_connection_send_oom_error): assert that
4446         message has a sender
4447         (connection_execute_transaction): ditto
4448         (bus_connection_preallocate_oom_error): fix to set the sender, and
4449         set recipient to the destination service, not the bus driver
4450
4451         * bus/policy.c: hacking
4452
4453         * dbus/dbus-message.c (dbus_message_service_is): new function
4454         (dbus_message_sender_is): new
4455
4456 2003-03-19  Havoc Pennington  <hp@redhat.com>
4457
4458         * bus/policy.c: start sketching code for policy restrictions on
4459         what connections can do.
4460
4461 2003-03-18  Havoc Pennington  <hp@redhat.com>
4462
4463         * doc/TODO: some notes on high-level todo items. Little nitpick
4464         stuff is all in @todo, so no need to add it here.
4465
4466         * doc/config-file.txt: some notes on how config file might look
4467
4468 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
4469
4470         * configure.in: 0.6
4471
4472         * NEWS: Update.
4473
4474 2003-03-17  Havoc Pennington  <hp@redhat.com>
4475
4476         * dbus/dbus-internals.h: add gcc attributes so that
4477         our printf-style functions warn on bad arguments to
4478         format
4479
4480         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
4481         format bug
4482
4483         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4484         printf format bug
4485
4486 2003-03-17  Havoc Pennington  <hp@redhat.com>
4487
4488         * bus/test-main.c (main): make it print something as it runs
4489         so make check doesn't look stuck
4490
4491         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
4492         from CVS, now obsolete
4493
4494 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
4495
4496         * bus/dispatch.c: (bus_dispatch):
4497         Refetch the service name since it may have been reallocated
4498         when dbus_message_set_sender was called.
4499
4500         * dbus/dbus-sysdeps.c: (_dbus_accept):
4501         Add address and address length variables and use them to stop
4502         valgrind from complaining.
4503
4504 2003-03-17  Havoc Pennington  <hp@pobox.com>
4505
4506         All tests pass, no memleaks, no valgrind complaints.
4507
4508         * bus/test.c: refcount handler_slot
4509
4510         * bus/connection.c (bus_connections_new): refcount
4511         connection_data_slot
4512
4513         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
4514         bytes so that auth scripts pass.
4515
4516         * bus/dispatch.c: init message_handler_slot so it gets allocated
4517         properly
4518
4519         * bus/dispatch.c (message_handler_slot_ref): fix memleak
4520
4521         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
4522         dealloc server_pipe_hash when no longer used for benefit of
4523         leak checking
4524
4525         * dbus/dbus-auth.c (process_command): memleak fix
4526
4527         * bus/dispatch.c (check_hello_message): memleak fix
4528
4529 2003-03-16  Havoc Pennington  <hp@pobox.com>
4530
4531         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
4532
4533 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
4534
4535         * bus/activation.c (bus_activation_activate_service): Append
4536         the pending activation entry to the list of pending activations.
4537
4538 2003-03-16  Havoc Pennington  <hp@pobox.com>
4539
4540         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
4541         connections
4542
4543         * dbus/dbus-address.c (create_entry): fix OOM handling when
4544         failing to alloc entry->method
4545
4546 2003-03-16  Havoc Pennington  <hp@pobox.com>
4547
4548         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
4549         the watch
4550
4551         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
4552         add some missing dbus_set_result
4553
4554         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
4555         alloc the DBusMessageHandler
4556
4557         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
4558         the transport here, since we call this from the finalizer; it
4559         resulted in a double-finalize.
4560
4561         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
4562         where we tried to use transport->connection that was NULL,
4563         happened when transport was disconnected early on due to OOM
4564
4565         * bus/*.c: adapt to handle OOM for watches/timeouts
4566
4567         * dbus/dbus-transport-unix.c: port to handle OOM during
4568         watch handling
4569
4570         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
4571         reference to unused bytes instead of a copy
4572
4573         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
4574         out of memory
4575
4576         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
4577         FALSE on OOM
4578
4579         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
4580         of memory
4581
4582 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
4583
4584         * doc/dbus-specification.sgml:
4585         Document reply message for ActivateService.
4586
4587 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
4588
4589         * bus/activation.c: (bus_pending_activation_entry_free),
4590         (bus_pending_activation_free), (bus_activation_new),
4591         (bus_activation_unref), (bus_activation_service_created),
4592         (bus_activation_activate_service):
4593         * bus/activation.h:
4594         * bus/bus.c: (bus_context_new):
4595         * bus/desktop-file.c: (new_section):
4596         * bus/driver.c: (bus_driver_send_service_deleted),
4597         (bus_driver_handle_activate_service):
4598         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
4599         * bus/services.h:
4600         * dbus/dbus-connection.c:
4601         (dbus_connection_send_with_reply_and_block):
4602         * dbus/dbus-message.c: (dbus_message_append_args_valist):
4603         * dbus/dbus-protocol.h:
4604         Make activation work better. Now pending activations will be queued
4605         and the daemon won't try to activate services that are already registered.
4606
4607 2003-03-16  Havoc Pennington  <hp@pobox.com>
4608
4609         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
4610         connection data
4611
4612         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
4613         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
4614
4615 2003-03-16  Havoc Pennington  <hp@pobox.com>
4616
4617         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
4618         this. always run the test suite before commit...
4619
4620         * bus/*: adapt to DBusConnection API changes
4621
4622         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
4623         requires renaming stuff to avoid dbus_connection_dispatch name
4624         conflict.
4625
4626         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
4627         function
4628
4629         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
4630         separate from _dbus_message_loader_return_buffer()
4631
4632         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
4633         this, because it's now always broken to use; the number of
4634         messages in queue vs. the number still buffered by the message
4635         loader is undefined/meaningless. Should use
4636         dbus_connection_get_dispatch_state().
4637         (dbus_connection_dispatch): rename from
4638         dbus_connection_dispatch_message
4639
4640 2003-03-16  Havoc Pennington  <hp@pobox.com>
4641
4642         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
4643         implementation
4644
4645 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
4646
4647         * dbus/dbus-connection.c:
4648         (dbus_connection_send_with_reply_and_block):
4649         Decrease connection->n_incoming when removing an entry
4650         from the list.
4651         * dbus/dbus-dict.c: (dbus_dict_entry_free),
4652         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4653         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4654         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
4655         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
4656         (dbus_dict_get_byte_array):
4657         Handle NULL arrays and strings. Also add support for byte arrays.
4658
4659         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
4660         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
4661         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
4662         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
4663         (_dbus_demarshal_dict), (demarshal_and_validate_len),
4664         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
4665         * dbus/dbus-marshal.h:
4666         Add support for marshalling and demarshalling empty arrays and strings.
4667
4668         * dbus/dbus-message.c: (dbus_message_append_args_valist),
4669         (dbus_message_append_string_array),
4670         (dbus_message_iter_get_boolean),
4671         (dbus_message_iter_get_boolean_array),
4672         (dbus_message_iter_get_int32_array),
4673         (dbus_message_iter_get_uint32_array),
4674         (dbus_message_iter_get_double_array),
4675         (dbus_message_iter_get_byte_array),
4676         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
4677         (check_message_handling):
4678         Add support for getting empty arrays and dicts.
4679
4680         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
4681         Don't do any validation at all for now, that's better than just checking
4682         for ASCII.
4683
4684         * test/data/valid-messages/emptiness.message:
4685         New test message with lots of empty arrays.
4686
4687 2003-03-16  Havoc Pennington  <hp@pobox.com>
4688
4689         * dbus/dbus-connection.c
4690         (_dbus_connection_queue_received_message_link): new function that
4691         can't fail due to OOM
4692
4693         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
4694         new function pops a message together with a list link
4695         containing it.
4696
4697         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
4698         message queuing functions to avoid needing to alloc memory
4699
4700 2003-03-16  Havoc Pennington  <hp@pobox.com>
4701
4702         Oops - test code was only testing failure of around 30 of the
4703         mallocs in the test path, but it turns out there are 500+
4704         mallocs. I believe this was due to misguided linking setup such
4705         that there was one copy of dbus_malloc etc. in the daemon and one
4706         in the shared lib, and only daemon mallocs were tested. In any
4707         case, the test case now tests all 500+ mallocs, and doesn't pass
4708         yet, though there are lots of fixes in this patch.
4709
4710         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4711         this so that it doesn't need to allocate memory, since it
4712         has no way of indicating failure due to OOM (and would be
4713         annoying if it did).
4714
4715         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
4716
4717         * bus/Makefile.am: rearrange to create two self-contained
4718         libraries, to avoid having libraries with overlapping symbols.
4719         that was resulting in weirdness, e.g. I'm pretty sure there
4720         were two copies of global static variables.
4721
4722         * dbus/dbus-internals.c: move the malloc debug stuff to
4723         dbus-memory.c
4724
4725         * dbus/dbus-list.c (free_link): free list mempool if it becomes
4726         empty.
4727
4728         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
4729
4730         * dbus/dbus-address.c (dbus_parse_address): free list nodes
4731         on failure.
4732
4733         * bus/dispatch.c (bus_dispatch_add_connection): free
4734         message_handler_slot when no longer using it, so
4735         memory leak checkers are happy for the test suite.
4736
4737         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
4738
4739         * bus/bus.c (new_connection_callback): disconnect in here if
4740         bus_connections_setup_connection fails.
4741
4742         * bus/connection.c (bus_connections_unref): fix to free the
4743         connections
4744         (bus_connections_setup_connection): if this fails, don't
4745         disconnect the connection, just be sure there are no side
4746         effects.
4747
4748         * dbus/dbus-string.c (undo_alignment): unbreak this
4749
4750         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
4751         leaking
4752         (_dbus_auth_new): fix the order in which we free strings
4753         on OOM failure
4754
4755         * bus/connection.c (bus_connection_disconnected): fix to
4756         not send ServiceDeleted multiple times in case of memory
4757         allocation failure
4758
4759         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
4760         get the base service name
4761         (dbus_bus_register_client): don't return base service name,
4762         instead store it on the DBusConnection and have an accessor
4763         function for it.
4764         (dbus_bus_register_client): rename dbus_bus_register()
4765
4766         * bus/dispatch.c (check_hello_message): verify that other
4767         connections on the bus also got the correct results, not
4768         just the one sending hello
4769
4770 2003-03-15  Havoc Pennington  <hp@pobox.com>
4771
4772         Make it pass the Hello handling test including all OOM codepaths.
4773         Now to do other messages...
4774
4775         * bus/services.c (bus_service_remove_owner): fix crash when
4776         removing owner from an empty list of owners
4777         (bus_registry_ensure): don't leave service in the list of
4778         a connection's owned services if we fail to put the service
4779         in the hash table.
4780
4781         * bus/connection.c (bus_connection_preallocate_oom_error): set
4782         error flag on the OOM error.
4783
4784         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4785         handle _dbus_transport_set_connection failure
4786
4787         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
4788         to create watches up front and simply enable/disable them as
4789         needed.
4790         (unix_connection_set): this can now fail on OOM
4791
4792         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
4793         of enabling/disabling a watch or timeout.
4794
4795         * bus/loop.c (bus_loop_iterate): don't touch disabled
4796         watches/timeouts
4797
4798         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
4799
4800 2003-03-15  Havoc Pennington  <hp@pobox.com>
4801
4802         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
4803         write useful test code, after all that futzing around ;-)
4804
4805         Test does not yet pass because we can't handle OOM in
4806         _dbus_transport_messages_pending (basically,
4807         dbus_connection_preallocate_send() does not prealloc the write
4808         watch). To fix this, I think we need to add new stuff to
4809         set_watch_functions, namely a SetEnabled function so we can alloc
4810         the watch earlier, then enable it later.
4811
4812         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
4813         dbus-memory.c to the convenience lib
4814
4815         * bus/test.c: rename some static functions to keep them clearly
4816         distinct from stuff in connection.c. Handle client disconnection.
4817
4818 2003-03-14  Havoc Pennington  <hp@pobox.com>
4819
4820         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
4821         transport, tests more of the real codepath. Set up clients
4822         with bus_setup_debug_client.
4823
4824         * bus/test.c (bus_setup_debug_client): function to set up debug
4825         "clients" on the main loop
4826
4827         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
4828         support
4829
4830         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
4831         server type
4832
4833         * dbus/dbus-server-debug.c: support a debug server based on pipes
4834
4835         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
4836         (_dbus_close): new function
4837
4838         * configure.in: check for socketpair
4839
4840 2003-03-14  Havoc Pennington  <hp@redhat.com>
4841
4842         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
4843         cheesy hack
4844
4845         * dbus/dbus-transport-debug.c: rework this a good bit to be
4846         less complicated. hopefully still works.
4847
4848         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
4849         manually
4850
4851         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
4852         after running it
4853
4854         * dbus/dbus-message.c (dbus_message_copy): rename from
4855         dbus_message_new_from_message, fix it up to copy
4856         all the message fields, add test case
4857
4858         * bus/dispatch.c (bus_dispatch_test): add some more test code,
4859         not quite passing yet
4860
4861 2003-03-14  Havoc Pennington  <hp@pobox.com>
4862
4863         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4864         until no work remains" in test code. (the large diff here
4865         is just code movement, no actual changes)
4866
4867         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4868         1, no point waiting around for test code.
4869         (_dbus_server_debug_accept_transport): unref the timeout
4870         after adding it (right?)
4871
4872         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4873
4874 2003-03-13  Havoc Pennington  <hp@redhat.com>
4875
4876         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4877         out of memory
4878
4879         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4880         of memory
4881
4882         * dbus/dbus-connection.h: Make AddWatchFunction and
4883         AddTimeoutFunction return a bool so they can fail on out-of-memory
4884
4885         * bus/bus.c (bus_context_new): set up timeout handlers
4886
4887         * bus/connection.c (bus_connections_setup_connection): set up
4888         timeout handlers
4889
4890         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4891         can fail
4892
4893         * bus/bus.c (bus_context_new): adapt to changes
4894
4895         * bus/connection.c: adapt to changes
4896
4897         * test/watch.c: adapt to DBusWatch changes
4898
4899         * bus/dispatch.c (bus_dispatch_test): started adding this but
4900         didn't finish
4901
4902 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
4903
4904         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4905
4906 2003-03-13  Havoc Pennington  <hp@pobox.com>
4907
4908         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4909         set up a test framework as for the library
4910
4911 2003-03-12  Havoc Pennington  <hp@pobox.com>
4912
4913         Throughout: purge global variables, introduce BusActivation,
4914         BusConnections, BusRegistry, etc. objects instead.
4915
4916         * bus/bus.h, bus/bus.c: introduce BusContext as a global
4917         message bus object
4918
4919         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4920         going to redo this a bit differently I think
4921
4922 2003-03-12  Havoc Pennington  <hp@redhat.com>
4923
4924         Mega-patch that gets the message bus daemon initially handling
4925         out-of-memory. Work still needed. Also lots of random
4926         moving stuff to DBusError instead of ResultCode.
4927
4928         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4929
4930         * dbus/dbus-connection.c
4931         (dbus_connection_send_with_reply_and_block): use DBusError
4932
4933         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4934         DBusResultCode
4935
4936         * dbus/dbus-connection.c (dbus_connection_send): drop the result
4937         code here, as the only failure possible is OOM.
4938
4939         * bus/connection.c (bus_connection_disconnect):
4940         rename bus_connection_disconnected as it's a notification only
4941
4942         * bus/driver.c (bus_driver_handle_acquire_service): don't free
4943         "name" on get_args failure, should be done by get_args;
4944         don't disconnect client for bad args, just return an error.
4945         (bus_driver_handle_service_exists): ditto
4946
4947         * bus/services.c (bus_services_list): NULL-terminate returned array
4948
4949         * bus/driver.c (bus_driver_send_service_lost)
4950         (bus_driver_send_service_acquired): send messages from driver to a
4951         specific client to the client's unique name, not to the broadcast
4952         service.
4953
4954         * dbus/dbus-message.c (decode_header_data): reject messages that
4955         contain no name field
4956         (_dbus_message_get_client_serial): rename to
4957         dbus_message_get_serial and make public
4958         (_dbus_message_set_serial): rename from set_client_serial
4959         (_dbus_message_set_reply_serial): make public
4960         (_dbus_message_get_reply_serial): make public
4961
4962         * bus/connection.c (bus_connection_foreach): allow stopping
4963         iteration by returning FALSE from foreach function.
4964
4965         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4966         (dbus_connection_free_preallocated_send)
4967         (dbus_connection_preallocate_send): new API for sending a message
4968         without possibility of malloc failure.
4969         (dbus_connection_send_message): rename to just
4970         dbus_connection_send (and same for whole function family)
4971
4972         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4973
4974         * dbus/dbus-sysdeps.c (_dbus_exit): new function
4975
4976         * bus/activation.c: handle/return errors
4977
4978         * dbus/dbus-errors.h: add more DBUS_ERROR #define
4979
4980         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4981         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4982         (_dbus_result_from_errno): move to this file
4983
4984 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
4985
4986         * dbus/dbus-marshal.c:
4987         (_dbus_marshal_set_string):
4988         Take a length argument so we can marshal the correct string
4989         length.
4990
4991         (_dbus_marshal_dict), (_dbus_demarshal_dict),
4992         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4993         (_dbus_marshal_test):
4994         * dbus/dbus-marshal.h:
4995         Add support for marshalling and demarshalling dicts.
4996
4997         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4998         Add support for TYPE DICT.
4999
5000         * dbus/dbus-message.c: (set_string_field):
5001         Adjust header padding.
5002
5003         (dbus_message_append_args_valist), (dbus_message_append_dict),
5004         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
5005         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
5006         (check_message_handling), (check_have_valid_message):
5007         * dbus/dbus-message.h:
5008         Add functions for setting and getting dicts.
5009
5010         * dbus/dbus-protocol.h:
5011         Add DBUS_TYPE_DICT.
5012
5013         * dbus/dbus.h:
5014         Add dbus-dict.h
5015
5016         * doc/dbus-specification.sgml:
5017         Add information about how dicts are marshalled.
5018
5019         * test/data/invalid-messages/dict-with-nil-value.message:
5020         * test/data/invalid-messages/too-short-dict.message:
5021         * test/data/valid-messages/dict-simple.message:
5022         * test/data/valid-messages/dict.message:
5023         Add sample messages containing dicts.
5024
5025 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
5026
5027         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
5028
5029 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
5030
5031         * dbus/Makefile.am:
5032         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5033         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
5034         (dbus_dict_set_int32), (dbus_dict_set_uint32),
5035         (dbus_dict_set_double), (dbus_dict_set_string),
5036         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
5037         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
5038         (dbus_dict_set_string_array), (_dbus_dict_test):
5039         * dbus/dbus-dict.h:
5040         Fix according to comments from Havoc.
5041
5042 2003-03-06  Michael Meeks  <michael@server.home>
5043
5044         * configure.in: if we don't have kde-config, disable have_qt.
5045
5046 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
5047
5048         * dbus/Makefile.am:
5049         Add dbus-dict.[ch]
5050
5051         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
5052         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
5053         (dbus_dict_remove), (dbus_dict_get_value_type),
5054         (dbus_dict_get_keys), (dbus_dict_put_boolean),
5055         (dbus_dict_put_int32), (dbus_dict_put_uint32),
5056         (dbus_dict_put_double), (dbus_dict_put_string),
5057         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
5058         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
5059         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
5060         (dbus_dict_get_int32), (dbus_dict_get_uint32),
5061         (dbus_dict_get_double), (dbus_dict_get_string),
5062         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
5063         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
5064         (dbus_dict_get_string_array), (_dbus_dict_test):
5065         * dbus/dbus-dict.h:
5066         Add DBusDict implementation
5067
5068         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
5069         * dbus/dbus-test.h:
5070         Add _dbus_dict_test
5071
5072 2003-03-04  Havoc Pennington  <hp@pobox.com>
5073
5074         * test/data/auth/*: adapt to changes
5075
5076         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
5077         USERID_BASE64 and change USERNAME_BASE64 to put in username not
5078         userid
5079
5080         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
5081         more stuff from being in a context name, to make the protocol
5082         simpler to deal with
5083
5084         * dbus/dbus-errors.c (dbus_error_has_name): new function
5085         (dbus_error_is_set): new function
5086
5087         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
5088         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
5089
5090         * dbus/dbus-connection.c (dbus_connection_flush): also read
5091         messages during a flush operation
5092
5093         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
5094
5095 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
5096
5097         * configure.in: Check for gethostbyname on Solaris.
5098
5099         * dbus/dbus-transport.c: (_dbus_transport_open):
5100         Remove duplicate "tcp" entry.
5101
5102         * doc/dbus-specification.sgml:
5103         Clarify some things.
5104
5105 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
5106
5107         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
5108         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
5109         (_dbus_keyring_test):
5110         * dbus/dbus-md5.c: (_dbus_md5_compute):
5111         * dbus/dbus-sha.c: (_dbus_sha_compute):
5112         Plug memory leaks.
5113
5114 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
5115
5116         * README: Add some things.
5117
5118 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
5119
5120         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
5121         after case DBUS_TYPE_BOOELAN.
5122
5123 2003-03-02  Havoc Pennington  <hp@pobox.com>
5124
5125         * test/break-loader.c (randomly_set_extreme_ints): add test that
5126         sets really huge and small integers
5127
5128         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
5129         that length of boolean array fits in the string, and that
5130         string has room for boolean value in single-bool case.
5131
5132         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
5133         optional value to "ALIGN" command which is what to fill the
5134         alignment with.
5135
5136         * test/data/valid-messages/no-padding.message: add regression
5137         test for the message padding problem
5138
5139 2003-03-02  Havoc Pennington  <hp@pobox.com>
5140
5141         * dbus/dbus-message.c (decode_header_data): fix to always init
5142         message_padding, from Benjamin Dauvergne
5143
5144 2003-03-02  Havoc Pennington  <hp@pobox.com>
5145
5146         * configure.in: 0.5
5147
5148         * NEWS: Update.
5149
5150 2003-03-01  Joe Shaw  <joe@assbarn.com>
5151
5152         * configure.in: Check for "struct cmsgcred" and try to access its
5153         members for BSD-like unices.
5154
5155         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
5156         _dbus_read_credentials_unix_socket().
5157         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
5158         read() for reading the credential byte off the unix socket.  Use
5159         struct cmsgcred on systems that support it.
5160
5161 2003-02-27  Alexander Larsson  <alexl@redhat.com>
5162
5163         * glib/Makefile.am:
5164         * configure.in:
5165         Make gthreads-2.0 dependency optional. Don't build thread test if
5166         its not found.
5167
5168 2003-02-27  Havoc Pennington  <hp@pobox.com>
5169
5170         * dbus/dbus-connection.c
5171         (dbus_connection_send_message_with_reply_and_block): fix doh!
5172         doh! doh! bug that resulted in never removing a reply from the
5173         queue, no wonder we called get_reply_serial so much ;-)
5174
5175         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
5176         and client serial instead of demarshaling them every time
5177
5178 2003-02-27  Havoc Pennington  <hp@pobox.com>
5179
5180         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
5181         more inlined, using dbus-string-private.h, speeds things up
5182         substantially
5183
5184         * dbus/dbus-string.c (_dbus_string_free): apply align offset
5185         when freeing the string
5186         (_dbus_string_steal_data): fix for align offset
5187         (undo_alignment): new function
5188
5189 2003-02-26  Havoc Pennington  <hp@redhat.com>
5190
5191         All kinds of audit fixes from Owen, plus initial attempt to
5192         handle unaligned memory returned from malloc.
5193
5194         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
5195         leave room for align_offset and nul byte
5196         (fixup_alignment): function to track an align_offset and
5197         ensure real->str is aligned
5198         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
5199         to allow a nul byte plus align offset
5200         (_dbus_string_lock): fix overflow issue
5201         (_dbus_string_init_const_len): add assertions on sanity of len,
5202         assign allocated to be ALLOCATION_PADDING larger than len
5203         (set_length): fixup the overflow handling
5204         (_dbus_string_get_data_len): fix overflow in assertion
5205         (open_gap): detect overflow in size of gap to be opened
5206         (_dbus_string_lengthen): add overflow check
5207         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
5208         (_dbus_string_append): add overflow check
5209         (_dbus_string_append_unichar): overflow
5210         (_dbus_string_delete): fix overflow in assertion
5211         (_dbus_string_copy_len): overflow in assertion
5212         (_dbus_string_replace_len): overflows in assertions
5213         (_dbus_string_find): change to implement in terms of
5214         _dbus_string_find_to
5215         (_dbus_string_find_to): assorted fixage
5216         (_dbus_string_equal_c_str): assert c_str != NULL,
5217         fix logic so the function works
5218         (_dbus_string_ends_with_c_str): fix overflow thingy
5219         (_dbus_string_base64_encode): overflow fix
5220         (_dbus_string_validate_ascii): overflow
5221         (_dbus_string_validate_nul): overflow
5222
5223 2003-02-26  Havoc Pennington  <hp@redhat.com>
5224
5225         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
5226
5227 2003-02-26  Alexander Larsson  <alexl@redhat.com>
5228
5229         * configure.in:
5230         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
5231
5232         * dbus/dbus-connection.c:
5233         * dbus/dbus-connection.h:
5234         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
5235         Add dbus_connection_set_wakeup_main_function and use it when queueing
5236         incoming and outgoing messages.
5237
5238
5239         * dbus/dbus-dataslot.c:
5240         Threadsafe usage of DBusDataSlotAllocator
5241
5242         * dbus/dbus-message.c: (dbus_message_get_args_iter):
5243         dbus_new can fail.
5244
5245         * dbus/dbus-server-unix.c:
5246         Add todo comment
5247
5248         * glib/dbus-gmain.c:
5249         Implement the new wakeup functions for glib.
5250
5251         * glib/Makefile.am:
5252         * glib/test-thread-client.c:
5253         * glib/test-thread-server.c:
5254         * glib/test-thread.h:
5255         Initial cut at some thread test code. Not really done yet.
5256
5257 2003-02-26  Havoc Pennington  <hp@pobox.com>
5258
5259         * dbus/dbus-connection.c
5260         (dbus_connection_send_message_with_reply_and_block): fix crash
5261         where we ref'd the outgoing message instead of the returned reply
5262
5263         * dbus/dbus-transport-unix.c (do_authentication): check read watch
5264         at the end of this function, so if we didn't need to read for
5265         authentication, we reinstall it for receiving messages
5266
5267         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
5268         a NULL sender for peer-to-peer case
5269
5270         * dbus/dbus-transport-unix.c (check_read_watch): handle
5271         !authenticated case correctly
5272
5273         * glib/dbus-gmain.c: add support for DBusServer
5274
5275         * dbus/dbus-server.c: add data slot support
5276
5277         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
5278         return values and handle errors
5279
5280         * dbus/dbus-dataslot.c: factor out the data slot stuff from
5281         DBusConnection
5282
5283         * Doxyfile.in (INPUT): add glib subdir
5284
5285         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
5286         setup_with_g_main instead of hookup_with_g_main; write docs
5287
5288 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
5289
5290         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
5291         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5292         * dbus/dbus-message.c: (dbus_message_append_boolean),
5293         (dbus_message_append_boolean_array),
5294         (dbus_message_get_args_valist), (_dbus_message_test):
5295         * dbus/dbus-message.h:
5296         * doc/dbus-specification.sgml:
5297         Various fixes as pointed out by Havoc.
5298
5299         * test/data/invalid-messages/bad-boolean-array.message:
5300         * test/data/invalid-messages/bad-boolean.message:
5301         Add invalid boolean value test cases.
5302
5303 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
5304
5305         * dbus/dbus-internals.c: (_dbus_type_to_string):
5306         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5307         (_dbus_marshal_validate_arg):
5308         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5309         * dbus/dbus-message.c: (dbus_message_append_args_valist),
5310         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
5311         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
5312         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
5313         (dbus_message_iter_get_double),
5314         (dbus_message_iter_get_boolean_array), (message_iter_test):
5315         * dbus/dbus-message.h:
5316         * dbus/dbus-protocol.h:
5317         * doc/dbus-specification.sgml:
5318         * test/data/valid-messages/lots-of-arguments.message:
5319         Add support for boolean and boolean array types.
5320
5321 2003-02-23  Havoc Pennington  <hp@pobox.com>
5322
5323         * dbus/dbus-keyring.c: finish most of this implementation and
5324         simple unit test
5325
5326         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
5327         these barf if the error isn't cleared to NULL
5328
5329         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
5330         (_dbus_create_directory): new function
5331
5332         * dbus/dbus-errors.c (dbus_set_error): fix warning
5333
5334         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
5335         (_dbus_string_hex_decode): new function
5336         (test_hex_roundtrip): test code
5337
5338         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
5339
5340         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
5341
5342         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
5343         the save-to-temp/rename trick to atomically write the new file
5344         (_dbus_string_parse_uint): new function
5345
5346 2003-02-22  Havoc Pennington  <hp@pobox.com>
5347
5348         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
5349
5350 2003-02-22  Havoc Pennington  <hp@pobox.com>
5351
5352         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
5353         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
5354
5355         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
5356
5357         * dbus/test/data/sha-1: add US government test suite for SHA-1
5358
5359 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
5360
5361         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5362         Make string arrays NULL-terminated.
5363
5364         * dbus/dbus-memory.c: (dbus_free_string_array):
5365         * dbus/dbus-memory.h:
5366         New function for freeing NULL-terminated string arrays.
5367
5368         * dbus/dbus-message-builder.c: (append_quoted_string),
5369         (_dbus_message_data_load):
5370         Add support for array types.
5371
5372         * dbus/dbus-message.c: (check_message_handling):
5373         Add more types as test cases.
5374
5375         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
5376         (_dbus_string_parse_double):
5377         Add the start offset to the end offset.
5378
5379         * test/data/valid-messages/lots-of-arguments.message:
5380         New test message with lots of arguments.
5381
5382 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
5383
5384         * dbus/dbus-message.c: (dbus_message_append_nil),
5385         (dbus_message_append_int32), (dbus_message_append_uint32),
5386         (dbus_message_append_double), (dbus_message_append_string),
5387         (dbus_message_append_int32_array),
5388         (dbus_message_append_uint32_array),
5389         (dbus_message_append_double_array),
5390         (dbus_message_append_byte_array),
5391         (dbus_message_append_string_array):
5392         Fix all out-of-memory handling in these functions.
5393
5394 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
5395
5396         * dbus/dbus-message.c: (dbus_message_append_nil):
5397         Fix a silly.
5398
5399 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
5400
5401         * dbus/dbus-message.c: (dbus_message_append_args_valist),
5402         (dbus_message_append_nil), (dbus_message_append_int32_array),
5403         (dbus_message_append_uint32_array),
5404         (dbus_message_append_double_array),
5405         (dbus_message_append_byte_array),
5406         (dbus_message_append_string_array), (dbus_message_get_args_valist),
5407         (dbus_message_iter_get_int32_array),
5408         (dbus_message_iter_get_uint32_array),
5409         (dbus_message_iter_get_double_array),
5410         (dbus_message_iter_get_byte_array),
5411         (dbus_message_iter_get_string_array):
5412
5413         * dbus/dbus-message.h:
5414         Add functions for appending and getting arrays.
5415
5416 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
5417
5418         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
5419         element size at least 8 bytes, fixes mempool tests on
5420         64-bit machines.
5421
5422 2003-02-20  Alexander Larsson  <alexl@redhat.com>
5423
5424         * dbus/dbus-transport-unix.c (unix_do_iteration):
5425         Unlock the connection mutex during a blocking select call.
5426         Add todo about how we need a way to wake up the select.
5427
5428         * dbus/dbus-connection-internal.h:
5429         * dbus/dbus-connection.c:
5430         Add _dbus_connection_lock and _dbus_connection_unlock.
5431
5432 2003-02-19  Havoc Pennington  <hp@pobox.com>
5433
5434         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
5435         Doxyfile.in, not Doxyfile
5436
5437         * dbus/dbus-keyring.c: do some hacking on this
5438
5439         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
5440
5441         * dbus/dbus-errors.c (dbus_set_error_const): do not call
5442         dbus_error_init
5443         (dbus_set_error): remove dbus_error_init, check for message ==
5444         NULL *before* we sprintf into it, and add @todo about including
5445         system headers in this file
5446
5447         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
5448
5449         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
5450
5451         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
5452         get various bits of user information based on either username
5453         or user ID
5454         (_dbus_homedir_from_username): new function
5455
5456 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
5457
5458         * configure.in:
5459         Add check for nonposix getpwnam_r
5460
5461         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
5462         Align the pool element size to a sizeof (void *) boundary.
5463
5464         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
5465         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
5466         General Solaris fixes.
5467
5468         * test/data/valid-messages/simplest-manual.message:
5469         Explicitly state that we want little-endian packing.
5470
5471 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
5472
5473         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5474
5475         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
5476         Added to create a transport connecting using a tcp/ip socket.
5477
5478         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
5479         to a tcp socket at given host and port.
5480         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
5481         hostname and port.
5482
5483         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
5484
5485         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
5486         Added to create a server listening on a TCP/IP socket.
5487
5488 2003-02-19  Havoc Pennington  <hp@pobox.com>
5489
5490         Throughout: mop up all the Doxygen warnings and undocumented
5491         stuff.
5492
5493         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
5494         to search any paths.
5495
5496         * dbus/dbus-threads.c: move global mutex initializers to
5497         dbus-internals.h, multiple prototypes was confusing doxygen
5498         besides being kind of ugly
5499
5500         * Doxyfile (PREDEFINED): have Doxygen define
5501         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
5502         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
5503         (do not abuse the feature! it's for stuff like the autogenerated
5504         macros in dbus-md5.c, not just for things you don't feel like
5505         documenting...)
5506
5507 2003-02-18  Havoc Pennington  <hp@pobox.com>
5508
5509         * dbus/dbus-string.c (_dbus_string_zero): new function
5510
5511         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
5512         wrap it in some dbus-friendly API
5513
5514         * dbus/dbus-types.h: add 16-bit types
5515
5516 2003-02-18  Joe Shaw  <joe@assbarn.com>
5517
5518         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
5519         credentials from our currently running process.
5520         (get_word): Fix a buglet where we were copying the entire length
5521         instead of relative to our position.
5522
5523         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
5524         keys on the stack... it's 640k of data.
5525
5526         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
5527         read the credentials byte off the socket, even if we don't have
5528         SO_PEERCRED.
5529         (_dbus_poll): Implement poll() using select() for systems which
5530         don't have it.
5531
5532         * glib/test-dbus-glib.c (main): Print out an error if no
5533         parameters are given.
5534
5535         * test/data/auth/fallback.auth-script: Added.  Tests that a client
5536         can fallback to a secondary auth mechanism if the first fails.
5537
5538 2003-02-18  Havoc Pennington  <hp@pobox.com>
5539
5540         * AUTHORS: add Alex
5541
5542 2003-02-17  Havoc Pennington  <hp@pobox.com>
5543
5544         * doc/dbus-specification.sgml: lots of cosmetic
5545         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
5546         env variable to DBUS_BUS_ADDRESS, s/client/application/,
5547         s/server/bus/ (except in authentication section). Add a section
5548         "Message Bus Message Routing"
5549
5550 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
5551
5552         Release 0.4
5553
5554         * NEWS: Update
5555
5556 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
5557
5558         * doc/dbus-specification.sgml:
5559         Specification updates.
5560
5561 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
5562
5563         * bus/activation.c: (bus_activation_init), (child_setup),
5564         (bus_activation_activate_service):
5565         * bus/activation.h:
5566         * bus/main.c: (main):
5567         Set DBUS_ADDRESS environment variable.
5568
5569         * dbus/dbus-errors.c: (dbus_set_error):
5570         Don't use va_copy since that's a C99 feature.
5571
5572         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
5573         (_dbus_spawn_async):
5574         * dbus/dbus-sysdeps.h:
5575         Add child_setup_func to _dbus_spawn_async.
5576
5577         * doc/dbus-specification.sgml:
5578         Update specification.
5579
5580         * test/spawn-test.c: (setup_func), (main):
5581         Fix test.
5582
5583 2003-02-17  Alexander Larsson  <alexl@redhat.com>
5584
5585         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
5586         Added todo.
5587
5588 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
5589
5590         * doc/.cvsignore:
5591         * doc/Makefile.am:
5592         * doc/dbus-test-plan.sgml:
5593         Add test plan document.
5594
5595         * test/Makefile.am:
5596         Fix distcheck.
5597
5598 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
5599
5600         * dbus/dbus-message.c: (decode_header_data),
5601         (_dbus_message_loader_return_buffer):
5602         Set the header padding amount when loading a message.
5603
5604 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
5605
5606         * bus/dispatch.c: (send_one_message):
5607         Only send broadcast messages to registered connections.
5608
5609         * dbus/dbus-message.c: (dbus_message_name_is):
5610         * dbus/dbus-message.h:
5611         New convenience function.
5612
5613         * dbus/dbus-transport-debug.c: (do_reading):
5614         Only dispatch one message per run.
5615
5616         * test/Makefile.am:
5617         * test/bus-test.c: (new_connection_callback), (die),
5618         (test_hello_client1_handler), (test_hello_client2_handler),
5619         (test_hello_replies), (main):
5620
5621         * test/bus-test-loop.[ch]:
5622         Add these.
5623
5624 2003-02-16  Havoc Pennington  <hp@pobox.com>
5625
5626         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
5627         backward conditional
5628
5629 2003-02-16  Alexander Larsson  <alexl@redhat.com>
5630
5631         * dbus/dbus-connection.c:
5632         Implement sent_message_with_reply. (with_reply_and block is still
5633         busted).
5634         Made dispatch_message not lose message if OOM.
5635
5636         * dbus/dbus-errors.h:
5637         Add NoReply error (for reply timeouts).
5638
5639 2003-02-16  Alexander Larsson  <alexl@redhat.com>
5640
5641         * dbus/dbus-hash.c (_dbus_hash_table_unref):
5642         Actually free keys and values when destroying hashtable.
5643
5644 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
5645
5646         * dbus/dbus-auth.c: (client_try_next_mechanism):
5647         Plug a leak.
5648
5649         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
5650         Return TRUE if there's no thread implementation around.
5651
5652         * glib/dbus-gmain.c: (free_source),
5653         (dbus_connection_hookup_with_g_main):
5654         Make sure to remove the GSource when the connection is finalized.
5655
5656 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
5657
5658         * bus/dispatch.c: (bus_dispatch_message_handler):
5659         * dbus/dbus-errors.h:
5660         Return an error if someone tries to send a message to a service
5661         that doesn't exist.
5662
5663 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
5664
5665         * bus/activation.c: (load_directory), (bus_activation_init),
5666         (bus_activation_activate_service):
5667         * bus/activation.h:
5668         * bus/driver.c:
5669         (bus_driver_handle_activate_service), (bus_driver_handle_message):
5670         More work on the activation handling.
5671
5672         * dbus/dbus-errors.h:
5673         Add some error messages
5674
5675         * dbus/dbus-message.c: (dbus_message_new_error_reply):
5676         * dbus/dbus-message.h:
5677         New function that creates an error message.
5678
5679         * dbus/dbus-protocol.h:
5680         Add ACTIVATE_SERVER message.
5681
5682         * dbus/dbus-server-unix.c: (unix_handle_watch),
5683         (_dbus_server_new_for_domain_socket):
5684         Call _dbus_fd_set_close_on_exec.
5685
5686         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
5687         (_dbus_spawn_async), (_dbus_disable_sigpipe),
5688         (_dbus_fd_set_close_on_exec):
5689         * dbus/dbus-sysdeps.h:
5690         Add _dbus_fd_set_close_on exec function. Also add function that checks
5691         that all open fds are set to close-on-exec and warns otherwise.
5692
5693         * dbus/dbus-transport-unix.c:
5694         (_dbus_transport_new_for_domain_socket):
5695         Call _dbus_fd_set_close_on_exec.
5696
5697 2003-02-16  Havoc Pennington  <hp@pobox.com>
5698
5699         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
5700         allow people to avoid setting SIGPIPE to SIG_IGN
5701         (_dbus_connection_new_for_transport): disable SIGPIPE unless
5702         we've been asked not to
5703
5704 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
5705
5706         * dbus/dbus-list.c: (_dbus_list_append_link),
5707         (_dbus_list_prepend_link):
5708         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
5709         (dbus_realloc):
5710         Warning fixes.
5711
5712 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
5713
5714         * bus/Makefile.am:
5715         * bus/activation.c: (bus_activation_entry_free),
5716         (add_desktop_file_entry), (load_directory), (bus_activation_init):
5717         * bus/activation.h:
5718         * bus/main.c: (main):
5719         Add simple activation support, doesn't work yet though.
5720
5721 2003-02-15   Zack Rusin  <zack@kde.org>
5722
5723         * qt/dbus-qthread.cpp:  small casting fix
5724
5725 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
5726
5727         * dbus/dbus-errors.c: (dbus_set_error):
5728         * dbus/dbus-errors.h:
5729         Add a few errors and make dbus_set_error void.
5730
5731         * dbus/dbus-sysdeps.c:
5732         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
5733         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
5734         * dbus/dbus-sysdeps.h:
5735         Add _dbus_spawn_async.
5736
5737         * test/spawn-test.c: (main):
5738         Test for _dbus_spawn_async.
5739
5740 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
5741
5742         * dbus/dbus-internals.h:
5743         Fix build without tests.
5744
5745         * dbus/dbus-list.c: (alloc_link):
5746         Fix a segfault when a malloc fails.
5747
5748         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
5749         (dbus_malloc0), (dbus_realloc):
5750         Add support for malloc debugging.
5751
5752 2003-02-15  Alexander Larsson  <alexl@redhat.com>
5753
5754         * dbus/dbus-threads.c:
5755         * dbus/dbus-threads.h:
5756         Add condvars. Remove static mutext from API.
5757         Implement static mutexes by initializing them from threads_init.
5758
5759         * glib/dbus-gthread.c:
5760         * qt/dbus-qthread.cpp:
5761         Update with the thread api changes.
5762
5763
5764         * dbus/dbus-list.c:
5765         * dbus/dbus-list.h:
5766         Turn StaticMutex into normal mutex + init function.
5767         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
5768         _dbus_list_append_link, _dbus_list_prepend_link
5769
5770
5771         * dbus/dbus-sysdeps.c:
5772         * dbus/dbus-sysdeps.h:
5773         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
5774         _dbus_atomic_dec. Only slow fallback implementation at the moment.
5775
5776         * dbus/dbus-protocol.h:
5777         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
5778
5779         * dbus/dbus-message.c:
5780         Make ref/unref atomic.
5781         Fix some docs.
5782
5783         * dbus/dbus-connection-internal.h:
5784         * dbus/dbus-connection.c:
5785         * dbus/dbus-connection.h:
5786         Make threadsafe.
5787         Change _peek to _borrow,_return & _steal_borrowed.
5788         Change disconnect callback to event.
5789         Make dbus_connection_dispatch_messages reentrant.
5790
5791         * dbus/dbus-transport.c:
5792         Don't ref the connection on calls to the transport
5793         implementation.
5794
5795         * dbus/dbus-message-handler.c:
5796         Make threadsafe.
5797
5798         * glib/dbus-gmain.c:
5799         Don't use peek_message anymore
5800
5801         * test/Makefile.am:
5802         * test/debug-thread.c:
5803         * test/debug-thread.h:
5804         Simple thread implementation that asserts() on deadlocks in
5805         single-threaded code.
5806
5807         * test/bus-test.c:
5808         (main) Call debug_threads_init.
5809
5810         * test/watch.c:
5811         Use disconnect message instead of disconnect callback.
5812
5813         * bus/connection.c:
5814         * bus/connection.h:
5815         Don't call dbus_connection_set_disconnect_function. Instead export
5816         bus_connection_disconnect.
5817
5818         * bus/dispatch.c:
5819         Call bus_connection_disconnect when we get a disconnected message.
5820
5821 2003-02-15  Havoc Pennington  <hp@pobox.com>
5822
5823         * dbus/dbus-message.c (dbus_message_new): fool around with the
5824         docs
5825
5826 2003-02-14  Havoc Pennington  <hp@pobox.com>
5827
5828         * dbus/dbus-mempool.c: fail if the debug functions so indicate
5829
5830         * dbus/dbus-memory.c: fail if the debug functions indicate we
5831         should
5832
5833         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
5834         (_dbus_decrement_fail_alloc_counter): debug functions to
5835         simulate memory allocation failures
5836
5837 2003-02-14  Havoc Pennington  <hp@pobox.com>
5838
5839         * dbus/dbus-errors.h (struct DBusError): add a word of padding
5840         to DBusError
5841
5842 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5843
5844         * bus/driver.c: (bus_driver_handle_hello):
5845         * bus/driver.h:
5846         * bus/services.c: (bus_service_lookup):
5847         Reorder message sending so we get a more sane order.
5848
5849         * test/bus-test.c: (message_handler):
5850         Fix tyop.
5851
5852 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5853
5854         * bus/driver.c: (bus_driver_send_service_deleted),
5855         (bus_driver_send_service_created), (bus_driver_send_service_lost),
5856         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5857         (bus_driver_send_welcome_message),
5858         (bus_driver_handle_list_services),
5859         (bus_driver_handle_acquire_service),
5860         (bus_driver_handle_service_exists):
5861         * dbus/dbus-bus.c: (dbus_bus_register_client),
5862         (dbus_bus_acquire_service), (dbus_bus_service_exists):
5863         * dbus/dbus-errors.c: (dbus_result_to_string):
5864         * dbus/dbus-errors.h:
5865         * dbus/dbus-message.c: (dbus_message_append_args),
5866         (dbus_message_append_args_valist), (dbus_message_get_args),
5867         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5868         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5869         (dbus_message_iter_get_byte_array),
5870         (dbus_message_iter_get_string_array), (message_iter_test),
5871         (check_message_handling), (_dbus_message_test):
5872         * dbus/dbus-message.h:
5873         * test/bus-test.c: (main):
5874         Change fields to arguments in messages, so that they won't be
5875         confused with header fields.
5876
5877         * glib/test-dbus-glib.c: (main):
5878         Remove append_fields from hello message.
5879
5880 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5881
5882         * dbus/dbus-errors.c:
5883         * dbus/dbus-message.c:
5884         * dbus/dbus-string.c:
5885         Documentation fixes.
5886
5887 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5888
5889         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5890         (remove_timeout):
5891         Implement support for timeouts in dbus-glib.
5892
5893 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5894
5895         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5896         * dbus/dbus-message.c: (process_test_subdir):
5897         * test/break-loader.c: (find_breaks_based_on):
5898         Plug some memory leaks.
5899
5900 2003-02-13  Richard Hult  <rhult@codefactory.se>
5901
5902         * bus/main.c: Fix build.
5903
5904         * dbus/dbus-errors.h:
5905         * dbus/dbus-errors.c: Fix copyright for Anders.
5906
5907 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5908
5909         * bus/Makefile.am:
5910         Add utils.[ch]
5911
5912         * bus/connection.c: (bus_connection_foreach):
5913         Fix a warning.
5914
5915         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5916         (unescape_string), (new_section), (parse_section_start),
5917         (parse_key_value), (report_error), (bus_desktop_file_load),
5918         (bus_desktop_file_get_string):
5919         * bus/desktop-file.h:
5920         Use DBusError for error reporting.
5921
5922         * bus/dispatch.c: (send_one_message),
5923         (bus_dispatch_message_handler):
5924         * bus/driver.c: (bus_driver_send_service_deleted),
5925         (bus_driver_send_service_created), (bus_driver_send_service_lost),
5926         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5927         (bus_driver_send_welcome_message),
5928         (bus_driver_handle_list_services),
5929         (bus_driver_handle_acquire_service),
5930         (bus_driver_handle_service_exists):
5931         * bus/loop.c: (bus_loop_run):
5932         * bus/main.c:
5933         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5934
5935         * bus/utils.c: (bus_wait_for_memory):
5936         * bus/utils.h:
5937         New files with general utility functions.
5938
5939         * dbus/dbus-internals.h:
5940         Remove _DBUS_HANDLE_OOM.
5941
5942 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5943
5944         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5945         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5946         * dbus/dbus-errors.h:
5947         Add DBusError structure.
5948
5949 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5950
5951         * test/data/valid-messages/standard-acquire-service.message:
5952         * test/data/valid-messages/standard-hello.message:
5953         * test/data/valid-messages/standard-list-services.message:
5954         * test/data/valid-messages/standard-service-exists.message:
5955         Add some standard messages.
5956
5957 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5958
5959         * bus/driver.c: (bus_driver_send_welcome_message),
5960         (bus_driver_handle_list_services),
5961         (bus_driver_handle_acquire_service),
5962         (bus_driver_handle_service_exists), (bus_driver_handle_message):
5963         Update for API changes in libdbus.
5964
5965         * dbus/dbus-message.c: (dbus_message_new_reply):
5966         * dbus/dbus-message.h:
5967         Remove the name argument. The spec states that replies shouldn't
5968         have a name.
5969
5970 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5971
5972         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5973         (report_error), (bus_desktop_file_load), (lookup_section),
5974         (lookup_line), (bus_desktop_file_get_raw),
5975         (bus_desktop_file_get_string):
5976         * bus/desktop-file.h:
5977         Some fixes, and new functions for getting a key value from a section.
5978
5979 2003-02-13  Havoc Pennington  <hp@pobox.com>
5980
5981         * test/data/auth/fail-after-n-attempts.auth-script: new test
5982
5983         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5984         reject the client.
5985
5986 2003-02-13  Havoc Pennington  <hp@pobox.com>
5987
5988         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5989         dbus_credentials_match were backward
5990
5991         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5992         NO_CREDENTIALS and ROOT_CREDENTIALS
5993
5994         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5995         into here. Never process more commands after we've reached an
5996         end state; store further data as unused bytes.
5997
5998         * test/data/auth/*: add more auth tests
5999
6000         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
6001         command to match exact string and EXPECT_UNUSED to match unused
6002         bytes
6003
6004         * test/Makefile.am (dist-hook): fix to dist all the test stuff
6005
6006 2003-02-12  Havoc Pennington  <hp@pobox.com>
6007
6008         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
6009         \r off of popped lines
6010
6011         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
6012         scripts
6013
6014         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
6015         SEND, append \r\n
6016
6017 2003-02-12  Havoc Pennington  <hp@pobox.com>
6018
6019         * dbus/Makefile.am: remove break-loader from the build, since it
6020         moved.
6021
6022         * configure.in: add --enable-gcov to turn on coverage profiling
6023         flags and disable optimization
6024
6025 2003-02-10  Havoc Pennington  <hp@pobox.com>
6026
6027         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
6028         initial cut at test framework for DBusAuth from laptop.
6029         Doesn't quite work yet but it compiles and I need to get
6030         it off the 266mhz laptop. ;-)
6031
6032         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
6033         fix a memleak in error case
6034
6035 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
6036
6037         * bus/Makefile.am:
6038         * bus/desktop-file.c:
6039         * bus/desktop-file.h:
6040         Add a desktop file parser.
6041
6042 2003-02-11  Zack Rusin  <zack@kde.org>
6043
6044         * qt/message.[h|cpp]: sample implementation
6045         of the KDE wrapper for DBusMessage
6046
6047 2003-02-09  Zack Rusin  <zack@kde.org>
6048
6049         * test/bus-test.c: make_it_compile
6050         * doc/dbus-specification.sgml: minimal semantic fix
6051
6052 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
6053
6054         Release 0.3
6055
6056         * NEWS: Update
6057
6058 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
6059
6060         * dbus/Makefile.am:
6061         * dbus/dbus-break-loader.c:
6062         * test/Makefile.am:
6063         * test/break-loader.c:
6064         Move dbus-break-loader to test/ and rename it to break-loader.
6065
6066 2003-02-02  Havoc Pennington  <hp@pobox.com>
6067
6068         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
6069         for code to manage cookies in your home directory
6070
6071         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
6072
6073         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
6074         to authenticate, then disconnect the client.
6075
6076 2003-02-03  Alexander Larsson  <alexl@redhat.com>
6077
6078         * dbus/dbus-message.c (dbus_message_append_fields):
6079         Correct docs.
6080
6081 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
6082
6083         * doc/dbus-specification.sgml:
6084         Update address format section.
6085
6086 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
6087
6088         * test/Makefile.am:
6089         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
6090         (message_handler), (new_connection_callback), (loop_quit),
6091         (loop_run), (main):
6092         Add bus test.
6093
6094 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
6095
6096         * bus/driver.c: (bus_driver_handle_service_exists):
6097         Simplify the code a bit.
6098
6099         * dbus/dbus-bus.c: (dbus_bus_service_exists):
6100         Fix a silly.
6101
6102 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
6103
6104         * bus/Makefile.am:
6105         Add libdbus-daemon.la and link to it.
6106
6107 2003-02-01  James Willcox  <jwillcox@gnome.org>
6108
6109         * bus/driver.c: (bus_driver_handle_own_service):
6110         Actually include the service reply code in the message.
6111
6112 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
6113
6114         * bus/driver.c: (bus_driver_handle_service_exists):
6115         Don't unref the incoming message.
6116
6117 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
6118
6119         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
6120
6121 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
6122
6123         * dbus/dbus-server.c: (dbus_server_listen):
6124         * dbus/dbus-transport.c: (_dbus_transport_open):
6125         ifdef out the calls to the debug transport and server.
6126
6127 2003-02-02  Alexander Larsson  <alexl@redhat.com>
6128
6129         * dbus/dbus-watch.c (dbus_watch_get_flags):
6130         Add note in the docs that ERROR or HANGUP won't be returned
6131         and are assumed always on.
6132
6133         * glib/dbus-gmain.c (add_watch):
6134         Always add IO_ERR | IO_HUP
6135
6136         * dbus/dbus-message.h:
6137         Add semicolon after dbus_message_iter_get_string_array().
6138         Makes qt code build again
6139
6140 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
6141
6142         * bus/driver.c: (create_unique_client_name),
6143         (bus_driver_handle_hello):
6144         Don't take a name, just use a numeric id to identify
6145         each client.
6146
6147         * dbus/Makefile.am:
6148         * dbus/dbus-bus.c: (dbus_bus_register_client),
6149         (dbus_bus_acquire_service), (dbus_bus_service_exists):
6150         * dbus/dbus-bus.h:
6151         Add new convenience functions for communicating with the bus.
6152
6153         * dbus/dbus-message.h:
6154
6155         * dbus/dbus-protocol.h:
6156         Fix a typo.
6157
6158 2003-02-01  Alexander Larsson  <alexl@redhat.com>
6159
6160         * dbus/dbus-message.c (dbus_message_append_fields):
6161         Add some more doc comments.
6162
6163 2003-02-01  Havoc Pennington  <hp@pobox.com>
6164
6165         * dbus/dbus-break-loader.c (randomly_modify_length): change
6166         a 4-byte value in the message as if it were a length
6167
6168         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
6169         execute bit on saved files
6170
6171 2003-02-01  Havoc Pennington  <hp@pobox.com>
6172
6173         * dbus/dbus-break-loader.c (main): new program to find messages
6174         that break the loader.
6175
6176         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
6177         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
6178
6179         * dbus/dbus-string.c (_dbus_string_set_byte): new
6180
6181 2003-01-31  Havoc Pennington  <hp@pobox.com>
6182
6183         * dbus/dbus-message.c: refactor the test code to be more general,
6184         in preparation for writing a "randomly permute test cases to
6185         try to break the loader" program.
6186
6187 2003-01-31  Havoc Pennington  <hp@pobox.com>
6188
6189         * doc/dbus-specification.sgml: work on the specification
6190
6191         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
6192         the protocol version of the message.
6193
6194         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
6195         no longer specifies that.
6196         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
6197         1/2/3/4)
6198
6199         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
6200         "break" for DBUS_TYPE_NIL, remove @todo
6201
6202 2003-01-31  Havoc Pennington  <hp@pobox.com>
6203
6204         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
6205         just set_is_error/get_is_error as this is a commonly-used
6206         function, and write docs.
6207
6208 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
6209
6210         * dbus/dbus-address.c: (dbus_address_entry_free):
6211         Free key and value lists.
6212
6213         * dbus/dbus-internals.c: (_dbus_type_to_string):
6214         Add the types we didn't have.
6215
6216         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
6217         (_dbus_marshal_validate_arg):
6218         Add NIL types.
6219
6220         * dbus/dbus-message.c: (dbus_message_set_sender):
6221         Remove todo about being able to set sender to NULL.
6222
6223         (dbus_message_set_is_error_reply),
6224         (dbus_message_get_is_error_reply):
6225         * dbus/dbus-message.h:
6226         New functions.
6227
6228         * dbus/dbus-protocol.h:
6229         Add error reply flag.
6230
6231         * test/data/valid-messages/opposite-endian.message:
6232         Add NIL type to test.
6233
6234 2003-01-31  Havoc Pennington  <hp@pobox.com>
6235
6236         * doc/dbus-specification.sgml: fully specify the header.  Add
6237         flags and major protocol version, and change header/body len to
6238         unsigned.
6239
6240         * dbus/dbus-message-builder.c (append_saved_length): append length
6241         as uint32
6242
6243         * dbus/dbus-message.c (dbus_message_create_header): change header
6244         length and body length to unsigned. Add the new fields from the
6245         spec
6246         (_dbus_message_loader_return_buffer): unsigned header/body len
6247
6248 2003-01-30  Havoc Pennington  <hp@pobox.com>
6249
6250         * dbus/dbus-auth.c: rework to use only REJECTED, no
6251         MECHANISMS
6252
6253         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
6254         use REJECTED, suggested by Mark McLoughlin
6255
6256 2003-01-30  Havoc Pennington  <hp@pobox.com>
6257
6258         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
6259         a better way to report errors here. e.g.  "unix address lacks
6260         path" or something. also "no such file" when the path doesn't
6261         exist, etc.
6262
6263         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
6264         leaking list nodes
6265         (dbus_parse_address): add @todo about documenting address format,
6266         and allowing , and ; to be escaped
6267
6268 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
6269
6270         * dbus/Makefile.am:
6271         Add dbus-address.[ch]
6272
6273         * dbus/dbus-address.c: (dbus_address_entry_free),
6274         (dbus_address_entries_free), (create_entry),
6275         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
6276         (dbus_parse_address), (_dbus_address_test):
6277         * dbus/dbus-address.h:
6278         New files for dealing with address parsing.
6279
6280         * dbus/dbus-connection.c:
6281         Document timeout functions.
6282
6283         * dbus/dbus-message.c:
6284         Document dbus_message_new_from_message.
6285
6286         * dbus/dbus-server-debug.c:
6287         Document.
6288
6289         * dbus/dbus-server.c: (dbus_server_listen):
6290         Parse address and use correct server implementation.
6291
6292         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
6293         * dbus/dbus-string.h:
6294         New function with test.
6295
6296         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
6297         * dbus/dbus-test.h:
6298         Add address tests.
6299
6300         * dbus/dbus-transport-debug.c:
6301         Document.
6302
6303         * dbus/dbus-transport.c: (_dbus_transport_open):
6304         Parse address and use correct transport implementation.
6305
6306 2003-01-30  Havoc Pennington  <hp@pobox.com>
6307
6308         * dbus/dbus-message.c: use message->byte_order instead of
6309         DBUS_COMPILER_BYTE_ORDER throughout.
6310         (dbus_message_create_header): pad header to align the
6311         start of the body of the message to 8-byte boundary
6312
6313         * dbus/dbus-marshal.h: make all the demarshalers take const
6314         DBusString arguments.
6315
6316         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
6317         validate message args here, so we don't have to do slow validation
6318         later, and so we catch bad messages as they are incoming. Also add
6319         better checks on header_len and body_len. Also fill in
6320         message->byte_order
6321
6322         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
6323         implemented properly)
6324         (_dbus_string_validate_nul): new function to check all-nul
6325
6326         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
6327         get_arg_end_pos and remove all validation
6328         (_dbus_marshal_validate_arg): actually do validation here.
6329
6330 2003-01-29  Havoc Pennington  <hp@pobox.com>
6331
6332         * dbus/dbus-message.c (check_message_handling): fix assertion
6333         failure on set_client_serial
6334
6335 2003-01-28  Havoc Pennington  <hp@pobox.com>
6336
6337         * dbus/dbus-server-debug.c: Add doc section comments
6338
6339         * dbus/dbus-transport-debug.c: add doc section comments
6340
6341 2003-01-28  Havoc Pennington  <hp@redhat.com>
6342
6343         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
6344         the reverse order from how I had it
6345         (_dbus_string_base64_encode): reverse encoding order. I was
6346         basically byteswapping everything during encoding.
6347
6348 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
6349
6350         * dbus/dbus-connection-internal.h:
6351         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
6352         (_dbus_connection_remove_timeout):
6353         Add functions for adding and removing timeouts.
6354
6355         * dbus/dbus-message.c: (dbus_message_new_from_message):
6356         Add new function that takes a message and creates an exact
6357         copy of it, but with the refcount set to 1.
6358         (check_message_handling):
6359         Fix build error.
6360
6361         * dbus/dbus-server-protected.h:
6362         * dbus/dbus-server.c: (_dbus_server_init_base),
6363         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
6364         (dbus_server_set_timeout_functions):
6365         (_dbus_server_remove_timeout):
6366         New functions so that a server can add and remove timeouts.
6367
6368         (dbus_server_listen):
6369         Add commented out call to dbus_server_debug_new.
6370
6371         * dbus/dbus-timeout.c: (_dbus_timeout_new):
6372         Actually set the handler, doh.
6373
6374         * dbus/dbus-transport.c: (_dbus_transport_open):
6375         Add commented out call to dbus_transport_debug_client_new.
6376
6377         * dbus/Makefile.am:
6378         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
6379
6380 2003-01-28  Havoc Pennington  <hp@pobox.com>
6381
6382         * dbus/dbus-message.c (check_message_handling): function to check
6383         on the loaded message, iterates over it etc.
6384
6385 2003-01-28  Havoc Pennington  <hp@pobox.com>
6386
6387         * test/Makefile.am (dist-hook): fix make distdir
6388
6389         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
6390
6391 2003-01-27  Havoc Pennington  <hp@pobox.com>
6392
6393         * dbus/dbus-mempool.c (time_for_size): replace printf with
6394         _dbus_verbose
6395
6396         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
6397         empty lines; fix the SAVE_LENGTH stuff to be
6398         START_LENGTH/END_LENGTH so it actually works; couple other
6399         bugfixes
6400
6401         * test/Makefile.am (dist-hook): add dist-hook for .message files
6402
6403         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
6404         can be constant or locked.
6405         (_dbus_string_free): allow freeing a const string as
6406         documented/intended
6407
6408         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
6409
6410         * dbus/dbus-test-main.c (main): take an argument which is the
6411         directory containing test data
6412
6413         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
6414         argument to this and load all the messages in test/data/
6415         checking that they can be loaded or not loaded as appropriate.
6416
6417 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
6418
6419         * bus/dispatch.c: (bus_dispatch_message_handler):
6420         Dispatch messages sent to services.
6421
6422         * bus/driver.c: (bus_driver_send_service_deleted),
6423         (bus_driver_send_service_created), (bus_driver_send_service_lost),
6424         (bus_driver_send_service_acquired):
6425         Add helper functions for sending service related messages.
6426
6427         (bus_driver_send_welcome_message):
6428         Send HELLO_REPLY instead of WELCOME.
6429
6430         (bus_driver_handle_list_services):
6431         Send LIST_SERVICES_REPLY instead of SERVICES.
6432
6433         (bus_driver_handle_own_service),
6434         (bus_driver_handle_service_exists):
6435         New message handlers.
6436
6437         (bus_driver_handle_message):
6438         Invoke new message handlers.
6439
6440         (bus_driver_remove_connection):
6441         Don't remove any services here since that's done automatically
6442         by bus_service_remove_owner now.
6443
6444         * bus/driver.h:
6445         New function signatures.
6446
6447         * bus/services.c: (bus_service_add_owner):
6448         Send ServiceAcquired message if we're the only primary owner.
6449
6450         (bus_service_remove_owner):
6451         Send ServiceAcquired/ServiceLost messages.
6452
6453         (bus_service_set_prohibit_replacement),
6454         (bus_service_get_prohibit_replacement):
6455         Functions for setting prohibit replacement.
6456
6457         (bus_service_has_owner):
6458         New function that checks if a connection is in the owner queue of
6459         a certain service.
6460
6461         * bus/services.h:
6462         Add new function signatures.
6463
6464         * dbus/dbus-list.c: (_dbus_list_test):
6465         Add tests for _dbus_list_remove_last and traversing the list backwards.
6466
6467         * dbus/dbus-list.h:
6468         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
6469         go any further, so return NULL then.
6470
6471         * dbus/dbus-protocol.h:
6472         Add new messages, service flags and service replies.
6473
6474 2003-01-26  Havoc Pennington  <hp@pobox.com>
6475
6476         * dbus/dbus-message-builder.c: implement, completely untested.
6477
6478         * test/data/*: add data to be used in testing.
6479         ".message" files are our simple loadable text format.
6480         ".message-raw" will be binary dumps of messages.
6481
6482         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
6483
6484 2003-01-26  Havoc Pennington  <hp@pobox.com>
6485
6486         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
6487
6488         * dbus/dbus-errors.c (dbus_result_to_string): add
6489         file errors
6490
6491         * dbus/dbus-message-builder.c: new file, will contain code to load
6492         up messages from files. Not implemented yet.
6493
6494 2003-01-26  Havoc Pennington  <hp@pobox.com>
6495
6496         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
6497         the sender by setting to NULL
6498
6499 2003-01-26  Havoc Pennington  <hp@pobox.com>
6500
6501         The unit tests pass, but otherwise untested.  If it breaks, the
6502         tests should have been better. ;-)
6503
6504         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
6505         the connection.
6506
6507         * dbus/dbus-message.c: redo everything so we maintain
6508         message->header as the only copy of the various fields.
6509         This avoids the possibility of out-of-memory in some cases,
6510         for example dbus_message_lock() can't run out of memory anymore,
6511         and avoids extra copying. Figured I may as well go ahead and do
6512         this since it was busted for dbus_message_lock to not return
6513         failure on OOM, and dbus_message_write_header was totally
6514         unchecked for OOM. Also fixed some random other bugs.
6515
6516         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
6517         that strings are nul-terminated. Also, end_pos can be equal
6518         to string length just not greater than, I think.
6519         (_dbus_marshal_set_int32): new function
6520         (_dbus_marshal_set_uint32): new function
6521         (_dbus_marshal_set_string): new function
6522
6523         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
6524         a warning, init timeout_list to NULL
6525         (dbus_connection_send_message): don't use uninitialized variable
6526         "serial"
6527
6528         * dbus/dbus-string.c (_dbus_string_replace_len): new function
6529
6530 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
6531
6532         * bus/driver.c: (bus_driver_handle_hello),
6533         (bus_driver_send_welcome_message):
6534         Plug leaks
6535
6536 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
6537
6538         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
6539         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6540         (dbus_connection_unref):
6541         * dbus/dbus-marshal.c: (_dbus_marshal_test):
6542         * dbus/dbus-message.c: (dbus_message_unref),
6543         Plug memory leaks.
6544
6545         (dbus_message_get_fields):
6546         Remove debugging printout.
6547
6548         (_dbus_message_loader_return_buffer):
6549         Don't store the header string.
6550
6551         (_dbus_message_test):
6552         Plug leaks.
6553
6554 2003-01-26  Richard Hult  <rhult@codefactory.se>
6555
6556         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
6557         the file descriptor list, since it can change under us.
6558
6559 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
6560
6561         * glib/dbus-gmain.c: (dbus_connection_prepare),
6562         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
6563         (remove_watch), (dbus_connection_hookup_with_g_main):
6564         Rewrite the glib handling to use its own GSource instead of a
6565         GIOChannel so we can catch messages put in the queue while waiting
6566         for a reply.
6567
6568 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
6569
6570         * bus/Makefile.am:
6571         * bus/connection.c: (connection_disconnect_handler),
6572         (connection_watch_callback), (bus_connection_setup):
6573         * bus/dispatch.c: (send_one_message),
6574         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
6575         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
6576         * bus/dispatch.h:
6577         * bus/driver.c: (bus_driver_send_service_deleted),
6578         (bus_driver_send_service_created), (bus_driver_handle_hello),
6579         (bus_driver_send_welcome_message),
6580         (bus_driver_handle_list_services), (bus_driver_remove_connection),
6581         (bus_driver_handle_message):
6582         * bus/driver.h:
6583         Refactor code, put the message dispatching in its own file. Use
6584         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
6585         is disconnected.
6586
6587 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
6588
6589         * dbus/dbus-internals.h:
6590         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
6591
6592         * dbus/dbus-message.c: (dbus_message_get_sender):
6593         * dbus/dbus-message.h:
6594         Implement dbus_message_get_sender.
6595
6596         * dbus/dbus-protocol.h:
6597         Add message and service defines.
6598
6599 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
6600
6601         * dbus/dbus-connection.c: (dbus_connection_send_message):
6602         * dbus/dbus-message-internal.h:
6603         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
6604         (dbus_message_write_header):
6605         Remove _dbus_messag_unlock and don't set the client serial on a
6606         message if one already exists.
6607
6608 2003-01-24  Havoc Pennington  <hp@pobox.com>
6609
6610         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
6611         list_pool
6612
6613         * bus/driver.c (bus_driver_handle_list_services): fix a leak
6614         on OOM
6615
6616 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
6617
6618         * dbus/dbus-list.c: (alloc_link), (free_link):
6619         Use a memory pool for the links.
6620
6621 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
6622
6623         * bus/connection.c: (bus_connection_foreach):
6624         * bus/connection.h:
6625         Add new bus_connection_foreach function.
6626
6627         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
6628         Add function that broadcasts a message to all clients.
6629
6630         (bus_driver_send_service_created), (bus_driver_handle_hello),
6631         (bus_driver_send_welcome_message),
6632         (bus_driver_handle_list_services), (bus_driver_message_handler):
6633         Implement functions that take care of listing services, and notifying
6634         clients when new services are created.
6635
6636         * bus/services.c: (bus_services_list):
6637         * bus/services.h:
6638         Add new function that returns an array of strings with the currently
6639         registered services.
6640
6641         * glib/dbus-glib.h:
6642         * glib/dbus-gmain.c:
6643         Update copyright year.
6644
6645 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
6646
6647         * dbus/dbus-connection.c: (dbus_connection_send_message):
6648         Unlock the message in case it was sent earlier.
6649
6650         (dbus_connection_send_message_with_reply_and_block):
6651         Remove the reply message from the list.
6652
6653         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
6654         Set array_len and new_pos correctly.
6655
6656         (_dbus_marshal_test):
6657         Remove debug output.
6658
6659         * dbus/dbus-message-internal.h:
6660         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
6661         New function that returns the reply serial.
6662
6663         (_dbus_message_unlock):
6664         New function that unlocks a message and resets its header.
6665
6666         (dbus_message_append_string_array),
6667         (dbus_message_get_fields_valist),
6668         (dbus_message_iter_get_field_type),
6669         (dbus_message_iter_get_string_array),
6670         (dbus_message_get_fields),
6671         (dbus_message_append_fields_valist):
6672         Handle string arrays.
6673
6674         (dbus_message_set_sender):
6675         Make this function public since the bus daemon needs it.
6676
6677         (decode_header_data):
6678         Set the reply serial to -1 initially.
6679
6680         * dbus/dbus-message.h:
6681         Add dbus_message_set_sender.
6682
6683 2003-01-24  Havoc Pennington  <hp@pobox.com>
6684
6685         * doc/dbus-specification.sgml: add some stuff
6686
6687 2003-01-22  Havoc Pennington  <hp@pobox.com>
6688
6689         * doc/dbus-specification.sgml: Start to document the protocol.
6690
6691 2003-01-22  Havoc Pennington  <hp@pobox.com>
6692
6693         * dbus/dbus-connection.c
6694         (dbus_connection_send_message_with_reply_and_block): add some @todo
6695
6696         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
6697
6698 2003-01-21  Havoc Pennington  <hp@pobox.com>
6699
6700         (patch untested because can't compile)
6701
6702         * bus/driver.c (create_unique_client_name): make this function
6703         never recycle client names. Also, caller should initialize
6704         the DBusString.
6705
6706         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
6707
6708 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
6709
6710         * dbus/dbus-marshal.c: (_dbus_marshal_double),
6711         (_dbus_marshal_int32), (_dbus_marshal_uint32),
6712         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
6713         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
6714         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
6715         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
6716         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
6717         * dbus/dbus-marshal.h:
6718         * dbus/dbus-protocol.h:
6719         Add support for marshalling and demarshalling integer, double
6720         and string arrays.
6721
6722 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
6723
6724         * bus/Makefile.am:
6725         Add driver.[ch]
6726
6727         * bus/connection.c: (connection_disconnect_handler):
6728         Remove the connection from the bus driver's list.
6729
6730         (connection_watch_callback): Dispatch messages.
6731
6732         (free_connection_data): Free connection name.
6733
6734         (bus_connection_setup): Add connection to the bus driver's list.
6735         (bus_connection_remove_owned_service):
6736         (bus_connection_set_name), (bus_connection_get_name):
6737         Add functions for setting and getting the connection's name.
6738
6739         * bus/connection.h:
6740         Add function headers.
6741
6742         * bus/driver.c: (create_unique_client_name),
6743         (bus_driver_handle_hello_message),
6744         (bus_driver_send_welcome_message), (bus_driver_message_handler),
6745         (bus_driver_add_connection), (bus_driver_remove_connection):
6746         * bus/driver.h:
6747         * bus/main.c:
6748         * bus/services.c: (bus_service_free):
6749         * bus/services.h:
6750         New file that handles communication and registreation with the bus
6751         itself.
6752
6753 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
6754
6755         * dbus/dbus-connection.c: (dbus_connection_send_message):
6756         Add a new client_serial parameter.
6757
6758         (dbus_connection_send_message_with_reply):
6759         Remove a @todo since we've implemented the blocking function.
6760
6761         (dbus_connection_send_message_with_reply_and_block):
6762         New function that sends a message and waits for a reply and
6763         then returns the reply.
6764
6765         * dbus/dbus-connection.h:
6766         Add new functions.
6767
6768         * dbus/dbus-errors.c: (dbus_result_to_string):
6769         * dbus/dbus-errors.h:
6770         Add new DBUS_RESULT.
6771
6772         * dbus/dbus-message-internal.h:
6773         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
6774         (_dbus_message_set_sender), (dbus_message_write_header),
6775         (dbus_message_new_reply), (decode_header_data),
6776         (_dbus_message_loader_return_buffer), (_dbus_message_test):
6777         * dbus/dbus-message.h:
6778         Add new functions that set the reply serial and sender.
6779         Also marshal and demarshal them correctly and add test.
6780
6781         * dbus/dbus-protocol.h:
6782         Add new DBUS_MESSAGE_TYPE_SENDER.
6783
6784         * glib/dbus-glib.h:
6785         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
6786         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
6787         (dbus_connection_hookup_with_g_main):
6788         * glib/test-dbus-glib.c: (main):
6789         Rewrite to use GIOChannel and remove the GSource crack.
6790
6791         * test/echo-client.c: (main):
6792         * test/watch.c: (check_messages):
6793         Update for changed APIs
6794
6795 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
6796
6797         * dbus/Makefile.am: Add dbus-timeout.[cħ]
6798
6799         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
6800         Create a DBusTimeoutList.
6801         (dbus_connection_set_timeout_functions): Add new function to
6802         set timeout callbacks
6803
6804         * dbus/dbus-connection.h: Add public DBusTimeout API.
6805
6806         * dbus/dbus-message.c: (dbus_message_get_service):
6807         * dbus/dbus-message.h:  New function.
6808
6809         * dbus/dbus-server.c: Fix small doc typo.
6810
6811         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
6812
6813 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
6814
6815         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
6816         of the string, just as long as specified.
6817
6818 2003-01-19  Havoc Pennington  <hp@pobox.com>
6819
6820         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
6821         new function
6822
6823         * dbus/dbus-server.c (dbus_server_set_max_connections)
6824         (dbus_server_get_max_connections, dbus_server_get_n_connections):
6825         keep track of current number of connections, and add API for
6826         setting a max (but haven't implemented enforcing the max yet)
6827
6828 2003-01-18  Havoc Pennington  <hp@pobox.com>
6829
6830         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
6831         reading/writing if read_watch != NULL or write_watch != NULL.
6832
6833         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
6834         the message loader code to actually load message->header and
6835         message->body into the newly-created message.
6836
6837         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
6838         in OOM case
6839
6840         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
6841         (dbus_connection_get_max_message_size)
6842         (dbus_connection_set_max_live_messages_size)
6843         (dbus_connection_get_max_live_messages_size): implement some
6844         resource limitation functions
6845
6846         * dbus/dbus-resources.c: new file implementing some of the
6847         resource limits stuff
6848
6849         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
6850         missing docs, add @todo to handle OOM etc.
6851
6852         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
6853         docs
6854
6855 2003-01-18  Havoc Pennington  <hp@pobox.com>
6856
6857         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6858         connection if it hasn't been already.
6859
6860         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6861         replace with DisconnectFunction.
6862
6863 2003-01-18  Havoc Pennington  <hp@pobox.com>
6864
6865         Building --disable-verbose-mode --disable-asserts --disable-tests
6866         cuts the library from 112K to 45K or so
6867
6868         * configure.in: check for varargs macro support,
6869         add --enable-verbose-mode, --enable-asserts.
6870
6871         * dbus/dbus-internals.h (_dbus_assert): support
6872         DBUS_DISABLE_ASSERT
6873         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6874
6875 2003-01-18  Havoc Pennington  <hp@pobox.com>
6876
6877         * dbus/dbus-test.c: include config.h so that tests actually run
6878
6879         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6880         so the failure mode when that assumption fails will be plenty
6881         obvious.
6882
6883 2003-01-18  Havoc Pennington  <hp@pobox.com>
6884
6885         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6886
6887         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6888         the distribution
6889
6890         * test/Makefile.am: don't use special variable "TESTS" for echo-*
6891         since we don't want to use those in make check
6892
6893 2003-01-15  Havoc Pennington  <hp@redhat.com>
6894
6895         Release 0.2
6896
6897         * NEWS: update
6898
6899 2003-01-15  Havoc Pennington  <hp@redhat.com>
6900
6901         * test/Makefile.am: fix so that test source code ends up in the
6902         distribution on make distcheck
6903
6904 2003-01-15  Havoc Pennington  <hp@redhat.com>
6905
6906         Release 0.1.
6907
6908         * NEWS: update
6909
6910 2003-01-15  Havoc Pennington  <hp@redhat.com>
6911
6912         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6913         fix build when --disable-tests
6914
6915         * Makefile.am (EXTRA_DIST): put HACKING in here
6916
6917         * HACKING: document procedure for making a tarball release.
6918
6919 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
6920
6921         * bus/connection.c: (connection_error_handler),
6922         (bus_connection_setup):
6923         * bus/main.c: (main):
6924         Make sure that the DBusConnectionData struct is NULLed
6925         out to prevent a segfault.
6926
6927         * dbus/dbus-errors.c: (dbus_result_to_string):
6928         * dbus/dbus-errors.h:
6929         * dbus/dbus-message.c: (dbus_message_get_fields),
6930         (dbus_message_get_fields_valist), (_dbus_message_test):
6931         * dbus/dbus-message.h:
6932         Make dbus_message_get_fields return a result code so we can
6933         track invalid fields as well as oom.
6934
6935 2003-01-11  Havoc Pennington  <hp@pobox.com>
6936
6937         * configure.in: change --enable-test/--enable-ansi action-if-given
6938         to enable_foo=$enableval instead of enable_foo=yes
6939
6940 2003-01-08  Havoc Pennington  <hp@pobox.com>
6941
6942         * dbus/dbus-string.c (_dbus_string_align_length): new function
6943
6944         * dbus/dbus-test-main.c: move main() for test app here
6945         * dbus/dbus-test.c
6946         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6947         symbol to run tests, because dbus-test isn't in the main
6948         library
6949
6950         Code review nitpicks.
6951
6952         * dbus/dbus-message.c (dbus_message_write_header): add newlines
6953         for people with narrow emacs ;-). Assert client_serial was filled
6954         in. Assert message->name != NULL.
6955         (dbus_message_append_fields): have "first_field_type" arg separate
6956         from va list, needed for C++ binding that also uses varargs IIRC
6957         and helps with type safety
6958         (dbus_message_new): add @todo about using DBusString to store
6959         service/name internally
6960         (dbus_message_new): don't leak ->service and ->name on OOM later
6961         in the function
6962         (dbus_message_unref): free the service name
6963         (dbus_message_get_fields): same change to varargs
6964         i.e. first_field_type
6965         (_dbus_message_loader_return_buffer): assert that the message data
6966         is aligned (if not it's a bug in our code). Put in verbose griping
6967         about why we set corrupted = TRUE.
6968         (decode_header_data): add FIXME that char* is evil.  Was going to
6969         add FIXME about evil locale-specific string.h strncmp, but just
6970         switched to wacky string-as-uint32 optimization. Move check for
6971         "no room for field name" above get_const_data_len() to avoid
6972         assertion failure in get_const_data_len if we have trailing 2
6973         bytes or the like. Check for service and name fields being
6974         provided twice. Don't leak service/name on error. Require field
6975         names to be aligned to 4 bytes.
6976
6977         * dbus/dbus-marshal.c: move byte swap stuff to header
6978         (_dbus_pack_int32): uscore-prefix
6979         (_dbus_unpack_int32): uscore-prefix
6980         (_dbus_unpack_uint32): export
6981         (_dbus_demarshal_string): add @todo complaining about use of
6982         memcpy()
6983         (_dbus_marshal_get_field_end_pos): add @todo about bad error
6984         handling allowing corrupt data to go unchecked
6985
6986 2003-01-08  Havoc Pennington  <hp@redhat.com>
6987
6988         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6989         to the select() as needed for authentication. (should be using
6990         _dbus_poll() not select, but for another day)
6991
6992         * dbus/dbus.h: include dbus/dbus-protocol.h
6993
6994 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
6995
6996         * dbus/Makefile.am (dbusinclude_HEADERS): Install
6997         dbus-connection.h
6998
6999 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
7000
7001         * dbus/dbus-internals.c: (_dbus_type_to_string):
7002         New function that returns a string describing a type.
7003
7004         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
7005         * dbus/dbus-marshal.h:
7006         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
7007         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
7008         (dbus_message_iter_get_byte_array):
7009         * dbus/dbus-message.h:
7010         Add new convenience functions for appending and getting message fields.
7011         Also add demarshalling routines for byte arrays.
7012
7013 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
7014
7015         * dbus/dbus-connection-internal.h:
7016         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
7017         (_dbus_connection_get_next_client_serial),
7018         (dbus_connection_send_message):
7019         * dbus/dbus-internals.h:
7020         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
7021         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
7022         (_dbus_marshal_uint32), (_dbus_demarshal_double),
7023         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
7024         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
7025         (_dbus_verbose_bytes), (_dbus_marshal_test):
7026         * dbus/dbus-marshal.h:
7027         * dbus/dbus-message-internal.h:
7028         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
7029         (dbus_message_write_header), (_dbus_message_lock),
7030         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
7031         (dbus_message_get_name), (dbus_message_append_int32),
7032         (dbus_message_append_uint32), (dbus_message_append_double),
7033         (dbus_message_append_string), (dbus_message_append_byte_array),
7034         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
7035         (dbus_message_iter_unref), (dbus_message_iter_has_next),
7036         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
7037         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
7038         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
7039         (decode_header_data), (_dbus_message_loader_return_buffer),
7040         (message_iter_test), (_dbus_message_test):
7041         * dbus/dbus-message.h:
7042         * dbus/dbus-protocol.h:
7043         * dbus/dbus-test.c: (main):
7044         * dbus/dbus-test.h:
7045         * glib/test-dbus-glib.c: (message_handler), (main):
7046         * test/echo-client.c: (main):
7047         * test/watch.c: (check_messages):
7048         Make messages sendable and receivable for real.
7049
7050 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
7051
7052         * dbus/dbus-marshal.c: (_dbus_marshal_double),
7053         (_dbus_marshal_string), (_dbus_marshal_byte_array):
7054         * dbus/dbus-message.c: (dbus_message_append_int32),
7055         (dbus_message_append_uint32), (dbus_message_append_double),
7056         (dbus_message_append_string), (dbus_message_append_byte_array):
7057         Handle OOM restoration.
7058
7059 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
7060
7061         * dbus/dbus-marshal.c: (_dbus_marshal_string),
7062         (_dbus_demarshal_string), (_dbus_marshal_test):
7063         * dbus/dbus-marshal.h:
7064         * dbus/dbus-message.c: (dbus_message_get_name),
7065         Document these functions.
7066
7067         (dbus_message_append_int32), (dbus_message_append_uint32),
7068         (dbus_message_append_double), (dbus_message_append_string),
7069         (dbus_message_append_byte_array):
7070         * dbus/dbus-message.h:
7071         Add functions for adding message fields of different types.
7072
7073         * dbus/dbus-protocol.h:
7074         Add the different types.
7075
7076 2003-01-05  Havoc Pennington  <hp@pobox.com>
7077
7078         * bus/connection.c: implement routines for handling connections,
7079         first thing is keeping a list of owned services on each connection
7080         and setting up watches etc.
7081
7082         * bus/services.c: implement a mapping from service names to lists
7083         of connections
7084
7085         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
7086
7087         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
7088         to use static mutexes for global data
7089
7090         * dbus/dbus-connection.c (dbus_connection_set_data): add new
7091         collection of functions to set/get application-specific data
7092         on the DBusConnection.
7093
7094 2003-01-04  Havoc Pennington  <hp@pobox.com>
7095
7096         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
7097         (_dbus_poll): new function
7098
7099         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
7100         copied from GLib
7101
7102         * bus/loop.c: initial code for the daemon main loop
7103
7104 2003-01-04  Havoc Pennington  <hp@pobox.com>
7105
7106         * test/watch.c (error_handler): make it safe if the error handler
7107         is called multiple times (if we s/error handler/disconnect
7108         handler/ we should just guarantee it's called only once)
7109
7110         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
7111         error handler on disconnect (it's quite possible we should
7112         just change the error handler to a "disconnect handler," I'm
7113         not sure we have any other meaningful errors)
7114
7115         * configure.in: check for getpwnam_r
7116
7117         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
7118         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
7119         mechanism as in SASL spec, using socket credentials
7120
7121         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
7122         (_dbus_send_credentials_unix_socket): new function
7123
7124         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
7125         dbus_accept()
7126         (_dbus_write): only check errno if <0 returned
7127         (_dbus_write_two): ditto
7128
7129 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
7130
7131         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
7132         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
7133         (_dbus_marshal_test):
7134         * dbus/dbus-marshal.h:
7135         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
7136         to _dbus_marshal_utf8_string. Also fix some tests.
7137
7138 2002-12-28  Harri Porten  <porten@kde.org>
7139
7140         * configure.in: added check for C++ compiler and a very cheesy
7141         check for the Qt integration
7142
7143         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
7144
7145         * qt/Makefile.am: added
7146
7147         * qt/.cvsignore: added
7148
7149         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
7150         latter, added #ifdef QT_THREAD_SUPPORT guard.
7151
7152         * dbus/Makefile.am: added missing headers for make dist
7153
7154 2002-12-28  Kristian Rietveld  <kris@gtk.org>
7155
7156         * dbus/Makefile.am: fixup export-symbols-regex.
7157
7158 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
7159
7160         * acinclude.m4: Add this file and put the
7161         PKG_CHECK_MODULE macro in it.
7162
7163 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
7164
7165         * dbus/dbus-marshal.c: (_dbus_marshal_string),
7166         (_dbus_demarshal_double), (_dbus_demarshal_int32),
7167         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7168         (_dbus_marshal_test):
7169         Make the demarshalling routines align the pos argument.
7170         Add string marshalling tests and fix the obvious bugs
7171         discovered.
7172
7173 2002-12-26  Havoc Pennington  <hp@pobox.com>
7174
7175         * dbus/dbus-auth.c: fixes fixes fixes
7176
7177         * dbus/dbus-transport-unix.c: wire up support for
7178         encoding/decoding data on the wire
7179
7180         * dbus/dbus-auth.c (_dbus_auth_encode_data)
7181         (_dbus_auth_decode_data): append to target string
7182         instead of nuking it.
7183
7184 2002-12-26  Havoc Pennington  <hp@pobox.com>
7185
7186         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
7187         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
7188         doh
7189
7190         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
7191         avoid swap_bytes() overhead (ignoring possible assembly stuff for
7192         now). Main point is because I wanted unpack_uint32 to implement
7193         _dbus_verbose_bytes
7194         (_dbus_verbose_bytes): new function
7195
7196         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
7197
7198         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
7199         mechanism to handle a corrupt message stream
7200         (_dbus_message_loader_new): fix preallocation to only prealloc,
7201         not prelengthen
7202
7203         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
7204         (_dbus_string_test): enhance tests for copy/move and fix the
7205         functions
7206
7207         * dbus/dbus-transport-unix.c: Hold references in more places to
7208         avoid reentrancy problems
7209
7210         * dbus/dbus-transport.c: ditto
7211
7212         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
7213         leak reference count in no-message case
7214
7215         * test/watch.c (do_mainloop): handle adding/removing watches
7216         during iteration over the watches. Also, ref the connection/server
7217         stored on a watch, so we don't try to mangle a destroyed one.
7218
7219         * dbus/dbus-transport-unix.c (do_authentication): perform
7220         authentication
7221
7222         * dbus/dbus-auth.c (get_state): add a state
7223         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
7224         (_dbus_auth_get_unused_bytes): append the unused bytes
7225         to the passed in string, rather than prepend
7226
7227         * dbus/dbus-transport.c (_dbus_transport_init_base): create
7228         the auth conversation DBusAuth
7229
7230         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
7231         (_dbus_transport_new_for_domain_socket): when creating a
7232         transport, pass in whether it's a client-side or server-side
7233         transport so we know which DBusAuth to create
7234
7235 2002-12-03  Havoc Pennington  <hp@pobox.com>
7236
7237         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
7238         _after_ finalizing the derived members
7239         (unix_connection_set): unref watch if we fail to add it
7240
7241         * dbus/dbus-connection.c (dbus_connection_unref): delete the
7242         transport first, so that the connection owned by the
7243         transport will be valid as the transport finalizes.
7244
7245         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
7246         if necessary, and remove watches from the connection.
7247
7248         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
7249
7250 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
7251
7252         * dbus/dbus-marshal.c: (_dbus_marshal_string),
7253         (_dbus_demarshal_double), (_dbus_demarshal_int32),
7254         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
7255         (_dbus_marshal_test):
7256         * dbus/dbus-marshal.h:
7257         Add string marshal functions and have the demarshal functions
7258         return the new position.
7259
7260 2002-12-25  Havoc Pennington  <hp@pobox.com>
7261
7262         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
7263         it is a simple protocol that just maps directly to SASL.
7264
7265         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
7266         initial implementation, not actually used yet.
7267
7268         * dbus/dbus-string.c (_dbus_string_find): new function
7269         (_dbus_string_equal): new function
7270         (_dbus_string_base64_encode): new function
7271         (_dbus_string_base64_decode): new function
7272
7273 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
7274
7275         * dbus/Makefile.am:
7276         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
7277         (_dbus_marshal_int32), (_dbus_marshal_uint32),
7278         (_dbus_demarshal_double), (_dbus_demarshal_int32),
7279         (_dbus_demarshal_uint32), (_dbus_marshal_test):
7280         * dbus/dbus-marshal.h:
7281         * dbus/dbus-protocol.h:
7282         * dbus/dbus-test.c: (main):
7283         * dbus/dbus-test.h:
7284         Add un-optimized marshalling/demarshalling routines.
7285
7286 2002-12-25  Harri Porten  <porten@kde.org>
7287
7288         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
7289
7290 2002-12-24  Zack Rusin  <zack@kde.org>
7291
7292         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
7293         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
7294         main loop stuff
7295
7296 2002-12-24  Havoc Pennington  <hp@pobox.com>
7297
7298         * glib/dbus-gthread.c: fix include
7299
7300         * glib/dbus-glib.h: rename DBusMessageHandler for now.
7301         I think glib API needs to change, though, as you don't
7302         want to use DBusMessageFunction, you want to use the
7303         DBusMessageHandler object. Probably
7304         dbus_connection_open_with_g_main_loop()
7305         and dbus_connection_setup_g_main_loop() or something like that
7306         (but think of better names...) that just create a connection
7307         that has watch/timeout functions etc. already set up.
7308
7309         * dbus/dbus-connection.c
7310         (dbus_connection_send_message_with_reply): new function just to
7311         show how the message handler helps us deal with replies.
7312
7313         * dbus/dbus-list.c (_dbus_list_remove_last): new function
7314
7315         * dbus/dbus-string.c (_dbus_string_test): free a string that
7316         wasn't
7317
7318         * dbus/dbus-hash.c: use memory pools for the hash entries
7319         (rebuild_table): be more paranoid about overflow, and
7320         shrink table when we can
7321         (_dbus_hash_test): reduce number of sprintfs and write
7322         valid C89. Add tests for case where we grow and then
7323         shrink the hash table.
7324
7325         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
7326
7327         * dbus/dbus-connection.c (dbus_connection_register_handler)
7328         (dbus_connection_unregister_handler): new functions
7329
7330         * dbus/dbus-message.c (dbus_message_get_name): new
7331
7332         * dbus/dbus-list.c: fix docs typo
7333
7334         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
7335         an object representing a handler for messages.
7336
7337 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
7338
7339         * glib/dbus-glib.h:
7340         * glib/dbus-gthread.c: (dbus_gthread_init):
7341         Don't use the gdbus prefix for public functions.
7342
7343 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
7344
7345         * Makefile.am:
7346         * configure.in:
7347         Add GLib checks and fixup .pc files
7348
7349         * glib/Makefile.am:
7350         * glib/dbus-glib.h:
7351         * glib/dbus-gmain.c: (gdbus_connection_prepare),
7352         (gdbus_connection_check), (gdbus_connection_dispatch),
7353         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
7354         (dbus_connection_gsource_new):
7355         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
7356         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
7357         * glib/test-dbus-glib.c: (message_handler), (main):
7358         Add GLib support.
7359
7360 2002-12-15  Harri Porten  <porten@kde.org>
7361
7362         * autogen.sh: check for libtoolize before attempting to use it
7363
7364         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
7365         struct.
7366
7367         * .cvsignore: ignore more stamp files
7368
7369         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
7370
7371         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
7372         without make install.
7373
7374 2002-12-15  Havoc Pennington  <hp@pobox.com>
7375
7376         * dbus/dbus-threads.c: add thread stubs that a higher library
7377         layer can fill in. e.g. the GLib wrapper might fill them in with
7378         GThread stuff. We still need to use this thread API to
7379         thread-safe-ize the library.
7380
7381 2002-12-12  Havoc Pennington  <hp@pobox.com>
7382
7383         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
7384         below new interfaces and include fewer system headers.
7385
7386         * dbus/dbus-sysdeps.c (_dbus_read): new function
7387         (_dbus_write): new function
7388         (_dbus_write_two): new function
7389         (_dbus_connect_unix_socket): new function
7390         (_dbus_listen_unix_socket): new function
7391
7392         * dbus/dbus-message-internal.h: change interfaces to use
7393         DBusString
7394
7395 2002-12-11  Havoc Pennington  <hp@pobox.com>
7396
7397         * dbus/dbus-types.h: add dbus_unichar
7398
7399         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
7400
7401         * dbus/dbus-connection.c (dbus_connection_send_message): return
7402         TRUE on success
7403
7404         * dbus/dbus-transport.c: include dbus-watch.h
7405
7406         * dbus/dbus-connection.c: include dbus-message-internal.h
7407
7408         * HACKING: add file with coding guidelines stuff.
7409
7410         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
7411         handling here, for security purposes (as in vsftpd). Not actually
7412         using this class yet.
7413
7414         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
7415         system/libc usage here, as in vsftpd, for ease of auditing (and
7416         should also simplify portability). Haven't actually moved all the
7417         system/libc usage into here yet.
7418
7419 2002-11-25  Havoc Pennington  <hp@pobox.com>
7420
7421         * dbus/dbus-internals.c (_dbus_verbose): fix to not
7422         always print the first verbose message.
7423
7424 2002-11-24  Havoc Pennington  <hp@pobox.com>
7425
7426         * test/echo-client.c, test/echo-server.c: cheesy test
7427         clients.
7428
7429         * configure.in (AC_CHECK_FUNCS): check for writev
7430
7431         * dbus/dbus-message.c (_dbus_message_get_network_data): new
7432         function
7433
7434         * dbus/dbus-list.c (_dbus_list_foreach): new function
7435
7436         * dbus/dbus-internals.c (_dbus_verbose): new function
7437
7438         * dbus/dbus-server.c, dbus/dbus-server.h: public object
7439         representing a server that listens for connections.
7440
7441         * dbus/.cvsignore: create
7442
7443         * dbus/dbus-errors.h, dbus/dbus-errors.c:
7444         public API for reporting errors
7445
7446         * dbus/dbus-connection.h, dbus/dbus-connection.c:
7447         public object representing a connection that
7448         sends/receives messages. (Same object used for
7449         both client and server.)
7450
7451         * dbus/dbus-transport.h, dbus/dbus-transport.c:
7452         Basic abstraction for different kinds of stream
7453         that we might read/write messages from.
7454
7455 2002-11-23  Havoc Pennington  <hp@pobox.com>
7456
7457         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
7458         _DBUS_INT_MAX
7459
7460         * dbus/dbus-test.c (main): add list test, and include
7461         dbus-test.h as intended
7462
7463         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
7464         (_dbus_hash_table_remove_int): return value indicates
7465         whether the entry existed to remove
7466
7467         * dbus/dbus-list.c: add linked list utility class,
7468         with docs and tests
7469
7470         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
7471         array sometimes.
7472
7473 2002-11-23  Havoc Pennington  <hp@pobox.com>
7474
7475         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
7476         DBUS_END_DECLS to nothing, that should fix this once and for all
7477
7478         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
7479
7480         * dbus/dbus-message.c, dbus/dbus-hash.c:
7481         add some missing @brief
7482
7483 2002-11-23  Havoc Pennington  <hp@pobox.com>
7484
7485         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
7486         to avoid confusing Doxygen
7487
7488         * dbus/dbus-hash.c: @} not }@
7489
7490         * dbus/dbus-message.c (struct DBusMessage): split out
7491         internals docs
7492
7493 2002-11-23  Havoc Pennington  <hp@pobox.com>
7494
7495         * configure.in: pile on more warning flags if using gcc
7496
7497         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
7498         to document static functions
7499
7500         * configure.in: add summary to end of configure so it
7501         looks nice and attractive
7502
7503         * dbus/dbus-hash.c: finish implementation and write unit
7504         tests and docs
7505
7506         * configure.in: add --enable-tests to enable unit tests
7507
7508         * dbus/dbus-test.c: test program to run unit tests
7509         for all files in dbus/*, initially runs a test for
7510         dbus-hash.c
7511
7512         * dbus/dbus-internals.h: file to hold some internal utility stuff
7513
7514 2002-11-22  Havoc Pennington  <hp@redhat.com>
7515
7516         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
7517         "ported" away from Tcl
7518
7519         * dbus/dbus-types.h: header for types such as dbus_bool_t
7520
7521 2002-11-22  Havoc Pennington  <hp@redhat.com>
7522
7523         * dbus/dbus.h: fixups for doc warnings
7524
7525         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
7526         macros
7527         (QUIET): make it quiet so we can see warnings
7528
7529         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
7530
7531 2002-11-22  Havoc Pennington  <hp@redhat.com>
7532
7533         * Makefile.am: include "Doxyfile" target in all-local
7534
7535         * configure.in: generate the Doxyfile
7536
7537         * Doxyfile.in: move Doxyfile here, so we can use
7538         configure to generate a Doxyfile with the right
7539         version number etc.
7540
7541 2002-11-22  Havoc Pennington  <hp@redhat.com>
7542
7543         * dbus/dbus-message.c: move inline docs into .c file
7544
7545         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
7546         so all docs are under doc/
7547         (MAN_EXTENSION): generate man pages. Use extension
7548         ".3dbus" which matches ".3qt" on my system,
7549         I guess this is OK, I don't know really.
7550         (FILE_PATTERNS): look for .c files not .h, makes sense
7551         for plain C I think
7552
7553 2002-11-22  Havoc Pennington  <hp@pobox.com>
7554
7555         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
7556         because any app can be a server, and any app can be a client,
7557         the bus is a special kind of server.
7558
7559 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
7560
7561         * Doxyfile : adding. Still needs Makefile rules to be generated
7562         automatically (just run "doxygen" in the toplevel dir for now to
7563         generate docs)
7564
7565         * dbus/dbus-message.h : Adding sample docs (javadoc since
7566         resembles gtk-doc a little more)
7567
7568         * dbus/dbus.h : Adding sample docs
7569
7570 2002-11-21  Havoc Pennington  <hp@redhat.com>
7571
7572         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
7573         so we can allow ourselves to include files directly,
7574         instead of having to use dbus.h
7575
7576         * dbus/dbus.h: fill in
7577
7578         * dbus/dbus-message.h: sketch out a sample header file.
7579         Include griping if you include it directly instead of
7580         via dbus.h
7581
7582         * dbus/dbus-macros.h: new file with macros for extern "C",
7583         TRUE/FALSE, NULL, etc.
7584
7585         * doc/file-boilerplate.c: put include guards in here
7586
7587 2002-11-21  Havoc Pennington  <hp@redhat.com>
7588
7589         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
7590
7591         * COPYING: include the GPL as well, and license code
7592         under both AFL and GPL.
7593
7594 2002-11-21  Havoc Pennington  <hp@redhat.com>
7595
7596         * acconfig.h: get rid of this
7597
7598         * autogen.sh (run_configure): add --no-configure option
7599
7600         * configure.in: remove AC_ARG_PROGRAM to make
7601         autoconf complain less. add AC_PREREQ.
7602         add AC_DEFINE third arg.
7603
7604 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
7605
7606         * doc/Makefile.am:
7607         Fix references so we can distcheck.
7608
7609 2002-11-21  Havoc Pennington  <hp@redhat.com>
7610
7611         * Initial module creation
7612