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