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