2003-05-18 Anders Carlsson <andersca@codefactory.se>
[platform/upstream/dbus.git] / ChangeLog
1 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
2
3         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
4
5 2003-05-17  Colin Walters  <walters@gnu.org>
6
7         * tools/dbus-send.c: Don't exit with an error code if --help was
8         passed.  Default to using the session bus instead of the system
9         one.
10         
11         * tools/dbus-launch.c: Ditto. 
12
13         * tools/dbus-monitor.c: Ditto.
14
15         * tools/dbus-send.1: Update with new arguments.
16         
17         * tools/dbus-launch.c: Emit code to export variables.  New
18         arguments -s and -c to specify shell syntax, and a bit of code to
19         autodetect syntax.  Also, allow specifying a program to run.
20         
21         * tools/dbus-launch.1: Update with new arguments.
22         
23         * tools/dbus-send.1: Ditto.
24
25         * tools/dbus-monitor.1: Ditto.
26         
27 2003-05-17  Havoc Pennington  <hp@pobox.com>
28
29         * bus/config-parser.c (merge_included): merge in policies from
30         child configuration file.
31
32         * bus/policy.c (bus_policy_merge): function to merge two policies 
33         together
34
35 2003-05-16  Havoc Pennington  <hp@redhat.com>
36
37         * dbus/dbus-connection.c: disable verbose lock spew
38
39         * tools/dbus-send.c: add --print-reply command line option
40
41         * tools/dbus-print-message.h (print_message): new util function 
42         shared by dbus-send and dbus-monitor
43
44         * tools/dbus-monitor.c (handler_func): exit on disconnect
45
46         * dbus/dbus-transport-unix.c (do_reading): if the transport is 
47         disconnected, don't try to use the read_watch
48
49         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
50         so we can find this bug more easily
51
52 2003-05-16  Havoc Pennington  <hp@redhat.com>
53
54         * bus/policy.c (free_rule_list_func): avoid a crash when passed
55         NULL as DBusHashTable is annoyingly likely to do.
56
57 2003-05-16  Colin Walters  <walters@verbum.org>
58
59         * tools/dbus-monitor.c: Add --session argument and usage()
60         function.
61
62         * tools/dbus-monitor.1: Update with new --session arg.
63
64         * bus/Makefile.am (install-data-hook): Create
65         $(libdir)/dbus-1.0/services so that the session bus is happy.
66
67 2003-05-15  Havoc Pennington  <hp@redhat.com>
68
69         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
70         on non-x86. ifdef's are evil.
71
72 2003-05-15  Havoc Pennington  <hp@redhat.com>
73
74         * configure.in: 0.11
75
76         * NEWS: update
77
78         * bus/Makefile.am (initddir): apparently we are supposed to put
79         init scripts in /etc/rc.d/init.d not /etc/init.d
80
81         * bus/Makefile.am: remove the "you must --enable-tests to make
82         check" as it broke distcheck
83
84         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
85         
86 2003-05-13  James Willcox  <jwillcox@gnome.org>
87
88         * configure.in:
89         * bus/activation.c: (bus_activation_service_created),
90         (bus_activation_activate_service):
91         * bus/driver.c: (bus_driver_send_service_deleted),
92         (bus_driver_send_service_created), (bus_driver_send_service_lost),
93         (bus_driver_send_service_acquired),
94         (bus_driver_send_welcome_message),
95         (bus_driver_handle_list_services):
96         * bus/session.conf.in:
97         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
98         (dbus_bus_service_exists), (dbus_bus_activate_service):
99         * dbus/dbus-bus.h:
100
101         Add some convenience API which lets you activate a service, and did a
102         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
103         and dbus_message_get_args()
104
105 2003-05-11  Havoc Pennington  <hp@pobox.com>
106
107         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid 
108         calling _dbus_marshal_validate_arg() for every byte in a byte
109         array, etc.
110
111         * dbus/dbus-message-handler.c: use atomic reference counting to 
112         reduce number of locks slightly; the global lock in here sucks
113
114         * dbus/dbus-connection.c
115         (_dbus_connection_update_dispatch_status_and_unlock): variant of
116         update_dispatch_status that can be called with lock held; then use
117         in a couple places to reduce locking/unlocking
118         (dbus_connection_send): hold the lock over the whole function 
119         instead of acquiring it twice.
120
121         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
122
123         * bus/connection.c (bus_connections_setup_connection): fix access
124         to already-freed memory.
125
126         * dbus/dbus-connection.c: keep a little cache of linked list
127         nodes, to avoid using the global linked list alloc lock in the
128         normal send-message case. Instead we just use the connection lock
129         that we already have to take.
130
131         * dbus/dbus-list.c (_dbus_list_find_last): new function
132
133         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
134         change to use a struct for the atomic type; fix docs, 
135         they return value before increment, not after increment.
136
137         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
138         (_dbus_string_append_8_aligned): new functions to try to
139         microoptimize this operation.
140         (reallocate_for_length): break this out of set_length(), to
141         improve profile info, and also so we can consider inlining the
142         set_length() part.
143
144         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
145         strings with some preallocation, cuts down on our calls to realloc
146         a fair bit. Though if we can get the "move entire string to empty
147         string" optimization below to kick in here, it would be better.
148
149         * dbus/dbus-string.c (_dbus_string_move): just call
150         _dbus_string_move_len
151         (_dbus_string_move_len): add a special case for moving 
152         an entire string into an empty string; we can just 
153         swap the string data instead of doing any reallocs.
154         (_dbus_string_init_preallocated): new function
155
156 2003-05-11  Havoc Pennington  <hp@pobox.com>
157
158         Write a "test-profile" that does echo client-server with threads;
159         profile reveals lock contention, memcpy/realloc of buffers, and
160         UTF-8 validation as hot spots. 20% of lock contention eliminated
161         with dbus_atomic_inc/dec implementation on x86.  Much remaining
162         contention is global mempool locks for GList and DBusList.
163         
164         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
165         x86 implementation
166
167         * dbus/dbus-connection.c (struct DBusConnection): use
168         dbus_atomic_t for the reference count   
169
170         * dbus/dbus-message.c (struct DBusMessage): declare 
171         dbus_atomic_t values as volatile
172
173         * configure.in: code to detect ability to use atomic integer
174         operations in assembly, from GLib patch
175
176         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
177         time, tired of it being wrong in threads and forked processes
178
179         * glib/test-profile.c: a little program to bounce messages back 
180         and forth between threads and eat CPU
181
182         * dbus/dbus-connection.c: add debug spew macros for debugging
183         thread locks; include config.h at top; fix deadlock in 
184         dbus_connection_flush()
185
186 2003-05-08  Havoc Pennington  <hp@pobox.com>
187
188         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
189         data from getting written, and there wasn't a good reason to 
190         use _exit really.
191
192         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
193         dbus_verbose lines in test coverage
194         (main): add list of functions sorted by # of untested blocks 
195         to the coverage report
196
197         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
198
199         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
200
201         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
202         extend test coverage
203
204         * test/data/auth/cancel.auth-script: test canceling an
205         authentication
206
207         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
208         aren't used. in CVS history if we end up needing them.
209
210 2003-05-04  Havoc Pennington  <hp@pobox.com>
211
212         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
213         unit test
214
215         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
216         function, which assumed length was in # of strings, not bytes
217
218         * dbus/dbus-message.c (_dbus_message_test): add tests for some
219         missing coverage
220
221         * dbus/dbus-connection.c
222         (_dbus_connection_queue_received_message): disable function for
223         now, we are only using it in test mode
224
225         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
226         remove a mistaken FIXME
227
228 2003-05-04  Havoc Pennington  <hp@pobox.com>
229
230         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
231         unlock mutex on successful return, patch from Anders Gustafsson
232
233 2003-05-04  Havoc Pennington  <hp@pobox.com>
234
235         * dbus-glib-1.pc.in (Requires): fix dependencies, from 
236         Anders Gustafsson
237
238 2003-05-04  Havoc Pennington  <hp@pobox.com>
239
240         * tools/dbus-launch.c: implement
241
242         * bus/main.c (main), bus/bus.c (bus_context_new): 
243         implement --print-pid and --fork
244
245 2003-05-03  Havoc Pennington  <hp@redhat.com>
246
247         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
248         the address had no value, and add to test suite. Fix and
249         regression test from Miloslav Trmac
250
251 2003-05-03  Havoc Pennington  <hp@pobox.com>
252
253         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
254         watch is invalid when handled
255
256         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
257         dbus-launch utility to launch the bus from a shell script.  Didn't
258         actually implement dbus-launch yet, it's just a placeholder still.
259         
260 2003-05-03  Havoc Pennington  <hp@pobox.com>
261
262         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
263         daemon; also documents daemon config file, so replaces
264         doc/config-file.txt. Corrected some stuff from config-file.txt in
265         the process of moving it.
266
267 2003-05-03  Havoc Pennington  <hp@pobox.com>
268
269         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1: 
270         add some man pages
271
272 2003-05-03  Colin Walters  <walters@verbum.org>
273
274         * dbus/dbus-sysdeps.c (fill_user_info): Test against
275         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
276
277         * Makefile.am: Update to use new .pc versioning scheme.
278
279 2003-05-02  Havoc Pennington  <hp@redhat.com>
280
281         * bus/system.conf.in: allow send/receive to/from message bus
282         service
283
284 2003-04-30  Havoc Pennington  <hp@redhat.com>
285
286         * configure.in: print a note when building with unit tests and
287         without assertions
288
289 2003-04-30  Havoc Pennington  <hp@redhat.com>
290
291         * Makefile.am: add a check-local that complains if you didn't
292         configure with --enable-tests
293
294 2003-04-29  Havoc Pennington  <hp@redhat.com>
295
296         * glib/dbus-gmain.c: docs cleanups
297
298         * dbus/dbus-types.h: add docs on int64 types
299
300         * dbus/dbus-memory.c: fix docs to avoid putting private API in
301         public API docs section
302
303 2003-04-29  Havoc Pennington  <hp@redhat.com>
304
305         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
306         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
307         parallel install API version, not with the D-BUS package version.
308
309         * HACKING: move some of README over here
310
311         * README: updates, and document API/ABI policy
312
313         * configure.in: reindentation
314
315 2003-04-29  Havoc Pennington  <hp@redhat.com>
316
317         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
318         to use this library" to be sure people have the right
319         expectations.
320         
321 2003-04-28  Havoc Pennington  <hp@redhat.com>
322
323         * configure.in: add --enable-docs which by default is auto yes if
324         doxygen and db2html found, no otherwise; but can be forced on/off
325
326         * doc/Makefile.am: conditionalize whether to build docs on
327         --enable-docs
328
329 2003-04-28  Havoc Pennington  <hp@redhat.com>
330
331         * configure.in: 0.10
332
333         * NEWS: update
334
335         * bus/system.conf.in: add <includedir>system.d</includedir>
336         
337         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
338         username was provided but not uid
339
340         * bus/config-parser.c (struct BusConfigParser): keep track of
341         whether the parser is toplevel or was included; change some 
342         of the error handling if it's included.
343         
344 2003-04-27  Havoc Pennington  <hp@pobox.com>
345
346         Unbreak my code...
347
348         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
349         report correct status if we finish processing authentication
350         inside this function.
351         
352         * bus/activation.c (try_send_activation_failure): use
353         bus_transaction_send_error_reply
354
355         * bus/connection.c (bus_connection_get_groups): return an error
356         explaining the problem
357
358         * bus/bus.c (bus_context_check_security_policy): implement
359         restriction here that inactive connections can only send the
360         hello message. Also, allow bus driver to send anything to 
361         any recipient.
362
363         * bus/connection.c (bus_connection_complete): create the
364         BusClientPolicy here instead of on-demand.
365         (bus_connection_get_policy): don't return an error
366
367         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
368         sender field in message being replied to
369
370         * bus/bus.c (bus_context_check_security_policy): fix silly typo
371         causing it to return FALSE always
372
373         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
374         we checked sender rather than destination
375
376 2003-04-25  Havoc Pennington  <hp@redhat.com>
377
378         test suite is slightly hosed at the moment, will fix soon
379         
380         * bus/connection.c (bus_connections_expire_incomplete): fix to
381         properly disable the timeout when required
382         (bus_connection_set_name): check whether we can remove incomplete
383         connections timeout after we complete each connection.
384
385         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
386         probably still broken.
387
388         * bus/services.c (bus_registry_acquire_service): implement max
389         number of services owned, and honor allow/deny rules on which 
390         services a connection can own.
391
392         * bus/connection.c (bus_connection_get_policy): report errors here
393
394         * bus/activation.c: implement limit on number of pending
395         activations
396
397 2003-04-25  Havoc Pennington  <hp@redhat.com>
398
399         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
400         where we used >= 0 instead of != DBUS_UID_UNSET.
401
402 2003-04-25  Havoc Pennington  <hp@redhat.com>
403
404         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
405         were toggled without add/remove, fix from Anders Gustafsson
406
407 2003-04-24  Havoc Pennington  <hp@redhat.com>
408
409         * test/data/valid-config-files/basic.conf: add <limit> tags to
410         this test
411         
412         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
413         <limit> tag in configuration file.
414         
415 2003-04-24  Havoc Pennington  <hp@redhat.com>
416
417         * bus/dispatch.c: somehow missed some name_is
418
419         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled) 
420         (_dbus_timeout_set_interval): new
421
422         * bus/connection.c (bus_connections_setup_connection): record time
423         when each connection is first set up, and expire them after the 
424         auth timeout passes.
425
426 2003-04-24  Havoc Pennington  <hp@redhat.com>
427
428         * dbus/dbus-message.c (dbus_message_name_is): rename
429         (dbus_message_service_is): rename
430         (dbus_message_sender_is): rename
431         (dbus_message_get_service): rename
432
433 2003-04-24  Havoc Pennington  <hp@redhat.com>
434
435         * configure.in: add --enable-checks
436
437         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
438
439         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
440         to use thread locks.
441         (_dbus_connection_handler_destroyed_locked): move some private
442         functions into proper docs group
443
444         * dbus/dbus-internals.h: add _dbus_return_if_fail,
445         _dbus_return_val_if_fail
446
447         Throughout: use dbus_return_if_fail
448
449 2003-04-23  James Willcox  <jwillcox@gnome.org>
450
451         * glib/dbus-glib.h:
452         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
453         (dbus_connection_setup_with_g_main),
454         (dbus_server_setup_with_g_main):
455         * glib/test-dbus-glib.c: (main):
456         * glib/test-thread-client.c: (main):
457         * glib/test-thread-server.c: (new_connection_callback), (main):
458         * tools/dbus-monitor.c: (main):
459
460         Added a GMainContext argument to dbus_connection_setup_with_g_main()
461         and dbus_server_setup_with_g_main().
462
463 2003-04-20  Havoc Pennington  <hp@pobox.com>
464
465         * doc/dbus-specification.sgml: document the restrictions on
466         message and service names
467
468 2003-04-22  Havoc Pennington  <hp@redhat.com>
469
470         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
471         support, and do some code cleanups to share more code and 
472         speed up array marshal/demarshal.
473
474         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
475
476         * configure.in: generate dbus-arch-deps.h
477
478         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
479         64-bit typecodes
480
481 2003-04-22  Havoc Pennington  <hp@redhat.com>
482
483         * test/data/valid-messages/opposite-endian.message: fix test
484         to use proper type for rply field
485
486         * test/data/invalid-messages: add tests for below validation
487         
488         * dbus/dbus-message.c (decode_header_data): validate field types,
489         and validate that named fields are valid names
490         (decode_name_field): consider messages in the
491         org.freedesktop.Local. namespace to be invalid.
492
493         * dbus/dbus-string.c (_dbus_string_validate_name): new
494
495 2003-04-19  Havoc Pennington  <hp@pobox.com>
496
497         * bus/driver.c (bus_driver_handle_hello): check limits and 
498         return an error if they are exceeded.
499
500         * bus/connection.c: maintain separate lists of active and inactive
501         connections, and a count of each. Maintain count of completed
502         connections per user. Implement code to check connection limits.
503
504         * dbus/dbus-list.c (_dbus_list_unlink): export
505
506         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
507         number of bytes in the message queue for a connection
508
509 2003-04-18  Havoc Pennington  <hp@pobox.com>
510
511         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
512
513         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
514         memleaks
515
516         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and 
517         on realloc be sure to update the pointer in the keyring
518
519         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
520         offset to avoid writing to unallocated memory
521
522         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
523         try the next mechanism, so we properly handle OOM
524
525         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
526         on OOM.
527         (_dbus_keyring_new): fix OOM bug
528         (_dbus_keyring_new_homedir): always set error; impose a maximum
529         number of keys we'll load from the file, mostly to speed up the
530         test suite and make its OOM checks more useful, but also for
531         general sanity.
532
533         * dbus/dbus-auth.c (process_error_server): reject authentication
534         if we get an error from the client
535         (process_cancel): on cancel, send REJECTED, per the spec
536         (process_error_client): send CANCEL if we get an error from the
537         server.
538
539 2003-04-18  Havoc Pennington  <hp@pobox.com>
540         
541         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
542         debug spew
543
544         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
545         handling problem
546
547         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
548         about DBUS_TEST_HOMEDIR once
549
550         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
551         the environment
552         
553         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
554         config file so we test the right thing
555
556         Throughout: assorted docs improvements
557
558 2003-04-18  Havoc Pennington  <hp@pobox.com>
559
560         * glib/dbus-gmain.c: adapt to watch changes
561
562         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
563
564         * dbus/dbus-server.h: remove dbus_server_handle_watch
565
566         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
567
568         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
569         like DBusTimeout, so we don't need dbus_connection_handle_watch
570         etc.
571
572 2003-04-17  Havoc Pennington  <hp@redhat.com>
573
574         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
575         database usage so it all goes via the DBusUserDatabase cache.
576
577 2003-04-17  Havoc Pennington  <hp@redhat.com>
578
579         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
580         there was an OOM watch we skipped, we always return TRUE so we
581         iterate again to have a look at it again. Fixes test suite hang.
582         Code rearrangement also lets us lose some memset and only iterate
583         over callbacks once.
584
585         * bus/driver.c (bus_driver_handle_message): sense of test for
586         reply was backward
587
588 2003-04-16  Havoc Pennington  <hp@pobox.com>
589
590         * doc/dbus-specification.sgml: make spec say serials are unsigned
591
592         * dbus/dbus-message.h: change message serials to unsigned
593
594         * dbus/dbus-connection.c: adapt to message serials being unsigned
595         
596 2003-04-15  Havoc Pennington  <hp@pobox.com>
597
598         * bus/bus.c: create and keep around a shared DBusUserDatabase 
599         object.
600
601         * bus/connection.c (bus_connection_get_groups): don't cache
602         groups for user in the connection object, since user database 
603         object now does that.
604
605 2003-04-16  Havoc Pennington  <hp@redhat.com>
606
607         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
608         list of size counters
609         (_dbus_message_loader_putback_message_link): put back a popped link
610
611         * dbus/dbus-connection.c
612         (dbus_connection_set_max_live_messages_size): rename 
613         max_received_size
614         (dbus_connection_get_outgoing_size): get size of outgoing 
615         queue
616         (_dbus_connection_set_connection_counter): remove this cruft
617         
618 2003-04-14  Havoc Pennington  <hp@redhat.com>
619
620         * dbus/dbus-userdb.c: user database abstraction, mostly to get
621         caching, but at some point we might want to be able to use a
622         different database.
623
624         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
625         SHA1 conf file to test the sha1 auth mechanism, since the regular
626         test always uses EXTERNAL when available.
627
628         * configure.in,
629         test/data/valid-config-files/debug-allow-all-sha1.conf.in: 
630         add conf file that requires use of sha1 auth
631
632 2003-04-13  Havoc Pennington  <hp@pobox.com>
633         
634         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
635         from Philip Blundell to send messages and monitor them.
636         
637 2003-04-13  Havoc Pennington  <hp@pobox.com>
638
639         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting 
640         callbacks
641
642         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
643         users
644
645         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
646         fix to only recover unused bytes if we're already authenticated
647         (_dbus_transport_get_is_authenticated): fix to still mark us 
648         authenticated if there are unused bytes.
649
650         * bus/dispatch.c: implement security policy checking
651         
652         * bus/connection.c (bus_transaction_send_from_driver): new
653
654         * bus/bus.c (bus_context_check_security_policy): new
655
656         * bus/dispatch.c (send_service_nonexistent_error): delete this,
657         now we just set the DBusError and it gets converted to an error
658         reply.
659
660         * bus/connection.c (allow_user_function): enable code using actual
661         data from the config file
662
663         * bus/policy.c (list_allows_user): handle wildcard rules for
664         user/group connection perms
665
666 2003-04-13  Havoc Pennington  <hp@pobox.com>
667
668         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
669         
670         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
671
672         * bus/policy.c (bus_policy_append_mandatory_rule)
673         (bus_policy_append_default_rule, bus_policy_append_user_rule)
674         (bus_policy_append_group_rule): new functions
675
676 2003-04-12  Havoc Pennington  <hp@pobox.com>
677
678         * bus/config-parser.c (bus_config_parser_new): fix a memleak
679
680         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
681         the pid/gid/uid, just for paranoia.
682
683         * test/break-loader.c (randomly_do_n_things): find a byte
684         containing a type code, and randomly change it to a different 
685         type code.
686
687 2003-04-12  Havoc Pennington  <hp@pobox.com>
688
689         * bus/policy.h: change BusPolicy to be the thing from the config
690         file, and rename old BusPolicy to BusClientPolicy
691
692         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to 
693         match change in how policy works
694
695         * dbus/dbus-internals.h: mark assert_not_reached as
696         __attribute((noreturn))__
697
698 2003-04-11  Havoc Pennington  <hp@redhat.com>
699
700         * doc/dbus-specification.sgml: fix a spot with the wrong name for 
701         the broadcast service. Use boolean return for ServiceExists.
702
703 2003-04-11  Havoc Pennington  <hp@redhat.com>
704
705         * configure.in: add another directory to look for qt in.
706
707 2003-04-11  Havoc Pennington  <hp@redhat.com>
708
709         * AUTHORS: add Colin Walters
710
711 2003-04-11  Havoc Pennington  <hp@redhat.com>
712
713         * NEWS: update
714
715         * configure.in: 0.9
716
717 2003-04-11  Havoc Pennington  <hp@redhat.com>
718
719         * bus/messagebus.in: remove pid file when stopping the
720         message bus, since the bus won't have privileges to remove it
721         itself.
722
723 2003-04-11  Havoc Pennington  <hp@redhat.com>
724
725         * bus/bus.c (bus_context_new): move credentials change after
726         creating pidfile
727
728 2003-04-11  Havoc Pennington  <hp@pobox.com>
729
730         * test/decode-gcov.c: add "below average functions" to the
731         coverage report, and change how some of the code works.
732
733         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
734         not in the coverage stats.
735
736         * test/test-service.c (main): use _dbus_verbose not fprintf in a
737         couple places so running the test suite doesn't result in megaspam.
738
739 2003-04-11  Havoc Pennington  <hp@pobox.com>
740
741         * bus/dispatch.c (check_existent_service_activation): accept a no
742         memory error in a place we didn't before
743
744         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
745         in case the first one failed," since the test suite is less
746         broken now.
747
748 2003-04-10  Havoc Pennington  <hp@pobox.com>
749
750         * bus/dispatch.c (check_segfault_service_activation): add test
751         for launching an executable that just crashes.
752
753         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
754         don't leave a million cores. We'll see how portable this is.
755
756 2003-04-10  Havoc Pennington  <hp@pobox.com>
757
758         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
759         the possible parent failures before we fork, so that we don't
760         fail to create a babysitter after creating the child.
761
762         * bus/activation.c (bus_activation_activate_service): kill child
763         if we don't successfully complete the activation.
764
765 2003-04-10  Havoc Pennington  <hp@redhat.com>
766
767         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
768         the connection if it's disconnected
769
770         * bus/activation.c (bus_activation_service_created): use new
771         transaction features to roll back removal of pending activation if
772         we don't successfully create the service after all. Don't remove
773         pending activation if the function fails.
774
775         * dbus/dbus-list.c (_dbus_list_insert_before_link) 
776         (_dbus_list_insert_after_link): new code to facilitate
777         services.c fixes
778
779         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
780         new functionality, so we can preallocate the ability to insert
781         into a hash table.
782
783         * bus/connection.c (bus_transaction_add_cancel_hook): new function
784         allowing us to put custom hooks in a transaction to be used for 
785         cancelling said transaction
786
787         * doc/dbus-specification.sgml: add some discussion of secondary
788         service owners, and disallow zero-length service names
789
790         * bus/services.c (bus_registry_acquire_service): new function,
791         splits out part of bus_driver_handle_acquire_service() and fixes 
792         a bug where we didn't remove the service doing the acquiring 
793         from the secondary queue if we failed to remove the current owner
794         from the front of the queue.
795         
796 2003-04-10  Alexander Larsson  <alexl@redhat.com>
797
798         * doc/dbus-specification.sgml:
799         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
800         
801 2003-04-10  Alexander Larsson  <alexl@redhat.com>
802
803         * bus/.cvsignore:
804         * glib/.cvsignore:
805         * test/.cvsignore:
806         Added files to cvsignore
807         
808         * dbus/dbus-message.h:
809         * dbus/dbus-message.c: (dbus_message_iter_get_named):
810         Make get_named() take two out argument and return a boolean.
811         (dbus_message_iter_get_args_valist):
812         Update usage of get_named().
813         (dbus_message_iter_append_byte):
814         Fix typo
815         (dbus_message_iter_append_named)
816         Fix typo
817         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
818         More tests.
819
820 2003-04-10  Alexander Larsson  <alexl@redhat.com>
821
822         * dbus/dbus-marshal.[ch]:
823         Add array_type_pos argument to _dbus_marshal_validate_arg.
824         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
825         
826         * dbus/dbus-message.[ch]:
827         Multi-dimensional arrays have full type specification in the
828         outermost array. Iter code re-arranged to handle this.
829         Added some more iter tests.
830         
831         * doc/dbus-specification.sgml:
832         Add me to authors.
833         Remove old FIXME.
834         Update new array encoding description.
835         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
836         
837         * test/data/invalid-messages/array-with-mixed-types.message:
838         * test/data/valid-messages/array-of-array-of-uint32.message:
839         Change to the new array format.
840         
841         * test/data/invalid-messages/too-short-dict.message:
842         Fix bug in test.
843         
844         * test/data/valid-messages/recursive-types.message:
845         Fix up and extend test.
846
847 2003-04-10  Havoc Pennington  <hp@pobox.com>
848
849         * bus/dispatch.c: lots of fixes
850         
851         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
852         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
853         that was crack, broke the test service.
854
855         * dbus/dbus-transport.c (_dbus_transport_open): fix error
856         handling to avoid piling up errors if we get a failure on the 
857         first address.
858
859         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
860         pid in assertion failures.
861
862         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
863         to some fixed size of file descriptor array. Don't return TRUE
864         anytime a timeout exists, that led to lots of busy loop silliness
865         in the tests.
866
867 2003-04-09  Havoc Pennington  <hp@redhat.com>
868
869         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
870         I'd checked this in earlier but hadn't.
871
872 2003-04-09  Havoc Pennington  <hp@redhat.com>
873
874         * bus/dispatch.c (bus_dispatch_test): get a bit further through
875         the activation test (man this is getting old!)
876
877 2003-04-09  Havoc Pennington  <hp@redhat.com>
878
879         * test/test-utils.c: use dispatch status function to fix this up
880
881         * bus/connection.c (connection_watch_callback): don't dispatch
882         from here
883         (connection_timeout_callback): don't dispatch from here
884         (bus_connections_setup_connection): set the dispatch status function
885         (bus_connection_disconnected): unset it
886
887         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
888         used to add a connection to be dispatched
889         (_dbus_loop_iterate): do the dispatching at the end of each
890         iteration
891
892         * dbus/dbus-connection.c
893         (dbus_connection_set_dispatch_status_function): new function
894         allowing us to fix up main loop usage
895         (_dbus_connection_last_unref): free all the various function
896         user data
897         (dbus_connection_dispatch): call the DispatchStatusFunction 
898         whenever this function returns
899         (dbus_connection_handle_watch): call DispatchStatusFunction
900         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
901         (reply_handler_timeout): call DispatchStatusFunction
902         (dbus_connection_flush): call DispatchStatusFunction
903
904 2003-04-09  Havoc Pennington  <hp@redhat.com>
905
906         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and 
907         a memory leak
908
909         * bus/dispatch.c (check_service_activated): fix bug in test
910
911         * dbus/dbus-mainloop.c (check_timeout): fix this up
912
913         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
914         verbose output so we can sort out output from different processes,
915         e.g. in the activation case.
916
917 2003-04-08  Colin Walters  <walters@gnu.org>
918  
919         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
920         the pid file.
921         (bus_context_new): Set it.
922         (bus_context_unref): Use it to delete the pid file.
923  
924 2003-04-08  Havoc Pennington  <hp@redhat.com>
925
926         * test/data/invalid-messages/array-with-mixed-types.message:
927         regression test that fails for the moment
928
929         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
930         tests for convenience
931
932         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
933         array of nil, it broke things.
934
935         * test/data/invalid-messages/array-of-nil.message: regression test
936
937         * test/data/valid-messages/array-of-array-of-uint32.message:
938         happened to write this so added it to suite
939         
940 2003-04-08  Havoc Pennington  <hp@redhat.com>
941
942         * bus/driver.c (bus_driver_handle_acquire_service): init
943         retval/reply before checking name
944
945         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
946         recursion depth argument
947
948         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
949         in the public struct for future extension
950
951         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
952         typo
953
954         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
955         message
956
957         * doc/dbus-specification.sgml: fix typo
958
959 2003-04-08  Alexander Larsson  <alexl@redhat.com>
960
961         Implemented recursive types, named types and new-style iters
962
963         * bus/driver.c:
964         * glib/test-thread-client.c: (thread_func):
965         * glib/test-thread-server.c: (handle_test_message):
966         * test/test-service.c: (handle_echo):
967         Update to new api
968         
969         * dbus/Makefile.am:
970         * dbus/dbus-dict.c:
971         * dbus/dbus-dict.h:
972         * dbus/dbus.h
973         Remove DBusDict
974
975         * dbus/dbus-internals.c: (_dbus_type_to_string):
976         Update for new types.
977         
978         * dbus/dbus-marshal.[ch]:
979         Implement recursive types and the new marshalling format.
980         Remove hardcoded dict marshalling.
981         Marshal named types.
982         
983         * dbus/dbus-message-builder.c:
984         Add BYTE_ARRAY.
985         Remove references to old types
986         
987         * dbus/dbus-message.[ch]:
988         New non-refcounted iter API that supports recursive iters.
989         Use iters for appending, including support for recursive
990         iters.
991         Add byte and named type support.
992         Update everything to new marshalling formats.
993         Add tests for new API.
994         
995         * dbus/dbus-protocol.h:
996         Remove old array types.
997         Add types: BYTE, ARRAY, DICT, NAMED
998         
999         * dbus/dbus-string.c:
1000         * dbus/dbus-sysdeps.c:
1001         Make parse_double locale safe.
1002         
1003         * dbus/dbus-test-main.c:
1004         Call setlocale.
1005         
1006         * dbus/dbus-test.c:
1007         Kill dict test
1008         
1009         * doc/dbus-specification.sgml:
1010         Update spec
1011         
1012         * test/data/incomplete-messages/missing-body.message:
1013         * test/data/invalid-messages/bad-boolean.message:
1014         * test/data/invalid-messages/bad-boolean-array.message:
1015         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
1016         * test/data/invalid-messages/boolean-has-no-value.message-raw:
1017         * test/data/invalid-messages/too-short-dict.message:
1018         * test/data/valid-messages/dict-simple.message:
1019         * test/data/valid-messages/dict.message:
1020         * test/data/valid-messages/emptiness.message:
1021         * test/data/valid-messages/lots-of-arguments.message:
1022         * test/data/valid-messages/no-padding.message:
1023         * test/data/valid-messages/recursive-types.message:
1024         Add missing NAME fields
1025         Fix up dicts & arrays
1026         
1027         * test/data/invalid-messages/dict-with-nil-value.message:
1028         Removed, this is not invalid anymore.
1029         
1030         * test/data/valid-messages/recursive-types.message:
1031         Add new test for deeply recursive types.
1032
1033 2003-04-07  Havoc Pennington  <hp@pobox.com>
1034
1035         * bus/driver.c (bus_driver_handle_acquire_service): return an
1036         error if you try to acquire a service that starts with ':'
1037
1038 2003-04-07  Havoc Pennington  <hp@redhat.com>
1039
1040         * doc/dbus-specification.sgml: require that base service names 
1041         start with ':' and that the base service is created/deleted 
1042         as first and last things a connection does on the bus
1043
1044         * bus/dispatch.c (check_existent_service_activation): lots more 
1045         work on the activation test; it doesn't fully pass yet...
1046
1047         * test/test-service.c (main): fix so we don't memleak the
1048         connection to the message bus
1049         (filter_func): accept a message asking us to exit
1050
1051 2003-04-06  Havoc Pennington  <hp@pobox.com>
1052
1053         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h, 
1054         from Colin Walters
1055
1056         * configure.in: fixes to Qt detection from Colin Walters
1057
1058         * doc/Makefile.am: Only remove generated docbook dirs if they
1059         exist, from Colin Walters
1060
1061         * dbus/dbus-bus.c: change how we set well-known connections to
1062         NULL, so that it works if a single connection is stored in 
1063         two well-known array slots.
1064
1065         * test/Makefile.am: remove a lot of stuff that isn't immediately
1066         useful, it's in CVS history if we want it.
1067
1068         * test/test-service.c: use dbus-mainloop instead of that
1069         watch.[hc] crack
1070
1071 2003-04-06  Havoc Pennington  <hp@pobox.com>
1072
1073         * dbus/Makefile.am: split lists of sources into stuff that goes in
1074         the library, util functions that go in the lib and are also used
1075         elsewhere, and util functions that are used in tests/daemon but
1076         don't go in the lib.
1077
1078         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc] 
1079         here so it can be used in test binaries also
1080
1081 2003-04-06  Havoc Pennington  <hp@pobox.com>
1082
1083         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
1084         here in the parent process, so we can return an error if it
1085         fails. Also, move some of the code into the child so the parent 
1086         is less hosed if we fail midway through.
1087
1088         * bus/bus.c (bus_context_new): move pidfile detection further up 
1089         in the function, before we start overwriting sockets and such.
1090
1091         * bus/messagebus.in: adjust this a bit, not sure if it will work.
1092
1093         * configure.in: add --with-system-pid-file and --with-system-socket
1094
1095 2003-04-06  Colin Walters  <walters@verbum.org>
1096
1097         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
1098
1099         * bus/system.conf.in: Declare a pidfile.
1100
1101         * bus/bus.c (bus_context_new): Test for an existing pid file, and
1102         create one (if appropriate).
1103
1104         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
1105         (struct BusConfigParser) [pidfile]: New.
1106         (element_type_to_name, merge_included, start_busconfig_child)
1107         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
1108         (bus_config_parser_unref): Free it.
1109         (bus_config_parser_get_pidfile): New function.
1110         
1111         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
1112
1113         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
1114
1115         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
1116         
1117         * dbus/dbus-sysdeps.h: Prototype it.
1118
1119 2003-04-06  Havoc Pennington  <hp@pobox.com>
1120
1121         * bus/bus.c (bus_context_new): print the address in here, rather
1122         than in main(), because we need to do it before forking the daemon
1123
1124         * bus/dispatch.c (send_service_nonexistent_error): set the sender 
1125         on the service nonexistent error
1126
1127         * bus/driver.c (bus_driver_handle_acquire_service): set the
1128         sender on the AcquireService reply
1129
1130         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
1131         server also listen on a UNIX socket so services can connect to it.
1132
1133 2003-04-06  Havoc Pennington  <hp@pobox.com>
1134
1135         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done 
1136         so it detects deadlocks and also we actually init threads when 
1137         debugging.
1138
1139 2003-04-06  Havoc Pennington  <hp@pobox.com>
1140
1141         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1142         save the domain socket name, and unlink it when we disconnect the
1143         server. Means that at least when we exit normally, we won't leave
1144         a bunch of junk in /tmp
1145
1146         * dbus/dbus-transport-unix.c
1147         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
1148         memory management). (I was making a real change here but then
1149         didn't)
1150
1151 2003-04-06  Havoc Pennington  <hp@pobox.com>
1152
1153         * bus/bus.c (bus_context_new): fix wrong handling of
1154         server_data_slot_unref() in the error case. 
1155
1156         * dbus/dbus-internals.h (_dbus_assert): change so it passes
1157         "(condition) != 0" to _dbus_real_assert so that
1158         "_dbus_assert (pointer)" doesn't cause a warning
1159
1160         * bus/main.c (main): accept --print-address option to print out
1161         the message bus address
1162
1163         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
1164
1165         * dbus/dbus-transport.c (_dbus_transport_open): special error for
1166         "tmpdir" option to unix: address on client side
1167
1168         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option 
1169         to unix: address
1170         
1171         * configure.in (TEST_SOCKET_DIR): locate a temporary directory 
1172         we can use to create sockets in the test suite.
1173
1174         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
1175         cleanly. To be used for testing.
1176
1177         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
1178
1179         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
1180
1181         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1182         handle trying to call this when there's no servers active
1183
1184 2003-04-05  Havoc Pennington  <hp@pobox.com>
1185
1186         * NEWS: update
1187
1188         * configure.in: 0.8
1189
1190 2003-04-05  Havoc Pennington  <hp@pobox.com>
1191
1192         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't 
1193         crash on startup. Need to get "try starting the daemon" 
1194         in the test suite I guess. ;-)
1195
1196         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
1197         tracked the number of open connections; it's better done in 
1198         application-specific code as you want it to span all servers etc.
1199
1200 2003-04-05  Havoc Pennington  <hp@pobox.com>
1201
1202         * bus/Makefile.am (install-data-hook): add missing DESTDIR, 
1203         patch from Colin Walters
1204
1205 2003-04-05  Havoc Pennington  <hp@pobox.com>
1206
1207         * doc/config-file.txt (Elements): fix docs of <auth> to reflect 
1208         reality; in fact multiple mechanisms are allowed.
1209
1210         * dbus/dbus-internals.c (_dbus_real_assert)
1211         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
1212         _dbus_assert_not_reached() into functions, so that they don't show
1213         up in basic block counts for test coverage, and don't use up as
1214         much disk space. Does mean slower execution speed though, so
1215         assumes --disable-asserts is the normal production case.
1216
1217 2003-04-05  Havoc Pennington  <hp@pobox.com>
1218
1219         * test/Makefile.am (dist-hook): also dist *.in files
1220
1221         * NEWS: update
1222
1223         * configure.in: 0.7
1224         
1225 2003-04-05  Havoc Pennington  <hp@pobox.com>
1226
1227         * dbus/dbus-string.c: docs warning
1228         
1229         * dbus/dbus-spawn.c: missing docs
1230
1231         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
1232
1233 2003-04-05  Havoc Pennington  <hp@pobox.com>
1234
1235         * bus/loop.c (bus_loop_iterate): fix the timeout code, using 
1236         magic from GLib
1237
1238         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid 
1239         to -1 once we've reaped the babysitter
1240         (_dbus_babysitter_handle_watch): do as much work as we can, not
1241         just one go of it
1242
1243         * bus/activation.c: add code using DBusBabysitter so that we
1244         handle it when a service fails to start up properly.
1245         (bus_activation_service_created): don't remove the activation
1246         entries as we go, just let them get removed when we free the pending
1247         activation. Unref reply messages after sending them.
1248
1249 2003-04-05  Havoc Pennington  <hp@pobox.com>
1250
1251         * test/decode-gcov.c (main): print per-directory stats in the report
1252
1253         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
1254
1255 2003-04-05  Havoc Pennington  <hp@pobox.com>
1256
1257         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
1258
1259         * test/decode-gcov.c: hack up a little program to suck data 
1260         out of gcov files. Yes this is sort of silly.
1261
1262         * configure.in: define something in config.h and do an
1263         AM_CONDITIONAL when gcov is enabled
1264
1265 2003-04-04  Havoc Pennington  <hp@redhat.com>
1266
1267         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
1268         return a "babysitter" object that is used to monitor the status of
1269         the spawned process and reap it when required.
1270
1271         * test/test-segfault.c, test/test-exit.c,
1272         test/test-sleep-forever.c: binaries that do various lame things, 
1273         used in the test suite.
1274
1275         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
1276         
1277 2003-04-03  Havoc Pennington  <hp@pobox.com>
1278
1279         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file 
1280         in preparation for modifying it, dbus-sysdeps is getting 
1281         a bit unmanageable.
1282
1283 2003-04-03  Havoc Pennington  <hp@redhat.com>
1284
1285         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
1286         have multiple ones
1287
1288         * bus/*.[hc]: adapt to mainloop change
1289
1290 2003-04-03  Havoc Pennington  <hp@redhat.com>
1291
1292         * bus/activation.c (load_directory): fix up memleaks
1293         (bus_activation_entry_free): free the entry
1294
1295         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
1296         we get one from the message bus; fix memleaks.
1297
1298         * dbus/dbus-message.c (dbus_set_error_from_message): new function
1299
1300 2003-04-03  Havoc Pennington  <hp@pobox.com>
1301
1302         * bus/config-parser.c (bus_config_parser_unref): free 
1303         list of mechanisms, bug discovered by test suite enhancements
1304         (putting system.conf and session.conf into suite)
1305
1306         * test/Makefile.am, test/test-service.c: add placeholder for a
1307         test service that we'll activate as part of test suite. Doesn't 
1308         do anything yet.
1309
1310         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by 
1311         setting NULL value, and use system malloc not dbus_malloc() 
1312         when we have unavoidable memleakage.
1313
1314         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
1315         didn't work, and support DBUS_BUS_ACTIVATION.
1316         
1317         * bus/activation.c (child_setup): pass our well-known bus type to
1318         the child
1319
1320         * bus/config-parser.c: support <type> to specify well-known type
1321
1322         * doc/dbus-specification.sgml: document the env variables to 
1323         locate well-known buses and find service activator
1324
1325 2003-04-02  Havoc Pennington  <hp@redhat.com>
1326
1327         * test/Makefile.am (all-local): add a rule to copy tests to
1328         builddir, so we can have generated tests. Use this to remove the
1329         silly hack for testing system.conf and session.conf. Will use this 
1330         shortly to generate .service files pointing to test binaries.
1331
1332 2003-04-02  Havoc Pennington  <hp@redhat.com>
1333
1334         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
1335         current alloc and needed new length, not max of the doubled
1336         allocation and needed new length. Also, when building tests, 
1337         don't do the double-allocation stuff, just realloc every time.
1338
1339 2003-04-02  Havoc Pennington  <hp@redhat.com>
1340
1341         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
1342         in error messages
1343         (_dbus_string_get_dirname): new
1344         (_dbus_sysdeps_test): new
1345         (_dbus_directory_open): include dirnames in error messages
1346
1347         * bus/config-parser.c: interpret <include> and <includedir> and
1348         <servicedir> relative to config file location if the given
1349         filename is not absolute.
1350
1351         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
1352
1353 2003-04-02  Havoc Pennington  <hp@redhat.com>
1354
1355         * bus/connection.c (bus_transaction_send_error_reply): set sender
1356         service for the error, and unref the reply on success
1357
1358         * bus/activation.c: convert to use BusTransaction so OOM can be
1359         handled correctly
1360         (bus_activation_service_created): set sender of the message
1361
1362 2003-04-01  Havoc Pennington  <hp@redhat.com>
1363
1364         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
1365         <includedir> (at least mostly)
1366
1367         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
1368         first, then the user ID
1369
1370 2003-04-01  Havoc Pennington  <hp@pobox.com>
1371
1372         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
1373         function
1374
1375         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
1376
1377         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
1378
1379         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
1380         socket 0777, and unlink any existing socket.
1381
1382         * bus/bus.c (bus_context_new): change our UID/GID and fork if
1383         the configuration file so specifies; set up auth mechanism 
1384         restrictions
1385
1386         * bus/config-parser.c (bus_config_parser_content): add support
1387         for <fork> option and fill in code for <auth> 
1388
1389         * bus/system.conf.in: add <fork/> to default configuration, 
1390         and limit auth mechanisms to EXTERNAL
1391
1392         * doc/config-file.txt (Elements): add <fork>
1393
1394         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
1395         (_dbus_change_identity): new function
1396
1397 2003-03-31  Havoc Pennington  <hp@redhat.com>
1398
1399         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket) 
1400         (_dbus_listen_unix_socket): fix off-by-one error in null
1401         termination spotted by Nalin
1402
1403 2003-03-31  Havoc Pennington  <hp@redhat.com>
1404
1405         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
1406         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
1407         having a real home directory available.
1408
1409 2003-03-31  Havoc Pennington  <hp@redhat.com>
1410
1411         * bus/Makefile.am (install-data-hook): create /var/run/dbus
1412
1413         * bus/messagebus.in: add init script for Red Hat /etc/init.d
1414
1415         * configure.in: add support for specifying a style of init script
1416         to install
1417
1418 2003-03-31  Havoc Pennington  <hp@redhat.com>
1419
1420         Fix some annoying DBusString API and fix all affected code.
1421         
1422         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
1423         max_length argument
1424         (_dbus_string_get_data): change to return string instead of using 
1425         an out param
1426         (_dbus_string_get_const_data): ditto
1427         (_dbus_string_get_data_len): ditto
1428         (_dbus_string_get_const_data_len): ditto
1429
1430 2003-03-31  Havoc Pennington  <hp@redhat.com>
1431
1432         * bus/main.c (main): fix up the command line arguments to be nicer
1433
1434 2003-03-31  Havoc Pennington  <hp@redhat.com>
1435
1436         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
1437         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same 
1438         final location that lands in the config file
1439
1440         * bus/config-loader-expat.c (bus_config_load): fix type of
1441         XML_Parser variable
1442
1443         * doc/TODO: remove TODO item for dbus_bus_get()
1444
1445         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
1446
1447 2003-03-31  Havoc Pennington  <hp@pobox.com>
1448
1449         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
1450         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
1451         argument since they are always client side
1452
1453         * dbus/dbus-server.c (dbus_server_get_address): new function
1454
1455         * bus/main.c (main): take the configuration file as an argument.
1456
1457         * test/data/valid-config-files/debug-allow-all.conf: new file to 
1458         use with dispatch.c tests for example
1459
1460         * bus/test-main.c (main): require test data dir
1461
1462         * bus/bus.c (bus_context_new): change this to take a
1463         configuration file name as argument
1464
1465         * doc/config-file.txt (Elements): add <servicedir>
1466
1467         * bus/system.conf, bus/session.conf: new files
1468         
1469         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
1470         well-known socket if none set
1471
1472         * configure.in: create system.conf and session.conf
1473
1474 2003-03-30  Havoc Pennington  <hp@pobox.com>
1475
1476         * bus/config-parser.c: hacking
1477         
1478         * dbus/dbus-memory.c: don't use DBusList for the list of stuff 
1479         to shut down, since it could cause weirdness with the DBusList
1480         lock
1481
1482         * dbus/dbus-list.c (_dbus_list_test): add tests for the
1483         link-oriented stack routines
1484         (alloc_link): free the mempool if the first alloc from it fails
1485
1486         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
1487
1488         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
1489         from GLib
1490         (_dbus_string_skip_white): new
1491
1492         * doc/config-file.txt (Elements): add <includedir>
1493
1494 2003-03-28  Havoc Pennington  <hp@pobox.com>
1495
1496         * dbus/dbus-string.c (_dbus_string_copy_data_len)
1497         (_dbus_string_copy_data): new functions
1498
1499 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
1500
1501         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
1502         * dbus/dbus-bus.h:
1503         Add dbus_bus_get.
1504         
1505         * dbus/dbus-memory.c:
1506         Fix a doc comment.
1507         
1508 2003-03-28  Havoc Pennington  <hp@pobox.com>
1509
1510         * bus/test.c (bus_test_flush_bus): remove the sleep from here, 
1511         I think it may have just been superstition. Not sure.
1512
1513         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
1514         failures that were not being handled.
1515
1516         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
1517
1518         * dbus/dbus-memory.c: add ability to set number of mallocs in a
1519         row that will fail on out-of-memory.
1520
1521         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
1522         function for testing out-of-memory handling.
1523
1524         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
1525         allocation functions, they do map exactly to the expat ones.
1526
1527 2003-03-27  Havoc Pennington  <hp@redhat.com>
1528
1529         * bus/config-loader-libxml.c (bus_config_load): add another error
1530         check
1531
1532 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
1533
1534         * doc/TODO:
1535         Add note about automatic service activation.
1536         
1537         * doc/dbus-specification.sgml:
1538         Rename the specification and clarify a few things.
1539         
1540 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
1541
1542         * Doxyfile.in:
1543         * dbus/dbus-address.c:
1544         * dbus/dbus-dict.c:
1545         * dbus/dbus-marshal.c:
1546         * dbus/dbus-server-debug-pipe.c:
1547         * dbus/dbus-transport-unix.c:
1548         Fix documentation warnings.
1549         
1550 2003-03-26  Havoc Pennington  <hp@pobox.com>
1551
1552         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
1553         after every test so it's quick and easy to see which leaked, and
1554         so we test multiple dbus_shutdown() calls
1555
1556         * configure.in: change configure.in XML stuff to also support
1557         expat
1558
1559         * config-loader-libxml.c: some hacking
1560
1561         * config-loader-expat.c: some hacking
1562
1563         * config-parser.c: some hacking, plus tests
1564
1565 2003-03-25  Havoc Pennington  <hp@redhat.com>
1566
1567         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
1568         
1569         * configure.in: add --with-xml option to specify XML library,
1570         right now only libxml is supported.
1571
1572         * bus/config-loader-libxml.c, config-parser.c: sync some minor 
1573         nonworking code between home and work, still just stubs
1574
1575 2003-03-24  Havoc Pennington  <hp@redhat.com>
1576
1577         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
1578         file
1579
1580         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow 
1581         NULL argument for "message" if the error is a well-known one, 
1582         fill in a generic message in this case.
1583
1584         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
1585         favor of DBusError
1586
1587         * bus/test.c (bus_test_flush_bus): add
1588
1589         * bus/policy.c (bus_policy_test): test code stub
1590
1591 2003-03-24  Havoc Pennington  <hp@pobox.com>
1592
1593         * bus/connection.c (bus_connections_setup_connection): set up 
1594         the "can this user connect" function, but it always returns 
1595         TRUE until we have a config file parser so we can have a config
1596         file that allows connections.
1597
1598 2003-03-23  Havoc Pennington  <hp@pobox.com>
1599
1600         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with 
1601         DBUS_BUILD_TESTS, actually alloc/free a block of memory for 
1602         the mutex, so we can check for proper memory management 
1603         and OOM handling.
1604
1605         * dbus/dbus-dataslot.c: remove the mutex from
1606         DBusDataSlotAllocator and lock it manually when using it, 
1607         to simplify fitting it into the global slots framework.
1608
1609         * dbus/dbus-threads.c (init_static_locks): rework how we're
1610         handling global locks so they are easily shut down.
1611
1612         * bus/policy.c (bus_policy_append_rule): fix
1613
1614         * bus/test-main.c (main): check for memleaks
1615
1616         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make 
1617         test suite check for memleaks
1618
1619         * dbus/dbus-memory.c: add support in test mode for tracking 
1620         number of outstanding blocks
1621
1622 2003-03-23  Havoc Pennington  <hp@pobox.com>
1623
1624         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
1625         policies code
1626         
1627         * dbus/dbus-hash.h: add ULONG hash keys
1628
1629         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
1630         (_dbus_get_group_id): new function
1631
1632 2003-03-20  Havoc Pennington  <hp@redhat.com>
1633
1634         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
1635         new function
1636         (dbus_connection_get_unix_user): new function
1637
1638 2003-03-20  Havoc Pennington  <hp@pobox.com>
1639
1640         * bus/connection.c (bus_connection_send_oom_error): assert that
1641         message has a sender
1642         (connection_execute_transaction): ditto
1643         (bus_connection_preallocate_oom_error): fix to set the sender, and
1644         set recipient to the destination service, not the bus driver
1645
1646         * bus/policy.c: hacking
1647
1648         * dbus/dbus-message.c (dbus_message_service_is): new function
1649         (dbus_message_sender_is): new
1650
1651 2003-03-19  Havoc Pennington  <hp@redhat.com>
1652
1653         * bus/policy.c: start sketching code for policy restrictions on 
1654         what connections can do.
1655
1656 2003-03-18  Havoc Pennington  <hp@redhat.com>
1657
1658         * doc/TODO: some notes on high-level todo items. Little nitpick
1659         stuff is all in @todo, so no need to add it here.
1660
1661         * doc/config-file.txt: some notes on how config file might look
1662
1663 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
1664
1665         * configure.in: 0.6
1666
1667         * NEWS: Update.
1668         
1669 2003-03-17  Havoc Pennington  <hp@redhat.com>
1670
1671         * dbus/dbus-internals.h: add gcc attributes so that 
1672         our printf-style functions warn on bad arguments to 
1673         format
1674         
1675         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf 
1676         format bug
1677
1678         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1679         printf format bug
1680
1681 2003-03-17  Havoc Pennington  <hp@redhat.com>
1682
1683         * bus/test-main.c (main): make it print something as it runs 
1684         so make check doesn't look stuck
1685
1686         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove 
1687         from CVS, now obsolete
1688
1689 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
1690
1691         * bus/dispatch.c: (bus_dispatch):
1692         Refetch the service name since it may have been reallocated
1693         when dbus_message_set_sender was called.
1694         
1695         * dbus/dbus-sysdeps.c: (_dbus_accept):
1696         Add address and address length variables and use them to stop
1697         valgrind from complaining.
1698         
1699 2003-03-17  Havoc Pennington  <hp@pobox.com>
1700
1701         All tests pass, no memleaks, no valgrind complaints.
1702         
1703         * bus/test.c: refcount handler_slot
1704
1705         * bus/connection.c (bus_connections_new): refcount
1706         connection_data_slot
1707
1708         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
1709         bytes so that auth scripts pass.
1710
1711         * bus/dispatch.c: init message_handler_slot so it gets allocated
1712         properly
1713
1714         * bus/dispatch.c (message_handler_slot_ref): fix memleak
1715
1716         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
1717         dealloc server_pipe_hash when no longer used for benefit of
1718         leak checking
1719
1720         * dbus/dbus-auth.c (process_command): memleak fix
1721
1722         * bus/dispatch.c (check_hello_message): memleak fix
1723
1724 2003-03-16  Havoc Pennington  <hp@pobox.com>
1725
1726         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
1727
1728 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
1729
1730         * bus/activation.c (bus_activation_activate_service): Append
1731         the pending activation entry to the list of pending activations.
1732
1733 2003-03-16  Havoc Pennington  <hp@pobox.com>
1734
1735         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
1736         connections
1737
1738         * dbus/dbus-address.c (create_entry): fix OOM handling when
1739         failing to alloc entry->method
1740
1741 2003-03-16  Havoc Pennington  <hp@pobox.com>
1742
1743         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
1744         the watch
1745
1746         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
1747         add some missing dbus_set_result
1748
1749         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to 
1750         alloc the DBusMessageHandler
1751
1752         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
1753         the transport here, since we call this from the finalizer; it 
1754         resulted in a double-finalize.
1755
1756         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug 
1757         where we tried to use transport->connection that was NULL, 
1758         happened when transport was disconnected early on due to OOM
1759
1760         * bus/*.c: adapt to handle OOM for watches/timeouts
1761
1762         * dbus/dbus-transport-unix.c: port to handle OOM during 
1763         watch handling
1764         
1765         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
1766         reference to unused bytes instead of a copy
1767
1768         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
1769         out of memory
1770
1771         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
1772         FALSE on OOM
1773
1774         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
1775         of memory
1776
1777 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
1778
1779         * doc/dbus-specification.sgml:
1780         Document reply message for ActivateService.
1781         
1782 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
1783
1784         * bus/activation.c: (bus_pending_activation_entry_free),
1785         (bus_pending_activation_free), (bus_activation_new),
1786         (bus_activation_unref), (bus_activation_service_created),
1787         (bus_activation_activate_service):
1788         * bus/activation.h:
1789         * bus/bus.c: (bus_context_new):
1790         * bus/desktop-file.c: (new_section):
1791         * bus/driver.c: (bus_driver_send_service_deleted),
1792         (bus_driver_handle_activate_service):
1793         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
1794         * bus/services.h:
1795         * dbus/dbus-connection.c:
1796         (dbus_connection_send_with_reply_and_block):
1797         * dbus/dbus-message.c: (dbus_message_append_args_valist):
1798         * dbus/dbus-protocol.h:
1799         Make activation work better. Now pending activations will be queued
1800         and the daemon won't try to activate services that are already registered.
1801         
1802 2003-03-16  Havoc Pennington  <hp@pobox.com>
1803
1804         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
1805         connection data
1806
1807         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
1808         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
1809
1810 2003-03-16  Havoc Pennington  <hp@pobox.com>
1811
1812         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
1813         this. always run the test suite before commit...
1814
1815         * bus/*: adapt to DBusConnection API changes
1816
1817         * glib/dbus-gmain.c: adapt to DBusConnection API changes, 
1818         requires renaming stuff to avoid dbus_connection_dispatch name 
1819         conflict.
1820
1821         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
1822         function
1823
1824         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1825         separate from _dbus_message_loader_return_buffer()
1826
1827         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
1828         this, because it's now always broken to use; the number of
1829         messages in queue vs. the number still buffered by the message
1830         loader is undefined/meaningless. Should use
1831         dbus_connection_get_dispatch_state().
1832         (dbus_connection_dispatch): rename from
1833         dbus_connection_dispatch_message
1834
1835 2003-03-16  Havoc Pennington  <hp@pobox.com>
1836
1837         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
1838         implementation
1839
1840 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
1841
1842         * dbus/dbus-connection.c:
1843         (dbus_connection_send_with_reply_and_block):
1844         Decrease connection->n_incoming when removing an entry 
1845         from the list.
1846         * dbus/dbus-dict.c: (dbus_dict_entry_free),
1847         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
1848         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
1849         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
1850         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
1851         (dbus_dict_get_byte_array):
1852         Handle NULL arrays and strings. Also add support for byte arrays.
1853         
1854         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
1855         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
1856         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
1857         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
1858         (_dbus_demarshal_dict), (demarshal_and_validate_len),
1859         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
1860         * dbus/dbus-marshal.h:
1861         Add support for marshalling and demarshalling empty arrays and strings.
1862         
1863         * dbus/dbus-message.c: (dbus_message_append_args_valist),
1864         (dbus_message_append_string_array),
1865         (dbus_message_iter_get_boolean),
1866         (dbus_message_iter_get_boolean_array),
1867         (dbus_message_iter_get_int32_array),
1868         (dbus_message_iter_get_uint32_array),
1869         (dbus_message_iter_get_double_array),
1870         (dbus_message_iter_get_byte_array),
1871         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
1872         (check_message_handling):
1873         Add support for getting empty arrays and dicts.
1874         
1875         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
1876         Don't do any validation at all for now, that's better than just checking
1877         for ASCII.
1878         
1879         * test/data/valid-messages/emptiness.message:
1880         New test message with lots of empty arrays.
1881         
1882 2003-03-16  Havoc Pennington  <hp@pobox.com>
1883
1884         * dbus/dbus-connection.c
1885         (_dbus_connection_queue_received_message_link): new function that
1886         can't fail due to OOM
1887
1888         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
1889         new function pops a message together with a list link 
1890         containing it.
1891
1892         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
1893         message queuing functions to avoid needing to alloc memory
1894
1895 2003-03-16  Havoc Pennington  <hp@pobox.com>
1896
1897         Oops - test code was only testing failure of around 30 of the
1898         mallocs in the test path, but it turns out there are 500+
1899         mallocs. I believe this was due to misguided linking setup such
1900         that there was one copy of dbus_malloc etc. in the daemon and one
1901         in the shared lib, and only daemon mallocs were tested. In any
1902         case, the test case now tests all 500+ mallocs, and doesn't pass
1903         yet, though there are lots of fixes in this patch.
1904         
1905         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
1906         this so that it doesn't need to allocate memory, since it 
1907         has no way of indicating failure due to OOM (and would be 
1908         annoying if it did).
1909
1910         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
1911
1912         * bus/Makefile.am: rearrange to create two self-contained
1913         libraries, to avoid having libraries with overlapping symbols. 
1914         that was resulting in weirdness, e.g. I'm pretty sure there 
1915         were two copies of global static variables.
1916
1917         * dbus/dbus-internals.c: move the malloc debug stuff to 
1918         dbus-memory.c
1919
1920         * dbus/dbus-list.c (free_link): free list mempool if it becomes
1921         empty.
1922
1923         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
1924
1925         * dbus/dbus-address.c (dbus_parse_address): free list nodes
1926         on failure.
1927
1928         * bus/dispatch.c (bus_dispatch_add_connection): free
1929         message_handler_slot when no longer using it, so 
1930         memory leak checkers are happy for the test suite.
1931
1932         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
1933
1934         * bus/bus.c (new_connection_callback): disconnect in here if 
1935         bus_connections_setup_connection fails.
1936
1937         * bus/connection.c (bus_connections_unref): fix to free the 
1938         connections
1939         (bus_connections_setup_connection): if this fails, don't
1940         disconnect the connection, just be sure there are no side
1941         effects.
1942
1943         * dbus/dbus-string.c (undo_alignment): unbreak this
1944
1945         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
1946         leaking
1947         (_dbus_auth_new): fix the order in which we free strings 
1948         on OOM failure
1949
1950         * bus/connection.c (bus_connection_disconnected): fix to 
1951         not send ServiceDeleted multiple times in case of memory 
1952         allocation failure
1953
1954         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
1955         get the base service name
1956         (dbus_bus_register_client): don't return base service name,
1957         instead store it on the DBusConnection and have an accessor
1958         function for it.
1959         (dbus_bus_register_client): rename dbus_bus_register()
1960
1961         * bus/dispatch.c (check_hello_message): verify that other 
1962         connections on the bus also got the correct results, not 
1963         just the one sending hello
1964
1965 2003-03-15  Havoc Pennington  <hp@pobox.com>
1966
1967         Make it pass the Hello handling test including all OOM codepaths.
1968         Now to do other messages...
1969         
1970         * bus/services.c (bus_service_remove_owner): fix crash when
1971         removing owner from an empty list of owners
1972         (bus_registry_ensure): don't leave service in the list of 
1973         a connection's owned services if we fail to put the service
1974         in the hash table.
1975
1976         * bus/connection.c (bus_connection_preallocate_oom_error): set
1977         error flag on the OOM error.
1978
1979         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1980         handle _dbus_transport_set_connection failure
1981
1982         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
1983         to create watches up front and simply enable/disable them as
1984         needed.
1985         (unix_connection_set): this can now fail on OOM
1986
1987         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept 
1988         of enabling/disabling a watch or timeout.
1989
1990         * bus/loop.c (bus_loop_iterate): don't touch disabled
1991         watches/timeouts
1992
1993         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
1994
1995 2003-03-15  Havoc Pennington  <hp@pobox.com>
1996
1997         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
1998         write useful test code, after all that futzing around ;-)
1999
2000         Test does not yet pass because we can't handle OOM in
2001         _dbus_transport_messages_pending (basically,
2002         dbus_connection_preallocate_send() does not prealloc the write
2003         watch). To fix this, I think we need to add new stuff to
2004         set_watch_functions, namely a SetEnabled function so we can alloc
2005         the watch earlier, then enable it later.
2006         
2007         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
2008         dbus-memory.c to the convenience lib
2009
2010         * bus/test.c: rename some static functions to keep them clearly 
2011         distinct from stuff in connection.c. Handle client disconnection.
2012
2013 2003-03-14  Havoc Pennington  <hp@pobox.com>
2014
2015         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe 
2016         transport, tests more of the real codepath. Set up clients 
2017         with bus_setup_debug_client.
2018
2019         * bus/test.c (bus_setup_debug_client): function to set up debug 
2020         "clients" on the main loop
2021
2022         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe 
2023         support
2024
2025         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe 
2026         server type
2027
2028         * dbus/dbus-server-debug.c: support a debug server based on pipes
2029
2030         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
2031         (_dbus_close): new function
2032         
2033         * configure.in: check for socketpair
2034
2035 2003-03-14  Havoc Pennington  <hp@redhat.com>
2036
2037         * dbus/dbus-memory.c: add a "detect buffer overwrites on free" 
2038         cheesy hack
2039
2040         * dbus/dbus-transport-debug.c: rework this a good bit to be 
2041         less complicated. hopefully still works.
2042
2043         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
2044         manually
2045
2046         * glib/dbus-gmain.c (timeout_handler): don't remove timeout 
2047         after running it
2048
2049         * dbus/dbus-message.c (dbus_message_copy): rename from 
2050         dbus_message_new_from_message, fix it up to copy 
2051         all the message fields, add test case
2052
2053         * bus/dispatch.c (bus_dispatch_test): add some more test code, 
2054         not quite passing yet
2055
2056 2003-03-14  Havoc Pennington  <hp@pobox.com>
2057
2058         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
2059         until no work remains" in test code. (the large diff here 
2060         is just code movement, no actual changes)
2061
2062         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
2063         1, no point waiting around for test code.
2064         (_dbus_server_debug_accept_transport): unref the timeout 
2065         after adding it (right?)
2066
2067         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
2068         
2069 2003-03-13  Havoc Pennington  <hp@redhat.com>
2070
2071         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
2072         out of memory
2073
2074         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
2075         of memory
2076
2077         * dbus/dbus-connection.h: Make AddWatchFunction and
2078         AddTimeoutFunction return a bool so they can fail on out-of-memory
2079
2080         * bus/bus.c (bus_context_new): set up timeout handlers
2081
2082         * bus/connection.c (bus_connections_setup_connection): set up
2083         timeout handlers
2084
2085         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
2086         can fail
2087
2088         * bus/bus.c (bus_context_new): adapt to changes
2089
2090         * bus/connection.c: adapt to changes
2091
2092         * test/watch.c: adapt to DBusWatch changes
2093
2094         * bus/dispatch.c (bus_dispatch_test): started adding this but
2095         didn't finish
2096         
2097 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
2098
2099         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
2100
2101 2003-03-13  Havoc Pennington  <hp@pobox.com>
2102
2103         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c: 
2104         set up a test framework as for the library
2105
2106 2003-03-12  Havoc Pennington  <hp@pobox.com>
2107
2108         Throughout: purge global variables, introduce BusActivation, 
2109         BusConnections, BusRegistry, etc. objects instead.
2110         
2111         * bus/bus.h, bus/bus.c: introduce BusContext as a global 
2112         message bus object
2113
2114         * test/Makefile.am (TEST_BINARIES): disable bus-test for now, 
2115         going to redo this a bit differently I think
2116         
2117 2003-03-12  Havoc Pennington  <hp@redhat.com>
2118
2119         Mega-patch that gets the message bus daemon initially handling 
2120         out-of-memory. Work still needed. Also lots of random 
2121         moving stuff to DBusError instead of ResultCode.
2122         
2123         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
2124
2125         * dbus/dbus-connection.c
2126         (dbus_connection_send_with_reply_and_block): use DBusError
2127
2128         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
2129         DBusResultCode
2130
2131         * dbus/dbus-connection.c (dbus_connection_send): drop the result
2132         code here, as the only failure possible is OOM.
2133
2134         * bus/connection.c (bus_connection_disconnect):
2135         rename bus_connection_disconnected as it's a notification only
2136
2137         * bus/driver.c (bus_driver_handle_acquire_service): don't free
2138         "name" on get_args failure, should be done by get_args; 
2139         don't disconnect client for bad args, just return an error.
2140         (bus_driver_handle_service_exists): ditto
2141
2142         * bus/services.c (bus_services_list): NULL-terminate returned array
2143
2144         * bus/driver.c (bus_driver_send_service_lost)
2145         (bus_driver_send_service_acquired): send messages from driver to a
2146         specific client to the client's unique name, not to the broadcast
2147         service.
2148
2149         * dbus/dbus-message.c (decode_header_data): reject messages that
2150         contain no name field
2151         (_dbus_message_get_client_serial): rename to
2152         dbus_message_get_serial and make public
2153         (_dbus_message_set_serial): rename from set_client_serial
2154         (_dbus_message_set_reply_serial): make public
2155         (_dbus_message_get_reply_serial): make public
2156
2157         * bus/connection.c (bus_connection_foreach): allow stopping
2158         iteration by returning FALSE from foreach function.
2159
2160         * dbus/dbus-connection.c (dbus_connection_send_preallocated) 
2161         (dbus_connection_free_preallocated_send) 
2162         (dbus_connection_preallocate_send): new API for sending a message
2163         without possibility of malloc failure.
2164         (dbus_connection_send_message): rename to just
2165         dbus_connection_send (and same for whole function family)
2166
2167         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
2168
2169         * dbus/dbus-sysdeps.c (_dbus_exit): new function
2170
2171         * bus/activation.c: handle/return errors
2172
2173         * dbus/dbus-errors.h: add more DBUS_ERROR #define
2174
2175         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
2176         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
2177         (_dbus_result_from_errno): move to this file
2178
2179 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
2180
2181         * dbus/dbus-marshal.c: 
2182         (_dbus_marshal_set_string):
2183         Take a length argument so we can marshal the correct string
2184         length.
2185         
2186         (_dbus_marshal_dict), (_dbus_demarshal_dict),
2187         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
2188         (_dbus_marshal_test):
2189         * dbus/dbus-marshal.h:  
2190         Add support for marshalling and demarshalling dicts.
2191         
2192         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2193         Add support for TYPE DICT.
2194         
2195         * dbus/dbus-message.c: (set_string_field):
2196         Adjust header padding.
2197         
2198         (dbus_message_append_args_valist), (dbus_message_append_dict),
2199         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
2200         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
2201         (check_message_handling), (check_have_valid_message):
2202         * dbus/dbus-message.h:
2203         Add functions for setting and getting dicts.
2204
2205         * dbus/dbus-protocol.h:
2206         Add DBUS_TYPE_DICT.
2207         
2208         * dbus/dbus.h:
2209         Add dbus-dict.h
2210         
2211         * doc/dbus-specification.sgml:
2212         Add information about how dicts are marshalled.
2213         
2214         * test/data/invalid-messages/dict-with-nil-value.message:
2215         * test/data/invalid-messages/too-short-dict.message:
2216         * test/data/valid-messages/dict-simple.message:
2217         * test/data/valid-messages/dict.message:
2218         Add sample messages containing dicts.
2219
2220 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
2221
2222         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
2223
2224 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
2225
2226         * dbus/Makefile.am:
2227         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
2228         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
2229         (dbus_dict_set_int32), (dbus_dict_set_uint32),
2230         (dbus_dict_set_double), (dbus_dict_set_string),
2231         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
2232         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
2233         (dbus_dict_set_string_array), (_dbus_dict_test):
2234         * dbus/dbus-dict.h:
2235         Fix according to comments from Havoc.
2236         
2237 2003-03-06  Michael Meeks  <michael@server.home>
2238
2239         * configure.in: if we don't have kde-config, disable have_qt.
2240
2241 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
2242
2243         * dbus/Makefile.am:
2244         Add dbus-dict.[ch]
2245         
2246         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
2247         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
2248         (dbus_dict_remove), (dbus_dict_get_value_type),
2249         (dbus_dict_get_keys), (dbus_dict_put_boolean),
2250         (dbus_dict_put_int32), (dbus_dict_put_uint32),
2251         (dbus_dict_put_double), (dbus_dict_put_string),
2252         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
2253         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
2254         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
2255         (dbus_dict_get_int32), (dbus_dict_get_uint32),
2256         (dbus_dict_get_double), (dbus_dict_get_string),
2257         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
2258         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
2259         (dbus_dict_get_string_array), (_dbus_dict_test):
2260         * dbus/dbus-dict.h:
2261         Add DBusDict implementation
2262         
2263         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
2264         * dbus/dbus-test.h:
2265         Add _dbus_dict_test
2266         
2267 2003-03-04  Havoc Pennington  <hp@pobox.com>
2268
2269         * test/data/auth/*: adapt to changes
2270
2271         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
2272         USERID_BASE64 and change USERNAME_BASE64 to put in username not
2273         userid
2274
2275         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
2276         more stuff from being in a context name, to make the protocol 
2277         simpler to deal with
2278
2279         * dbus/dbus-errors.c (dbus_error_has_name): new function
2280         (dbus_error_is_set): new function
2281
2282         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth 
2283         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
2284         
2285         * dbus/dbus-connection.c (dbus_connection_flush): also read
2286         messages during a flush operation
2287
2288         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
2289
2290 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
2291
2292         * configure.in: Check for gethostbyname on Solaris.
2293
2294         * dbus/dbus-transport.c: (_dbus_transport_open):
2295         Remove duplicate "tcp" entry.
2296         
2297         * doc/dbus-specification.sgml:
2298         Clarify some things.
2299         
2300 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
2301
2302         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
2303         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
2304         (_dbus_keyring_test):
2305         * dbus/dbus-md5.c: (_dbus_md5_compute):
2306         * dbus/dbus-sha.c: (_dbus_sha_compute):
2307         Plug memory leaks.
2308
2309 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
2310
2311         * README: Add some things.
2312
2313 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
2314
2315         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
2316         after case DBUS_TYPE_BOOELAN.
2317
2318 2003-03-02  Havoc Pennington  <hp@pobox.com>
2319
2320         * test/break-loader.c (randomly_set_extreme_ints): add test that
2321         sets really huge and small integers
2322
2323         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
2324         that length of boolean array fits in the string, and that 
2325         string has room for boolean value in single-bool case.
2326
2327         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
2328         optional value to "ALIGN" command which is what to fill the
2329         alignment with.
2330
2331         * test/data/valid-messages/no-padding.message: add regression
2332         test for the message padding problem
2333
2334 2003-03-02  Havoc Pennington  <hp@pobox.com>
2335
2336         * dbus/dbus-message.c (decode_header_data): fix to always init
2337         message_padding, from Benjamin Dauvergne
2338
2339 2003-03-02  Havoc Pennington  <hp@pobox.com>
2340
2341         * configure.in: 0.5
2342
2343         * NEWS: Update.
2344
2345 2003-03-01  Joe Shaw  <joe@assbarn.com>
2346
2347         * configure.in: Check for "struct cmsgcred" and try to access its
2348         members for BSD-like unices.
2349
2350         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
2351         _dbus_read_credentials_unix_socket().
2352         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
2353         read() for reading the credential byte off the unix socket.  Use
2354         struct cmsgcred on systems that support it.
2355
2356 2003-02-27  Alexander Larsson  <alexl@redhat.com>
2357
2358         * glib/Makefile.am: 
2359         * configure.in:
2360         Make gthreads-2.0 dependency optional. Don't build thread test if
2361         its not found.
2362
2363 2003-02-27  Havoc Pennington  <hp@pobox.com>
2364
2365         * dbus/dbus-connection.c
2366         (dbus_connection_send_message_with_reply_and_block): fix doh!
2367         doh! doh! bug that resulted in never removing a reply from the
2368         queue, no wonder we called get_reply_serial so much ;-)
2369         
2370         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
2371         and client serial instead of demarshaling them every time
2372
2373 2003-02-27  Havoc Pennington  <hp@pobox.com>
2374
2375         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
2376         more inlined, using dbus-string-private.h, speeds things up 
2377         substantially
2378
2379         * dbus/dbus-string.c (_dbus_string_free): apply align offset
2380         when freeing the string
2381         (_dbus_string_steal_data): fix for align offset
2382         (undo_alignment): new function
2383
2384 2003-02-26  Havoc Pennington  <hp@redhat.com>
2385
2386         All kinds of audit fixes from Owen, plus initial attempt to 
2387         handle unaligned memory returned from malloc.
2388         
2389         * dbus/dbus-string.c (_dbus_string_init): clamp max length to 
2390         leave room for align_offset and nul byte
2391         (fixup_alignment): function to track an align_offset and 
2392         ensure real->str is aligned
2393         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated, 
2394         to allow a nul byte plus align offset
2395         (_dbus_string_lock): fix overflow issue
2396         (_dbus_string_init_const_len): add assertions on sanity of len, 
2397         assign allocated to be ALLOCATION_PADDING larger than len
2398         (set_length): fixup the overflow handling
2399         (_dbus_string_get_data_len): fix overflow in assertion
2400         (open_gap): detect overflow in size of gap to be opened
2401         (_dbus_string_lengthen): add overflow check
2402         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
2403         (_dbus_string_append): add overflow check
2404         (_dbus_string_append_unichar): overflow
2405         (_dbus_string_delete): fix overflow in assertion
2406         (_dbus_string_copy_len): overflow in assertion
2407         (_dbus_string_replace_len): overflows in assertions
2408         (_dbus_string_find): change to implement in terms of 
2409         _dbus_string_find_to
2410         (_dbus_string_find_to): assorted fixage
2411         (_dbus_string_equal_c_str): assert c_str != NULL, 
2412         fix logic so the function works
2413         (_dbus_string_ends_with_c_str): fix overflow thingy
2414         (_dbus_string_base64_encode): overflow fix
2415         (_dbus_string_validate_ascii): overflow
2416         (_dbus_string_validate_nul): overflow
2417         
2418 2003-02-26  Havoc Pennington  <hp@redhat.com>
2419
2420         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
2421
2422 2003-02-26  Alexander Larsson  <alexl@redhat.com>
2423
2424         * configure.in:
2425         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
2426         
2427         * dbus/dbus-connection.c:
2428         * dbus/dbus-connection.h:
2429         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
2430         Add dbus_connection_set_wakeup_main_function and use it when queueing
2431         incoming and outgoing messages.
2432         
2433         
2434         * dbus/dbus-dataslot.c:
2435         Threadsafe usage of DBusDataSlotAllocator
2436         
2437         * dbus/dbus-message.c: (dbus_message_get_args_iter):
2438         dbus_new can fail.
2439         
2440         * dbus/dbus-server-unix.c:
2441         Add todo comment
2442         
2443         * glib/dbus-gmain.c:
2444         Implement the new wakeup functions for glib.
2445         
2446         * glib/Makefile.am:
2447         * glib/test-thread-client.c: 
2448         * glib/test-thread-server.c: 
2449         * glib/test-thread.h:
2450         Initial cut at some thread test code. Not really done yet.
2451
2452 2003-02-26  Havoc Pennington  <hp@pobox.com>
2453
2454         * dbus/dbus-connection.c
2455         (dbus_connection_send_message_with_reply_and_block): fix crash
2456         where we ref'd the outgoing message instead of the returned reply
2457
2458         * dbus/dbus-transport-unix.c (do_authentication): check read watch
2459         at the end of this function, so if we didn't need to read for
2460         authentication, we reinstall it for receiving messages
2461
2462         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to 
2463         a NULL sender for peer-to-peer case
2464
2465         * dbus/dbus-transport-unix.c (check_read_watch): handle
2466         !authenticated case correctly
2467
2468         * glib/dbus-gmain.c: add support for DBusServer
2469
2470         * dbus/dbus-server.c: add data slot support
2471
2472         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
2473         return values and handle errors
2474
2475         * dbus/dbus-dataslot.c: factor out the data slot stuff from
2476         DBusConnection
2477
2478         * Doxyfile.in (INPUT): add glib subdir
2479
2480         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename 
2481         setup_with_g_main instead of hookup_with_g_main; write docs
2482         
2483 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
2484
2485         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
2486         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2487         * dbus/dbus-message.c: (dbus_message_append_boolean),
2488         (dbus_message_append_boolean_array),
2489         (dbus_message_get_args_valist), (_dbus_message_test):
2490         * dbus/dbus-message.h:
2491         * doc/dbus-specification.sgml:
2492         Various fixes as pointed out by Havoc.
2493         
2494         * test/data/invalid-messages/bad-boolean-array.message:
2495         * test/data/invalid-messages/bad-boolean.message:
2496         Add invalid boolean value test cases.
2497         
2498 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
2499
2500         * dbus/dbus-internals.c: (_dbus_type_to_string):
2501         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
2502         (_dbus_marshal_validate_arg):
2503         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
2504         * dbus/dbus-message.c: (dbus_message_append_args_valist),
2505         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
2506         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
2507         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
2508         (dbus_message_iter_get_double),
2509         (dbus_message_iter_get_boolean_array), (message_iter_test):
2510         * dbus/dbus-message.h:
2511         * dbus/dbus-protocol.h:
2512         * doc/dbus-specification.sgml:
2513         * test/data/valid-messages/lots-of-arguments.message:
2514         Add support for boolean and boolean array types.
2515         
2516 2003-02-23  Havoc Pennington  <hp@pobox.com>
2517
2518         * dbus/dbus-keyring.c: finish most of this implementation and 
2519         simple unit test
2520
2521         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
2522         these barf if the error isn't cleared to NULL
2523
2524         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
2525         (_dbus_create_directory): new function
2526
2527         * dbus/dbus-errors.c (dbus_set_error): fix warning
2528
2529         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
2530         (_dbus_string_hex_decode): new function
2531         (test_hex_roundtrip): test code
2532
2533         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
2534
2535         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
2536
2537         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use 
2538         the save-to-temp/rename trick to atomically write the new file
2539         (_dbus_string_parse_uint): new function
2540
2541 2003-02-22  Havoc Pennington  <hp@pobox.com>
2542
2543         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
2544
2545 2003-02-22  Havoc Pennington  <hp@pobox.com>
2546
2547         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
2548         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
2549
2550         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
2551
2552         * dbus/test/data/sha-1: add US government test suite for SHA-1
2553
2554 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
2555
2556         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
2557         Make string arrays NULL-terminated.
2558         
2559         * dbus/dbus-memory.c: (dbus_free_string_array):
2560         * dbus/dbus-memory.h:
2561         New function for freeing NULL-terminated string arrays.
2562         
2563         * dbus/dbus-message-builder.c: (append_quoted_string),
2564         (_dbus_message_data_load):
2565         Add support for array types.
2566         
2567         * dbus/dbus-message.c: (check_message_handling):
2568         Add more types as test cases.
2569         
2570         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
2571         (_dbus_string_parse_double):
2572         Add the start offset to the end offset.
2573         
2574         * test/data/valid-messages/lots-of-arguments.message:
2575         New test message with lots of arguments.
2576         
2577 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
2578
2579         * dbus/dbus-message.c: (dbus_message_append_nil),
2580         (dbus_message_append_int32), (dbus_message_append_uint32),
2581         (dbus_message_append_double), (dbus_message_append_string),
2582         (dbus_message_append_int32_array),
2583         (dbus_message_append_uint32_array),
2584         (dbus_message_append_double_array),
2585         (dbus_message_append_byte_array),
2586         (dbus_message_append_string_array):
2587         Fix all out-of-memory handling in these functions.
2588
2589 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
2590
2591         * dbus/dbus-message.c: (dbus_message_append_nil):
2592         Fix a silly.
2593         
2594 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
2595
2596         * dbus/dbus-message.c: (dbus_message_append_args_valist),
2597         (dbus_message_append_nil), (dbus_message_append_int32_array),
2598         (dbus_message_append_uint32_array),
2599         (dbus_message_append_double_array),
2600         (dbus_message_append_byte_array),
2601         (dbus_message_append_string_array), (dbus_message_get_args_valist),
2602         (dbus_message_iter_get_int32_array),
2603         (dbus_message_iter_get_uint32_array),
2604         (dbus_message_iter_get_double_array),
2605         (dbus_message_iter_get_byte_array),
2606         (dbus_message_iter_get_string_array):
2607
2608         * dbus/dbus-message.h:
2609         Add functions for appending and getting arrays.
2610         
2611 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
2612
2613         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
2614         element size at least 8 bytes, fixes mempool tests on
2615         64-bit machines.
2616
2617 2003-02-20  Alexander Larsson  <alexl@redhat.com>
2618
2619         * dbus/dbus-transport-unix.c (unix_do_iteration):
2620         Unlock the connection mutex during a blocking select call.
2621         Add todo about how we need a way to wake up the select.
2622
2623         * dbus/dbus-connection-internal.h: 
2624         * dbus/dbus-connection.c:
2625         Add _dbus_connection_lock and _dbus_connection_unlock.
2626
2627 2003-02-19  Havoc Pennington  <hp@pobox.com>
2628
2629         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
2630         Doxyfile.in, not Doxyfile
2631
2632         * dbus/dbus-keyring.c: do some hacking on this
2633
2634         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
2635
2636         * dbus/dbus-errors.c (dbus_set_error_const): do not call
2637         dbus_error_init
2638         (dbus_set_error): remove dbus_error_init, check for message ==
2639         NULL *before* we sprintf into it, and add @todo about including 
2640         system headers in this file
2641
2642         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
2643
2644         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
2645
2646         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
2647         get various bits of user information based on either username 
2648         or user ID
2649         (_dbus_homedir_from_username): new function
2650
2651 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
2652
2653         * configure.in:
2654         Add check for nonposix getpwnam_r
2655         
2656         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
2657         Align the pool element size to a sizeof (void *) boundary.
2658         
2659         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
2660         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
2661         General Solaris fixes.
2662         
2663         * test/data/valid-messages/simplest-manual.message:
2664         Explicitly state that we want little-endian packing.
2665         
2666 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
2667
2668         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2669
2670         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket): 
2671         Added to create a transport connecting using a tcp/ip socket.
2672
2673         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
2674         to a tcp socket at given host and port.
2675         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
2676         hostname and port.
2677
2678         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
2679
2680         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket): 
2681         Added to create a server listening on a TCP/IP socket.
2682
2683 2003-02-19  Havoc Pennington  <hp@pobox.com>
2684
2685         Throughout: mop up all the Doxygen warnings and undocumented
2686         stuff.
2687         
2688         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
2689         to search any paths.
2690
2691         * dbus/dbus-threads.c: move global mutex initializers to
2692         dbus-internals.h, multiple prototypes was confusing doxygen
2693         besides being kind of ugly
2694
2695         * Doxyfile (PREDEFINED): have Doxygen define
2696         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from 
2697         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
2698         (do not abuse the feature! it's for stuff like the autogenerated 
2699         macros in dbus-md5.c, not just for things you don't feel like 
2700         documenting...)
2701
2702 2003-02-18  Havoc Pennington  <hp@pobox.com>
2703
2704         * dbus/dbus-string.c (_dbus_string_zero): new function
2705
2706         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
2707         wrap it in some dbus-friendly API
2708
2709         * dbus/dbus-types.h: add 16-bit types
2710
2711 2003-02-18  Joe Shaw  <joe@assbarn.com>
2712
2713         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
2714         credentials from our currently running process.
2715         (get_word): Fix a buglet where we were copying the entire length
2716         instead of relative to our position.
2717
2718         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
2719         keys on the stack... it's 640k of data.
2720
2721         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
2722         read the credentials byte off the socket, even if we don't have
2723         SO_PEERCRED.
2724         (_dbus_poll): Implement poll() using select() for systems which
2725         don't have it.
2726
2727         * glib/test-dbus-glib.c (main): Print out an error if no
2728         parameters are given.
2729
2730         * test/data/auth/fallback.auth-script: Added.  Tests that a client
2731         can fallback to a secondary auth mechanism if the first fails.
2732
2733 2003-02-18  Havoc Pennington  <hp@pobox.com>
2734
2735         * AUTHORS: add Alex
2736
2737 2003-02-17  Havoc Pennington  <hp@pobox.com>
2738
2739         * doc/dbus-specification.sgml: lots of cosmetic
2740         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
2741         env variable to DBUS_BUS_ADDRESS, s/client/application/,
2742         s/server/bus/ (except in authentication section). Add a section
2743         "Message Bus Message Routing"
2744
2745 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
2746
2747         Release 0.4
2748         
2749         * NEWS: Update
2750
2751 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
2752
2753         * doc/dbus-specification.sgml:
2754         Specification updates.
2755         
2756 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
2757
2758         * bus/activation.c: (bus_activation_init), (child_setup),
2759         (bus_activation_activate_service):
2760         * bus/activation.h:
2761         * bus/main.c: (main):
2762         Set DBUS_ADDRESS environment variable.
2763         
2764         * dbus/dbus-errors.c: (dbus_set_error):
2765         Don't use va_copy since that's a C99 feature.
2766         
2767         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
2768         (_dbus_spawn_async):
2769         * dbus/dbus-sysdeps.h:
2770         Add child_setup_func to _dbus_spawn_async.
2771         
2772         * doc/dbus-specification.sgml:
2773         Update specification.
2774         
2775         * test/spawn-test.c: (setup_func), (main):
2776         Fix test.
2777         
2778 2003-02-17  Alexander Larsson  <alexl@redhat.com>
2779
2780         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
2781         Added todo.
2782
2783 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
2784
2785         * doc/.cvsignore:
2786         * doc/Makefile.am:
2787         * doc/dbus-test-plan.sgml:
2788         Add test plan document.
2789         
2790         * test/Makefile.am:
2791         Fix distcheck.
2792         
2793 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
2794
2795         * dbus/dbus-message.c: (decode_header_data),
2796         (_dbus_message_loader_return_buffer):
2797         Set the header padding amount when loading a message.
2798
2799 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
2800
2801         * bus/dispatch.c: (send_one_message):
2802         Only send broadcast messages to registered connections.
2803         
2804         * dbus/dbus-message.c: (dbus_message_name_is):
2805         * dbus/dbus-message.h:
2806         New convenience function.
2807         
2808         * dbus/dbus-transport-debug.c: (do_reading):
2809         Only dispatch one message per run.
2810
2811         * test/Makefile.am:
2812         * test/bus-test.c: (new_connection_callback), (die),
2813         (test_hello_client1_handler), (test_hello_client2_handler),
2814         (test_hello_replies), (main):
2815
2816         * test/bus-test-loop.[ch]:
2817         Add these.
2818         
2819 2003-02-16  Havoc Pennington  <hp@pobox.com>
2820
2821         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
2822         backward conditional
2823
2824 2003-02-16  Alexander Larsson  <alexl@redhat.com>
2825
2826         * dbus/dbus-connection.c:
2827         Implement sent_message_with_reply. (with_reply_and block is still
2828         busted).
2829         Made dispatch_message not lose message if OOM.
2830         
2831         * dbus/dbus-errors.h:
2832         Add NoReply error (for reply timeouts).
2833
2834 2003-02-16  Alexander Larsson  <alexl@redhat.com>
2835
2836         * dbus/dbus-hash.c (_dbus_hash_table_unref):
2837         Actually free keys and values when destroying hashtable.
2838
2839 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
2840
2841         * dbus/dbus-auth.c: (client_try_next_mechanism):
2842         Plug a leak.
2843         
2844         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
2845         Return TRUE if there's no thread implementation around.
2846         
2847         * glib/dbus-gmain.c: (free_source),
2848         (dbus_connection_hookup_with_g_main):
2849         Make sure to remove the GSource when the connection is finalized.
2850         
2851 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
2852
2853         * bus/dispatch.c: (bus_dispatch_message_handler):
2854         * dbus/dbus-errors.h:
2855         Return an error if someone tries to send a message to a service
2856         that doesn't exist.
2857         
2858 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
2859
2860         * bus/activation.c: (load_directory), (bus_activation_init),
2861         (bus_activation_activate_service):
2862         * bus/activation.h:
2863         * bus/driver.c: 
2864         (bus_driver_handle_activate_service), (bus_driver_handle_message):
2865         More work on the activation handling.
2866         
2867         * dbus/dbus-errors.h:
2868         Add some error messages
2869         
2870         * dbus/dbus-message.c: (dbus_message_new_error_reply):
2871         * dbus/dbus-message.h:
2872         New function that creates an error message.
2873         
2874         * dbus/dbus-protocol.h:
2875         Add ACTIVATE_SERVER message.
2876         
2877         * dbus/dbus-server-unix.c: (unix_handle_watch),
2878         (_dbus_server_new_for_domain_socket):
2879         Call _dbus_fd_set_close_on_exec.
2880         
2881         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
2882         (_dbus_spawn_async), (_dbus_disable_sigpipe),
2883         (_dbus_fd_set_close_on_exec):
2884         * dbus/dbus-sysdeps.h:
2885         Add _dbus_fd_set_close_on exec function. Also add function that checks
2886         that all open fds are set to close-on-exec and warns otherwise.
2887         
2888         * dbus/dbus-transport-unix.c:
2889         (_dbus_transport_new_for_domain_socket):
2890         Call _dbus_fd_set_close_on_exec.
2891
2892 2003-02-16  Havoc Pennington  <hp@pobox.com>
2893
2894         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
2895         allow people to avoid setting SIGPIPE to SIG_IGN
2896         (_dbus_connection_new_for_transport): disable SIGPIPE unless 
2897         we've been asked not to
2898
2899 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
2900
2901         * dbus/dbus-list.c: (_dbus_list_append_link),
2902         (_dbus_list_prepend_link):
2903         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
2904         (dbus_realloc):
2905         Warning fixes.
2906
2907 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
2908
2909         * bus/Makefile.am:
2910         * bus/activation.c: (bus_activation_entry_free),
2911         (add_desktop_file_entry), (load_directory), (bus_activation_init):
2912         * bus/activation.h:
2913         * bus/main.c: (main):
2914         Add simple activation support, doesn't work yet though.
2915
2916 2003-02-15   Zack Rusin  <zack@kde.org>
2917
2918         * qt/dbus-qthread.cpp:  small casting fix
2919
2920 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
2921
2922         * dbus/dbus-errors.c: (dbus_set_error):
2923         * dbus/dbus-errors.h:
2924         Add a few errors and make dbus_set_error void.
2925         
2926         * dbus/dbus-sysdeps.c: 
2927         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
2928         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
2929         * dbus/dbus-sysdeps.h:
2930         Add _dbus_spawn_async.
2931         
2932         * test/spawn-test.c: (main):
2933         Test for _dbus_spawn_async.
2934         
2935 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
2936
2937         * dbus/dbus-internals.h:
2938         Fix build without tests.
2939         
2940         * dbus/dbus-list.c: (alloc_link):
2941         Fix a segfault when a malloc fails.
2942         
2943         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
2944         (dbus_malloc0), (dbus_realloc):
2945         Add support for malloc debugging.
2946
2947 2003-02-15  Alexander Larsson  <alexl@redhat.com>
2948
2949         * dbus/dbus-threads.c:
2950         * dbus/dbus-threads.h:
2951         Add condvars. Remove static mutext from API.
2952         Implement static mutexes by initializing them from threads_init.
2953         
2954         * glib/dbus-gthread.c:
2955         * qt/dbus-qthread.cpp:
2956         Update with the thread api changes.
2957
2958                 
2959         * dbus/dbus-list.c:
2960         * dbus/dbus-list.h:
2961         Turn StaticMutex into normal mutex + init function.
2962         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
2963         _dbus_list_append_link, _dbus_list_prepend_link
2964
2965
2966         * dbus/dbus-sysdeps.c: 
2967         * dbus/dbus-sysdeps.h:
2968         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
2969         _dbus_atomic_dec. Only slow fallback implementation at the moment.
2970         
2971         * dbus/dbus-protocol.h:
2972         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
2973         
2974         * dbus/dbus-message.c:
2975         Make ref/unref atomic.
2976         Fix some docs.
2977         
2978         * dbus/dbus-connection-internal.h:
2979         * dbus/dbus-connection.c:
2980         * dbus/dbus-connection.h:
2981         Make threadsafe.
2982         Change _peek to _borrow,_return & _steal_borrowed.
2983         Change disconnect callback to event.
2984         Make dbus_connection_dispatch_messages reentrant.
2985         
2986         * dbus/dbus-transport.c:
2987         Don't ref the connection on calls to the transport
2988         implementation.
2989         
2990         * dbus/dbus-message-handler.c:
2991         Make threadsafe.
2992         
2993         * glib/dbus-gmain.c:
2994         Don't use peek_message anymore
2995         
2996         * test/Makefile.am:
2997         * test/debug-thread.c:
2998         * test/debug-thread.h:
2999         Simple thread implementation that asserts() on deadlocks in
3000         single-threaded code.
3001         
3002         * test/bus-test.c:
3003         (main) Call debug_threads_init.
3004
3005         * test/watch.c:
3006         Use disconnect message instead of disconnect callback.
3007
3008         * bus/connection.c:
3009         * bus/connection.h:
3010         Don't call dbus_connection_set_disconnect_function. Instead export
3011         bus_connection_disconnect.
3012         
3013         * bus/dispatch.c:
3014         Call bus_connection_disconnect when we get a disconnected message.
3015         
3016 2003-02-15  Havoc Pennington  <hp@pobox.com>
3017
3018         * dbus/dbus-message.c (dbus_message_new): fool around with the
3019         docs
3020
3021 2003-02-14  Havoc Pennington  <hp@pobox.com>
3022
3023         * dbus/dbus-mempool.c: fail if the debug functions so indicate
3024
3025         * dbus/dbus-memory.c: fail if the debug functions indicate we
3026         should
3027
3028         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
3029         (_dbus_decrement_fail_alloc_counter): debug functions to 
3030         simulate memory allocation failures
3031
3032 2003-02-14  Havoc Pennington  <hp@pobox.com>
3033
3034         * dbus/dbus-errors.h (struct DBusError): add a word of padding 
3035         to DBusError
3036
3037 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3038
3039         * bus/driver.c: (bus_driver_handle_hello):
3040         * bus/driver.h:
3041         * bus/services.c: (bus_service_lookup):
3042         Reorder message sending so we get a more sane order.
3043         
3044         * test/bus-test.c: (message_handler):
3045         Fix tyop.
3046         
3047 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3048
3049         * bus/driver.c: (bus_driver_send_service_deleted),
3050         (bus_driver_send_service_created), (bus_driver_send_service_lost),
3051         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
3052         (bus_driver_send_welcome_message),
3053         (bus_driver_handle_list_services),
3054         (bus_driver_handle_acquire_service),
3055         (bus_driver_handle_service_exists):
3056         * dbus/dbus-bus.c: (dbus_bus_register_client),
3057         (dbus_bus_acquire_service), (dbus_bus_service_exists):
3058         * dbus/dbus-errors.c: (dbus_result_to_string):
3059         * dbus/dbus-errors.h:
3060         * dbus/dbus-message.c: (dbus_message_append_args),
3061         (dbus_message_append_args_valist), (dbus_message_get_args),
3062         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
3063         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
3064         (dbus_message_iter_get_byte_array),
3065         (dbus_message_iter_get_string_array), (message_iter_test),
3066         (check_message_handling), (_dbus_message_test):
3067         * dbus/dbus-message.h:
3068         * test/bus-test.c: (main):
3069         Change fields to arguments in messages, so that they won't be
3070         confused with header fields.
3071         
3072         * glib/test-dbus-glib.c: (main):
3073         Remove append_fields from hello message.
3074         
3075 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3076
3077         * dbus/dbus-errors.c:
3078         * dbus/dbus-message.c:
3079         * dbus/dbus-string.c:
3080         Documentation fixes.
3081
3082 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3083
3084         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
3085         (remove_timeout):
3086         Implement support for timeouts in dbus-glib.
3087         
3088 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3089
3090         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3091         * dbus/dbus-message.c: (process_test_subdir):
3092         * test/break-loader.c: (find_breaks_based_on):
3093         Plug some memory leaks.
3094         
3095 2003-02-13  Richard Hult  <rhult@codefactory.se>
3096
3097         * bus/main.c: Fix build.
3098
3099         * dbus/dbus-errors.h: 
3100         * dbus/dbus-errors.c: Fix copyright for Anders.
3101
3102 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3103
3104         * bus/Makefile.am:
3105         Add utils.[ch]
3106         
3107         * bus/connection.c: (bus_connection_foreach):
3108         Fix a warning.
3109         
3110         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
3111         (unescape_string), (new_section), (parse_section_start),
3112         (parse_key_value), (report_error), (bus_desktop_file_load),
3113         (bus_desktop_file_get_string):
3114         * bus/desktop-file.h:
3115         Use DBusError for error reporting.
3116         
3117         * bus/dispatch.c: (send_one_message),
3118         (bus_dispatch_message_handler):
3119         * bus/driver.c: (bus_driver_send_service_deleted),
3120         (bus_driver_send_service_created), (bus_driver_send_service_lost),
3121         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
3122         (bus_driver_send_welcome_message),
3123         (bus_driver_handle_list_services),
3124         (bus_driver_handle_acquire_service),
3125         (bus_driver_handle_service_exists):
3126         * bus/loop.c: (bus_loop_run):
3127         * bus/main.c:
3128         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
3129         
3130         * bus/utils.c: (bus_wait_for_memory):
3131         * bus/utils.h:
3132         New files with general utility functions.
3133         
3134         * dbus/dbus-internals.h:
3135         Remove _DBUS_HANDLE_OOM.
3136         
3137 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3138
3139         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
3140         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
3141         * dbus/dbus-errors.h:
3142         Add DBusError structure.
3143         
3144 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3145
3146         * test/data/valid-messages/standard-acquire-service.message:
3147         * test/data/valid-messages/standard-hello.message:
3148         * test/data/valid-messages/standard-list-services.message:
3149         * test/data/valid-messages/standard-service-exists.message:
3150         Add some standard messages.
3151         
3152 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3153
3154         * bus/driver.c: (bus_driver_send_welcome_message),
3155         (bus_driver_handle_list_services),
3156         (bus_driver_handle_acquire_service),
3157         (bus_driver_handle_service_exists), (bus_driver_handle_message):
3158         Update for API changes in libdbus.
3159         
3160         * dbus/dbus-message.c: (dbus_message_new_reply):
3161         * dbus/dbus-message.h:
3162         Remove the name argument. The spec states that replies shouldn't
3163         have a name.
3164
3165 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
3166
3167         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
3168         (report_error), (bus_desktop_file_load), (lookup_section),
3169         (lookup_line), (bus_desktop_file_get_raw),
3170         (bus_desktop_file_get_string):
3171         * bus/desktop-file.h:
3172         Some fixes, and new functions for getting a key value from a section.
3173         
3174 2003-02-13  Havoc Pennington  <hp@pobox.com>
3175
3176         * test/data/auth/fail-after-n-attempts.auth-script: new test
3177
3178         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
3179         reject the client.
3180
3181 2003-02-13  Havoc Pennington  <hp@pobox.com>
3182
3183         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
3184         dbus_credentials_match were backward
3185
3186         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
3187         NO_CREDENTIALS and ROOT_CREDENTIALS
3188
3189         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine 
3190         into here. Never process more commands after we've reached an 
3191         end state; store further data as unused bytes.
3192
3193         * test/data/auth/*: add more auth tests
3194         
3195         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
3196         command to match exact string and EXPECT_UNUSED to match unused
3197         bytes
3198
3199         * test/Makefile.am (dist-hook): fix to dist all the test stuff
3200
3201 2003-02-12  Havoc Pennington  <hp@pobox.com>
3202
3203         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
3204         \r off of popped lines
3205
3206         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
3207         scripts
3208
3209         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
3210         SEND, append \r\n
3211
3212 2003-02-12  Havoc Pennington  <hp@pobox.com>
3213
3214         * dbus/Makefile.am: remove break-loader from the build, since it
3215         moved.
3216
3217         * configure.in: add --enable-gcov to turn on coverage profiling
3218         flags and disable optimization
3219
3220 2003-02-10  Havoc Pennington  <hp@pobox.com>
3221
3222         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync 
3223         initial cut at test framework for DBusAuth from laptop.
3224         Doesn't quite work yet but it compiles and I need to get 
3225         it off the 266mhz laptop. ;-)
3226         
3227         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
3228         fix a memleak in error case
3229
3230 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
3231
3232         * bus/Makefile.am:
3233         * bus/desktop-file.c:
3234         * bus/desktop-file.h:
3235         Add a desktop file parser.
3236
3237 2003-02-11  Zack Rusin  <zack@kde.org>
3238
3239         * qt/message.[h|cpp]: sample implementation
3240         of the KDE wrapper for DBusMessage
3241
3242 2003-02-09  Zack Rusin  <zack@kde.org>
3243
3244         * test/bus-test.c: make_it_compile
3245         * doc/dbus-specification.sgml: minimal semantic fix
3246
3247 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
3248
3249         Release 0.3
3250         
3251         * NEWS: Update
3252
3253 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
3254
3255         * dbus/Makefile.am:
3256         * dbus/dbus-break-loader.c:
3257         * test/Makefile.am:
3258         * test/break-loader.c:
3259         Move dbus-break-loader to test/ and rename it to break-loader.
3260
3261 2003-02-02  Havoc Pennington  <hp@pobox.com>
3262
3263         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files 
3264         for code to manage cookies in your home directory
3265
3266         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
3267
3268         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
3269         to authenticate, then disconnect the client.
3270
3271 2003-02-03  Alexander Larsson  <alexl@redhat.com>
3272
3273         * dbus/dbus-message.c (dbus_message_append_fields):
3274         Correct docs.
3275
3276 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
3277
3278         * doc/dbus-specification.sgml:
3279         Update address format section.
3280         
3281 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
3282
3283         * test/Makefile.am:
3284         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
3285         (message_handler), (new_connection_callback), (loop_quit),
3286         (loop_run), (main):
3287         Add bus test.
3288         
3289 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
3290
3291         * bus/driver.c: (bus_driver_handle_service_exists):
3292         Simplify the code a bit.
3293         
3294         * dbus/dbus-bus.c: (dbus_bus_service_exists):
3295         Fix a silly. 
3296         
3297 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
3298
3299         * bus/Makefile.am:
3300         Add libdbus-daemon.la and link to it.
3301
3302 2003-02-01  James Willcox  <jwillcox@gnome.org>
3303
3304         * bus/driver.c: (bus_driver_handle_own_service):
3305         Actually include the service reply code in the message.
3306
3307 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
3308
3309         * bus/driver.c: (bus_driver_handle_service_exists):
3310         Don't unref the incoming message.
3311         
3312 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
3313
3314         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
3315
3316 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
3317
3318         * dbus/dbus-server.c: (dbus_server_listen):
3319         * dbus/dbus-transport.c: (_dbus_transport_open):
3320         ifdef out the calls to the debug transport and server.
3321         
3322 2003-02-02  Alexander Larsson  <alexl@redhat.com>
3323
3324         * dbus/dbus-watch.c (dbus_watch_get_flags):
3325         Add note in the docs that ERROR or HANGUP won't be returned
3326         and are assumed always on.
3327
3328         * glib/dbus-gmain.c (add_watch):
3329         Always add IO_ERR | IO_HUP
3330
3331         * dbus/dbus-message.h:
3332         Add semicolon after dbus_message_iter_get_string_array().
3333         Makes qt code build again
3334
3335 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
3336
3337         * bus/driver.c: (create_unique_client_name),
3338         (bus_driver_handle_hello):
3339         Don't take a name, just use a numeric id to identify
3340         each client.
3341         
3342         * dbus/Makefile.am:
3343         * dbus/dbus-bus.c: (dbus_bus_register_client),
3344         (dbus_bus_acquire_service), (dbus_bus_service_exists):
3345         * dbus/dbus-bus.h:
3346         Add new convenience functions for communicating with the bus.
3347         
3348         * dbus/dbus-message.h:
3349         
3350         * dbus/dbus-protocol.h:
3351         Fix a typo.
3352         
3353 2003-02-01  Alexander Larsson  <alexl@redhat.com>
3354
3355         * dbus/dbus-message.c (dbus_message_append_fields):
3356         Add some more doc comments.
3357
3358 2003-02-01  Havoc Pennington  <hp@pobox.com>
3359
3360         * dbus/dbus-break-loader.c (randomly_modify_length): change 
3361         a 4-byte value in the message as if it were a length
3362
3363         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
3364         execute bit on saved files
3365
3366 2003-02-01  Havoc Pennington  <hp@pobox.com>
3367
3368         * dbus/dbus-break-loader.c (main): new program to find messages
3369         that break the loader.
3370
3371         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
3372         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
3373
3374         * dbus/dbus-string.c (_dbus_string_set_byte): new
3375         
3376 2003-01-31  Havoc Pennington  <hp@pobox.com>
3377
3378         * dbus/dbus-message.c: refactor the test code to be more general, 
3379         in preparation for writing a "randomly permute test cases to 
3380         try to break the loader" program.
3381
3382 2003-01-31  Havoc Pennington  <hp@pobox.com>
3383         
3384         * doc/dbus-specification.sgml: work on the specification
3385
3386         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check 
3387         the protocol version of the message.
3388
3389         * dbus/dbus-protocol.h: drop special _REPLY names, the spec 
3390         no longer specifies that.
3391         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not 
3392         1/2/3/4)
3393
3394         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
3395         "break" for DBUS_TYPE_NIL, remove @todo
3396
3397 2003-01-31  Havoc Pennington  <hp@pobox.com>
3398
3399         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename 
3400         just set_is_error/get_is_error as this is a commonly-used
3401         function, and write docs.
3402
3403 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
3404
3405         * dbus/dbus-address.c: (dbus_address_entry_free):
3406         Free key and value lists.
3407         
3408         * dbus/dbus-internals.c: (_dbus_type_to_string):
3409         Add the types we didn't have.
3410         
3411         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
3412         (_dbus_marshal_validate_arg):
3413         Add NIL types.
3414         
3415         * dbus/dbus-message.c: (dbus_message_set_sender):
3416         Remove todo about being able to set sender to NULL.
3417         
3418         (dbus_message_set_is_error_reply),
3419         (dbus_message_get_is_error_reply):
3420         * dbus/dbus-message.h:
3421         New functions.
3422         
3423         * dbus/dbus-protocol.h:
3424         Add error reply flag.
3425         
3426         * test/data/valid-messages/opposite-endian.message:
3427         Add NIL type to test.
3428         
3429 2003-01-31  Havoc Pennington  <hp@pobox.com>
3430
3431         * doc/dbus-specification.sgml: fully specify the header.  Add
3432         flags and major protocol version, and change header/body len to
3433         unsigned.
3434
3435         * dbus/dbus-message-builder.c (append_saved_length): append length
3436         as uint32
3437
3438         * dbus/dbus-message.c (dbus_message_create_header): change header
3439         length and body length to unsigned. Add the new fields from the
3440         spec
3441         (_dbus_message_loader_return_buffer): unsigned header/body len
3442
3443 2003-01-30  Havoc Pennington  <hp@pobox.com>
3444
3445         * dbus/dbus-auth.c: rework to use only REJECTED, no 
3446         MECHANISMS
3447
3448         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just 
3449         use REJECTED, suggested by Mark McLoughlin
3450
3451 2003-01-30  Havoc Pennington  <hp@pobox.com>
3452
3453         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
3454         a better way to report errors here. e.g.  "unix address lacks
3455         path" or something. also "no such file" when the path doesn't
3456         exist, etc.
3457
3458         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
3459         leaking list nodes
3460         (dbus_parse_address): add @todo about documenting address format, 
3461         and allowing , and ; to be escaped
3462
3463 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
3464
3465         * dbus/Makefile.am:
3466         Add dbus-address.[ch]
3467         
3468         * dbus/dbus-address.c: (dbus_address_entry_free),
3469         (dbus_address_entries_free), (create_entry),
3470         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
3471         (dbus_parse_address), (_dbus_address_test):
3472         * dbus/dbus-address.h:
3473         New files for dealing with address parsing.
3474         
3475         * dbus/dbus-connection.c:
3476         Document timeout functions.
3477         
3478         * dbus/dbus-message.c:
3479         Document dbus_message_new_from_message.
3480         
3481         * dbus/dbus-server-debug.c:
3482         Document.
3483         
3484         * dbus/dbus-server.c: (dbus_server_listen):
3485         Parse address and use correct server implementation.
3486         
3487         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
3488         * dbus/dbus-string.h:
3489         New function with test.
3490         
3491         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
3492         * dbus/dbus-test.h:
3493         Add address tests.
3494         
3495         * dbus/dbus-transport-debug.c:
3496         Document.
3497         
3498         * dbus/dbus-transport.c: (_dbus_transport_open):
3499         Parse address and use correct transport implementation. 
3500
3501 2003-01-30  Havoc Pennington  <hp@pobox.com>
3502
3503         * dbus/dbus-message.c: use message->byte_order instead of 
3504         DBUS_COMPILER_BYTE_ORDER throughout.
3505         (dbus_message_create_header): pad header to align the 
3506         start of the body of the message to 8-byte boundary
3507
3508         * dbus/dbus-marshal.h: make all the demarshalers take const 
3509         DBusString arguments.
3510
3511         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
3512         validate message args here, so we don't have to do slow validation
3513         later, and so we catch bad messages as they are incoming. Also add
3514         better checks on header_len and body_len. Also fill in
3515         message->byte_order
3516
3517         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
3518         implemented properly)
3519         (_dbus_string_validate_nul): new function to check all-nul
3520
3521         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename 
3522         get_arg_end_pos and remove all validation
3523         (_dbus_marshal_validate_arg): actually do validation here.
3524
3525 2003-01-29  Havoc Pennington  <hp@pobox.com>
3526
3527         * dbus/dbus-message.c (check_message_handling): fix assertion
3528         failure on set_client_serial
3529
3530 2003-01-28  Havoc Pennington  <hp@pobox.com>
3531
3532         * dbus/dbus-server-debug.c: Add doc section comments
3533         
3534         * dbus/dbus-transport-debug.c: add doc section comments
3535         
3536 2003-01-28  Havoc Pennington  <hp@redhat.com>
3537
3538         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
3539         the reverse order from how I had it
3540         (_dbus_string_base64_encode): reverse encoding order. I was
3541         basically byteswapping everything during encoding.
3542
3543 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
3544
3545         * dbus/dbus-connection-internal.h:
3546         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
3547         (_dbus_connection_remove_timeout):
3548         Add functions for adding and removing timeouts.
3549         
3550         * dbus/dbus-message.c: (dbus_message_new_from_message):
3551         Add new function that takes a message and creates an exact
3552         copy of it, but with the refcount set to 1.
3553         (check_message_handling):
3554         Fix build error.
3555         
3556         * dbus/dbus-server-protected.h:
3557         * dbus/dbus-server.c: (_dbus_server_init_base),
3558         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
3559         (dbus_server_set_timeout_functions):
3560         (_dbus_server_remove_timeout):
3561         New functions so that a server can add and remove timeouts.
3562
3563         (dbus_server_listen):
3564         Add commented out call to dbus_server_debug_new.
3565
3566         * dbus/dbus-timeout.c: (_dbus_timeout_new):
3567         Actually set the handler, doh.
3568         
3569         * dbus/dbus-transport.c: (_dbus_transport_open):
3570         Add commented out call to dbus_transport_debug_client_new.
3571         
3572         * dbus/Makefile.am:
3573         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
3574         
3575 2003-01-28  Havoc Pennington  <hp@pobox.com>
3576
3577         * dbus/dbus-message.c (check_message_handling): function to check 
3578         on the loaded message, iterates over it etc.
3579
3580 2003-01-28  Havoc Pennington  <hp@pobox.com>
3581
3582         * test/Makefile.am (dist-hook): fix make distdir
3583
3584         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
3585
3586 2003-01-27  Havoc Pennington  <hp@pobox.com>
3587
3588         * dbus/dbus-mempool.c (time_for_size): replace printf with 
3589         _dbus_verbose
3590
3591         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
3592         empty lines; fix the SAVE_LENGTH stuff to be
3593         START_LENGTH/END_LENGTH so it actually works; couple other 
3594         bugfixes
3595         
3596         * test/Makefile.am (dist-hook): add dist-hook for .message files
3597
3598         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
3599         can be constant or locked.
3600         (_dbus_string_free): allow freeing a const string as
3601         documented/intended
3602
3603         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
3604
3605         * dbus/dbus-test-main.c (main): take an argument which is the 
3606         directory containing test data
3607
3608         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
3609         argument to this and load all the messages in test/data/
3610         checking that they can be loaded or not loaded as appropriate.
3611
3612 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
3613
3614         * bus/dispatch.c: (bus_dispatch_message_handler):
3615         Dispatch messages sent to services.
3616         
3617         * bus/driver.c: (bus_driver_send_service_deleted),
3618         (bus_driver_send_service_created), (bus_driver_send_service_lost),
3619         (bus_driver_send_service_acquired):
3620         Add helper functions for sending service related messages.
3621
3622         (bus_driver_send_welcome_message):
3623         Send HELLO_REPLY instead of WELCOME.
3624         
3625         (bus_driver_handle_list_services):
3626         Send LIST_SERVICES_REPLY instead of SERVICES.
3627         
3628         (bus_driver_handle_own_service),
3629         (bus_driver_handle_service_exists):
3630         New message handlers.
3631         
3632         (bus_driver_handle_message):
3633         Invoke new message handlers.
3634         
3635         (bus_driver_remove_connection):
3636         Don't remove any services here since that's done automatically
3637         by bus_service_remove_owner now.
3638         
3639         * bus/driver.h:
3640         New function signatures.
3641         
3642         * bus/services.c: (bus_service_add_owner):
3643         Send ServiceAcquired message if we're the only primary owner.
3644         
3645         (bus_service_remove_owner):
3646         Send ServiceAcquired/ServiceLost messages.
3647         
3648         (bus_service_set_prohibit_replacement),
3649         (bus_service_get_prohibit_replacement):
3650         Functions for setting prohibit replacement.
3651         
3652         (bus_service_has_owner):
3653         New function that checks if a connection is in the owner queue of 
3654         a certain service.
3655         
3656         * bus/services.h:
3657         Add new function signatures.
3658         
3659         * dbus/dbus-list.c: (_dbus_list_test):
3660         Add tests for _dbus_list_remove_last and traversing the list backwards.
3661         
3662         * dbus/dbus-list.h:
3663         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
3664         go any further, so return NULL then.
3665         
3666         * dbus/dbus-protocol.h:
3667         Add new messages, service flags and service replies.
3668         
3669 2003-01-26  Havoc Pennington  <hp@pobox.com>
3670
3671         * dbus/dbus-message-builder.c: implement, completely untested.
3672
3673         * test/data/*: add data to be used in testing. 
3674         ".message" files are our simple loadable text format.
3675         ".message-raw" will be binary dumps of messages.
3676
3677         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
3678
3679 2003-01-26  Havoc Pennington  <hp@pobox.com>
3680
3681         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
3682
3683         * dbus/dbus-errors.c (dbus_result_to_string): add
3684         file errors
3685
3686         * dbus/dbus-message-builder.c: new file, will contain code to load
3687         up messages from files. Not implemented yet.
3688
3689 2003-01-26  Havoc Pennington  <hp@pobox.com>
3690
3691         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
3692         the sender by setting to NULL
3693
3694 2003-01-26  Havoc Pennington  <hp@pobox.com>
3695
3696         The unit tests pass, but otherwise untested.  If it breaks, the
3697         tests should have been better. ;-)
3698         
3699         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
3700         the connection.
3701
3702         * dbus/dbus-message.c: redo everything so we maintain 
3703         message->header as the only copy of the various fields.
3704         This avoids the possibility of out-of-memory in some cases,
3705         for example dbus_message_lock() can't run out of memory anymore,
3706         and avoids extra copying. Figured I may as well go ahead and do 
3707         this since it was busted for dbus_message_lock to not return 
3708         failure on OOM, and dbus_message_write_header was totally
3709         unchecked for OOM. Also fixed some random other bugs.
3710
3711         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
3712         that strings are nul-terminated. Also, end_pos can be equal 
3713         to string length just not greater than, I think.
3714         (_dbus_marshal_set_int32): new function
3715         (_dbus_marshal_set_uint32): new function
3716         (_dbus_marshal_set_string): new function
3717
3718         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
3719         a warning, init timeout_list to NULL
3720         (dbus_connection_send_message): don't use uninitialized variable
3721         "serial"
3722
3723         * dbus/dbus-string.c (_dbus_string_replace_len): new function
3724
3725 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
3726
3727         * bus/driver.c: (bus_driver_handle_hello),
3728         (bus_driver_send_welcome_message):
3729         Plug leaks
3730         
3731 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
3732
3733         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
3734         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
3735         (dbus_connection_unref):
3736         * dbus/dbus-marshal.c: (_dbus_marshal_test):
3737         * dbus/dbus-message.c: (dbus_message_unref),
3738         Plug memory leaks.
3739         
3740         (dbus_message_get_fields): 
3741         Remove debugging printout.
3742
3743         (_dbus_message_loader_return_buffer):
3744         Don't store the header string.
3745         
3746         (_dbus_message_test):
3747         Plug leaks.
3748
3749 2003-01-26  Richard Hult  <rhult@codefactory.se>
3750
3751         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
3752         the file descriptor list, since it can change under us.
3753
3754 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
3755
3756         * glib/dbus-gmain.c: (dbus_connection_prepare),
3757         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
3758         (remove_watch), (dbus_connection_hookup_with_g_main):
3759         Rewrite the glib handling to use its own GSource instead of a 
3760         GIOChannel so we can catch messages put in the queue while waiting
3761         for a reply.
3762         
3763 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
3764
3765         * bus/Makefile.am:
3766         * bus/connection.c: (connection_disconnect_handler),
3767         (connection_watch_callback), (bus_connection_setup):
3768         * bus/dispatch.c: (send_one_message),
3769         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
3770         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
3771         * bus/dispatch.h:
3772         * bus/driver.c: (bus_driver_send_service_deleted),
3773         (bus_driver_send_service_created), (bus_driver_handle_hello),
3774         (bus_driver_send_welcome_message),
3775         (bus_driver_handle_list_services), (bus_driver_remove_connection),
3776         (bus_driver_handle_message):
3777         * bus/driver.h:
3778         Refactor code, put the message dispatching in its own file. Use 
3779         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
3780         is disconnected.
3781         
3782 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
3783
3784         * dbus/dbus-internals.h:
3785         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
3786         
3787         * dbus/dbus-message.c: (dbus_message_get_sender):
3788         * dbus/dbus-message.h:
3789         Implement dbus_message_get_sender.
3790         
3791         * dbus/dbus-protocol.h:
3792         Add message and service defines.
3793         
3794 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
3795
3796         * dbus/dbus-connection.c: (dbus_connection_send_message):
3797         * dbus/dbus-message-internal.h:
3798         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
3799         (dbus_message_write_header):
3800         Remove _dbus_messag_unlock and don't set the client serial on a 
3801         message if one already exists.
3802         
3803 2003-01-24  Havoc Pennington  <hp@pobox.com>
3804
3805         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
3806         list_pool
3807
3808         * bus/driver.c (bus_driver_handle_list_services): fix a leak 
3809         on OOM
3810
3811 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
3812
3813         * dbus/dbus-list.c: (alloc_link), (free_link):
3814         Use a memory pool for the links.
3815         
3816 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
3817
3818         * bus/connection.c: (bus_connection_foreach):
3819         * bus/connection.h:
3820         Add new bus_connection_foreach function.
3821         
3822         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
3823         Add function that broadcasts a message to all clients.
3824         
3825         (bus_driver_send_service_created), (bus_driver_handle_hello),
3826         (bus_driver_send_welcome_message),
3827         (bus_driver_handle_list_services), (bus_driver_message_handler):
3828         Implement functions that take care of listing services, and notifying
3829         clients when new services are created.
3830         
3831         * bus/services.c: (bus_services_list):
3832         * bus/services.h:
3833         Add new function that returns an array of strings with the currently
3834         registered services.
3835         
3836         * glib/dbus-glib.h:
3837         * glib/dbus-gmain.c:
3838         Update copyright year.
3839         
3840 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
3841
3842         * dbus/dbus-connection.c: (dbus_connection_send_message):
3843         Unlock the message in case it was sent earlier.
3844         
3845         (dbus_connection_send_message_with_reply_and_block):
3846         Remove the reply message from the list.
3847         
3848         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
3849         Set array_len and new_pos correctly.
3850         
3851         (_dbus_marshal_test):
3852         Remove debug output.
3853         
3854         * dbus/dbus-message-internal.h:
3855         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
3856         New function that returns the reply serial.
3857         
3858         (_dbus_message_unlock):
3859         New function that unlocks a message and resets its header.
3860
3861         (dbus_message_append_string_array), 
3862         (dbus_message_get_fields_valist),
3863         (dbus_message_iter_get_field_type),
3864         (dbus_message_iter_get_string_array),   
3865         (dbus_message_get_fields),      
3866         (dbus_message_append_fields_valist):
3867         Handle string arrays.
3868         
3869         (dbus_message_set_sender):
3870         Make this function public since the bus daemon needs it.
3871         
3872         (decode_header_data):
3873         Set the reply serial to -1 initially.
3874
3875         * dbus/dbus-message.h:
3876         Add dbus_message_set_sender.    
3877
3878 2003-01-24  Havoc Pennington  <hp@pobox.com>
3879
3880         * doc/dbus-specification.sgml: add some stuff
3881
3882 2003-01-22  Havoc Pennington  <hp@pobox.com>
3883
3884         * doc/dbus-specification.sgml: Start to document the protocol.
3885
3886 2003-01-22  Havoc Pennington  <hp@pobox.com>
3887
3888         * dbus/dbus-connection.c
3889         (dbus_connection_send_message_with_reply_and_block): add some @todo
3890
3891         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
3892
3893 2003-01-21  Havoc Pennington  <hp@pobox.com>
3894
3895         (patch untested because can't compile)
3896         
3897         * bus/driver.c (create_unique_client_name): make this function
3898         never recycle client names. Also, caller should initialize 
3899         the DBusString.
3900
3901         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
3902
3903 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
3904
3905         * dbus/dbus-marshal.c: (_dbus_marshal_double),
3906         (_dbus_marshal_int32), (_dbus_marshal_uint32),
3907         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
3908         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
3909         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3910         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3911         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
3912         * dbus/dbus-marshal.h:
3913         * dbus/dbus-protocol.h:
3914         Add support for marshalling and demarshalling integer, double
3915         and string arrays.
3916         
3917 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
3918
3919         * bus/Makefile.am:
3920         Add driver.[ch]
3921         
3922         * bus/connection.c: (connection_disconnect_handler):
3923         Remove the connection from the bus driver's list.
3924         
3925         (connection_watch_callback): Dispatch messages.
3926
3927         (free_connection_data): Free connection name.
3928         
3929         (bus_connection_setup): Add connection to the bus driver's list.
3930         (bus_connection_remove_owned_service): 
3931         (bus_connection_set_name), (bus_connection_get_name):
3932         Add functions for setting and getting the connection's name.
3933         
3934         * bus/connection.h:
3935         Add function headers.
3936         
3937         * bus/driver.c: (create_unique_client_name),
3938         (bus_driver_handle_hello_message),
3939         (bus_driver_send_welcome_message), (bus_driver_message_handler),
3940         (bus_driver_add_connection), (bus_driver_remove_connection):
3941         * bus/driver.h:
3942         * bus/main.c:
3943         * bus/services.c: (bus_service_free):
3944         * bus/services.h:
3945         New file that handles communication and registreation with the bus
3946         itself. 
3947         
3948 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
3949
3950         * dbus/dbus-connection.c: (dbus_connection_send_message):
3951         Add a new client_serial parameter.
3952         
3953         (dbus_connection_send_message_with_reply):
3954         Remove a @todo since we've implemented the blocking function.
3955         
3956         (dbus_connection_send_message_with_reply_and_block):
3957         New function that sends a message and waits for a reply and
3958         then returns the reply.
3959         
3960         * dbus/dbus-connection.h:
3961         Add new functions.
3962         
3963         * dbus/dbus-errors.c: (dbus_result_to_string):
3964         * dbus/dbus-errors.h:
3965         Add new DBUS_RESULT.
3966         
3967         * dbus/dbus-message-internal.h:
3968         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
3969         (_dbus_message_set_sender), (dbus_message_write_header),
3970         (dbus_message_new_reply), (decode_header_data),
3971         (_dbus_message_loader_return_buffer), (_dbus_message_test):
3972         * dbus/dbus-message.h:
3973         Add new functions that set the reply serial and sender.
3974         Also marshal and demarshal them correctly and add test.
3975         
3976         * dbus/dbus-protocol.h:
3977         Add new DBUS_MESSAGE_TYPE_SENDER.
3978         
3979         * glib/dbus-glib.h:
3980         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
3981         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
3982         (dbus_connection_hookup_with_g_main):
3983         * glib/test-dbus-glib.c: (main):
3984         Rewrite to use GIOChannel and remove the GSource crack.
3985         
3986         * test/echo-client.c: (main):
3987         * test/watch.c: (check_messages):
3988         Update for changed APIs
3989         
3990 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
3991
3992         * dbus/Makefile.am: Add dbus-timeout.[cħ]
3993         
3994         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
3995         Create a DBusTimeoutList.       
3996         (dbus_connection_set_timeout_functions): Add new function to
3997         set timeout callbacks
3998         
3999         * dbus/dbus-connection.h: Add public DBusTimeout API.
4000         
4001         * dbus/dbus-message.c: (dbus_message_get_service):
4002         * dbus/dbus-message.h:  New function.
4003
4004         * dbus/dbus-server.c: Fix small doc typo.
4005         
4006         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
4007
4008 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
4009
4010         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
4011         of the string, just as long as specified.
4012
4013 2003-01-19  Havoc Pennington  <hp@pobox.com>
4014
4015         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
4016         new function
4017
4018         * dbus/dbus-server.c (dbus_server_set_max_connections)
4019         (dbus_server_get_max_connections, dbus_server_get_n_connections):
4020         keep track of current number of connections, and add API for
4021         setting a max (but haven't implemented enforcing the max yet)
4022
4023 2003-01-18  Havoc Pennington  <hp@pobox.com>
4024
4025         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
4026         reading/writing if read_watch != NULL or write_watch != NULL.
4027
4028         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
4029         the message loader code to actually load message->header and
4030         message->body into the newly-created message.
4031
4032         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
4033         in OOM case
4034
4035         * dbus/dbus-connection.c (dbus_connection_set_max_message_size) 
4036         (dbus_connection_get_max_message_size) 
4037         (dbus_connection_set_max_live_messages_size) 
4038         (dbus_connection_get_max_live_messages_size): implement some
4039         resource limitation functions
4040
4041         * dbus/dbus-resources.c: new file implementing some of the
4042         resource limits stuff
4043
4044         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
4045         missing docs, add @todo to handle OOM etc.
4046
4047         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
4048         docs
4049         
4050 2003-01-18  Havoc Pennington  <hp@pobox.com>
4051
4052         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the 
4053         connection if it hasn't been already.
4054
4055         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
4056         replace with DisconnectFunction.
4057
4058 2003-01-18  Havoc Pennington  <hp@pobox.com>
4059
4060         Building --disable-verbose-mode --disable-asserts --disable-tests
4061         cuts the library from 112K to 45K or so
4062         
4063         * configure.in: check for varargs macro support, 
4064         add --enable-verbose-mode, --enable-asserts. 
4065
4066         * dbus/dbus-internals.h (_dbus_assert): support
4067         DBUS_DISABLE_ASSERT
4068         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
4069
4070 2003-01-18  Havoc Pennington  <hp@pobox.com>
4071
4072         * dbus/dbus-test.c: include config.h so that tests actually run
4073
4074         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
4075         so the failure mode when that assumption fails will be plenty
4076         obvious.
4077
4078 2003-01-18  Havoc Pennington  <hp@pobox.com>
4079
4080         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
4081
4082         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
4083         the distribution
4084
4085         * test/Makefile.am: don't use special variable "TESTS" for echo-*
4086         since we don't want to use those in make check
4087
4088 2003-01-15  Havoc Pennington  <hp@redhat.com>
4089
4090         Release 0.2
4091         
4092         * NEWS: update
4093
4094 2003-01-15  Havoc Pennington  <hp@redhat.com>
4095
4096         * test/Makefile.am: fix so that test source code ends up in the
4097         distribution on make distcheck
4098
4099 2003-01-15  Havoc Pennington  <hp@redhat.com>
4100
4101         Release 0.1.
4102         
4103         * NEWS: update  
4104
4105 2003-01-15  Havoc Pennington  <hp@redhat.com>
4106
4107         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
4108         fix build when --disable-tests
4109
4110         * Makefile.am (EXTRA_DIST): put HACKING in here
4111
4112         * HACKING: document procedure for making a tarball release.
4113
4114 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
4115
4116         * bus/connection.c: (connection_error_handler),
4117         (bus_connection_setup):
4118         * bus/main.c: (main):
4119         Make sure that the DBusConnectionData struct is NULLed
4120         out to prevent a segfault.
4121         
4122         * dbus/dbus-errors.c: (dbus_result_to_string):
4123         * dbus/dbus-errors.h:
4124         * dbus/dbus-message.c: (dbus_message_get_fields),
4125         (dbus_message_get_fields_valist), (_dbus_message_test):
4126         * dbus/dbus-message.h:
4127         Make dbus_message_get_fields return a result code so we can
4128         track invalid fields as well as oom.
4129         
4130 2003-01-11  Havoc Pennington  <hp@pobox.com>
4131
4132         * configure.in: change --enable-test/--enable-ansi action-if-given
4133         to enable_foo=$enableval instead of enable_foo=yes
4134
4135 2003-01-08  Havoc Pennington  <hp@pobox.com>
4136
4137         * dbus/dbus-string.c (_dbus_string_align_length): new function
4138
4139         * dbus/dbus-test-main.c: move main() for test app here
4140         * dbus/dbus-test.c
4141         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
4142         symbol to run tests, because dbus-test isn't in the main 
4143         library
4144
4145         Code review nitpicks.
4146         
4147         * dbus/dbus-message.c (dbus_message_write_header): add newlines
4148         for people with narrow emacs ;-). Assert client_serial was filled
4149         in. Assert message->name != NULL.
4150         (dbus_message_append_fields): have "first_field_type" arg separate
4151         from va list, needed for C++ binding that also uses varargs IIRC
4152         and helps with type safety
4153         (dbus_message_new): add @todo about using DBusString to store
4154         service/name internally
4155         (dbus_message_new): don't leak ->service and ->name on OOM later
4156         in the function
4157         (dbus_message_unref): free the service name
4158         (dbus_message_get_fields): same change to varargs
4159         i.e. first_field_type
4160         (_dbus_message_loader_return_buffer): assert that the message data
4161         is aligned (if not it's a bug in our code). Put in verbose griping
4162         about why we set corrupted = TRUE.
4163         (decode_header_data): add FIXME that char* is evil.  Was going to
4164         add FIXME about evil locale-specific string.h strncmp, but just
4165         switched to wacky string-as-uint32 optimization. Move check for
4166         "no room for field name" above get_const_data_len() to avoid
4167         assertion failure in get_const_data_len if we have trailing 2
4168         bytes or the like. Check for service and name fields being
4169         provided twice. Don't leak service/name on error. Require field
4170         names to be aligned to 4 bytes.
4171
4172         * dbus/dbus-marshal.c: move byte swap stuff to header
4173         (_dbus_pack_int32): uscore-prefix
4174         (_dbus_unpack_int32): uscore-prefix
4175         (_dbus_unpack_uint32): export
4176         (_dbus_demarshal_string): add @todo complaining about use of
4177         memcpy()
4178         (_dbus_marshal_get_field_end_pos): add @todo about bad error
4179         handling allowing corrupt data to go unchecked
4180
4181 2003-01-08  Havoc Pennington  <hp@redhat.com>
4182
4183         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write 
4184         to the select() as needed for authentication. (should be using
4185         _dbus_poll() not select, but for another day)
4186
4187         * dbus/dbus.h: include dbus/dbus-protocol.h
4188
4189 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
4190
4191         * dbus/Makefile.am (dbusinclude_HEADERS): Install
4192         dbus-connection.h
4193
4194 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
4195
4196         * dbus/dbus-internals.c: (_dbus_type_to_string):
4197         New function that returns a string describing a type.
4198         
4199         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
4200         * dbus/dbus-marshal.h:
4201         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
4202         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
4203         (dbus_message_iter_get_byte_array):
4204         * dbus/dbus-message.h:
4205         Add new convenience functions for appending and getting message fields.
4206         Also add demarshalling routines for byte arrays.
4207
4208 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
4209
4210         * dbus/dbus-connection-internal.h:
4211         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
4212         (_dbus_connection_get_next_client_serial),
4213         (dbus_connection_send_message):
4214         * dbus/dbus-internals.h:
4215         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
4216         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
4217         (_dbus_marshal_uint32), (_dbus_demarshal_double),
4218         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
4219         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
4220         (_dbus_verbose_bytes), (_dbus_marshal_test):
4221         * dbus/dbus-marshal.h:
4222         * dbus/dbus-message-internal.h:
4223         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
4224         (dbus_message_write_header), (_dbus_message_lock),
4225         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
4226         (dbus_message_get_name), (dbus_message_append_int32),
4227         (dbus_message_append_uint32), (dbus_message_append_double),
4228         (dbus_message_append_string), (dbus_message_append_byte_array),
4229         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
4230         (dbus_message_iter_unref), (dbus_message_iter_has_next),
4231         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
4232         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
4233         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
4234         (decode_header_data), (_dbus_message_loader_return_buffer),
4235         (message_iter_test), (_dbus_message_test):
4236         * dbus/dbus-message.h:
4237         * dbus/dbus-protocol.h:
4238         * dbus/dbus-test.c: (main):
4239         * dbus/dbus-test.h:
4240         * glib/test-dbus-glib.c: (message_handler), (main):
4241         * test/echo-client.c: (main):
4242         * test/watch.c: (check_messages):
4243         Make messages sendable and receivable for real.
4244         
4245 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
4246
4247         * dbus/dbus-marshal.c: (_dbus_marshal_double),
4248         (_dbus_marshal_string), (_dbus_marshal_byte_array):
4249         * dbus/dbus-message.c: (dbus_message_append_int32),
4250         (dbus_message_append_uint32), (dbus_message_append_double),
4251         (dbus_message_append_string), (dbus_message_append_byte_array):
4252         Handle OOM restoration.
4253         
4254 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
4255
4256         * dbus/dbus-marshal.c: (_dbus_marshal_string),
4257         (_dbus_demarshal_string), (_dbus_marshal_test):
4258         * dbus/dbus-marshal.h:
4259         * dbus/dbus-message.c: (dbus_message_get_name),
4260         Document these functions.
4261         
4262         (dbus_message_append_int32), (dbus_message_append_uint32),
4263         (dbus_message_append_double), (dbus_message_append_string),
4264         (dbus_message_append_byte_array):
4265         * dbus/dbus-message.h:
4266         Add functions for adding message fields of different types.
4267         
4268         * dbus/dbus-protocol.h:
4269         Add the different types.
4270
4271 2003-01-05  Havoc Pennington  <hp@pobox.com>
4272
4273         * bus/connection.c: implement routines for handling connections,
4274         first thing is keeping a list of owned services on each connection
4275         and setting up watches etc.
4276
4277         * bus/services.c: implement a mapping from service names to lists
4278         of connections
4279
4280         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
4281
4282         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
4283         to use static mutexes for global data
4284
4285         * dbus/dbus-connection.c (dbus_connection_set_data): add new
4286         collection of functions to set/get application-specific data
4287         on the DBusConnection.
4288
4289 2003-01-04  Havoc Pennington  <hp@pobox.com>
4290
4291         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
4292         (_dbus_poll): new function
4293
4294         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
4295         copied from GLib
4296
4297         * bus/loop.c: initial code for the daemon main loop
4298
4299 2003-01-04  Havoc Pennington  <hp@pobox.com>
4300
4301         * test/watch.c (error_handler): make it safe if the error handler 
4302         is called multiple times (if we s/error handler/disconnect
4303         handler/ we should just guarantee it's called only once)
4304
4305         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
4306         error handler on disconnect (it's quite possible we should
4307         just change the error handler to a "disconnect handler," I'm 
4308         not sure we have any other meaningful errors)
4309
4310         * configure.in: check for getpwnam_r
4311
4312         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
4313         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
4314         mechanism as in SASL spec, using socket credentials
4315
4316         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
4317         (_dbus_send_credentials_unix_socket): new function
4318
4319         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
4320         dbus_accept()
4321         (_dbus_write): only check errno if <0 returned
4322         (_dbus_write_two): ditto
4323
4324 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
4325
4326         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
4327         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
4328         (_dbus_marshal_test):
4329         * dbus/dbus-marshal.h:
4330         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
4331         to _dbus_marshal_utf8_string. Also fix some tests.
4332         
4333 2002-12-28  Harri Porten  <porten@kde.org>
4334
4335         * configure.in: added check for C++ compiler and a very cheesy
4336         check for the Qt integration
4337
4338         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
4339
4340         * qt/Makefile.am: added 
4341
4342         * qt/.cvsignore: added  
4343
4344         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
4345         latter, added #ifdef QT_THREAD_SUPPORT guard.
4346
4347         * dbus/Makefile.am: added missing headers for make dist
4348
4349 2002-12-28  Kristian Rietveld  <kris@gtk.org>
4350
4351         * dbus/Makefile.am: fixup export-symbols-regex.
4352
4353 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
4354
4355         * acinclude.m4: Add this file and put the 
4356         PKG_CHECK_MODULE macro in it.
4357
4358 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
4359
4360         * dbus/dbus-marshal.c: (_dbus_marshal_string),
4361         (_dbus_demarshal_double), (_dbus_demarshal_int32),
4362         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4363         (_dbus_marshal_test):
4364         Make the demarshalling routines align the pos argument.
4365         Add string marshalling tests and fix the obvious bugs 
4366         discovered.
4367         
4368 2002-12-26  Havoc Pennington  <hp@pobox.com>
4369
4370         * dbus/dbus-auth.c: fixes fixes fixes
4371
4372         * dbus/dbus-transport-unix.c: wire up support for
4373         encoding/decoding data on the wire
4374
4375         * dbus/dbus-auth.c (_dbus_auth_encode_data) 
4376         (_dbus_auth_decode_data): append to target string 
4377         instead of nuking it.
4378
4379 2002-12-26  Havoc Pennington  <hp@pobox.com>
4380
4381         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
4382         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
4383         doh
4384
4385         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
4386         avoid swap_bytes() overhead (ignoring possible assembly stuff for 
4387         now). Main point is because I wanted unpack_uint32 to implement
4388         _dbus_verbose_bytes
4389         (_dbus_verbose_bytes): new function
4390
4391         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
4392
4393         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
4394         mechanism to handle a corrupt message stream
4395         (_dbus_message_loader_new): fix preallocation to only prealloc, 
4396         not prelengthen
4397         
4398         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
4399         (_dbus_string_test): enhance tests for copy/move and fix the
4400         functions
4401
4402         * dbus/dbus-transport-unix.c: Hold references in more places to 
4403         avoid reentrancy problems
4404
4405         * dbus/dbus-transport.c: ditto
4406
4407         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
4408         leak reference count in no-message case
4409
4410         * test/watch.c (do_mainloop): handle adding/removing watches
4411         during iteration over the watches. Also, ref the connection/server
4412         stored on a watch, so we don't try to mangle a destroyed one.
4413
4414         * dbus/dbus-transport-unix.c (do_authentication): perform
4415         authentication
4416
4417         * dbus/dbus-auth.c (get_state): add a state
4418         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
4419         (_dbus_auth_get_unused_bytes): append the unused bytes
4420         to the passed in string, rather than prepend
4421
4422         * dbus/dbus-transport.c (_dbus_transport_init_base): create 
4423         the auth conversation DBusAuth
4424
4425         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
4426         (_dbus_transport_new_for_domain_socket): when creating a
4427         transport, pass in whether it's a client-side or server-side
4428         transport so we know which DBusAuth to create
4429
4430 2002-12-03  Havoc Pennington  <hp@pobox.com>
4431
4432         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
4433         _after_ finalizing the derived members
4434         (unix_connection_set): unref watch if we fail to add it
4435
4436         * dbus/dbus-connection.c (dbus_connection_unref): delete the
4437         transport first, so that the connection owned by the 
4438         transport will be valid as the transport finalizes.
4439
4440         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
4441         if necessary, and remove watches from the connection.
4442         
4443         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
4444         
4445 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
4446
4447         * dbus/dbus-marshal.c: (_dbus_marshal_string),
4448         (_dbus_demarshal_double), (_dbus_demarshal_int32),
4449         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
4450         (_dbus_marshal_test):
4451         * dbus/dbus-marshal.h:
4452         Add string marshal functions and have the demarshal functions
4453         return the new position.
4454         
4455 2002-12-25  Havoc Pennington  <hp@pobox.com>
4456
4457         * doc/dbus-sasl-profile.txt: docs on the authentication protocol, 
4458         it is a simple protocol that just maps directly to SASL.
4459
4460         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
4461         initial implementation, not actually used yet.
4462         
4463         * dbus/dbus-string.c (_dbus_string_find): new function
4464         (_dbus_string_equal): new function
4465         (_dbus_string_base64_encode): new function
4466         (_dbus_string_base64_decode): new function
4467
4468 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
4469
4470         * dbus/Makefile.am:
4471         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
4472         (_dbus_marshal_int32), (_dbus_marshal_uint32),
4473         (_dbus_demarshal_double), (_dbus_demarshal_int32),
4474         (_dbus_demarshal_uint32), (_dbus_marshal_test):
4475         * dbus/dbus-marshal.h:
4476         * dbus/dbus-protocol.h:
4477         * dbus/dbus-test.c: (main):
4478         * dbus/dbus-test.h:
4479         Add un-optimized marshalling/demarshalling routines.
4480         
4481 2002-12-25  Harri Porten  <porten@kde.org>
4482
4483         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
4484
4485 2002-12-24  Zack Rusin  <zack@kde.org>
4486
4487         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
4488         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
4489         main loop stuff
4490
4491 2002-12-24  Havoc Pennington  <hp@pobox.com>
4492
4493         * glib/dbus-gthread.c: fix include
4494
4495         * glib/dbus-glib.h: rename DBusMessageHandler for now. 
4496         I think glib API needs to change, though, as you don't 
4497         want to use DBusMessageFunction, you want to use the 
4498         DBusMessageHandler object. Probably 
4499         dbus_connection_open_with_g_main_loop()
4500         and dbus_connection_setup_g_main_loop() or something like that
4501         (but think of better names...) that just create a connection 
4502         that has watch/timeout functions etc. already set up.
4503
4504         * dbus/dbus-connection.c
4505         (dbus_connection_send_message_with_reply): new function just to 
4506         show how the message handler helps us deal with replies.
4507
4508         * dbus/dbus-list.c (_dbus_list_remove_last): new function
4509
4510         * dbus/dbus-string.c (_dbus_string_test): free a string that
4511         wasn't
4512
4513         * dbus/dbus-hash.c: use memory pools for the hash entries
4514         (rebuild_table): be more paranoid about overflow, and 
4515         shrink table when we can
4516         (_dbus_hash_test): reduce number of sprintfs and write
4517         valid C89. Add tests for case where we grow and then 
4518         shrink the hash table.
4519
4520         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
4521
4522         * dbus/dbus-connection.c (dbus_connection_register_handler) 
4523         (dbus_connection_unregister_handler): new functions
4524
4525         * dbus/dbus-message.c (dbus_message_get_name): new
4526
4527         * dbus/dbus-list.c: fix docs typo
4528
4529         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
4530         an object representing a handler for messages.
4531
4532 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
4533
4534         * glib/dbus-glib.h:
4535         * glib/dbus-gthread.c: (dbus_gthread_init):
4536         Don't use the gdbus prefix for public functions.
4537         
4538 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
4539
4540         * Makefile.am:
4541         * configure.in:
4542         Add GLib checks and fixup .pc files
4543         
4544         * glib/Makefile.am:
4545         * glib/dbus-glib.h:
4546         * glib/dbus-gmain.c: (gdbus_connection_prepare),
4547         (gdbus_connection_check), (gdbus_connection_dispatch),
4548         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
4549         (dbus_connection_gsource_new):
4550         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
4551         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
4552         * glib/test-dbus-glib.c: (message_handler), (main):
4553         Add GLib support.
4554         
4555 2002-12-15  Harri Porten  <porten@kde.org>
4556
4557         * autogen.sh: check for libtoolize before attempting to use it 
4558         
4559         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
4560         struct.
4561         
4562         * .cvsignore: ignore more stamp files
4563
4564         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
4565
4566         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
4567         without make install.
4568
4569 2002-12-15  Havoc Pennington  <hp@pobox.com>
4570
4571         * dbus/dbus-threads.c: add thread stubs that a higher library
4572         layer can fill in. e.g. the GLib wrapper might fill them in with
4573         GThread stuff. We still need to use this thread API to
4574         thread-safe-ize the library.
4575
4576 2002-12-12  Havoc Pennington  <hp@pobox.com>
4577
4578         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
4579         below new interfaces and include fewer system headers.
4580
4581         * dbus/dbus-sysdeps.c (_dbus_read): new function
4582         (_dbus_write): new function
4583         (_dbus_write_two): new function
4584         (_dbus_connect_unix_socket): new function
4585         (_dbus_listen_unix_socket): new function
4586
4587         * dbus/dbus-message-internal.h: change interfaces to use
4588         DBusString
4589
4590 2002-12-11  Havoc Pennington  <hp@pobox.com>
4591
4592         * dbus/dbus-types.h: add dbus_unichar
4593
4594         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
4595
4596         * dbus/dbus-connection.c (dbus_connection_send_message): return
4597         TRUE on success
4598
4599         * dbus/dbus-transport.c: include dbus-watch.h   
4600
4601         * dbus/dbus-connection.c: include dbus-message-internal.h
4602
4603         * HACKING: add file with coding guidelines stuff.
4604
4605         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
4606         handling here, for security purposes (as in vsftpd). Not actually
4607         using this class yet.
4608
4609         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
4610         system/libc usage here, as in vsftpd, for ease of auditing (and
4611         should also simplify portability). Haven't actually moved all the
4612         system/libc usage into here yet.
4613         
4614 2002-11-25  Havoc Pennington  <hp@pobox.com>
4615
4616         * dbus/dbus-internals.c (_dbus_verbose): fix to not 
4617         always print the first verbose message.
4618
4619 2002-11-24  Havoc Pennington  <hp@pobox.com>
4620
4621         * test/echo-client.c, test/echo-server.c: cheesy test 
4622         clients.
4623         
4624         * configure.in (AC_CHECK_FUNCS): check for writev
4625
4626         * dbus/dbus-message.c (_dbus_message_get_network_data): new
4627         function
4628
4629         * dbus/dbus-list.c (_dbus_list_foreach): new function
4630
4631         * dbus/dbus-internals.c (_dbus_verbose): new function
4632
4633         * dbus/dbus-server.c, dbus/dbus-server.h: public object
4634         representing a server that listens for connections.
4635
4636         * dbus/.cvsignore: create
4637
4638         * dbus/dbus-errors.h, dbus/dbus-errors.c:
4639         public API for reporting errors
4640
4641         * dbus/dbus-connection.h, dbus/dbus-connection.c:
4642         public object representing a connection that 
4643         sends/receives messages. (Same object used for 
4644         both client and server.)
4645
4646         * dbus/dbus-transport.h, dbus/dbus-transport.c:
4647         Basic abstraction for different kinds of stream
4648         that we might read/write messages from.
4649
4650 2002-11-23  Havoc Pennington  <hp@pobox.com>
4651
4652         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN 
4653         _DBUS_INT_MAX
4654
4655         * dbus/dbus-test.c (main): add list test, and include 
4656         dbus-test.h as intended
4657
4658         * dbus/dbus-hash.c (_dbus_hash_table_remove_string) 
4659         (_dbus_hash_table_remove_int): return value indicates 
4660         whether the entry existed to remove
4661
4662         * dbus/dbus-list.c: add linked list utility class, 
4663         with docs and tests
4664
4665         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket 
4666         array sometimes.
4667
4668 2002-11-23  Havoc Pennington  <hp@pobox.com>
4669
4670         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
4671         DBUS_END_DECLS to nothing, that should fix this once and for all
4672
4673         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
4674
4675         * dbus/dbus-message.c, dbus/dbus-hash.c: 
4676         add some missing @brief
4677
4678 2002-11-23  Havoc Pennington  <hp@pobox.com>
4679
4680         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS 
4681         to avoid confusing Doxygen
4682
4683         * dbus/dbus-hash.c: @} not }@
4684
4685         * dbus/dbus-message.c (struct DBusMessage): split out 
4686         internals docs
4687
4688 2002-11-23  Havoc Pennington  <hp@pobox.com>
4689
4690         * configure.in: pile on more warning flags if using gcc
4691
4692         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have 
4693         to document static functions
4694
4695         * configure.in: add summary to end of configure so it 
4696         looks nice and attractive
4697
4698         * dbus/dbus-hash.c: finish implementation and write unit 
4699         tests and docs
4700
4701         * configure.in: add --enable-tests to enable unit tests
4702
4703         * dbus/dbus-test.c: test program to run unit tests 
4704         for all files in dbus/*, initially runs a test for 
4705         dbus-hash.c
4706         
4707         * dbus/dbus-internals.h: file to hold some internal utility stuff
4708
4709 2002-11-22  Havoc Pennington  <hp@redhat.com>
4710
4711         * dbus/dbus-hash.c: copy in Tcl hash table, not yet 
4712         "ported" away from Tcl
4713
4714         * dbus/dbus-types.h: header for types such as dbus_bool_t
4715
4716 2002-11-22  Havoc Pennington  <hp@redhat.com>
4717
4718         * dbus/dbus.h: fixups for doc warnings
4719
4720         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up 
4721         macros
4722         (QUIET): make it quiet so we can see warnings
4723
4724         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
4725
4726 2002-11-22  Havoc Pennington  <hp@redhat.com>
4727
4728         * Makefile.am: include "Doxyfile" target in all-local
4729
4730         * configure.in: generate the Doxyfile
4731
4732         * Doxyfile.in: move Doxyfile here, so we can use 
4733         configure to generate a Doxyfile with the right 
4734         version number etc.
4735
4736 2002-11-22  Havoc Pennington  <hp@redhat.com>
4737
4738         * dbus/dbus-message.c: move inline docs into .c file
4739
4740         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
4741         so all docs are under doc/
4742         (MAN_EXTENSION): generate man pages. Use extension 
4743         ".3dbus" which matches ".3qt" on my system, 
4744         I guess this is OK, I don't know really.
4745         (FILE_PATTERNS): look for .c files not .h, makes sense
4746         for plain C I think
4747
4748 2002-11-22  Havoc Pennington  <hp@pobox.com>
4749
4750         * Makefile.am (SUBDIRS): rename subdir "server" to "bus" 
4751         because any app can be a server, and any app can be a client, 
4752         the bus is a special kind of server.
4753
4754 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
4755
4756         * Doxyfile : adding. Still needs Makefile rules to be generated
4757         automatically (just run "doxygen" in the toplevel dir for now to
4758         generate docs)
4759         
4760         * dbus/dbus-message.h : Adding sample docs (javadoc since
4761         resembles gtk-doc a little more)
4762
4763         * dbus/dbus.h : Adding sample docs
4764
4765 2002-11-21  Havoc Pennington  <hp@redhat.com>
4766
4767         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION 
4768         so we can allow ourselves to include files directly, 
4769         instead of having to use dbus.h
4770
4771         * dbus/dbus.h: fill in
4772
4773         * dbus/dbus-message.h: sketch out a sample header file.
4774         Include griping if you include it directly instead of 
4775         via dbus.h
4776
4777         * dbus/dbus-macros.h: new file with macros for extern "C", 
4778         TRUE/FALSE, NULL, etc.
4779
4780         * doc/file-boilerplate.c: put include guards in here
4781
4782 2002-11-21  Havoc Pennington  <hp@redhat.com>
4783
4784         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
4785
4786         * COPYING: include the GPL as well, and license code 
4787         under both AFL and GPL.
4788
4789 2002-11-21  Havoc Pennington  <hp@redhat.com>
4790
4791         * acconfig.h: get rid of this
4792
4793         * autogen.sh (run_configure): add --no-configure option
4794
4795         * configure.in: remove AC_ARG_PROGRAM to make
4796         autoconf complain less. add AC_PREREQ. 
4797         add AC_DEFINE third arg.
4798         
4799 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
4800
4801         * doc/Makefile.am:
4802         Fix references so we can distcheck.
4803
4804 2002-11-21  Havoc Pennington  <hp@redhat.com>
4805
4806         * Initial module creation
4807