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