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