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