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