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